Deploy .war-File to Camunda via Docker

Hey :slight_smile:

I did the 2 Camunda Tutorial for Java Developers but I am stuck at the point, when I need to deploy the .war-File.

I am using Docker to run Camunda. And I was able to deploy the war-File with the help of the GitHub documentation. So that was what I did:

docker run -d --name camunda -p 8080:8080 \
           -v /PATH/TO/DEMO/twitter.war:/camunda/webapps/twitter.war \
           camunda/camunda-bpm-platform:latest

First of all, how can I deploy .war-File to an existing and running container? Because with the above method I created a new container.

The process is now in Camunda, but if I start the process it shows no running instance of the process.

Any suggestion how I can fix this?

Attached you can find the .bpmn.

Thank you very much!

Cheers,
Matthiasprocess.bpmn (5.5 KB)

Hey Matthias,

For your question:

First of all, how can I deploy .war-File to an existing and running container?

I’m not a Docker expert, but I think that you can mount the whole /PATH/TO/DEMO directory, and map it to /camunda/webapps, instead of only the twitter.war archive. This way, you should be able to drop new archives in /PATH/TO/DEMO and they will be deployed on the running container.

For your question:

The process is now in Camunda, but if I start the process it shows no running instance of the process. Any suggestion how I can fix this?

Your BPMN process consists of ServiceTasks which do not introduce any wait states. This means that the whole process is executed in a single transaction, all at once. You won’t be able to see any running instances, but you should be able to see a Historic Process instance in the History view of the Process Definition.

As an alternative, you can introduce a UserTask in your process, which will block the process execution until that task is completed.

Best,
Nikola

2 Likes

Thanks for your reply!

You won’t be able to see any running instances, but you should be able to see a Historic Process instance in the History view of the Process Definition.

Thats the problem. Because after running process I don’t see any completed processes…
Therefore I assume that I made a mistake during the deployment…
Attached you can find a screenshot how the process screen looks like after I run the process.

Right! I’m guessing you’re using the Community Edition Docker image. The Community Edition doesn’t provide History views, that’s an Enterprise Edition feature.

You can confirm that your Process Instances have finished through the Rest API. Just use:
http://localhost:8080/engine-rest/history/process-instance?finished=true to fetch all your finished Process Instances (adjust the host and port according to your setup).

You can see all the parameters for this endpoint here: https://docs.camunda.org/manual/latest/reference/rest/history/process-instance/get-process-instance-query/

Have fun!
Nikola