Deployment on Tomcat-Server

Hi everyone,

I create my BPMN-diagramms in the Camunda Modeler and add my own code with JavaDelegate classes to the service Tasks. To execute my processes, I create a war-package in Eclipse that contains the .bpmn-files as well as the Java-files. After that, I place the war-file inside the webapps-folder of my Tomcat, so that the processes and code get deployed there.

My questions are:

  1. If I want to make a change in one of my .bpmn-files, is it better to just the deploy the process with the Deploy Current Diagram-option in the Camunda Modeler or is it better to build a new war-package again and redeploy it on the server?

  2. What happens if i redeploy a new war-file (with changed .bpmn- and Java-files) to the server, how does this affect the currently running instances? Do they still use the old Java-code and only the newly started instances are executed with the updated changes?

Thanks in advance.

Regards
Michael

As a prerequisite to answering these questions i just want to explain the difference in how these 2 types of deployments works on a basic level.

WAR files are stored on the node they’re deployed to, the JavaDelegates, BPMN files and other artifacts are on the node itself. The BPMN file alone is also persisted in the engine’s DB

Deployment of a BPMN file via the REST API stores the file directly into the Database with nothing on the node.

If you start with a WAR deployment it’s better to keep deploying that way, otherwise you could end up with the DB model not matching the one in the WAR file on the node

New java classes overwrite the old ones and a new version of BPMN process will be created by the engine. This means that all versions will use the same Java class. It also means that if you deploy a WAR file and only change the Java classes it will not version the process but will just overwrite old java classes.

Hope that clarifies things.

2 Likes

Thanks @Niall,

your answer clarifies my understanding perfectly.

Regards
Michael

Hi @Niall,

one further question came up to my mind regarding this sentence:

How exactly are the .bpmn-files stored in the database? Is the xml-content stored as a string in the db or are the files saved in a specific folder and only the path to the files is stored in the db or is it implemented completely different?

Regards
Michael

They’re stored as a byte-array in the database