Deployment of multiple process applications in a Web application archive (WAR)

796 views
Skip to first unread message

Nibin Varghese

unread,
Jul 2, 2015, 6:27:47 AM7/2/15
to camunda-...@googlegroups.com
Hi All,

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:

8<---------8<------------
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)

8<---------8<------------

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 ?

Regards,
Nibin

Christian Lipphardt

unread,
Jul 2, 2015, 7:20:17 AM7/2/15
to camunda-...@googlegroups.com, nibi...@gmail.com
Hi Nibin,

It is not possible to have multiple Process Application in a WAR, but you can have multiple process archives in a WAR. One process application can contain any number of process archive deployments, each of which can be deployed to a different process engine with different resources. See the section on the processes.xml deployment descriptor at [1] for details.
Another example of multiple process archives is also given at [2]. (You have to scroll down till the 'deployment' part.

Cheers,
Christian

thorben....@camunda.com

unread,
Jul 2, 2015, 7:22:51 AM7/2/15
to camunda-...@googlegroups.com
Hi Nibin,

Could you please elaborate on your use case where you would need that?

Thanks,
Thorben

Nibin Varghese

unread,
Jul 2, 2015, 7:28:01 AM7/2/15
to camunda-...@googlegroups.com
Hi Thorben,

My use case and need is quite specific to the environment and constraints in which I am trying to operate. The application (WAR) that I manage consists of different set of process'es (BPMN process'es) and I would like to ship them as a single WAR application with different process applications (PA's) inside it.

Regards,
Nibin

--
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/6632df22-0462-4406-80f6-640a250efc5f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Nibin Varghese

unread,
Jul 2, 2015, 7:31:05 AM7/2/15
to camunda-...@googlegroups.com
Hi,

Thanks for the response Christian. But is there any reason why I cannot have multiple process applications in a web context ? Is there any technical limitations for it. 

I read it in Camunda docs that the design for process application is influenced by JAXRS application. Now JAX-RS allows to deploy multiple jaxrs application's. I know this comparison is quite irrelevant. But just letting you know that I don't see any technical issues to have multiple process applications in a web context.

Regards,
Nibin 

On Thu, Jul 2, 2015 at 4:50 PM, Christian Lipphardt <christian...@gmail.com> wrote:
Hi Nibin,

It is not possible to have multiple Process Application in a WAR, but you can have multiple process archives in a WAR. One process application can contain any number of process archive deployments, each of which can be deployed to a different process engine with different resources. See the section on the processes.xml deployment descriptor at [1] for details.
Another example of multiple process archives is also given at [2]. (You have to scroll down till the 'deployment' part.

--
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.

thorben....@camunda.com

unread,
Jul 2, 2015, 10:58:36 AM7/2/15
to camunda-...@googlegroups.com
Hi Nibin,

Thanks for the clarification. Deploying different sets of processes can be achieved with multiple archives, as Christian pointed out. What does your use case require in addition to that which cannot be provided with this approach?

I am not aware of a technical limitation for the one process application per WAR restriction. We'll discuss this internally.

Cheers,
Thorben
Reply all
Reply to author
Forward
0 new messages