[jboss-user] [jBPM] - Problem using REST interface

satish polasi do-not-reply at jboss.com
Mon Apr 18 03:07:14 EDT 2011

satish polasi [http://community.jboss.org/people/satishpolasi] created the discussion

"Problem using REST interface"

To view the discussion, visit: http://community.jboss.org/message/600525#600525


I have my jbpm-console application running on one profle jbpm on 9090 port and my application running on another profile default on 8080 port. I run both the consoles on JbossEAP5.1 server.

I have created one bpmn process and deployed on to JBPM engine and I can login to jbpm-cosole application as admin/admin and start the process.

My requirement here is, I need to do the same process from my application running on 8080 port. For that i am making a call to this URL  http://localhost:9090/gwt-console-server/rs/process/definition/ http://localhost:9090/gwt-console-server/rs/process/definition/{id}/new_instance to start the process. Where {id} is the processid(InstallSR) of my bpmn process.

Here is my code

        PostMethod post = new PostMethod( http://localhost:9090/gwt-console-server/rs/process/definition/InstallSR/new_instance); http://localhost:9090/gwt-console-server/rs/process/definition/InstallSR/new_instance);
        try {
            post.addRequestHeader("Accept", "application/json");
            int result = httpClient.executeMethod(post);

            System.out.println("Response status code: " + result);
            System.out.println("Response body: ");
        } catch (HttpException e) {
        } catch (IOException e) {
        } finally {

When i call my above codel I see the following output as below and I don't see any thing printed on my human task servie or jbpm application server console.

Response status code: 200
Response body: 
  <title>HTTP 401</title> <!-- Do not remove -->
<form method="POST" action="j_security_check">


  <div style="font-family:sans-serif;border:1px solid black; width:270;padding:15px;">
    <h2>BPM Console Server</h2>

    <table with=250>
      <td><input type="text" name="j_username"></td>
      <td><input type="password" name="j_password"></td>
      <td align=right><input type="submit"/></td>

Can any one help me out on this, what I need to do to start a new process instance by calling rest url.
Thanks a lot in advance


Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110418/5728e347/attachment.html 

More information about the jboss-user mailing list