08-17-2019 07:07 AM
Assuming I have a process like this:
Both sub processes have parallel cardinality. I wanted to set an execution local variable in the outer script task and be able to get that variable in the inner script task; so that every inner sub process would have access to the variable from their respective parent sub process. But this is not so simple as the outer script task would be executed in an execution which is not the ancestor(eventual parent) of the inner script task. This is because activiti creates a separate execution for each sub process instance and then creates a child execution which supposedly executes everything inside that sub process instance(same goes for the main process instance as well; it creates a child execution and executes everything in that execution).
This problem can be solved by setting local variables in the parent execution of the current execution. But I am not certain about the possible side effects of this solution if we make it a convention to ALWAYS set local variables in the parent execution; because I don't know the answer to these questions:
Explore our Alfresco products with the links below. Use labels to filter content by product module.