AnsweredAssumed Answered

problem with List of executions

Question asked by vitalii_vid on Jul 25, 2013
Latest reply on Aug 1, 2013 by frederikheremans1
Hi,

I use Activiti v. 5.12 and I try to receive List of executions . (for v. 5.13 an expression is (
GET repository/executions
) http://www.activiti.org/userguide/#N13EC2)
However a respons from a server is *No router defined*

What do I do wrong?
For
/process-instances 
everything OK.

A code example is below.


  public void listProcessDefinitions() throws IOException, JSONException {
    Client client = null;
    ClientResponse response = null;
    try {
      client = getClient("kermit", "kermit");
      // WebResource webResource = client.resource(REST_URI + "/process-instances?size=100");
      WebResource webResource = client.resource(REST_URI + "/executions");
      response = webResource.type("application/json").get(ClientResponse.class);
      JSONObject object = new JSONObject(response.getEntity(String.class));
      System.out.println("total is " + object.get("total"));
      if (object.getInt("total") > 0) {
        for (int i = 0; i < object.getJSONArray("data").length(); i++) {
          JSONObject o = object.getJSONArray("data").getJSONObject(i);
          System.out.println(o);
        }
      }
    } finally {
      releaseResources(response, client);
    }
  }

  private static Client getClient(final String login,
                                  final String password) {
    Client client = Client.create();
    client.addFilter(new HTTPBasicAuthFilter(login, password));
    return client;
  }

Outcomes