[英]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.