<!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: Not able to start a process through the Java API
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/jmiguel77">Jose Miguel Loor</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/796824#796824">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 Maciej</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks for the answer. I found this article:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><a class="jive-link-external-small" href="https://access.redhat.com/knowledge/docs/en-US/JBoss_Enterprise_BRMS_Platform/5/html/BRMS_Business_Process_Management_Guide/Configure_the_Engine_to_use_Persistence.html" rel="nofollow">https://access.redhat.com/knowledge/docs/en-US/JBoss_Enterprise_BRMS_Platform/5/html/BRMS_Business_Process_Management_Guide/Configure_the_Engine_to_use_Persistence.html</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>As you said, i had to create a persistent session in order to store the data in the database, and as you said, the process started and ended at once.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>So, i am asuming that i have to register other Handlers for the <strong>Human Task</strong>; but the bottom line is this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><ul><li>It seems to me that my application is doing the job that the server should be doing; i am connecting to the database and the guvnor repository, and persisting all needed data; wich i think is the jbpm's server job</li><li>I had to add a bunch of jars to my app; this might not be meaninful for a desktop application, but in a web application i think they are excessive. True enough, they would not be necessary if the application is deployed in the same server as the brms server, but what if it doesn't ?? In this case, some of those jars are already present in the jboss server, but still, my web app has to deal with the database persistence of the jbpm data, wich, again, i think it is a job for the jbpm server. Am i wrong ??</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Finally, the brms server provides a REST api to interact with the server. For a web app, could this be a more feasible solution ??</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>And again, this approach presents problems by itself. In order to use the REST api with an external java client, i have to change the login-method of the bussiness-central-server, from FORM to BASIC. With this change, i can consume the REST api ok, but the business-central gui, in the brms server, stops working. Any recomendation about this ???</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thanks a lot</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/796824#796824">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>