Check that the Purge workflow exists before trying to run it. Fixes bug #11698
This commit is contained in:
parent
db96547f3c
commit
61008c8bb8
2 changed files with 11 additions and 5 deletions
|
|
@ -298,11 +298,16 @@ sub _invokeWorkflowOnExportedFiles {
|
|||
if ($workflowId) {
|
||||
my ($lastExportedAs) = $self->get("lastExportedAs");
|
||||
my $wfInstance = WebGUI::Workflow::Instance->create($self->session, { workflowId => $workflowId });
|
||||
$wfInstance->setScratch(
|
||||
WebGUI::Workflow::Activity::DeleteExportedFiles::DELETE_FILES_SCRATCH() =>
|
||||
Storable::freeze([ defined($lastExportedAs) ? ($lastExportedAs) : () ])
|
||||
);
|
||||
$wfInstance->start(1);
|
||||
if ($wfInstance) {
|
||||
$wfInstance->setScratch(
|
||||
WebGUI::Workflow::Activity::DeleteExportedFiles::DELETE_FILES_SCRATCH() =>
|
||||
Storable::freeze([ defined($lastExportedAs) ? ($lastExportedAs) : () ])
|
||||
);
|
||||
$wfInstance->start(1);
|
||||
}
|
||||
else {
|
||||
$self->session->log->warn('The Purge Workflow from the settings has been deleted and cannot be run.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue