Hi all,
I am using AEM 5.6.1 and facing issues with the workflow participant step when I have nested participant groups. The issue is that the users in the user selection is duplicated if they belong to a sub group of the main approver group.
Here is the model of my workflow:
Start > Workflow Initiator Participant Chooser > Participant Step > Activate Page/Asset > End
The "Participant Step" will be configured with the main approver group. Basically once the workflow starts, the initiator will be able to go to the next step and select the next user or group to continue the workflow. However, with nested groups, the user which belongs to the sub group appears twice in the dropdown for the initiator's selection. Any way to remove these duplicates with nested user groups?
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Thanks for the steps - I now see the issue. I consider this a bug - can you file a daycare ticket so we can get it fixed?
In the meantime to get you going I have some steps to fix this on your own.
1) find the file /libs/cq/workflow/components/workitem/routes.json.jsp.
2) copy that file to the /apps folder to overlay the jsp. create folder strucutre to mirror this jsp under apps and copy the file to: /apps/cq/workflow/components/workitem/routes.json.jsp
3) now edit the newly copied file under apps (careful not to modify the one under libs!) as follows:
add imports for
import java.util.Set; import java.util.HashSet;add this line before the for loop looping over routes:
Set existingUsers = new HashSet();
add the following lines after the String participant = ...
String participant = wfNode.getMetaDataMap().get("PARTICIPANT", String.class); if (existingUsers.contains(participant)) { continue; } existingUsers.add(participant);
This will exclude participants from showing up more than once.
Hope this helps!
Will
Views
Replies
Total Likes
Hi,
I am unable to reproduce this - and it should not happen. Are you sure you don't have more than one user in the system with the same name? The exclusion that is done on the delegate list is by user path not their name.
(you are talking about the delegate option here correct?)
Will
Views
Replies
Total Likes
Hi,
Yup I am sure that there is only one user with that name. I have started a new instance, and configured the following model, as per my initial description
[img]workflow-model.png[/img]
In my main approver group, there is a sub approver group (region approvers group) which contains 2 users. When i run the workflow, I am seeing the following:
[img]select-approver.png[/img]
Thanks!
Views
Replies
Total Likes
Hi,
Thanks for the steps - I now see the issue. I consider this a bug - can you file a daycare ticket so we can get it fixed?
In the meantime to get you going I have some steps to fix this on your own.
1) find the file /libs/cq/workflow/components/workitem/routes.json.jsp.
2) copy that file to the /apps folder to overlay the jsp. create folder strucutre to mirror this jsp under apps and copy the file to: /apps/cq/workflow/components/workitem/routes.json.jsp
3) now edit the newly copied file under apps (careful not to modify the one under libs!) as follows:
add imports for
import java.util.Set; import java.util.HashSet;add this line before the for loop looping over routes:
Set existingUsers = new HashSet();
add the following lines after the String participant = ...
String participant = wfNode.getMetaDataMap().get("PARTICIPANT", String.class); if (existingUsers.contains(participant)) { continue; } existingUsers.add(participant);
This will exclude participants from showing up more than once.
Hope this helps!
Will
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies