cancel
Showing results for 
Search instead for 
Did you mean: 

problem with List of executions

vitalii_vid
Champ in-the-making
Champ in-the-making
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;
  }
3 REPLIES 3

trademak
Star Contributor
Star Contributor
that's a typo in the userguide it should be runtime/executions
Does that work for you.

Best regards,

vitalii_vid
Champ in-the-making
Champ in-the-making
trademak, thx for your answer.

I explain my question. I use Activiti v. 5.12 and I want receive list of executions.
However I couldn't find appropriate API for Activiti v. 5.12.

For Activiti v. 5.13 API is <code>GET runtime/executions </code>

How could I receive  list of executions for Activiti v. 5.12?
Please help me!

frederikherema1
Star Contributor
Star Contributor
AFAIK, there is no way of retrieving executions through 5.12 REST… Double-check the 5.12 user guide, but I'm afraid you'll have to upgrade to 5.13 to get full REST-API coverage…