Bootstrap a Process Engine Using the Java API

Using this Java api, iteratively we can create muliple process engine for each tenant in Standalone process engine deployment approach.

ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();

In this case, how to remove/disable the default process engine being created?

How to map the rest api calls of specific tenant to appropriate process engines?

Hi @aravindhrs,

the default process engine is a regular process engine object with the predefined name default.

You can easly change it with ProcessEngineConfiguration#setProcessEngineName().

The engine can be referenced in the URL of the REST resource: https://docs.camunda.org/manual/latest/reference/rest/overview/#engine-usage.

I haven’t tried anything than the default engine up to now, so maybe I missed something inbetween the mapping. But it’s worth to try it out.

Hope this helps, Ingo

@Ingo_Richtsmeier lets say to complete a task using default process engine i use below url:

http://localhost:8080/rest-engine/task/someTaskId/complete

  1. Suppose if i want to specify the other process engine called “newProcessEngine” then the url would look like below?

    http://localhost:8080/rest-engine/newProcessEngine/task/someTaskId/complete

  2. If my understanding is correct, in the case of default process engine we no need to specify processengine name in the url, if we want to direct request to specific process engine we have to specify processEngine name in the request url right?

  3. If yes, what happened if i overwrite the name of the default process engine and want to route the request to default engine, do i need to specify process engine name in that case?

Hi @aravindhrs,

have a look at the docs: https://docs.camunda.org/manual/7.11/reference/rest/overview/#engine-usage

In my running spring boot environment both URLs deliver the same result: http://localhost:8080/rest/engine/default/process-definition and http://localhost:8080/rest/process-definition.

Hope this helps, Ingo

1 Like

Thanks @Ingo_Richtsmeier.

what if i overwrite the name of the default process engine as “customEngine” and want to route the request to default engine, do i need to specify process engine name in that case?

http://localhost:8080/rest/engine/customEngine/process-definition and http://localhost:8080/rest/process-definition.

Will both the above url works???

Hi @aravindhrs,

I havn’t use this option by myself right now.

The implementation in the REST api seems quite abstract, so a lot of possiblities there:

I don’t know how they managed the ContainerManagedProcessEngineProvider in the camunda-bpm-spring-boot-starter-rest . But, as it’s open source your can figure it out by yourself.

Hope this helps, Ingo

1 Like

@Ingo_Richtsmeier thanks :+1: