Integration of Human Task Service into Distributed Application
mknyazev Jun 7, 2013 10:56 AMDear JBPM experts,
Could you please suggest which of below plans of "Human Task Service" integration is best according with strategic JBPM development plans? A brief overview of our context:
In our backoffice system (with Resin 4 / Oracle DB at server side) we have an Ext GWT based "Work Issues" GUI which is backed by very simple "open / closed" task model.
We currently need such advanced features of jBPM WS-HumanTask realization as reassignments, managed deadlines, group task assignment, etc.
In 1-2 months, we only want to replace our human task model with jBPM 6 "Human task service" implementation and make only basic changes to our existing GUI.
Strategically, in 5-8 months, we are likely to make use of "jBPM Console NG" with its beautiful GUI and probably start adapting jBPM Business Process management implementation. At the moment, we have an imposed by our primary customer design constrain: our Java deployments must either use Resin 4 server (Java EE 6 Web Profile compatible) or be Java SE applications.
So, after thorough investigation of the older "jBPM 5.4 + BPM Console 2.3.8" bundle and the latest "jBPM 6 + jBPM Console NG" we have come up with following options.
(1) Deploy "Human Task Service" from jBPM 6 package on Resin 4 (it should work as the service can be deployed into e.g. Tomcat).
We need the Java-based backend of our system to deal with "Human Task Service", so, to minimize compile time dependencies for it, we are going to implement a "RESTful access facade" to the service via "JAX-RS with JAXB". We consider using existing classes from package "org.jbpm.services.task.impl.model.xml".
Some of them depend on jBPM original "Impl" model classes, so we will need to make more "plain JAXB implementations" of the model interfaces - to not introduce a dependency of our system from internal classes of "Human Task Service".
The "RESTful access facade" is going to be deployed in the same web application as "Human Task Service" - we will "wrap" an existing standard realization of interface "org.kie.internal.task.api.InternalTaskService" - same as it does server side of "jBPM Console NG" right now.
(2) Instead of development of our own "RESTful access facade", use one of following approaches:
2.a. Borrow and extend "org.jboss.bpm.console.server.TaskMgmtFacade" from BPM Console 2.3.8. and integrate it into "jBPM Console NG".
Use example "HT RESTful access" client code from this post for the older Console version: "Example JBPM Console Rest Client (plus example maven SpringMVC webapp)" ( https://community.jboss.org/thread/197164 )
2.b. Make use of "jBPM Console NG" server side. Deploy "org.jbpm.console.ng.ht.backend.server.TaskServiceEntryPointImpl" locally with "Human Task Service" and make our system dependent on package "org.jbpm.console.ng.ht.model". We are NOT sure it is technically possible because we want to access the Errai-based TaskServiceEntryPointImpl NOT from GWT - we needed our Java backend to act as a client for "org.jbpm.console.ng.ht.service.TaskServiceEntryPoint".
We know that Errai Bus uses RESTEasy to marshall / unmarshall entities, so if we cannot use Errai Bus directly, we may probably "re-annotate" TaskServiceEntryPointImpl and model classes from package "org.jbpm.console.ng.ht.model" to become JAX-RS-accessible at client side. Or are they already JAX-RS-accessible WITHOUT GWT?
Any comments would be highly appreciated.
Thank you very much in advance,
Mikhail