07-25-2013 03:06 AM
GET repository/executions) http://www.activiti.org/userguide/#N13EC2)/process-instances everything OK.
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;
}
07-25-2013 05:53 AM
07-25-2013 10:56 AM
08-01-2013 08:30 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.