Deployment file formats

Hello,

I have a question about that which file format is supported by Process Engine to deploy the process? As I know it provides the ‘.bpmn’ and ‘.bpmn20.xml’ files. Does it supports the zip file format through REST API? We are migrating from Activiti to Camunda, and Activiti was supported to upload the Zip file through REST API as well.

Hi @Deep_Shah,

Deployment via zip file is not a feature of Camunda BPM at this time. You could either upload files individually or add a custom endpoint to the REST API that accepts zip files. For the latter, see https://docs.camunda.org/manual/7.9/reference/rest/overview/embeddability/ how to emed the REST API into a custom JAX-RS application.

Cheers,
Thorben

Hi Thorben,

If we will add the custom endpoint and if it handles the zip file but after that how can we pass that zip to the engine?

Your endpoint would have to do the work of extracting the contents and then add them as individual deployment resources to the builder.

Okay.
So, is there any reason that Camunda itself does not provide this feature? Because as we were using the Activiti, it provides the support of ‘.bar’ file which can have multiple deployment resource.

And other than zip which file formats it supports like: ‘.bpmn’, ‘.bpmn20.xml’ etc?

My answer was not entirely correct: In the Java API, you have DeploymentBuilder#addZipInputStream. It’s not exposed in the REST API though. Check https://docs.camunda.org/javadoc/camunda-bpm-platform/7.9/org/camunda/bpm/engine/repository/DeploymentBuilder.html for specifics on file extensions.

Cheers,
Thorben

I know its too old to catchup with this coversation. Yet, I tried with below solution. It worked for me. So, posting it, thinking it will help someone to work with .zip archive deployments in Camunda v7.18.

If you have the same use case you can try out the same approach and post here incase you face any challenges.

processEngine.getRepositoryService().createDeployment().tenantId(tenantId)
                    .name(deploymentName)
                    .enableDuplicateFiltering(true)
                    .addZipInputStream(new ZipInputStream(file.getInputStream()))
                    .deploy();

Hi @Rajamohan_Raju

Please don’t duplicate you questions and waking up old threads. Can you just create a new topic please?