Creating Events
An event can be defined to act in response to an update in any datasource/table, as a scheduled event as in maintenance, or in reponse to user action or input, such as logging in or pressing a button.
Use the Events app to create a new event; the Events app is located under the tools page or can be located using the search tool
The following shows a CRUD event which acts in response to an update to a table or datastore.
Event Types
The Event Type dropdown presents the different event types:
Event Type | Description |
---|---|
Database Action | An update to a datastore/table triggerrs the event |
Schedule | A schedule (e.g. daily, weekly) triggers the event |
User Action | A user action, such as login or logout triggers the event |
Form Submit | An application form or adhoc form is submitted by a user (validation event). |
When to use each Event Type
The various event types serve different purposes in the life of an application. The following table outlines when to use each event type and the type of things you might process in the resultant workflows:
Event Type | Use Case |
---|---|
User Action | These events fire in response to a direct user action such as logging in our out. While the act of logging into or out of the system is already captured in the system audit trails, you may wish to fire some other action (such as checking into a task group, or updating a status). |
Form Submit | These events are most important as a validation, and are used to allow or disallow a form from being saved. For example, a "Timeclock punch validation" workflow, connected to a Form Submit event on the "Timeclock Punch Form" can be used to determine if the punch can proceed; this workflow can check schedules, rules and other conditions and return yes/no if the form is allowed to proceed with the transaction. The validation workflow can also return a message for display to the user (e.g. "this is why you can't punch yet.."). Generally validation workflows don't generate any additional data or perform any actions, rather, just confirm whether the submit process can continue.You may select multiple forms which share the same form submit event; this allows you to centralize logic when different versions of a form are all processed in a similar manner. |
Database Action (CRUD) | These events occur after a record/form has been updated; unlike the above Form Submit which has a say in whether the form can be submitted, CRUD events occur as a result of a record being updated, and then take actions to update data, call other processes, etc. Using the above "timeclock" punch form example, the CRUD event might send a notification that a punch just received is tardy..while it can't stop the punch from being recorded, it can take action, update the punch data and perform other meaningful tasks. |
Scheduled | These are maintenance events who's workflows perform routine tasks on a periodic basis, such as backups, purging, updating recurring data, etc. These are typically processes that will run every night, once monthly or on some other routine schedule. There is no input to a scheduled event, so there is no target "record" to be processed. |
Schedules
Schedules different granularities, and with each you can select from the following properties:
Type | Options |
---|---|
Daily | The time of day to run |
Weekly | The time to run and days of the week |
Monthly | The time to run and days of the month |
Yearly | The time to run, months, and days of the month |
In each case the timezone for the selected time is also provided.
A daily event; multiple run-times per day are handled by creating additional schedules
Schedules can be combined to create custom schedule templates. For example, to run an event multiple times per day, but only on certain days of the week, create multiple schedules such as the following:
Schedule Type | Time | Days of the Week |
---|---|---|
Daily | 7am | M, W, F |
Daily | 11am | M, W, F |
Daily | 3pm | M, W, F |
Daily | 5am | Sat, Sun |
The above runs the event at 7, 11 and 3p on Monday, Wednesday and Friday, and at 5am on the weekend.
The following shows a scheduled event running daily:
Use the
X
next to any existing schedule to remove the schedule