How to communicate between web applications on camunda wildFly shared engine process

What is the best way / practice to execute a sub process which is available at the other web application from main process ?

given its a shared engine, you should be able to use a BPMN call to start the other subprocess. Alternates are if the subprocess can be started by an event or signal, you could call the engine API to inject the event or signal…



Camunda also has a REST api. Have you checked the possibilities?

Hi Many thanks for your kind response, can you please elaborate more and any reference example helps me to move forward, am a new-bie to this BPM world.

Thank you for the suggestion.
Yes, I am going through them, any reference example helps me to move forward.

The following are the problems I am having while calling the sub process with
If I call on both the cases it is saying, - 'No deployed process definition found with id ‚ÄėProcessId‚Äô.

If you go into cockpit, find the process definition you are trying to call. Bring up the process definition view. On the left panel should be an attribute Definition Key:. Make sure you are using the name as per the definition key if you are using the start process by definition key API.



done but still same problem,

Using dynamic call activity, calling arg0.getProcessEngineServices().getRuntimeService().startProcessInstanceById(‚ÄúprocessDefId-of another web application‚ÄĚ, arg0.getVariables());

OK there are two similar APIs, start by ID and start by Key. The ID is generated by the engine. Id recommend using he start by key version and use the key as previously described. My rationale is, the engine generated ID changes every new deployment, whereas the key will typically map to the latest version deployed.



you can read more about process ids, keys and versions in the docs.

Sebastian is there any equivalent REST service

1 Like

Thank you, finally achieved thru REST call.

I‚Äôm also using Wildfly and have directly integrated a Camunda ‚Äúshared engine‚ÄĚ with web-based services - specifically JAX-RS.

This feature provided via Camunda’s CDI support.

For example, in one of my JAX-RS services I injected the RuntimeService:

private RuntimeService runtimeService;

And then reference the runtimeService to interact with process. In this example I start a model via its Start Message Event:

.setVariable(‚ÄúmyProcessVariable‚ÄĚ, ‚ÄúmyProcessVariableValue‚ÄĚ)

Additionally, if wanting to develop advanced interaction, WildFly provides a very nice set of thread utilities. With these you can take advantage of advanced interactions such as sockets or simply block the JAX-RS session while waiting for Camunda to return its results.

1 Like