Activiti-Rest-Client

 view release on metacpan or  search on metacpan

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

sub timer_jobs {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/management/timer-jobs",
    params => \%args,
    method => "GET"
  );
  Activiti::Rest::Response->from_http_response($res);
}

sub timer_job {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/management/timer-jobs/".uri_escape($args{jobId}),
    params => {},
    method => "GET"
  );
  Activiti::Rest::Response->from_http_response($res);
}

sub execute_timer_job {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/management/timer-jobs/".uri_escape($args{jobId}),
    params => {},
    method => "POST",
    headers => {
      'Content-Type' => "application/json",
      Content => encode_json({ action => "move" })
    }
  );
  Activiti::Rest::Response->from_http_response($res);
}

sub suspended_jobs {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/management/suspended-jobs",
    params => \%args,
    method => "GET"
  );
  Activiti::Rest::Response->from_http_response($res);
}

sub suspended_job {
  my($self,%args)=@_;
  my $res = $self->ua->request(
    path => "/management/suspended-jobs/".uri_escape($args{jobId}),
    params => {},
    method => "GET"
  );
  Activiti::Rest::Response->from_http_response($res);
}

=head1 LICENSE AND COPYRIGHT

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 L<http://dev.perl.org/licenses/> for more information.

=cut

1;



( run in 0.882 second using v1.01-cache-2.11-cpan-df04353d9ac )