fixed a bug in the auto start realtime

This commit is contained in:
JT Smith 2008-06-10 20:11:05 +00:00
parent 1e4c392ab8
commit b476dcc1b0

View file

@ -71,7 +71,7 @@ sub create {
# create instance
my $instanceId = $session->db->setRow("WorkflowInstance","instanceId",{instanceId=>"new", runningSince=>time()});
my $self = $class->new($session, $instanceId);
my $self = $class->new($session, $instanceId, 1);
$self->set($properties,1);
return $self;
@ -267,9 +267,17 @@ sub new {
my $class = shift;
my $session = shift;
my $instanceId = shift;
my $isNew = shift;
my $data = $session->db->getRow("WorkflowInstance","instanceId", $instanceId);
return undef unless $data->{instanceId};
bless {_session=>$session, _id=>$instanceId, _data=>$data, _started=>0}, $class;
my $self = {
_session => $session,
_id => $instanceId,
_data => $data,
_started => ($isNew ? 0 : 1)
};
bless $self, $class;
return $self;
}
#-------------------------------------------------------------------