<!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: Problem with Rest Interface in JBPM 5.2
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/chandrasachin16">Sachin Chandra</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/740100#740100">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 ,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have few questions.Which version of JBPM&#160; are you using ? In my previous discussion I had discussed about error related to time out. I tried to investigate and found few things which I would like to put down.</p><p>My JBPM version is 5.2 and the url by which I was trying to authenticate was-&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <a class="jive-link-external-small" href="http://localhost:8080/gwt-console-server/rs/process/j_security_check" target="_blank">http://localhost:8080/gwt-console-server/rs/process/j_security_check</a></p><p><span>I checked the list of url available which are exposed by REST interface by using the url -&gt;&#160;&#160;&#160;&#160;&#160; </span><a class="jive-link-external-small" href="http://localhost:8080/gwt-console-server/rs/server/resources/jbpm" target="_blank">http://localhost:8080/gwt-console-server/rs/server/resources/jbpm</a><span> </span></p><p>The list is as given below:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>// List of url's ----------------------------------------------------------------------------- //</p><p>Server Info</p><p>General REST server information</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/server/status&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/server/resources/{project}&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; text/html</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Process Management</p><p>Process related data.</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/process/definition/{id}/new_instance&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/process/instance/{id}/state/{next}&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/process/definition/{id}/image&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; image/*</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/process/instance/{id}/activeNodeInfo&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/process/definition/history/{id}/nodeInfo&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/process/definitions&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/process/definition/{id}/remove&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/process/definition/{id}/instances&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/process/instance/{id}/dataset&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; text/xml</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/process/instance/{id}/end/{result}&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/process/instance/{id}/delete&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/process/tokens/{id}/transition&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/process/tokens/{id}/transition/default&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/process/definition/{id}/image/{instance}&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; image/*</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Task Lists</p><p>Access task lists</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/tasks/{idRef}&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/tasks/{idRef}/participation&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Task Management</p><p>Manage task instances</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/task/{taskId}/assign/{ifRef}&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/task/{taskId}/release&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/task/{taskId}/close&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/task/{taskId}/close/{outcome}&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>User management</p><p>Manage user and groups</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/identity/sid/invalidate&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; text/plain</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/identity/sid&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; text/plain</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/identity/secure/sid&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; text/plain</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/identity/user/roles&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/identity/user/{actorId}/groups/&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/identity/group/{groupName}/members&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/identity/user/{actorId}/actors&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Process Engine</p><p>Process runtime state</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/engine/deployments&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/engine/deployment/{id}/delete&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/engine/deployment/{id}/suspend&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/engine/jobs&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/engine/job/{id}/execute&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/engine/deployment/{id}/resume&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; application/json</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Form Processing</p><p>Web based form processing</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/form/task/{id}/render&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; text/html</p><p>GET&#160;&#160;&#160; /gwt-console-server/rs/form/process/{id}/render&#160;&#160;&#160;&#160;&#160;&#160;&#160; */*&#160;&#160;&#160; text/html</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/form/task/{id}/complete&#160;&#160;&#160;&#160;&#160;&#160;&#160; multipart/form-data&#160;&#160;&#160; text/html</p><p>POST&#160;&#160;&#160; /gwt-console-server/rs/form/process/{id}/complete&#160;&#160;&#160;&#160;&#160;&#160;&#160; multipart/form-data&#160;&#160;&#160; text/html</p><p>// End of list -----------------------------------//</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>As per my understanding this list will also include the url for authentication but the&#160; url&#160;&#160;&#160; <a class="jive-link-external-small" href="http://localhost:8080/gwt-console-server/rs/process/j_security_check" target="_blank">http://localhost:8080/gwt-console-server/rs/process/j_security_check</a></p><p>is not in the list given above.Correct me if I am wrong if this url is not listed in the list it is bound to give me a time out error(a url which does not exist).I saw the solution given by Jeff where he had used url some thing like</p><p><span> </span><a class="jive-link-external-small" href="http://localhost:8080/gwt-console-server/rs/identity/secure/j_security_check" target="_blank">http://localhost:8080/gwt-console-server/rs/identity/secure/j_security_check</a><span>".Both are different.</span></p><p>I did a simple thing I replaced my authentication url <a class="jive-link-external-small" href="http://localhost:8080/gwt-console-server/rs/process/j_security_check" target="_blank">http://localhost:8080/gwt-console-server/rs/process/j_security_check </a></p><p><span>with the url -&gt;&#160;&#160;&#160; </span><a class="jive-link-external-small" href="http://localhost:8080/gwt-console-server/rs/identity/secure/sid" target="_blank">http://localhost:8080/gwt-console-server/rs/identity/secure/sid</a><span>&#160; and it did not gave any time out error ,but the response was a blank string which was the same as in case of the code which Chris showed .</span></p><p>My biggest query is how and from where do I confirm which is the correct url for form authentication and secondly once form authentication is successfull what should be the response string .In Chris code it was a blank string and following was the output---------------------</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>start process1:------&gt;&lt;html&gt;&lt;head&gt;&#160; &lt;title&gt;HTTP 401&lt;/title&gt; &lt;!-- Do not remove --&gt;&lt;/head&gt;&lt;body&gt;&lt;form method="POST" action="j_security_check"&gt;&#160; &lt;center/&gt;&#160; &lt;br&gt;&lt;br&gt;&#160; &lt;div style="font-family:sans-serif;border:1px solid black; width:270;padding:15px;"&gt;&#160;&#160;&#160; &lt;h2&gt;BPM Console Server&lt;/h2&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;table with=250&gt;&#160;&#160;&#160; &lt;tr&gt;&#160;&#160;&#160;&#160;&#160; &lt;td&gt;Username:&lt;/td&gt;&#160;&#160;&#160;&#160;&#160; &lt;td&gt;&lt;input type="text" name="j_username"&gt;&lt;/td&gt;&#160;&#160;&#160; &lt;/tr&gt;&#160;&#160;&#160; &lt;tr&gt;&#160;&#160;&#160;&#160;&#160; &lt;td&gt;Password:&lt;/td&gt;&#160;&#160;&#160;&#160;&#160; &lt;td&gt;&lt;input type="password" name="j_password"&gt;&lt;/td&gt;&#160;&#160;&#160; &lt;/tr&gt;&#160;&#160;&#160; &lt;tr&gt;&#160;&#160;&#160;&#160;&#160; &lt;td&gt;&lt;/td&gt;&#160;&#160;&#160;&#160;&#160; &lt;td align=right&gt;&lt;input type="submit"/&gt;&lt;/td&gt;&#160;&#160;&#160; &lt;/tr&gt;&#160; &lt;/table&gt;&#160; &lt;/div&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>authentication2:------&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>start&#160; process2:------&gt;{"id":"104","definitionId":"yourProcessName","startDate":"2011-06-03&#160; 12:43:45","suspended":false,"rootToken":{"id":"1","name":"","currentNodeName":"","children":[],"availableSignals":[],"canBeSignaled":false}}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>start&#160; process3:------&gt;{"id":"105","definitionId":"yourProcessName","startDate":"2011-06-03&#160; 12:43:45","suspended":false,"rootToken":{"id":"2","name":"","currentNodeName":"","children":[],"availableSignals":[],"canBeSignaled":false}}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>start&#160; process4:------&gt;{"id":"106","definitionId":"yourProcessName","startDate":"2011-06-03&#160; 12:43:45","suspended":false,"rootToken":{"id":"3","name":"","currentNodeName":"","children":[],"availableSignals":[],"canBeSignaled":false}}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I am struggling which url is the right one and why am I not able to see it in the list of url's in JBPM 5.2. Can you please help me out .</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/740100#740100">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>