Classless processes

We are using BPMN processes purely by using the rest api. These processes are compiled to war files and included in the docker engine.

Currently, add an empty java file like this to every process.

package org.camunda.bpm.destiny;

import org.camunda.bpm.application.ProcessApplication;
import org.camunda.bpm.application.impl.ServletProcessApplication;

@ProcessApplication("Test Process App")
public class TestProcessApplication extends ServletProcessApplication {
	// empty implementation
}

I’ve seen the ability to use classless processes. If I’m correct, these don’t require the java files (what we don’t use, we use the http connector to make rest calls).

I’ve based my code on https://github.com/camunda/camunda-bpm-examples/tree/7.7/servicetask/rest-service since that isn’t using any java code, but it seems that that code compiles to a jar file, and I guess I can’t deploy that to tomcat.

If I change the packaging in pom.xml to war, camunda finds the file, but doesn’t register the process.

Am I correct that it is possible to create war files without java code in them that camunda can use? This could simplify our workflow to create new processes.

You just need to deploy the bpmn file. You don’t need to package it in a jar file or war. Just use the deployment rest endpoint.

And is there a way to embed the bpmn files in a docker image like we can do with war files?

You could write a small plugin that executes a Deployment through the Java API on engine startup.

see GitHub - DigitalState/camunda-administrative-user-plugin: Camunda BPM Engine plugin that generates a administrative user on engine start.

and see camunda-bpm-platform/InvoiceProcessApplication.java at 595e232e0b4d43f971afb3e0874f99b9dea4814c · camunda/camunda-bpm-platform · GitHub

The second link is the default application that runs when starting the default camunda docker container. You can see how they are executing a deployment for the files. You would just need to your point file locations to a volume.

and

here is another example that lets your version control your non-jar/war process projects and auto deploy through jenkins:

Thanks for the links.

I’ve just noticed that I could just create one empty process application and include all the bpmn files in the resources of that application. That way, I only need to build one app and have camunda pick up all the bpmn files.

1 Like

Does camunda redeploy the bpmn on each restart of the server with that setup?

I’m not sure, but docker does that for me. When a bpmn is changed, a new container is build and the old container is replaced.
The h2 storage is placed on a volume so it is persisted over containers. Every new start, I can see camunda deploying my application.

@MichaelArnauts why go to the trouble of build By a new container for a change to a bpmn file? Rather than just rest deploy the change?