Shared process engine - tomcat - got null for process engine

Hi,

I am also using Camunda in a layered microservice context and some services are controlled by BPM process. As the BPM process is invoking some other BPM processes of other domains, we preferred a shared engine with a central Camunda installation and its central cockpit and administration tools.

I have followed these steps

Issue: Got null this.processEngineService().getDefaultProcessEngine()

Listed out the steps:

  1. Downloaded Tomcat
  2. Downloaded camunda-webapp-tomcat-standalone-7.14.0.war, unzip and drop it in the webapps
  3. My own spring boot application is build and when i tried to deployed into same tomcat, always got null processEngineService().getDefaultProcessEngine()

Please find the sample code:
@bean
public ProcessEngineService processEngineService() {
return BpmPlatform.getProcessEngineService();
}
@bean(destroyMethod = “”)
public ProcessEngine processEngine(){
ProcessEngine processEngine = this.processEngineService().getDefaultProcessEngine();
System.out.println(" Process engine is successfully created "+processEngine);
return processEngine;
}
@bean
public SpringProcessApplication processApplication()
{
return new SpringProcessApplication();
}
Following dependencies:
org.camunda.bpm camunda-engine provided
org.camunda.bpm camunda-engine-spring
org.springframework spring-context
org.apache.tomcat.embed tomcat-embed-jasper provided
org.springframework.boot spring-boot-starter-tomcat provided org.springframework.boot spring-boot-starter-web

Spring boot: 2.2.7
Camunda:7.14.0
Please let me know any other details are required.

Why are you using tomcat along with spring boot - you should really only need one of those.

Thanks Niall for your quick response. I am using spring boot which excludes tomcat and finally able to work on shared process engine…

But using Delegate Expression ${beanName}, got Unknown property used in expression: ${beanName} Cause: Cannot resolve identifier ‘beanName’. If i use package name, it is working fine.

I have used camunda-engine-spring in the each application and heard that SpringProcessApplicationElResolver will detect automatically to identify the right application context. am not sure how to validate this and pls help me on this.