Hi,
We have task form where user will see a drop down called lead groups. This drop down will show all the lead groups (lead admin, lead office, lead employee, etc).
Below that we have 10 check boxes that are also a individual groups. User can choose 1 lead group from the dropdown and choose as many as the other groups by ticking the check boxes below.
My question is, how can I create a process model that can assign the tasks dynamically to the groups selected by the user via checkboxes. Because one time he/she can choose only 3 groups and next time he/she can choose 7 groups.
All these groups will be displayed the same task form (for now). Only the drop down group will be displayed different form.
Any help will be appreciated
Solved! Go to Solution.
If number of groups will always remain static then: you can fork the process with an inclusive gateway, for each group selected the respective task will be executed.
Iff the number of groups may vary in future:
The Multi-instance for a task also works with list as an argument.
After your group selection task, create a list of selected participant groups, pass this list (e.g. group_participants) to the Collection (Multi-instance) property of the userTask. add an element variable of desired name (e.g. participant). In the Task Assignment select Candidate groups and add the element variable as an expression ${participant}
Note: The list of Participants must be list of string containing group ids (as selected by the user).
If number of groups will always remain static then: you can fork the process with an inclusive gateway, for each group selected the respective task will be executed.
Iff the number of groups may vary in future:
The Multi-instance for a task also works with list as an argument.
After your group selection task, create a list of selected participant groups, pass this list (e.g. group_participants) to the Collection (Multi-instance) property of the userTask. add an element variable of desired name (e.g. participant). In the Task Assignment select Candidate groups and add the element variable as an expression ${participant}
Note: The list of Participants must be list of string containing group ids (as selected by the user).
Thanks Abbas Kararawala for your reply. You mean to say I need to write a java TaskListner where I will create the list of use Ids and set them in the next multi user tasks?
Yes, a java-based taskListener will do the work. You'll have to add this on completion of the userTask where the groups are being selected.
How can I get the group IDs from the group names? As I have check boxes with group name, in Task listener I will get their names and then need to find the group Id from the name. Do you have any idea. Thank you
You can query the groups based on group name.
If you've created a custom field for fetching groups, why not bring the group ids as well.
Hey Abbas Kararawala can you put the simple example for getting group ids from group name. I am trying it but without success...
Hi,
Have you got any solution to this? I'm facing the same problem, i.e. How to get the groupId from the group names. Thank you.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.