Start embedded camunda engine only in specific spring profiles

Hi,

I am using embedded camunda BPM engine in a spring-boot app.

I have configured:

  • @EnableProcessApplication annotation (alongside @SpringBootApplication) in my main application class
  • an empty META-INF/processes.xml file

With this, camunda engine starts up when the app starts up.

I want to use Spring Profiles such that camunda engine runs only in specific profiles.

QUESTION: How do I configure the embedded camunda engine to start up ONLY IN SPECIFIC SPRING PROFILES? In other profiles, it should not even start.

I would appreciate help/pointers/code samples in this regard.

Thanks!

Hi Folks,

I’d appreciate any pointers in this regard!

Thanks!

I don’t quite understand why you would want that. But I see two possible solutions: create two separate spring boot apps or create two application classes (one annotated with “EnableProcessApplication” and the other one not.

I don’t know how to prevent the engine from start based on spring profiles.

Maybe you should exclude in a few SpringConfiguration classes and use profiles for it. For example AConfiguration for profile test and BConfiguration for profile dev. And start app with profile