Activiti::Rest::Client - Low level client for the Activiti Rest API
Nicolas Franck <nicolas.franck at ugent.be>
<nicolas.franck at ugent.be>
This is a work in progress. More documentation will be added in time
see http://www.activiti.org/userguide
my $client = Activiti::Rest::Client->new( url => 'http://kermit:kermit@localhost:8080/activiti-rest/service' ); my $res = $client->process_definitions; die("no parsed content") unless $res->has_parsed_content; my $pdefs = $res->parsed_content; my @ids = map { $_->{id} } @{ $pdefs->{data} }; for my $id(@ids){ print Dumper($client->process_definition(processDefinitionId => $id)->parsed_content); }
base url of the activiti rest api activiti-rest uses basic http authentication, so username and password should be included in the url e.g. http://kermit:kermit@localhost:8080/activiti-rest/service
timeout in seconds when connecting to the activiti rest api default value is 180
Retrieve list of Deployments parameters: see user guide (http://www.activiti.org/userguide/index.html#N13293) equal to rest call: GET repository/deployments
Get a deployment parameters: deploymentId other parameters: see user guide (http://www.activiti.org/userguide/index.html#N1332E) equal to rest call: GET repository/deployments/:deploymentId
List resources in a deployment parameters: deploymentId other parameters: see user guide (http://www.activiti.org/userguide/index.html#N133F1) equal to rest call: GET repository/deployments/:deploymentId/resources
Get a deployment resource parameters: deploymentId resourceId other parameters: see user guide (http://www.activiti.org/userguide/index.html#N1345B) equal to rest call: GET repository/deployments/:deploymentId/resources/:resourceId
List of process definitions parameters: see user guide (http://www.activiti.org/userguide/index.html#N13520) equal to rest call: GET repository/process-definitions
Get a process definition parameters: processDefinitionId other parameters: see user guide (http://www.activiti.org/userguide/index.html#N13605) equal to rest call: GET repository/process-definitions/:processDefinitionId
Get a process definition resource content parameters: processDefinitionId equal to rest call: GET repository/process-definitions/:processDefinitionId/resourcedata
Get a process definition BPMN model parameters: processDefinitionId equal to rest call: GET repository/process-definitions/:processDefinitionId/model
Get all candidate starters for a process-definition parameters: processDefinitionId equal to rest call: GET repository/process-definitions/:processDefinitionId/identitylinks
Get a candidate starter from a process definition parameters: (see http://www.activiti.org/userguide/index.html#N138A9) processDefinitionId family identityId equal to rest call: GET repository/process-definitions/:processDefinitionId/identitylinks/:family/:identityId
Get a list of models Parameters: see user guide (http://www.activiti.org/userguide/index.html#N1390A) equal to rest call: GET repository/models
Get a model Parameters: modelId equal to rest call: GET repository/models/:modelId
List of process instances Parameters: see user guide (http://www.activiti.org/userguide/index.html#restProcessInstancesGet) equal to rest call: GET runtime/process-instances
Get a process instance Parameters: processInstanceId equal to rest call: GET runtime/process-instances/:processInstanceId
Query process instances Parameters: see user guide (http://www.activiti.org/userguide/index.html#N13E2A) equal to rest call: POST runtime/process-instances
Start a process instance Parameters: see user guide (http://www.activiti.org/userguide/index.html#N13CE6) equal to rest call: POST runtime/process-instances
Get involved people for process instance Parameters: processInstanceId equal to rest call: GET runtime/process-instances/:processInstanceId/identitylinks
List of variables for a process instance Parameters: processInstanceId equal to rest call: GET runtime/process-instances/:processInstanceId/variables
Get a variable for a process instance Parameters: processInstanceId variableName equal to rest call: GET runtime/process-instances/:processInstanceId/variables/:variableName
Get a diagram for a process instance Parameters: processInstanceId equal to rest call: GET runtime/process-instances/:processInstanceId/diagram when successfull the "content_type" of the response is "image/png" and "content" is equal to the image data
List of executions Parameters: see user guide (http://www.activiti.org/userguide/index.html#restExecutionsGet) equal to rest call: GET repository/executions
Query executions Parameters in request body (i.e. 'content' hash) equal to rest call: POST query/executions
send signal to execution equal to rest call: PUT runtime/executions/{executionId}
Get an execution Parameters: executionId equal to rest call: GET repository/executions/:executionId
Get active activities in an execution Parameters: executionId equal to rest call: GET repository/executions/:executionId/activities
List of variables for an execution Parameters: executionId equal to rest call: GET repository/executions/:executionId/variables
List of tasks Parameters: see user guide (http://www.activiti.org/userguide/index.html#restTasksGet) equal to rest call: GET runtime/tasks
Query for tasks Parameters: see user guide (http://www.activiti.org/userguide/index.html#N148B7) equal to rest call: POST query/tasks
Get a task Parameters: taskId equal to rest call: GET runtime/tasks/:taskId
Update a task Parameters: taskId Body parameters: see user guide (http://www.activiti.org/userguide/index.html#N148FA) equal to rest call: PUT runtime/tasks/:taskId
Get all variables for a task Parameters: taskId scope (global|local) equal to rest call: GET runtime/tasks/:taskId/variables?scope=:scope
Get one variable for a task Parameters: taskId scope (global|local) equal to rest call: GET runtime/tasks/:taskId/variables/:variableName?scope=:scope
Get all identity links for a task Parameters: taskId equal to rest call: GET runtime/tasks/:taskId/identitylinks
Get all identity links for a task for either groups or users Parameters: taskId equal to rest call: GET runtime/tasks/:taskId/identitylinks/(users|groups)
Get all comments on a task Parameters: taskId equal to rest call: GET runtime/tasks/:taskId/comments
Get a comments on a task Parameters: taskId commentId equal to rest call: GET runtime/tasks/:taskId/comments/:commentId
Get all events for a task Parameters: taskId equal to rest call: GET runtime/tasks/:taskId/events
Get an event for a task Parameters: taskId eventId equal to rest call: GET runtime/tasks/:taskId/events/:eventId
Get all attachments on a task Parameters: taskId equal to rest call: GET runtime/tasks/:taskId/attachments
Get an attachment on a task Parameters: taskId attachmentId equal to rest call: GET runtime/tasks/:taskId/comments/:attachmentId
Get the content for an attachment on a task Parameters: taskId attachmentId equal to rest call: GET runtime/tasks/:taskId/attachments/:attachmentId/content
List of historic process instances Parameters: see user guide (http://www.activiti.org/userguide/index.html#restHistoricProcessInstancesGet) equal to rest call: GET history/historic-process-instances
Query for historic process instances Parameters: see user guide (http://www.activiti.org/userguide/index.html#N153C2) equal to rest call: POST history/historic-process-instances
Get a historic process instance Parameters: processInstanceId equal to rest call: GET history/historic-process-instances/:processInstanceId
Delete a historic process instance Parameters: processInstanceId equal to rest call: DELETE history/historic-process-instances/:processInstanceId
Get all comments on a historic process instance Parameters: processInstanceId equal to rest call: GET history/historic-process-instances/:processInstanceId/comments
Get a comment on a historic process instance Parameters: processInstanceId commentId equal to rest call: GET history/historic-process-instances/:processInstanceId/comments/:commentId
Get historic task instances Parameters: see user guide (http://www.activiti.org/userguide/index.html#restHistoricTaskInstancesGet) equal to rest call: GET history/historic-task-instances
Get historic variable instances, either from tasks or process instances Parameters: see user guide (http://www.activiti.org/userguide/index.html#restHistoricVariableInstancesGet) equal to rest call: GET history/historic-variable-instances
Query historic variable instances, either from tasks or process instances Parameters: see user guide (http://www.activiti.org/userguide/index.html#N15B00) equal to rest call: POST query/historic-variable-instances
Get a historic task instance Parameters: taskId equal to rest call: GET history/historic-task-instances/:taskId
Get the identity links of a historic task instance Parameters: taskId equal to rest call: GET history/historic-task-instances/:taskId/identitylinks
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Activiti::Rest::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Activiti::Rest::Client
CPAN shell
perl -MCPAN -e shell install Activiti::Rest::Client
For more information on module installation, please visit the detailed CPAN module installation guide.