I was trying to deploy multiple process application's (using @ProcessApplication annotation) in a WAR file. The deployment failed and it gave me the below stack trace:
SEVERE: An application must not contain more than one class annotated with @ProcessApplication.
Application '/camunda-ism-0.0.1-SNAPSHOT' contains the following @ProcessApplication classes:
com.nvarghese.camunda.CamundaSignalReceivedProcessApplication
com.nvarghese.camunda.IsmProcessApplication
com.nvarghese.camunda.CamundaSignalProcessApplication
Jul 02, 2015 3:14:41 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error during ServletContainerInitializer processing
javax.servlet.ServletException: An application must not contain more than one class annotated with @ProcessApplication.
Application '/camunda-ism-0.0.1-SNAPSHOT' contains the following @ProcessApplication classes:
com.nvarghese.camunda.CamundaSignalReceivedProcessApplication
com.nvarghese.camunda.IsmProcessApplication
com.nvarghese.camunda.CamundaSignalProcessApplication
at org.camunda.bpm.application.impl.ServletProcessApplicationDeployer.onStartup(ServletProcessApplicationDeployer.java:69)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1930)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
I checked the camunda code and it is clearly checking for one process application in a web context. But I would like to have multiple process applications in web context (WAR file). What can be done to achieve it ? Should I write explicit code to deploy them by calling processEngine's API ?