Hi Team,
We are creating POC for a project where we will have 4 stages of approval. Let's say the 4 stages are
1. Accountant
2. Manager
3. Owner
4. Delivery Head
A process has started and right now the user task i.e. approval is at the Accountant level. The multi-instance will loop in a collection returned from Java Service class. While the loop is running for that particular set of users, I want to push a new user in it. I'm able to add more users in the collections of manager, owner and Delivery Head because the approval stage is on Accountant Level and the collection call for those approvers is not performed yet.
Is there a way to add new users in the current running loop collection i.e. of Accountant collection? If yes, Please suggest a way, preferably using Java.
You can use a boundary signal event on your multi-instance use task/sub-process, which will cancel all the currently running tasks and create new tasks for the updated collection.
below diagram might help
Note: you will have to call the signal (from your code) after you have updated your collection with runtimeService.signalEventReceived("yourSignalId", "yourProcessInstanceID");
We don't want to replace it with the new collection, we want to update it and continue. E.g. I want to add a new resource into the collection or if we want to change the sequence of items in the collection.
i don't think its possible to "update" values on the fly. the execution will simply replace your old list with a new one. anyways you won't be able to refer to the old list.
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.