flowable-engine icon indicating copy to clipboard operation
flowable-engine copied to clipboard

Deployment of App fails when modelKey of included model has been updated and the model has a message start event subscription

Open billerby opened this issue 2 years ago • 0 comments

Describe the bug We have a process model which is initiated via a message start event. Just found out that the deployment of the App containing this model fails when the model key was updated, with a somewhat hard to understand error message there already is a message event subscription for the message with name 'startMyFantasticProcess'

Expected behavior The deployment to succeed

Code If applicable, add the code that you are using when having the issue.

Additional context This is on Flowable 6.7.2.

The reason for this error is that when deploying the method BpmnDeploymentHelper.updateTimersAndEvents calls eventSubscriptionManager.removeObsoleteMessageEventSubscriptions(previousProcessDefinition); which will not find the EventSubscriptionEntity to delete before the deployment since the name was changed.

So the fix would probably be to update the modelKey reference in that table whenever a modelKey is updated.

billerby avatar Jun 03 '22 10:06 billerby