Access the process engine name

Hi all

The class ProcessEngines provides a method getProcessEngine(String name):


How do I retrieve the name of the process engine, I am currently in, so that I can pass it to getProcessEngine(String)?

I want to call this method within an ExecutionListener.

Thank you.

Hi @miguelgalaxy

There is a method getProcessEngineInfos() can find more details here. The individual List object contains a method getName() documented here. It returns the process engine name.

If you re in default process engine then can use ProcessEngines.getDefaultProcessEngine().getName()

Hi @miguelgalaxy

If you didn’t define more than one process engine then It is better to use getDefaultProcessEngine() method to get the only one default process engine you have.

The process engine configuration can be placed in both processes.xml and the bpm-platform.xml files (See below link)

On way to achieve Multi-Tenancy is by providing one process engine per tenant (See below link)

By the way, in case you are looking to access ProcessEngineServices from ExecutionListener like (HistoryService, IdentityService, ManagementService, TaskService …) then, better to get it as below


or getIdentityService()
or getManagementService()
or getRepositoryService()
or getRuntimeService()
or getTaskService()

Thank you for your replies.

I have a setup with multiple process engines ( => One Process Engine per Tenant).

I don’t use the default process engine.

How do I retrieve the name of the process engine in such a setup?

Hi @miguelgalaxy

May we know the use case of getting the current process engine object?

Hi @miguelgalaxy

One such example can be seen This might help you



I want to use the History REST API in an embedded form.

There, I need to pass the name of the engine as a parameter (/engine/{name}).

In the end, I need to know the name of the process engine in java script so that I can make a REST API call from there.

Hi @miguelgalaxy

You can get the tenantId from embedded form using the available built-in variable camForm as follow

var processDefinitionService = camForm.client.resource('process-definition');
processDefinitionService.get(camForm.processDefinitionId, function(err, processDefinition) {


Thank you.

But instead of the tenantId I need the process engine name.

When I bootstrap a process engine, then I use this statement to set the process engine name:


Hi @miguelgalaxy
Try to get tenant name as follow. Suppose it has same name as the process engine’s name; otherwise you can edit tenant attributes from admin app (See below link)

var processDefinitionService = camForm.client.resource('process-definition');
var tenantService = camForm.client.resource('tenant');
processDefinitionService.get(camForm.processDefinitionId, function(err, processDefinition) {
    	tenantService.get(processDefinition.tenantId, function(err, tenant) {

Hi @hassang

Thank you for your reply.

This sounds like a workaround to me, because I have to create a tenant within each process engine, even if I don’t need a tenant.

If there is no other solution, then I will try you suggestion.

I haven’t really followed the discussion, but the answer to your original question

would be: There does not seem to be an API. It appears you can write something like ProcessEngine engine = (ProcessEngine) execution.getProcessEngineServices(); though, where execution is an instance of DelegateExecution. Of course that cast is not safe and may not work in future versions. Feel free to raise an issue in our JIRA to expose a proper API for that and/or create a pull request.


1 Like


Thank you for you reply. This solves my problem.
I will open a JIRA issue so that this workaround becomes a public API.