I have an application form and i need to send it for Approval to particular group and i need that the task should not complete till the time all users of that group will say complete . I have given multi instance on my task as 2 but when i send the form for approval each user from the group is able to claim both task , so how to send only one task to one user for approval.?
what is the way to pass array of users in collection ?. as in screenshot you have passed as ‘people’
For example you use a service task to fetch the list of users from an API or create a list via code/forms. I think you could also use a DMN to do this, but I am still learning that. It just depends on how you want to get the collection.
As a note, I am only a few months into using Camunda, so I am not an expert.
Below is something simple… I used a script task and just set a peoples that is a list.
multi_approve.bpmn (4.1 KB)
is there any way to assign group name instead of individual users in list like you have given peoples = [“mike”,“jim”].? so that I can assign all users who are there in that group.
You could call the Group API and get the list of people in that group. That would be a script/service task to get the list I would think. Then pass that as the collection to the multi-instance task/call activity.
I am sharing my modeler.can you please do the scripting part and revert me back.
actually i am totally new to this.loanApprove.bpmn (3.1 KB)
if you want you can make changes on that modeler as well
Try this… The sub process you were trying to use is non-functional. To call a sub process, you use the expanded sub-process or Call Activity (which is what I used and non-functional things in the Camunda modeler is annoying). Should work, but I didn’t test it, but just made sure it spun off a couple tasks.
I used a script task an created a simple list. You will see I changed some of your form fields also. Like using required and min/max for simple validation.
I have am building my own samples from what I learn and uploading to Github (GitHub - devsetgo/Camunda-BPM-Learning: Project to store what I learn about Camunda and use for future base projects.). I hope to update this once or twice a month depending on how busy I am at work.
I suggest you also go through Awesome Camunda (GitHub - DigitalState/awesome-camunda: a curated list of awesome Camunda BPM projects, libraries, tools, documentations, forum posts, etc.).
Good luck.
loanApprove.bpmn (4.2 KB)
sub_approval.bpmn (2.9 KB)
