I haven't tested this out, but just from looking at the code it looks like the logic in org.activiti.engine.impl.persistence.entity.EventSubscriptionEntityManager#findSignalEventSubscriptionsByProcessInstanceAndEventName
has an obvious defect:
// add events created in this command (not visible yet in query) for (SignalEventSubscriptionEntity entity : createdSignalSubscriptions) { if(processInstanceId.equals(processInstanceId) && eventName.equals(entity.getEventName())) { selectList.add(entity); } }
The first test most likely should be if (entity.getProcessInstanceId.equals(processInstanceId) && … Other methods in the same class seem to have the same issue.
My bad, the test is strange to say the least (may throw an NPE but will otherwise always return true), but the query used to obtain selectList should ensure that the processInstanceId matches anyway.