It looks like the only way to run this is using Java Delegate code.
There seems to be no way to add a piece of Groovy script just to add this code, specially to declare variables in the Map.
Can I add this code as part of a Expression? Seems a bit problematic not to have this and to have to end using Java for such a simple communication.
Thanks,
Leonardo
execution.getProcessEngineServices().getRuntimeService().createMessageCorrelation("work").correlateWithResult()
Docs:
https://docs.camunda.org/javadoc/camunda-bpm-platform/7.7/org/camunda/bpm/engine/RuntimeService.html
https://docs.camunda.org/javadoc/camunda-bpm-platform/7.7/org/camunda/bpm/engine/RuntimeService.html#correlateMessage(java.lang.String)
You can call this snippet of code as a expression as well by wrapping it in ${execution.getprocessengineservice......}
1 Like
Thank you. I could make it work without the need to run Java.
But I needed to start another process via messaging and send variables:
${execution.getProcessEngineServices().getRuntimeService().startProcessInstanceByMessage("insured-summary", variables)}
The good thing is I could setup the variables in the input/output via a Map and worked great!
1 Like