I am trying to set the process variable but getting below error
java.lang.IllegalStateException: Process instance 10[SampleBusinessProcess] is disconnected.
at
I can't comment on the previous answer so I'm posting this answer.
The quick and dirty way I found (inspired from previous answer) is:
public void setProcessInstanceVariables(long processInstanceId, Map variables) {
kieSession.execute(new SetProcessInstanceVariablesCommand(processInstanceId, variables));
}
Thanks a lot Kris Verlaenen!