set a default parameter hashref if none is passed to the set method of Workflow::Instance
This commit is contained in:
parent
63a80e00ff
commit
4ab8102d63
1 changed files with 3 additions and 2 deletions
|
|
@ -437,9 +437,10 @@ sub set {
|
||||||
$self->{_data}{workflowId} = $properties->{workflowId} || $self->{_data}{workflowId};
|
$self->{_data}{workflowId} = $properties->{workflowId} || $self->{_data}{workflowId};
|
||||||
$self->{_data}{className} = (exists $properties->{className}) ? $properties->{className} : $self->{_data}{className};
|
$self->{_data}{className} = (exists $properties->{className}) ? $properties->{className} : $self->{_data}{className};
|
||||||
$self->{_data}{methodName} = (exists $properties->{methodName}) ? $properties->{methodName} : $self->{_data}{methodName};
|
$self->{_data}{methodName} = (exists $properties->{methodName}) ? $properties->{methodName} : $self->{_data}{methodName};
|
||||||
if (exists $properties->{parameters}) {
|
if (! exists $properties->{parameters}) {
|
||||||
$self->{_data}{parameters} = JSON->new->utf8->pretty->encode({parameters => $properties->{parameters}});
|
$properties->{parameters} = {};
|
||||||
}
|
}
|
||||||
|
$self->{_data}{parameters} = JSON->new->utf8->pretty->encode({parameters => $properties->{parameters}});
|
||||||
$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});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue