How to find differences between two versions of deployments

When ever a BPMN workflow is deployed, I want to find the difference between the current version and new version. Is this possible? Based on the differences the front end of my application needs to be changed. For example: In workflow-1, if there is a user task which waits for an approval, the front end of my application will have a text field, to accept the assignee name. If I change the workflow by adding another usertask, front end of my application should now have two text fields to accept assignees of both the usertasks. Please let me know if there is a API, which helps me to find differences between two versions of workflow deployment

Hi @Asritha, Version numbers are automatically set by the Camunda engine.

Everytime when you deploy same bpmn file with some changes new version of bpmn will be created without affecting the running process instances in older versions.

Rest Api/Java Api’s are available to query for available versions.

https://docs.camunda.org/manual/7.13/reference/rest/process-definition/get-query/

GET /process-definition?key=myNewProcess&version=2&versionTag=newUserTaskAdded

Response:

[
    {
      "id": "myNewProcess:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e",
      "key": "myNewProcess",
      "category": "http://www.omg.org/spec/BPMN/20100524/MODEL",
      "description": null,
      "name": "myNewProcess",
      "version": 2,
      "resource": "myNewProcess.v2.bpmn",
      "deploymentId": "c398cd26-2046-11e7-8f94-34f39ab71d4e",
      "diagram": null,
      "suspended": false,
      "tenantId": null,
      "versionTag": "newUserTaskAdded",
      "historyTimeToLive": 5,
      "startableInTasklist": true
    }
]

https://camunda.com/best-practices/versioning-process-definitions/

When you deploy the process, process engine will check if the version has changed. If it has, it will register that deployment as a new version of the definition. By default running instances will continue to run on the basis of the version they started with, new instances will by default be spawned from the latest version of that definition.

Use Camunda’s camunda:versionTag attribute to tag your versions with semantically meaningful labels.

ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
        .versionTag("1.2") 
        .latestVersion()     
        .singleResult();

1 Like

Hi @Asritha,

here is a demo of bpmn.io capabilites to compare two different versions of BPMN diagram: https://demo.bpmn.io/diff

A more sophisticated tooling is part of the Cawemo enterprise version: https://docs.camunda.org/cawemo/latest/user-guide/milestones/#diffing-enterprise-only

You can find a screenshot here at “Keep Track or Changes”: https://camunda.com/products/camunda-bpm/cawemo/

Hope this helps, Ingo

1 Like