Hi all,
an update on the below. the Issues seems to be that my “notifcationsWorkflow” value also happens to be a value of a process variable (which is a java variable). This is because I have logic earlier on in the process which builds a collection of different subprocess to run using this variable. Variable is called “workflowName”.
So, my next question then is how to do I use a process variable in an expression or javascript script?
I get this error when trying to execute an expression on a message end task as in:
${execution.getProcessEngineServices().getRuntimeService().createMessageCorrelation(“notificationsWorkflow”).correlateWithResult()}
where “notificationsWorkflow” is a separate process.
Error is:
org.camunda.bpm.engine.ProcessEngineException: Error while evaluating expression: ${execution.getProcessEngineServices().getRuntimeService().createMessageCorrelation(“notificationsWorkflow”).correlateWithResult()}. Cause: java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to jdk.nashorn.internal.runtime.ScriptObject
I am using Camunda 7.13.
many thanks