Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

How to assign group/user to the Work Item programatically

Avatar

Former Community Member

Hi,

    I have a use case which states author workflow need to be called automatically based on node modification.Within that workflow I have to call approver workflow,participants need to be created and assigned based on authors group. I created a new group with User Manager Interface. How to assign this created group to the Work Item in the approver workflow? Please guide me how to achieve this.

I tried this in author's workflow process step

Group newGroup = userManager.createGroup(approverGroup,approverGroup , null);

 

Thanks!

Kirithi

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi, 

Use the dynamic participant workflow step in your workflow and have the logic of creating and assigning the user/group in that step. refer [1] and [2] for the same.

[1] http://adobeaemclub.com/workflow-dynamic-participant-step/

[2] https://helpx.adobe.com/experience-manager/using/dynamic-steps.html

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi, 

Use the dynamic participant workflow step in your workflow and have the logic of creating and assigning the user/group in that step. refer [1] and [2] for the same.

[1] http://adobeaemclub.com/workflow-dynamic-participant-step/

[2] https://helpx.adobe.com/experience-manager/using/dynamic-steps.html

Avatar

Level 10

Hi 

Take a look @ https://helpx.adobe.com/experience-manager/using/jackrabbit-users.html

Its uses Jackrabbit API to dynamically create user and assign to group.

Avatar

Administrator

Hi kirithikak97587242

As mentioned by Bsloki in his comments, Dynamic Participant workflow would help you with your problem:

Link:-- https://helpx.adobe.com/experience-manager/using/dynamic-steps.html

Another link for a reference :- https://helpx.adobe.com/experience-manager/using/invoking-experience-manager-workflows-using.html

I hope this would help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni