<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: Integration of Human Task Service into Distributed Application
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/mknyazev">Mikhail Knyazev</a> in <i>jBPM Development</i> - <a href="https://community.jboss.org/message/823038#823038">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi Mauricio,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>&gt;&gt; Nice plans, if you are looking forward to use the jbpm console ng it would be nice if you share your thoughts and </em></p><p><em>&gt;&gt; ideas about which requirements do you currently have or expect from it. So we can make sure to implement what is expected.</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>&gt;&gt; About the two plans..</em></p><p><em>&gt;&gt; The plan 1 sounds more appropriate to me, you don't need to mess with the console if you are not using it. </em></p><p><em>&gt;&gt; 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.</em></p><p><em>&gt;&gt; You should take a look at our rest integration: <a class="jive-link-external-small" href="https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/kie-remote/kie-services-remote" target="_blank">https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/kie-remote/kie-services-remote</a></em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I've investigated the code. It is really great that we have such an integration layer out-of-the-box. Some related considerations:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>(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 &lt;&lt;"jBPM 6 + jBPM Console NG" <strong>+ "kie-remote"</strong>&gt;&gt; impossible to deploy on a generic "Java EE 6 Web Profile"-compatible system because it supports only "EJB 3.1 Lite" by specification, while <span>MDB-s are not supported by "EJB 3.1 Lite" ( </span><a class="jive-link-external-small" href="http://www.oracle.com/technetwork/articles/javaee/javaee6overview-part3-139660.html#ejblite" rel="nofollow" target="_blank">http://www.oracle.com/technetwork/articles/javaee/javaee6overview-part3-139660.html#ejblite</a><span> )</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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) ?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>(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).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>a. Client-side-managed transactions for JAX-RS</p><p><span>- [general purpose; prototype realization] </span><a class="jive-link-wiki-small" href="https://community.jboss.org/docs/DOC-13311" target="_blank">https://community.jboss.org/wiki/TransactionalSupportForJAXRSBasedApplications</a></p><p><span>- [part of specific system] </span><a class="jive-link-external-small" href="http://docs.marklogic.com/guide/rest-dev/transactions" rel="nofollow" target="_blank">http://docs.marklogic.com/guide/rest-dev/transactions</a></p><p><span>- [part of specific system] </span><a class="jive-link-external-small" href="https://wiki.duraspace.org/display/FF/Transaction+enabled+REST+API" rel="nofollow" target="_blank">https://wiki.duraspace.org/display/FF/Transaction+enabled+REST+API</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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:</p><p><span>[fully featured documented example] </span><a class="jive-link-external-small" href="https://github.com/Talend/tesb-rt-se/tree/master/examples/cxf/jaxrs-jms-http" target="_blank">https://github.com/Talend/tesb-rt-se/tree/master/examples/cxf/jaxrs-jms-http</a></p><p><span>[related article] </span><a class="jive-link-external-small" href="http://sberyozkin.blogspot.ru/2012/07/jms-transport-support-for-cxf-jax-rs.html" rel="nofollow" target="_blank">http://sberyozkin.blogspot.ru/2012/07/jms-transport-support-for-cxf-jax-rs.html</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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. </p><p><span>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: </span><a class="jive-link-external-small" href="https://github.com/Talend/tesb-rt-se/blob/master/examples/cxf/jaxrs-jms-http/client/src/main/java/client/JMSHttpClient.java" target="_blank">https://github.com/Talend/tesb-rt-se/blob/master/examples/cxf/jaxrs-jms-http/client/src/main/java/client/JMSHttpClient.java</a><span> )</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>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 <strong>for Human Tasks</strong>? If yes, then we probably choose the "explicit JMS" integration option.</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span>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. </span><a class="jive-link-external-small" href="http://www.ibm.com/developerworks/library/ws-transjta/" rel="nofollow" target="_blank">http://www.ibm.com/developerworks/library/ws-transjta/</a><span> ) </span></p><p>Didn't you consider this combination as an API for "kie-remote" to expose?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Best regards,</p><p>&#160; Mikhail</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/823038#823038">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2035">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>