I use Model API to define process and I faced with problem that process is deployed every time, even if its definition was not changed.
As I can see resolving resources to deploy, also due to their potential changes is implemented here:
This method use also another method
which compares two XML process definitions - existing, and new (potentially the same as existing). But when these XMLs are generated by Model API, all element ids are generated on the fly and are different for every single deploy of the same process definition - e.g.
<bpmndi:BPMNShape bpmnElement="..." id="BPMNShape_99f63448-ae44-4d4a-a315-f42d253188a9">
Hence, every generated process definition XML by Model API is different from previous and is deployed every time.
Deployment realisation in my code:
repositoryService .createDeployment() .name("shop-deployment") .source("shop") .tenantId("shop") .enableDuplicateFiltering(true) .addModelInstance("shop.bpmn", modelInstance) .deploy()
Does anyone know how to handle it?
Camunda v. 7.11