Best Practice: Rename / refactor process beans / names

Can anybody point me to best practices around versioning variables / bean references in BPMN?

I have scenario where we have java delegate:

<camunda:taskListener delegateExpression="#{taskAssignValidatorHandler}" event="create" />

And now I realize name was poor, and should now be ‘userTaskAssignValidationHandler’

However, this will break previously running processes, as they won’t find old delegate bean (taskAssignValidatorHandler).

I would assume the same anytime we rename / refactor other bean references such as:

#{myObject.myMethod()}

What are best practices for this kind of refactoring / change isolation?

One idea I had was we could use version # in process name, such as ApprovalProcess_v1.0.bpmn, ApprovalProcess_v2.0, etc - only when there would be breaking changes for running processes. However, this means I would lose history across those process renames.

What you all think?

I don’t know what the best practices are since I don’t have much experience and also not have a rich statistics, but the question is a very interesting one.

The problem is that you have to have the process model (containing the bean refs) and the backing code (providing the beans) in synch. I’d address the problem by using the containers (docker or the like). This way you’d have your application completely packaged. Even if different containers whould use the same process DB, this would still work because each container would produce a new version of the process model. Instances of different versions (of the same process model key and version tag) still “know” to which version the belong, so there shold not be any problems here.

If you do not use containers (but rather e.g. a web app within a server) then it could get hard to separate the code for the different versions of the process model.

Hi @Scott_Langeberg,

you can use process instance migration to move all running process instances to the latest version of the process definition: https://docs.camunda.org/manual/7.11/user-guide/process-engine/process-instance-migration/ and https://docs.camunda.org/manual/7.11/webapps/cockpit/bpmn/process-instance-migration/

If you suspend the process definition before you deploy the new version of your bean together with the changed process definition into the engine, nothing will happen with the running instances: https://docs.camunda.org/manual/7.11/webapps/cockpit/bpmn/suspension/.

Hope this helps, Ingo