Get process engine configuration from service

Hi! How can I get process engine configuration from a service?

I need to get process engine inforatation, for example Process Engine Name, from using TaskService or RuntimeService instance as I’m using more than one process engine and I have to do some operations distinguishing the working one

You obtain services like TaskService from a ProcessEngine object via the method ProcessEngine#getTaskService. That process engine object offers method #getName and #getProcessEngineConfiguration that should solve your problem. See https://docs.camunda.org/javadoc/camunda-bpm-platform/7.5/org/camunda/bpm/engine/ProcessEngine.html

Thanks for reply @thorben I just use this case for other operations, but in this case I haven’t process engine instances to use, because I have only services instances to pass as argument to a method, is there a way to get process engine configuration by another way as well as what you described?

I’m afraid that is not possible if you have only the service instance at hand.

Cheers,
Thorben