1 Reply Latest reply on Mar 26, 2013 8:02 PM by rush_pawan

    Workflow, dynamic participant, participant chooser question

    nuneju

      Hi,

       

      I have a question regarding workflows, specifically the dynamic participant group step. I want to create a participant chooser that includes a group but excludes the workflow initiator. The reason I need this is because I recieved the following requirement:

       

      The requirement I recieved was: to create a rule that the Author and Editor can not be the same person.

       

      I've looked at the documentation at:

      http://dev.day.com/docs/en/cq/current/workflows/wf-ref/workflow_steps.html

       

      I'm not sure how to proceed with this. Any suggestions would be appreciated. The example showed how we can get the workflow initiator but I am unsure how to get a list of users in a group?

       

      Is there another way of achieving this rule?

       

      Thanks for the help!

        • 1. Re: Workflow, dynamic participant, participant chooser question
          rush_pawan Level 4

          Hello,

           

          I think you can implement this in two ways but both require customization.

           

          #1: Use "dialog participant step" which will allow you to select group/user whom you want to assign the task. Now because it is dialog step, it will allow initiator to select user from list of users (when you assigned group at step configuration). Now here you will see all the users associated to this group but you can customize it by extending "/libs/cq/workflow/components/model/participant" and "/libs/cq/workflow/components/model/dialog" because "/libs/cq/workflow/components/model/dialog/dialog/items/tabs/items/participant" refer to ""/libs/cq/workflow/components/model/participant" componet. Now ""/libs/cq/workflow/components/model/participant" has "/libs/cq/workflow/components/model/participant/details.jsp" scriptlet which display list of user in that group, so customize this scriptlet mainly.

           

          #2: Go with "dynamic participant step" which will allow you to create your own dynamic ecma script to list out users from group example "/etc/workflow/scripts/initiator-participant-chooser.ecma" but as this is not a dialog step so you have to make it as dialog step as above and you have to extend /libs/cq/workflow/components/workflow/initiatorparticipantchooser

           

          I hope above will give you some idea to proceed.

           

          Thanks,

          Pawan