Dear all,I am struggling with updating a process variable from a java delegate that is called by an asynchronously executed multi-instance service task.My setting:My problem:Setting progress
within jd
works fine by
int completed = (int) execution.getVariable("nrOfCompletedInstances") + 1;
int total = (int) execution.getVariable("nrOfInstances");
float progress = (float) completed / (float) total;
execution.setVariable("progress", progress)
but when I read progress
during process execution by
getProcessEngine().getRuntimeService().getVariable(processInstanceId, "progress");
I always get the initial value and not the value that was set by jd
.Any hints what I am missing or how to "update" process variables from "inner" asynchronous executions?Thank you in advance and best regards,kai