Forum Stats

  • 3,770,503 Users
  • 2,253,127 Discussions
  • 7,875,489 Comments

Discussions

UCM Criteria Workflow with different approvers

User_Q91MT
User_Q91MT Member Posts: 20 Red Ribbon
edited Aug 12, 2020 9:40AM in WebCenter Content

I need to create a workflow on a profile with 2 different aliases:

Requirement is:

1st scenario

Setp1: If author is anyone from Alias1, document goes to Alias1

Step2: On step1 Approval, doc. goes to Approver 1

Step3: On step2 Approval, doc. goes to Approver 2

2nd scenario on the same profile is:

Step1: If author is anyone from Alias2, document goes to Alias2

Step2: On step1 Approval, doc. goes directly to Approver 2

My questions are:

1) On one Checkin profile e.g. "NewProfileForTesters", how can i match criteria definition for 2 different aliases i.e. if users from Alias1 or Alias2

I'm also fine to create 2 diff. workflows for 2 diff. aliases but it has to be on same profile. Please help with code and conf. change required.

Answers

  • rajeev.y.ranjan-Oracle
    rajeev.y.ranjan-Oracle Member Posts: 717
    edited Aug 9, 2020 5:41AM

    Would request to log SR with UCM team,we need to test the scenario

  • Srinath Menon-Oracle
    Srinath Menon-Oracle Posts: 6,291 Employee
    edited Aug 9, 2020 9:56PM
    1) On one Checkin profile e.g. "NewProfileForTesters", how can i match criteria definition for 2 different aliases i.e. if users from Alias1 or Alias22) On rejection from any approver, i would like to send the document to the author and not to the previous approver.

    You will need to get the dUser in the entry / update step and then use wfAddUser function to set it as reviewer based on the your requirement / business logic.

    https://docs.oracle.com/cd/E14571_01/doc.1111/e10726.pdf

    An easier mechanism in my suggestion would be to use a custom metadata (hidden / read-only) which will derive it's value from the list of authors / reviewers that should be added and use this metadata field in the token / alias in the WF. What this does is keep the WF transparent and much less complex.

  • User_Q91MT
    User_Q91MT Member Posts: 20 Red Ribbon
    edited Aug 10, 2020 3:49AM

    @rajeev.y.ranjan-Oracle raised SR but response is we are on out of grace period for support(Version:11.1.1.9.0).

    Can you help share the resolution. It should be same for 11g/12c.

  • User_Q91MT
    User_Q91MT Member Posts: 20 Red Ribbon
    edited Aug 11, 2020 12:35PM
    An easier mechanism in my suggestion would be to use a custom metadata (hidden / read-only) which will derive it's value from the list of authors / reviewers that should be added and use this metadata field in the token / alias in the WF. What this does is keep the WF transparent and much less complex.

    @Srinath Menon-Oracle I followed below but still content goes to Workflow1 only:

    1. Create a hidden custom field 'XYZ' with Option list values Test1 & Test2

    2. In the rule for this profile -> Go to field -> 'Is Derived Field' ->

    <$if #active.dDocAuthor like "ABCTest1|ABCTest3|ABCTest5"$>

    <$dprDerivedValue="Test1"$>

    <$elseif #active.dDocAuthor like "ABCTest2|ABCTest4|ABCTest6"$>

    <$dprDerivedValue="Test2"$>

    <$endif$>

    3. Create 2 new users with username "Test1" & "Test2" and them respectively to Alias1 & Alias2.

    4. Add these aliases 1& 2 respectively in Step1 of its respective workflows 1 & 2

    Checked in a new content from ABCTest2 user & it goes to workflow1 rather than workflow2.

    Also, i like to know if i may have to add/remove users going forward,  i will have to make changes in the rule?

  • Srinath Menon-Oracle
    Srinath Menon-Oracle Posts: 6,291 Employee
    edited Aug 11, 2020 9:44PM
    Checked in a new content from ABCTest2 user & it goes to workflow1 rather than workflow2.

    Add <$("#all","#console")$> in the workflow sections and your rule logic to trace what data is being picked up during run time.

  • User_Q91MT
    User_Q91MT Member Posts: 20 Red Ribbon
    edited Aug 12, 2020 4:24AM
    Srinath Menon-Oracle wrote:Add <$("#all","#console")$> in the workflow sections and your rule logic to trace what data is being picked up during run time.

    @Srinath Menon-Oracle

    attached traces and rule screenshots. Looking forward to hear from you.

  • Srinath Menon-Oracle
    Srinath Menon-Oracle Posts: 6,291 Employee
    edited Aug 12, 2020 5:55AM

    It won't be possible to review the entire functionality here and suggest solutions. Please review the logs and see the data being processed and make necessary changes to the logic.

  • User_Q91MT
    User_Q91MT Member Posts: 20 Red Ribbon
    edited Aug 12, 2020 7:22AM
    Srinath Menon-Oracle wrote:It won't be possible to review the entire functionality here and suggest solutions. Please review the logs and see the data being processed and make necessary changes to the logic.

    @Srinath Menon-Oracle the traces , to me , doesn't suggest and sends teh content to workflow1.

    "Testing value business_checkin_test retrieved using lookup key xIdcProfile for workflow _Business_Test against criteria value _business_checkin_test

    if we disable

    Also, if i disable workflow1 & checkin a new content, then it rightly moves to workflow2 . So, my question is solution you shared technically possible and we can have 2 workflows on same profile?

  • Srinath Menon-Oracle
    Srinath Menon-Oracle Posts: 6,291 Employee
    edited Aug 12, 2020 9:40AM
     So, my question is solution you shared technically possible and we can have 2 workflows on same profile?

    You can do this logic in the WF code using Jumps to change the wf depending on the author / reviewer value from the metadata. Look to leverage jumps functionality. https://docs.oracle.com/cd/E23943_01/doc.1111/e10978/c05_workflows.htm#CSMRC644

    Some additional details are here : https://www.tekstream.com/as-simple-as-else-workflow-routing-made-easy/

    https://stackoverflow.com/questions/50924667/change-document-account-in-an-oracle-webcenter-content-workflow?rq=1