Hi
We are on flowable 6.5 and have inflight legacy processes which were created in Activiti 5.15 and
continue to work in backward compatible flowable 5 engine.
Problem - we are sending signal in legacy in-flight processes and it fails in
org.flowable.engine.impl.agenda.TriggerExecutionOperation with a NPE given ActivityBehavior
activityBehavior = (ActivityBehavior) ((FlowNode) currentFlowElement).getBehavior() returns NULL from below code(Current flow element here is IntermediateCatchEvent ).
Ideally FlowNode behaviors are set by bpmn parsers which deploy the process definition in memory. Though for flowable 5 compatible process definitions the parsers set ActivitiImpl and not FlowNode. So when the signal is invoked , it gets in TriggerExecutionOperation and tries to find current behavior and cannot find it, given it was not set by bpmn parse handler.
Same flow works great if I am sending signal with a new process definition instantiated in flowable 6.5 engine.
Any ideas why this is happening ?
Code that fails in TriggerExecutionOperation
public void run() {
FlowElement currentFlowElement = getCurrentFlowElement(execution);
if (currentFlowElement instanceof FlowNode) {
ActivityBehavior activityBehavior = (ActivityBehavior) ((FlowNode) currentFlowElement).getBehavior();
Thanks
Binish