AnsweredAssumed Answered

Removing subscribed boundary-signal-events of previous process-definition on process-model deployment

Question asked by mf on Mar 16, 2016
Latest reply on Mar 18, 2016 by jbarrez
Hi,

By deploying process-model, all signal-event (including start, boundary, and intermediate-catching) subscriptions of the previous process-definition, will be removed. But it only makes sense for start-signal-events, because it's not desired to start process from previous process-definitions. But, about boundary and intermediate-catching signal-events, removing subscriptions does not make any sense; Because  in case of throwing signals, it's desired boundary and intermediate-catching signal-events of processes of previous process-definition, catch it.

Is it a bug or something else?

Here is the method which removes all signal-events of previous process-definition in BpmnDeployer class:


protected void removeObsoleteSignalEventSubScription(ProcessDefinitionEntity processDefinition, ProcessDefinitionEntity latestProcessDefinition) {
    // remove all subscriptions for the previous version   
    if(latestProcessDefinition != null) {
      CommandContext commandContext = Context.getCommandContext();
     
      List<EventSubscriptionEntity> subscriptionsToDelete = commandContext
        .getEventSubscriptionEntityManager()
        .findEventSubscriptionsByConfiguration(SignalEventHandler.EVENT_HANDLER_TYPE, latestProcessDefinition.getId(), latestProcessDefinition.getTenantId());
     
      for (EventSubscriptionEntity eventSubscriptionEntity : subscriptionsToDelete) {
         eventSubscriptionEntity.delete();
      }
     
    }
}

Outcomes