[jBPM Development] - Re: Integration of Human Task Service into Distributed Application
by Mikhail Knyazev
Mikhail Knyazev [https://community.jboss.org/people/mknyazev] created the discussion
"Re: Integration of Human Task Service into Distributed Application"
To view the discussion, visit: https://community.jboss.org/message/823038#823038
--------------------------------------------------------------
Hi Mauricio,
+>> Nice plans, if you are looking forward to use the jbpm console ng it would be nice if you share your thoughts and+
+>> ideas about which requirements do you currently have or expect from it. So we can make sure to implement what is expected.+
Thank you for the invitation - I'll certainly get back to it on the next iteration, I mean after the "Human Task Service" model integration into our distributed system. Please see further comments below.
+>> About the two plans..+
+>> The plan 1 sounds more appropriate to me, you don't need to mess with the console if you are not using it.+
+>> The services which are inside the console backend are console specific, if you use the HT module alone you can tweak it for your special use case.+
+>> You should take a look at our rest integration: https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/kie-remo... https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/kie-remo...
I've investigated the code. It is really great that we have such an integration layer out-of-the-box. Some related considerations:
(I) The above-mentioned latest "jBPM 6 + jBPM Console NG" bundle is deployable to Tomcat 7 - it handles persistence via org.hibernate.ejb.HibernatePersistence. In the same time, "org.kie.services.remote.jms.RequestMessageBean" from "droolsjbpm-integration" introduces dependency on "javax.ejb.MessageDrivenContext", which makes bundle <<"jBPM 6 + jBPM Console NG" *+ "kie-remote"*>> impossible to deploy on a generic "Java EE 6 Web Profile"-compatible system because it supports only "EJB 3.1 Lite" by specification, while MDB-s are not supported by "EJB 3.1 Lite" ( http://www.oracle.com/technetwork/articles/javaee/javaee6overview-part3-1... http://www.oracle.com/technetwork/articles/javaee/javaee6overview-part3-1... )
Wouldn't be it more portable/flexible to provide the JMS version of the API (we are mostly interested in the "Tasks" part) via "bare JMS", i.e. without MDB(-s) ?
(II) It is common to expect XA / distributed transactions support from components in enterprise environments, which are targeted by jBPM. The components should nearly always integrate with existing / upcoming other subsystems, which makes interoperability one of their key qualities. At the moment, strictly speaking, "kie-remote" is either transactional (the JMS API) or highly interoperable out-of-the-box (the "JAX RS over HTTP" API).
Our initial intention was using the JAX RS version as it should be generally easier. However it is not transactional out-of-the-box. Here are some approaches to overcome this vital in enterprise environment limitation:
a. Client-side-managed transactions for JAX-RS
- [general purpose; prototype realization] https://community.jboss.org/docs/DOC-13311 https://community.jboss.org/wiki/TransactionalSupportForJAXRSBasedApplica...
- [part of specific system] http://docs.marklogic.com/guide/rest-dev/transactions http://docs.marklogic.com/guide/rest-dev/transactions
- [part of specific system] https://wiki.duraspace.org/display/FF/Transaction+enabled+REST+API https://wiki.duraspace.org/display/FF/Transaction+enabled+REST+API
b. Required by Java EE JAX-RS does not require HTTP as the transport. Here are descriptions for CXF realization of XA-transactional JAX-RS over JMS:
[fully featured documented example] https://github.com/Talend/tesb-rt-se/tree/master/examples/cxf/jaxrs-jms-http https://github.com/Talend/tesb-rt-se/tree/master/examples/cxf/jaxrs-jms-http
[related article] http://sberyozkin.blogspot.ru/2012/07/jms-transport-support-for-cxf-jax-r... http://sberyozkin.blogspot.ru/2012/07/jms-transport-support-for-cxf-jax-r...
Option (a) seems not production ready, plus we already cound on XA transactions in our distributed architecture to support various active resources participation in one distributed transaction.
Option (b) looks generally good for us (we already use CXF), but we probably do not want to use it because client-side code loses "lightness" of JAX RS (take a look at say "postGetMessage" method implementation here: https://github.com/Talend/tesb-rt-se/blob/master/examples/cxf/jaxrs-jms-h... https://github.com/Talend/tesb-rt-se/blob/master/examples/cxf/jaxrs-jms-h... )
*So, I'd like to ask whether you are going to evolve both the "JMS" and "REST" versions of the API-s to cover same eventual functionality, first of all *for Human Tasks*? If yes, then we probably choose the "explicit JMS" integration option.*
By the way, likely, JAX-WS in conjunction with WS-AtomicTransaction and WS-Coordination should have highest interoperability and be transactional in the same time. (see e.g. http://www.ibm.com/developerworks/library/ws-transjta/ http://www.ibm.com/developerworks/library/ws-transjta/ )
Didn't you consider this combination as an API for "kie-remote" to expose?
Best regards,
Mikhail
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/823038#823038]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 7 months
[JBoss AS 7 Development] - Continual JBOSS internal error
by David Harris
David Harris [https://community.jboss.org/people/dmwpepper] created the discussion
"Continual JBOSS internal error"
To view the discussion, visit: https://community.jboss.org/message/822072#822072
--------------------------------------------------------------
I'm consistently getting an internal jboss error when logging into a the JBOSS JBPM(5.4) console: Its displayed immediately after logging in. What could be causing it? Thanks for your help!!
URL: ' http://localhost:8080/gwt-console-server/rs/tasks/krisv http://localhost:8080/gwt-console-server/rs/tasks/krisv'
Action: 'org.jboss.bpm.console.client.task.LoadTasksAction'
Exception: 'class com.google.gwt.http.client.RequestException'
HTTP 500:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.jboss.resteasy.spi.UnhandledException: java.lang.NoClassDefFoundError: org/jboss/netty/channel/socket/ClientSocketChannelFactory
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340)
org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
root cause
java.lang.NoClassDefFoundError: org/jboss/netty/channel/socket/ClientSocketChannelFactory
org.hornetq.core.remoting.impl.netty.NettyConnectorFactory.createConnector(NettyConnectorFactory.java:40)
org.hornetq.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:1118)
org.hornetq.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:993)
org.hornetq.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:224)
org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:663)
org.jbpm.task.service.hornetq.HornetQTaskClientConnector.connect(HornetQTaskClientConnector.java:96)
org.jbpm.task.service.hornetq.HornetQTaskClientConnector.connect(HornetQTaskClientConnector.java:76)
org.jbpm.task.service.TaskClient.connect(TaskClient.java:845)
org.jbpm.integration.console.TaskClientFactory.newAsyncInstance(TaskClientFactory.java:101)
org.jbpm.integration.console.TaskClientFactory.newAsyncInstance(TaskClientFactory.java:111)
org.jbpm.integration.console.TaskClientFactory.newInstance(TaskClientFactory.java:65)
org.jbpm.integration.console.TaskManagement.connect(TaskManagement.java:61)
org.jbpm.integration.console.TaskManagement.getAssignedTasks(TaskManagement.java:124)
org.jboss.bpm.console.server.TaskListFacade.getTasksForIdRef(TaskListFacade.java:101)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/822072#822072]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 7 months
[jBPM Development] - Integration of Human Task Service into Distributed Application
by Mikhail Knyazev
Mikhail Knyazev [https://community.jboss.org/people/mknyazev] created the discussion
"Integration of Human Task Service into Distributed Application"
To view the discussion, visit: https://community.jboss.org/message/821982#821982
--------------------------------------------------------------
Dear 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 it 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 your "Impl" model classes, to 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 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
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/821982#821982]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 7 months
[jBPM Development] - end-tasks attribute in task node
by sam ni
sam ni [https://community.jboss.org/people/sam435] created the discussion
"end-tasks attribute in task node"
To view the discussion, visit: https://community.jboss.org/message/821632#821632
--------------------------------------------------------------
I'm having a set of task instances for a task. These are getting created in the action class within the node-enter event of the task node.
I have added the attribute end-tasks="true" and I am having a timer for the task.
When the timer is completed, all the tasks have to be ended and execution should go to next node.
This seems to work fine if any of the task instances have not been ended.
If I end one of the task instance and the remaining ones are still open, the task is not ended even after the timer has completed.
<task-node name="task node" create-tasks="false" end-tasks="true">
<event type="node-enter">
<action name="test action" class="com.TestAction">
</action>
</event>
<task name="task1" >
<timer duedate="2 minutes" transition="signalcheck">
</timer>
</task>
<transition to="next node"></transition>
</task-node>
I'm using jbpm v3.
Please help.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/821632#821632]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 7 months