02-08-2019 10:20 AM
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.
02-25-2019 02:17 AM
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");
02-25-2019 04:46 AM
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.
02-25-2019 06:58 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.