[英]Camunda: How pass variable from parent process to subprocess. (which is started by event)
我有一个通过事件创建子流程的流程。 我想将一个变量从父进程传递给子进程。 我发现的一种方法是使用:
MessageCorrelationResult result = runtimeService
.createMessageCorrelation("newEvent")
.setVariable(TOUR_ID, id) //trigger instance where customer matches
.correlateWithResult();
runtimeService.setVariable(result.getProcessInstance().getId(),"variableToSend", "val");
但是, result.getProcessInstance()
返回 null,这似乎是一个已知问题: https : result.getProcessInstance()
您知道如何使用其他方法将变量从父进程传递到子进程吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.