Assign Task based on Dynamic Amount of Users

Comments

4 comments

  • Avatar
    AgilePoint NX Support

    Hello Hong Nguyen,

    Below article might help you in your case, please go through it

    http://agilepointnxblog.com/adding-participants-on-the-fly-to-a-process-instance/

    Thanks

    0
    Comment actions Permalink
  • Avatar
    Hong Nguyen

    Thanks for the help but none of the solutions in the article help me in my scenario.   But I think I may have found a workaround to accomplish what I need.

    I used a "Parallel" task and added 10 hidden fields on the eForm.   I use a REST service call to obtain all the necessary participants (which can be 1 or more users) and store them in the hidden fields.   I assign each hidden field in the participants tab to the same eFORM.        

    The system seems to correctly assign the task based if the hidden field has a valid user.   So if only 3 users are populated out of the 10 hidden fields, only 3 participants will be assigned the task.    This seems to work to allow dynamic amount of participants for the task during run-time.    I am stuck if there are more than 10 participants, but I can always increase the amount of hidden fields and adjust the participants list.   

    Doing some testing, this seems to work.  Not an elegant solution, but this is the only solution I could find.

    0
    Comment actions Permalink
  • Avatar
    AgilePoint NX Support

    Hi,

    I would suggest another solution see if you can do that.

    1. If you have control over REST Service can you update the rest service to return users in semicolon separated format

    for ex : Domain1\User1;Domain1\User2;Domain1\User3 

    2. Assign that to a process variable .

    3.Use the process variable in the Standard Task Participant . 

    0
    Comment actions Permalink
  • Avatar
    Hong Nguyen

    Yes, I do have control over the REST service.  I gave it a try and looks like this works.  One setting I had to adjust was the "Maximum number of participants to complete task...." to be "infinite" so that each user has to review the task as mandatory. 

    This is a much better solution.   Thank you for the help!

    0
    Comment actions Permalink

Please sign in to leave a comment.