generic java delegate not found when migrating from activiti to camunda

374 views
Skip to first unread message

giovan...@gmail.com

unread,
Sep 15, 2014, 5:44:12 AM9/15/14
to camunda-...@googlegroups.com
Hi
Background: We are using the "Standalone (Remote) Process Engine Server" (JBoss eap 6.2) option and have several separate process controlled apps. Some of the processes span across multiple apps and therefore we use a generic java delegate (JAXWSWebServiceDelegate.java) embedded in the Camunda Rest API web app. (blog: http://www.bpm-guide.de/2010/12/09/how-to-call-a-webservice-from-bpmn/) This generic delegate class act as the delegate for ALL service tasks across ALL processes and ties our processes to the business logic in web services. This delegate (and related classes) is packaged as a jar file inside the Camunda rest web app /lib/.. folder. We have done this in Activiti and it works great. However, in Camunda we get this error when a service task is executed:

Caused by: java.lang.ClassNotFoundException: za.co.discoverygrouprisk.processcontroller.web.JAXWSWebServiceDelegate from [Module "deployment.camel-test-0.1.0-SNAPSHOT.war:main" from Service Module Loader]

We have deployed the process (*.bpmn) as part of a war file as described on the start-up manual. It seems that the module "deployment.camel-test-0.1.0-SNAPSHOT.war:main does not have 'visibility' to delegate classes inside the lib folder of the camunda rest web app. Any ideas how we can config Camunda to fix this class loading issue?

PS We do not want to put this generic delegate class inside the war file used to deploy our processes since it contains quite a lot of transitive dependencies that makes the process war files huge and also does not fit well with our architecture as outlined above.

Thank you.

giovan...@gmail.com

unread,
Sep 15, 2014, 6:43:07 AM9/15/14
to camunda-...@googlegroups.com, giovan...@gmail.com
In short: our processes does not have application boundaries, we need all processes to have a singe java delegate on the class-path which is our jar file embedded in the lib folder of the Camunda Rest API. This works well with Activiti but we get a ClassNotFoundException in with Camunda. Please point me in the right direction.
Thank you.

giovan...@gmail.com

unread,
Sep 15, 2014, 7:03:22 AM9/15/14
to camunda-...@googlegroups.com, giovan...@gmail.com
Here is our processes.xml:
<?xml version="1.0" encoding="UTF-8" ?>

<process-application
xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<process-archive name="proc-ctrl-task-test">
<process-engine>default</process-engine>
<properties>
<property name="isDeleteUponUndeploy">true</property>
<property name="isScanForProcessDefinitions">true</property>
</properties>
</process-archive>

</process-application>

Currently the war contains one bmpn file with a single service task.
Any suggestions?

Daniel Meyer

unread,
Sep 15, 2014, 7:30:07 AM9/15/14
to camunda-...@googlegroups.com, giovan...@gmail.com
Hi Giovanni,

how do you deploy you application with activiti? 
Are you:
a) building a custom WAR file which includes the process engine, the rest API + you custom classes and processes?
b) adding your processes and classes to the activiti-explorer webapp?
b) adding your processes and classes to the activiti-rest webapp?

Moving to camunda, do you want to use a shared process engine or an embedded process engine?

If an embedded process engine is enough for you, it may be worthwhile checking out the following example:

It shows how to build a standalone war file, embedding the process engine and the REST api.

Cheers,
Daniel


Giovanni Roos

unread,
Sep 15, 2014, 8:01:23 AM9/15/14
to camunda-...@googlegroups.com
Hi Daniel
We do option a) EXCEPT that we do not deploy our process with this artifact (called process-controller). We deploy our processes with Activiti-explorer's drag and drop page. We create the process-controller component with a maven war overlay to create a custom war containing the Process Engine + REST api + custom classes (jar file containing the shared java delegate file).
Make sense?

Thank you.

--
You received this message because you are subscribed to a topic in the Google Groups "camunda BPM users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/camunda-bpm-users/WFVqiEZDSJA/unsubscribe.
To unsubscribe from this group and all its topics, 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/f2d503cd-9f45-4e15-a746-763b728170e0%40googlegroups.com.

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

Giovanni Roos

unread,
Sep 15, 2014, 9:45:14 AM9/15/14
to camunda-...@googlegroups.com
Hi Daniel

A solution (not sure if it is the best) that we found:

* Add a WEB-INF to the war file containing the processes and 
* add a  jboss-deployment-structure.xml file to this folder. It has the following contents:
* contents of this file references the process-controller component:


<jboss-deployment-structure>
  <deployment>
    <dependencies>
      <module name="deployment.grouprisk-process-controller.war"/>
    </dependencies>
  </deployment>
</jboss-deployment-structure>

Ciao
Giovanni

giovan...@gmail.com

unread,
Sep 17, 2014, 4:00:24 AM9/17/14
to camunda-...@googlegroups.com, giovan...@gmail.com
The solution above is a hack and does not solve the real problem. Although our java delegate is found adding the above config there are other class-loading issues and expression resolutions that does not work correctly.
Please continue this discussion on stream with subject "Standalone Remote process server architectural style support in camunda"
Reply all
Reply to author
Forward
0 new messages