When the BpmnDeployer is attempting to re-deploy a BPMN resource, it runs through several steps that remove subscriptions from 'previous' process definition entities.
One of these is to remove subscriptions from signal events. This is
protected void removeObsoleteSignalEventSubScription(ProcessDefinitionEntity processDefinition, ProcessDefinitionEntity latestProcessDefinition)
However, something seems to be not quite right.
This like attempts to get the subscriptions to delete:
List<EventSubscriptionEntity> subscriptionsToDelete = commandContext
.findEventSubscriptionsByConfiguration(SignalEventHandler.EVENT_HANDLER_TYPE, latestProcessDefinition.getId(), latestProcessDefinition.getTenantId());
Which is in my case expands to:
.findEventSubscriptionsByConfiguration("signal", "vte:6:3811", "");
However - this appears to never return any results. Drilling down to the query that ultimately gets executed results in this:
where (EVENT_TYPE_ = ?)
and (CONFIGURATION_ = ?)
and (TENANT_ID_ = '' or TENANT_ID_ is null)], parameters=[[signal], [vte:6:3811]]]
Given the parameters, it would return results correctly if
(CONFIGURATION_ = ?)
were replaced with
(PROC_DEF_ID_ = ?)
Which I think would solve my issue where old process definitions are still being started by signals.