prevent WebGUI from contacting Spectre needlessly for realtime workflows

This commit is contained in:
Graham Knop 2008-08-11 21:52:00 +00:00
parent 980dc18831
commit 6357356355

View file

@ -443,7 +443,7 @@ sub set {
$self->{_data}{currentActivityId} = (exists $properties->{currentActivityId}) ? $properties->{currentActivityId} : $self->{_data}{currentActivityId}; $self->{_data}{currentActivityId} = (exists $properties->{currentActivityId}) ? $properties->{currentActivityId} : $self->{_data}{currentActivityId};
$self->{_data}{lastUpdate} = time(); $self->{_data}{lastUpdate} = time();
$self->session->db->setRow("WorkflowInstance","instanceId",$self->{_data}); $self->session->db->setRow("WorkflowInstance","instanceId",$self->{_data});
unless ($skipNotify) { if ($self->{_started} && !$skipNotify) {
my $spectre = WebGUI::Workflow::Spectre->new($self->session); my $spectre = WebGUI::Workflow::Spectre->new($self->session);
$spectre->notify("workflow/deleteInstance",$self->getId); $spectre->notify("workflow/deleteInstance",$self->getId);
$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}}); $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}});
@ -505,7 +505,7 @@ sub start {
# we were able to complete the workflow in realtime # we were able to complete the workflow in realtime
if ($status eq "done") { if ($status eq "done") {
$log->info('Completed workflow instance '.$self->getId.' in realtime.'); $log->info('Completed workflow instance '.$self->getId.' in realtime.');
$self->delete; $self->delete(1);
return undef; return undef;
} }
} }