Closed miwoe closed 7 years ago
Hm. You probably know the war example https://github.com/camunda/camunda-bpm-spring-boot-starter/tree/master/examples/example-war Buts thats still using an embedded engine. I wonder why I would want to use spring boot in a shared engine scenario anyway. Could you please elaborate what problem you are trying to solve? I mean if the engine is configured via platform.xml anyway, a normal engine-spring application would be enough, this extension mainly deals with configuring/starting and deploying the engine ...
We are 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 solved the problem with the examples by propagating the process engine in the Spring Context:
@Bean
public ProcessEngineService getProcessEngineService() {
return BpmPlatform.getProcessEngineService();
}
@Bean
public ProcessEngine getProcessEngine() {
return this.getProcessEngineService().getDefaultProcessEngine();
}
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 above steps, but always process engine is null this.processEngineService().getDefaultProcessEngine().
Listed out the steps:
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(); }
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-spring</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Please help me to resolve
Hi,
I am currently trying to deploy a Spring Boot application with a shared process engine on a tomcat. I thought I have the solution, but it seems that I have two different application contexts running. I cannot autowire dependencies like RuntimeService.
Is there any example available for using Spring Boot with a shared engine on a servlet container?
Best Regards, Michael