I have a process which creates a sub-process by event. I would like to pass a variable from the parent process to the sub-process. One way which I found is by using:
MessageCorrelationResult result = runtimeService
.createMessageCorrelation("newEvent")
.setVariable(TOUR_ID, id) //trigger instance where customer matches
.correlateWithResult();
runtimeService.setVariable(result.getProcessInstance().getId(),"variableToSend", "val");
But, result.getProcessInstance()
returns null and it seems that this is a known issue: https://app.camunda.com/jira/browse/CAM-7772
Do you know how can I pass variables from parent to sub process using other approach ?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.