Camunda deploys BPMN diagram even when not changed

Hello,

I have the following processes.xml file in Java Spring project.

Each tenant has its own BPMN file and a common escalation_handler.bpmn file that is used by all tenants.

The problem is that the escalation_handler process version is bumped every time there is a deployment regardless of whether the escalation_handler.bpmn file is changed or not.

How can I avoid this?

I am using Camunda 7.13.0

I also tried using the property:
<property name="isDeployChangedOnly">true</property>
But, it did not help solve the issue.

<?xml version="1.0" encoding="UTF-8"?>
<process-application
        xmlns="http://www.camunda.org/schema/1.0/ProcessApplication">

    <process-archive tenantId="abc">
        <process-engine>default</process-engine>
        <resource>bpmn/abc/abc.bpmn</resource>
        <resource>bpmn/common/escalation_handler.bpmn</resource>
        <properties>
            <property name="isDeleteUponUndeploy">false</property>
            <property name="isScanForProcessDefinitions">false</property>
        </properties>
    </process-archive>

    <process-archive tenantId="pqr">
        <process-engine>default</process-engine>
        <resource>bpmn/pqr/pqr.bpmn</resource>
        <resource>bpmn/common/escalation_handler.bpmn</resource>
        <properties>
            <property name="isDeleteUponUndeploy">false</property>
            <property name="isScanForProcessDefinitions">false</property>
        </properties>
    </process-archive>

    <process-archive tenantId="xyz">
        <process-engine>default</process-engine>
        <resource>bpmn/xyz/xyz.bpmn</resource>
        <resource>bpmn/common/escalation_handler.bpmn</resource>
        <properties>
            <property name="isDeleteUponUndeploy">false</property>
            <property name="isScanForProcessDefinitions">false</property>
        </properties>
    </process-archive>

</process-application>

1 Like

By default version will be increased. you can set to false by setting this property to false

false

https://docs.camunda.org/manual/7.14/user-guide/process-applications/the-processes-xml-deployment-descriptor/

isResumePreviousVersions to false.

Thank you @cpbpm for your reply.
However, I don’t think “isResumePreviousVersions” is answer to my question.
Firstly, I don’t understand what it means to: resume the previous deployment?

Also, I want the previous version to remain as is and new version to be deployed only if BPMN file changes.

I tried by adding following anyways just to check its impact. It did not solve my problem. A new deployment happened even when BPMN file was not changed.

false

1 Like

Hi @yogeshrnaik,

you can use isDeployChangedOnly to configure this.

Hope this helps, Ingo

@Ingo_Richtsmeier
I already tried isDeployChangedOnly but it did not solve my problem.

If the common model is part of several process archives, it will be re-deployed on any change of another diagram in the same process archive. Could that be the case?

The common model is getting deployed even if there is no change in any other diagram. Not sure how to fix it.
@tiesebarrell any other ideas?
It the issue because the same common model is referenced in different process-archives each having a different tenant id?

I don’t have any specific ideas just yet as to why that might happen, because I would expect using a different tenant id would isolate it.

To figure it out, I would approach it this way: download the BPMN files for the two most recent versions and compare them with a diff tool. What exactly was different might give a hint what is causing it. If there are no differences, it might be something to do with the archives and/or tenants. Also take note of which deployment both versions are part of. That will also provide some information on which tenant it was deployed for.

What way do you deploy model? Modeller ordinary checks model and didnt create new version if no changes occured
But if deployment occurs by using script you can use special tag -F ‘deployment-source=Camunda Modeler’

   model=$(cat $filename |grep '  <bpmn:process id="' | cut -d'"' -f 2)
   upload='upload=@"./'$filename'"'
   deployname='deployment-name='$model
   curl -k -H "Content-Type: multipart/form-data" -X POST -F $upload -F $deployname -F 'deploy-changed-only=true'  -F 'deployment-source=Camunda Modeler' 
      https://localhost:8080/engine-rest/deployment/create

to make sure source is one with modeller

@tiesebarrell
I downloaded the versions and compared them. They are exactly the same.

I have the same problem with rest Api. when i deploy the exact same bpmn, engine doesn’t recognize that the bpmn is unchanged. i used below query params in create deployment request:

http://192.168.74.51:8098/camunda/engine-rest/deployment/create?
deployment-source=CustomerApplication&deploy-changed-only=true&
enable-duplicate-filtering=true&deployment-name=TEST&
deployment-activation-time=2022-02-06T11%3A40%3A56.773570200%2B03%3A30

I also tried isDeployChangedOnly. but it was no use. i looked at camunda rest api implementation. looks like these two query param flags are not considered on creating deployment.

1 Like

I’m using the run platform version 7.17.0 (camunda/camunda-bpm-platform:run-7.17.0) and I have the same issue. I’ve tried all of the suggestions in this thread.

Clearly the “deploy-changed-only” flag is broken.

If you are not using @EnableProcessApplication annotation then editing processes.xml file will not work. You need to add it in your application properties or yml file.

camunda:
  bpm:
    generic-properties:
      properties:
        deployChangedOnly: true

https://docs.camunda.org/manual/7.15/reference/deployment-descriptors/tags/process-archive/#configuration-properties