- Simplified Spectre's initial data load, and reduced memory footprint in the

process.
This commit is contained in:
JT Smith 2007-02-01 18:48:23 +00:00
parent f140fdead4
commit b19bf14389
8 changed files with 159 additions and 73 deletions

View file

@ -122,6 +122,26 @@ sub get {
return $self->{_data}{$name};
}
#-------------------------------------------------------------------
=head2 getAllTasks ( session )
Returns an array reference of all the schedule objects defined in this system. A class method.
=cut
sub getAllTasks {
my $class = shift;
my $session = shift;
my @schedules = ();
my $rs = $session->db->read("SELECT taskId FROM WorkflowSchedule");
while (my ($taskId) = $rs->array) {
push(@schedules, WebGUI::Workflow::Cron->new($session, $taskId));
}
return \@schedules;
}
#-------------------------------------------------------------------
=head2 getId ( )

View file

@ -142,6 +142,27 @@ sub get {
return $self->{_data}{$name};
}
#-------------------------------------------------------------------
=head2 getAllInstances ( session )
Returns an array reference of all the instance objects defined in this system. A class method.
=cut
sub getAllInstances {
my $class = shift;
my $session = shift;
my @instances = ();
my $rs = $session->db->read("SELECT instanceId FROM WorkflowInstance");
while (my ($instanceId) = $rs->array) {
push(@instances, WebGUI::Workflow::Instance->new($session, $instanceId));
}
return \@instances;
}
#-------------------------------------------------------------------
=head2 getId ( )