The TRIRIGA platform has the ability to put events into the workflow queue at a predefined point in time. These events can be singular events to be executed one time, or recurring based on a schedule. The TRIRIGA application has two business objects that are critical to the Scheduler — Events and Scheduled Events found in the Mail module. Records in the system have calendars associated to them to help keep schedule the Scheduled Events. This entry is VERY technical. The purpose is to show how complex the process is, and be transparent in all of the functionality that the scheduler agent is capable of.
What is the process flow?
A Scheduled Event record begins at a particular time, it has a duration, and an end time. Scheduled Event records should not be created directly, but must be created through the SCHEDULE action performed on an Event record. Before an event can be fired by the Scheduler Agent, it needs to be created. At least 3 workflow tasks are needed to create a Scheduled Event.
The Creation of a Scheduled Event
- First task is a Schedule Task. The Schedule Task does not create a Scheduled Event, but creates an Event record.
- After the Event record is created, use one or more Modify Task steps to set data in the Event record.
- The last workflow task is a Trigger Action to perform the SCHEDULE action on the Event record…
The Scheduler Agent
The scheduler agent is a process that runs in the background. It runs once a minute — 60 seconds sleep time between runs, so when it is finished with one run, 60 seconds later, it will start again. Its main job is to put actions into the workflow queue at times specified in the Event record. The agent’s service() starts out by making a call to process Open Events to Close, then process new Events to Create. Then it regenerates any closed events that needs regenerating, and finally processes and generates no end recurrence events…