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()
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.
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
execution.getProcessEngineServices().
getHistoryService() or getIdentityService() or getManagementService() or getRepositoryService() or getRuntimeService() or getTaskService()
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)
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.