Deployment fails when Intermediate Event is waiting for same message as start message

Description

In a scenario where a currently running process instance is waiting for an intermediate or boundary message event, when trying to deploy a new process definition at this point that uses a message with the same ID as start event, the deployment is rejected with the same message as when trying to deploy two process definitions using the same start message. According to the specification in the User Guide, only start message IDs need to be unique over all process definitions, so this behavior seems to be a bug.

The problem apparently is that during deployment, the engine only checks if there subscriptions for the start message present, but not if the subscriptions are actually start events:

org.activiti.engine.impl.bpmn.deployer.BpmnDeployer#addMessageEventSubscriptions

The issue is described in further detail on the forum in this topic: http://forums.activiti.org/content/deployment-fails-when-intermediate-event-waiting-same-message-start-message

The attached unit test shows this behavior for both a process waiting for an intermediate event as well as for a boundary event.

Environment

None

Assignee

Tijs Rademakers

Reporter

Jakob Tonn

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure