0 Replies Latest reply on Apr 18, 2011 3:07 AM by satish polasi

    Problem using REST interface

    satish polasi Newbie



      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/{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);

              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