mostly working workflow

This commit is contained in:
JT Smith 2006-03-17 23:13:27 +00:00
parent 46c8e25e3a
commit 11cc18a5c3
8 changed files with 31 additions and 66 deletions

View file

@ -17,6 +17,8 @@ use WebGUI::HTMLForm;
use WebGUI::International;
use WebGUI::Workflow;
use WebGUI::Workflow::Activity;
use WebGUI::Workflow::Instance;
use WebGUI::Utility;
=head1 NAME
@ -297,4 +299,26 @@ sub www_manageWorkflows {
return $ac->render($output);
}
#-------------------------------------------------------------------
=head2 www_runWorkflow ( )
Checks to ensure the requestor is who we think it is, and then executes a workflow and returns the results.
=cut
sub www_runWorkflow {
my $session = shift;
$session->http->setMimeType("text/plain");
return "error" unless (isInSubnet($session->env->get("REMOTE_ADDR"), $session->config->get("spectreSubnets")));
my $instanceId = $session->form->param("instanceId");
if ($instanceId) {
my $instance = WebGUI::Workflow::Instance->new($session, $instanceId);
if (defined $instance) {
return $instance->run;
}
}
return "error";
}
1;