Hey there,
My process engine shows a strange behaviour regarding process variables:
I have a process with execution listeners attached to sequence flows. In those execution listeners I’m in a while loop till a value of a process variable changes to true.
This process variable is set from another thread which somehow independent from camunda but which has access to to the process engine and its interfaces (like the runtime service). In this thread I set the process variable and if I query it afterwards the revision is updated each time:
[VariableInstanceEntity[id=11, revision=6, name=stepForward, processInstanceId=6, executionId=6, caseInstanceId=null, caseExecutionId=null, taskId=null, activityInstanceId=6, tenantId=null, longValue=1, doubleValue=null, textValue=null, textValue2=null, byteArrayValueId=null, configuration=null, isConcurrentLocal=false]]
My problem is that the Execution listener retrieves an old unchanged revision of the variable in its loop although he also queries the runtime service in the same way:
[[VariableInstanceEntity[id=11, revision=3, name=stepForward, processInstanceId=6, executionId=6, caseInstanceId=null, caseExecutionId=null, taskId=null, activityInstanceId=6, tenantId=null, longValue=0, doubleValue=null, textValue=null, textValue2=null, byteArrayValueId=null, configuration=null, isConcurrentLocal=false]]
Is this a bug, or is there some kind of workaround for this?
Best regards,
Hendrik