javawildflycamunda

Disable Camunda engine at startup in Widlfly?


I have one application using embedded Camunda engine 7.16, deployed in Wildfly 15, and it works fine.

for some weird architectural reasons, I now need to be able to deploy the same application a second time, in a different environment in which I would like to disable Camunda, because it’s not used there (and the underlying DB doesn’t have the Camunda tables).

In Spring Boot, we can easily disable the starter through properties, but how can we achieve the same in Wildfly ? I have the processes.yml file in the resources/META-INF folder, but is there a way to ignore it a startup ?

Otherwise, I will probably look at some options from Is there a quick way to delete a file from a Jar / war without having to extract the jar and recreate it? , and based on a property at startup, I would try to delete the processes.xml in the war file in the container before it actually starts the application, but that’s hack-ish to say the least

Thanks


Solution

  • deleting the file in the war before application startup actually worked - super hackish, but the only solution I found :

    zip -d ${WILDFLY_HOME}/standalone/deployments/my-service.war WEB-INF/classes/META-INF/processes.xml