Consider that there is a " Service task A " which is attached to a parallel gateway then there are two tasks "Service Task B " and "Service task C".
I have marked " Service Task B " , "Service task C" and parallel gateway as Asynchronous.
Therefore a new execution will be created to execute "Service task C" .
Suppose Execution 1 was executing Service Task A and then
Execution 1 started executing Service Task B and
Execution 2 was created and it started executing service task B
How to make execution 2 aware that it was created from execution 1 ?
Similarly while On Join only 1 execution remains then in parallel gateway I want to collect local variables of both execution 2 and execution 1 and perform some operation and make a new variable on the surviving execution
After service task A I need to dynamically set X = 1 for 1 execution and X = 2.5 for other execution.
If i can set those values in listener of parallel gateway then how can i identify which is old execution and which is new execution .
Not sure I completely understand your scenario, but if you have marked both Service Task B and Service Task C as asynchronous, then the original execution from Service Task A is released as soon as you hit the gateway.
You can prove this by logging the execution ID from each of the service tasks.
As for collecting local variables from each of the branch executions, you can set variables on the process instance which will be child execution agnostic.
I typically use map with the execution id as the key so there is no overlap between the different branches.
Another option for somethign ilke this is to use a multi instance loop.
Perhaps I am missing what you are trying to do, perhaps a more specific example.
Greg
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.