remove Do Nothing On Delete workflow and allow none to be selected for on delete etc workflow
remove remnants of realtime workflow selection code
This commit is contained in:
parent
5fc629993a
commit
778a32df19
8 changed files with 44 additions and 32 deletions
|
|
@ -28,11 +28,32 @@ my $quiet; # this line required
|
|||
|
||||
my $session = start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
removeDoNothingOnDelete( $session );
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub removeDoNothingOnDelete {
|
||||
my $session = shift;
|
||||
print "\tRemoving 'Do Nothing On Delete workflow if not customized... " unless $quiet;
|
||||
my $workflow = WebGUI::Workflow->new($session, 'DPWwf20061030000000001');
|
||||
if ($workflow) {
|
||||
my $activities = $workflow->getActivities;
|
||||
if (@$activities == 0) {
|
||||
# safe to delete.
|
||||
for my $setting (qw(trashWorkflow purgeWorkflow changeUrlWorkflow)) {
|
||||
my $setValue = $session->setting->get($setting);
|
||||
if ($setValue eq 'DPWwf20061030000000001') {
|
||||
$session->setting->set($setting, undef);
|
||||
}
|
||||
}
|
||||
$workflow->delete;
|
||||
}
|
||||
}
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Describe what our function does
|
||||
#sub exampleFunction {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue