replaced return; with return undef;
This commit is contained in:
parent
ffa90c5fbd
commit
fa09c41598
113 changed files with 287 additions and 286 deletions
|
|
@ -296,12 +296,12 @@ sub new {
|
|||
my $session = shift;
|
||||
my $activityId = shift;
|
||||
my $main = $session->db->getRow("WorkflowActivity","activityId", $activityId);
|
||||
return unless $main->{activityId};
|
||||
return undef unless $main->{activityId};
|
||||
$class = $main->{className};
|
||||
eval { WebGUI::Pluggable::load($class) };
|
||||
if ($@) {
|
||||
$session->errorHandler->error($@);
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
my $sub = $session->db->buildHashRef("select name,value from WorkflowActivityData where activityId=?",[$activityId]);
|
||||
my %data = (%{$main}, %{$sub});
|
||||
|
|
@ -335,13 +335,13 @@ sub newByPropertyHashRef {
|
|||
my $class = shift;
|
||||
my $session = shift;
|
||||
my $properties = shift;
|
||||
return unless defined $properties;
|
||||
return unless exists $properties->{className};
|
||||
return undef unless defined $properties;
|
||||
return undef unless exists $properties->{className};
|
||||
my $className = $properties->{className};
|
||||
eval { WebGUI::Pluggable::load($class) };
|
||||
if ($@) {
|
||||
$session->errorHandler->error($@);
|
||||
return;
|
||||
return undef;
|
||||
}
|
||||
bless {_session=>$session, _id=>$properties->{activityId}, _data => $properties}, $className;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ sub new {
|
|||
my $session = shift;
|
||||
my $taskId = shift;
|
||||
my $data = $session->db->getRow("WorkflowSchedule","taskId", $taskId);
|
||||
return unless $data->{taskId};
|
||||
return undef unless $data->{taskId};
|
||||
bless {_session=>$session, _id=>$taskId, _data=>$data}, $class;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ sub create {
|
|||
? JSON::objToJson({parameters => $properties->{parameters}}, {pretty => 1, indent => 4, autoconv=>0, skipinvalid=>1})
|
||||
: undef;
|
||||
my ($count) = $session->db->quickArray("select count(*) from WorkflowInstance where workflowId=? and parameters=?",[$properties->{workflowId},$params]);
|
||||
return if ($isSingleton && $count);
|
||||
return undef if ($isSingleton && $count);
|
||||
|
||||
# create instance
|
||||
my $instanceId = $session->db->setRow("WorkflowInstance","instanceId",{instanceId=>"new", runningSince=>time()});
|
||||
|
|
@ -204,7 +204,7 @@ Returns a reference to the next activity in this workflow from the current posit
|
|||
sub getNextActivity {
|
||||
my $self = shift;
|
||||
my $workflow = $self->getWorkflow;
|
||||
return unless defined $workflow;
|
||||
return undef unless defined $workflow;
|
||||
return $workflow->getNextActivity($self->get("currentActivityId"));
|
||||
}
|
||||
|
||||
|
|
@ -262,7 +262,7 @@ sub new {
|
|||
my $session = shift;
|
||||
my $instanceId = shift;
|
||||
my $data = $session->db->getRow("WorkflowInstance","instanceId", $instanceId);
|
||||
return unless $data->{instanceId};
|
||||
return undef unless $data->{instanceId};
|
||||
bless {_session=>$session, _id=>$instanceId, _data=>$data}, $class;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue