Creating Database Triggers
A database trigger initiates a new task whenever database records are inserted, updated, or deleted.
To create a database trigger:
-
Enter the connection string for the data source; and
-
Indicate whether you would like to retrieve database login credentials from the Credentials Vault. If credential vault is not checked, the credentials must be included within the connection string in order for the connection to work. If checked - no need to enter credentials in the connection string
NOTE: Test connectivity to the data source with the entered string by clicking the FETCH button
-
-
Select the table/view the trigger should monitor from the drop-down list
NOTE: The list will display the available tables/views after you have connected successfully to the selected database
-
Identify required columns
NOTE: Depending on the event(s) you selected in Step 1, one or more of these fields will be displayed (and are mandatory)
-
(Optional) Enter any applicable WHERE clauses to further refine the events to monitor
-
Indicate how often the trigger should fetch data (i.e., check for the events specified in Step 1)
-
Indicate one or more event(s) for which the trigger should monitor (database records inserted/updated/deleted)
NOTE: To use the "Delete" monitor, the table must support logical delete. See About using the "Delete" monitoring option in Database Trigger.
-
Select the data (database columns) to be fetched for each record returned
NOTE: Available columns will be displayed after you have connected successfully to the selected database
-
Indicate the maximum number of records to be returned each time the trigger checks for the specified events
-
Enter the delimiters to use to separate each row and column in the returned data
NOTE: These delimiters will be used by the wizard the trigger initiates to loop through the retrieved data
-
Indicate whether to create a single task for all returned rows
NOTE: By default this box will be unchecked indicating that an individual task will be initiated for each record returned