Activiti-Rest-Client

 view release on metacpan or  search on metacpan

lib/Activiti/Rest/Client.pm  view on Meta::CPAN

    GET runtime/tasks/:taskId/comments/:commentId

=cut

sub task_comment {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/runtime/tasks/".uri_escape($args{taskId})."/comments/".uri_escape($args{commentId}),
    params => {},
    method => "GET"
  );
  Activiti::Rest::Response->from_http_response($res);
}
=head2 task_events

  Get all events for a task

  Parameters:

    taskId

  equal to rest call:

    GET runtime/tasks/:taskId/events

=cut

sub task_events {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/runtime/tasks/".uri_escape($args{taskId})."/events",
    params => {},
    method => "GET"
  );
  Activiti::Rest::Response->from_http_response($res);
}
=head2 task_event

  Get an event for a task

  Parameters:

    taskId
    eventId

  equal to rest call:

    GET runtime/tasks/:taskId/events/:eventId

=cut

sub task_event {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/runtime/tasks/".uri_escape($args{taskId})."/events/".uri_escape($args{eventId}),
    params => {},
    method => "GET"
  );
  Activiti::Rest::Response->from_http_response($res);
}
=head2 task_attachments

  Get all attachments on a task

  Parameters:

    taskId

  equal to rest call:

    GET runtime/tasks/:taskId/attachments

=cut

sub task_attachments {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/runtime/tasks/".uri_escape($args{taskId})."/attachments",
    params => {},
    method => "GET"
  );
  Activiti::Rest::Response->from_http_response($res);
}
=head2 task_attachment

  Get an attachment on a task

  Parameters:

    taskId
    attachmentId

  equal to rest call:

    GET runtime/tasks/:taskId/comments/:attachmentId

=cut

sub task_attachment {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/runtime/tasks/".uri_escape($args{taskId})."/attachments/".uri_escape($args{attachmentId}),
    params => {},
    method => "GET"
  );
  Activiti::Rest::Response->from_http_response($res);
}
=head2 task_attachment_content

  Get the content for an attachment on a task

  Parameters:

    taskId
    attachmentId

  equal to rest call:

    GET runtime/tasks/:taskId/attachments/:attachmentId/content

=cut

sub task_attachment_content {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/runtime/tasks/".uri_escape($args{taskId})."/attachments/".uri_escape($args{attachmentId})."/content",
    params => {},
    method => "GET"
  );
  Activiti::Rest::Response->from_http_response($res);
}
=head2 historic_process_instances

  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

=cut

sub historic_process_instances {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/history/historic-process-instances",
    params => \%args,
    method => "GET"
  );
  Activiti::Rest::Response->from_http_response($res);
}
=head2 query_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

=cut
sub query_historic_process_instances {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/query/historic-process-instances",
    params => {},
    method => "POST",
    headers => {
      'Content-Type' => "application/json",
      Content => encode_json($args{content})
    }
  );
  Activiti::Rest::Response->from_http_response($res);
}
=head2 historic_process_instance

  Get a historic process instance

  Parameters:

    processInstanceId

  equal to rest call:



( run in 1.548 second using v1.01-cache-2.11-cpan-e1769b4cff6 )