Expand my Community achievements bar.

SOLVED

Dynamically choose different participant as approvers for different pages in workflow

Avatar

Level 3

Suppose, we have 3 pages (page 1, page 2, page 3) and we want the pages to be approved by 3 different users using workflow.

 

For example any changes happen in Page 1 then approve request should go to the user 1 and in Page 2 should go to the user 2 and so on. How can we achieve that? 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Then we can achieve this using Context Aware configuration and ParticipantStepChooser interface.

 

I have shared the approach with sample code in Re: AEM Workflow - Adobe Experience League Community - 449447

 

Instead of define the context aware configuration at site level , we can define the configuration at individual page level as we have only 4-5 pages.

 

Please note that personally I won't follow this approach incase of 30 pages.

In that case I will request business that we can have dedicated approver group(user group) and content authors can select individual approver[users are member of approver group] from page property and start the workflow.

 

We can read the approver or user name from page property and dynamically assign it an an approver using Dynamic Participant Step.

 

View solution in original post

6 Replies

Avatar

Employee Advisor

Let's assume that you have 500 pages in your site then are you expecting one unique user(approver) per page? 

My main question is that how do you want to map these users with pages?

If you could provide this input then it will help me to define the logic.

Avatar

Level 3

Yes your first argument is right and only difference is in page number and user only 4-5 pages and user will work.

Avatar

Correct answer by
Employee Advisor

Then we can achieve this using Context Aware configuration and ParticipantStepChooser interface.

 

I have shared the approach with sample code in Re: AEM Workflow - Adobe Experience League Community - 449447

 

Instead of define the context aware configuration at site level , we can define the configuration at individual page level as we have only 4-5 pages.

 

Please note that personally I won't follow this approach incase of 30 pages.

In that case I will request business that we can have dedicated approver group(user group) and content authors can select individual approver[users are member of approver group] from page property and start the workflow.

 

We can read the approver or user name from page property and dynamically assign it an an approver using Dynamic Participant Step.

 

Avatar

Level 3

I tried this method the only error I am getting is in creating the nodes sling:configs under ca and de. CRX DE throws an 409 conflict:  Unexpected child node found in a new node.

Avatar

Employee Advisor

jcr:primaryType of sling:configs should be sling:Folder -

 

DEBAL_DAS_0-1650799866228.png

Pleaes use sling:Folder as jcr:parimaryType for both ca/de folder and sling:configs -

 

DEBAL_DAS_1-1650799994011.pngDEBAL_DAS_2-1650800005081.pngDEBAL_DAS_3-1650800016961.png

Hope these will help.