-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
See user forum:
https://groups.google.com/forum/#!topic/camunda-bpm-users/URuVUbMKlFc
The implementation of "CaseVariableListenerInvocation#invoke()" tries to get the current CaseExecution from the "Context#executionContextStackThreadLocal". But instead of an expected instance of "CaseExecutionContext" a instance of "BpmnExecutionContext" will be returned. This happens because a process instance has been executed (triggered by a ProcessTask inside the case instance).
Possible solution:
"CaseVariableListenerInvocation#invoke()" should be implemented like this:
protected void invoke() throws Exception {
try {
if (contextExecution instanceof CaseExecutionEntity)
variableListenerInstance.notify(variableInstance);
}
finally {
if (contextExecution instanceof CaseExecutionEntity)
}
}
Hints:
Clarify why it is necessary to call "Context#getCaseExecutionContext()" inside the "invoke()" method?