Update sub-process variables dynamically

cancel
Showing results for 
Search instead for 
Did you mean: 
axferreira
Active Member

Update sub-process variables dynamically

**Using script task event and setting the variables manually worked.
1 Reply
openpj
Moderator
Moderator

Re: How to pass and display variables in Sub-process

Try to get the RootProcessInstance and then you should get or set parameters from there:

ExecutionEntity yourCurrentExecutionEntity = (ExecutionEntity) execution;
ExecutionEntity processInstance = (ExecutionEntityImpl) Context.getCommandContext().getExecutionEntityManager().findById(yourCurrentExecutionEntity.getRootProcessInstanceId());