I created diagram which used boundaryEvent to signalize that some action was done.
<boundaryEvent id="boundarysignal1" name="cancel" attachedToRef="subprocess3" cancelActivity="true">
<signalEventDefinition signalRef="cancelApplication"></signalEventDefinition>
</boundaryEvent>
Everything is working ok, but in one moment (I didn't catch it yet), the process loses binding to the event so I can't use flow which related to boundaryEvent at all. Found out that during runtime Activiti creates records into ACT_RU_EVENT_SUBSCR table which holds event subscriptions to appropriate record in ACT_HI_PROCINST table which stores the process instance data. In the same time I see that process is not closed and is alive, the appropriate END_FIELD column is null.
The next code doesn't return anything as event is not bound:
final List<Execution> executionList =runtimeService.createExecutionQuery().processVariableValueEquals("VAR_NAME","VAR_VALUE").signalEventSubscriptionName(SIGNAL_CANCEL_PROCESS).list();
Meanwhile Process is active as next result is success:
final List<ProcessInstance> instances = runtimeService.createProcessInstanceQuery().variableValueEquals("VAR_NAME","VAR_VALUE").active().list();
What can be the reason that boundaryEvent is detached from Process?
Env: SpringBoot 1.3.2 ; Activiti 5.19.0.2
ACT_RU_EVENT_SUBSCR table(Working example):
ACT_HI_PROCINST table(Working example):
ACT_RU_EVENT_SUBSCR table(NOT Working example, table is empty):
One of possibilities is mentioned here:
https://community.alfresco.com/docs/DOC-4591
Release Notes - Activiti - Version 5.20.0
...
Signal and Boundary event subscription are lost when deploying a new process definition version
...
This one was the major reason for us to upgrade to 5.20