Check the return value of IKC call to spectre

This commit is contained in:
Paul Driver 2011-05-23 12:51:56 -05:00
parent 1fa911029d
commit edcf276a2f
2 changed files with 7 additions and 13 deletions

View file

@ -677,14 +677,9 @@ sub start {
# hand off the workflow to spectre
$log->info('Could not complete workflow instance '.$self->getId.' in realtime, handing off to Spectre.');
my $spectre = WebGUI::Workflow::Spectre->new($self->session);
$spectre->notify("workflow/addInstance", {cookieName=>$self->session->config->getCookieName, gateway=>$self->session->config->get("gateway"), sitename=>$self->session->config->get("sitename")->[0], instanceId=>$self->getId, priority=>$self->{_data}{priority}});
my $success = $spectre->notify("workflow/addInstance", {cookieName=>$self->session->config->getCookieName, gateway=>$self->session->config->get("gateway"), sitename=>$self->session->config->get("sitename")->[0], instanceId=>$self->getId, priority=>$self->{_data}{priority}});
my $spectreTest = WebGUI::Operation::Spectre::spectreTest($self->session);
if($spectreTest ne "success"){
return WebGUI::International->new($self->session, "Macro_SpectreCheck")->get($spectreTest);
}
return undef;
return $success ? undef : WebGUI::International->new($self->session, "Macro_SpectreCheck")->get($spectreTest);
}
1;