Database Trigger Setup
Database Triggers allow the Workflow Management module to react to changes in database records. This feature helps automate workflows based on specific database actions like adding, modifying, deleting, or restoring records.
Overview
Database Triggers can be configured to monitor both static and dynamic tables for various record changes. By setting up triggers, users can automate responses based on database actions, ensuring that workflows react appropriately to data changes.
Configuring Database Triggers
Configure Database Trigger for Internal Destination with Static Table
To configure a Database Trigger for adding records in a static table:
- Destination: Select Internal.
- Title: Provide a descriptive title for the trigger.
- Description: Explain the purpose of the trigger.
- Trigger Method: Select Add Record.
- Source Table: Choose the static table to monitor.
Example:
- Title: Static Table Add Trigger
- Description: Trigger for adding records in static table
- Trigger Method: Add Record
- Source Table: Static Table
Outcome: The Database Trigger will be set to monitor the selected static table (e.g., "User Roles") for added records.
Configure Database Trigger for External Destination with Dynamic Table
To configure a Database Trigger for modifying records in a dynamic table:
- Destination: Select External.
- Title: Provide a descriptive title for the trigger.
- Description: Explain the purpose of the trigger.
- Trigger Method: Select Modify Record.
- Source Table: Choose the dynamic table to monitor.
Example:
- Title: Dynamic Table Modify Trigger
- Description: Trigger for modifying records in dynamic table
- Trigger Method: Modify Record
- Source Table: Dynamic Table
Outcome: The Database Trigger will be set to monitor the selected dynamic table (e.g., "Employee Records") for modified records.
Configure Database Trigger for Deleting a Record
To configure a Database Trigger for deleting records:
- Destination: Select Internal.
- Title: Provide a descriptive title for the trigger.
- Description: Explain the purpose of the trigger.
- Trigger Method: Select Delete Record.
- Source Table: Choose the static table to monitor.
Example:
- Title: Record Delete Trigger
- Description: Trigger for deleting records
- Trigger Method: Delete Record
- Source Table: Static Table
Outcome: The Database Trigger will be set to monitor the selected static table (e.g., "User Departments") for deleted records.
Configure Database Trigger for Restoring Records
To configure a Database Trigger for restoring records:
- Destination: Select Internal.
- Title: Provide a descriptive title for the trigger.
- Description: Explain the purpose of the trigger.
- Trigger Method: Select Restore Record.
- Source Table: Choose the dynamic table to monitor.
Example:
- Title: Restore Record Trigger
- Description: Trigger for restoring records
- Trigger Method: Restore Record
- Source Table: Dynamic Table
Outcome: The Database Trigger will be set to monitor the selected dynamic table (e.g., "Invoice Records") for restored records.
Validating Database Triggers
To validate the configuration of a Database Trigger:
- Review Configuration: Ensure all fields are correctly filled with appropriate values.
- Check Trigger Method: Confirm that the correct trigger method is selected.
- Verify Source Table: Ensure that the appropriate table is selected for monitoring.
Validation Checklist:
- Destination
- Title
- Description
- Trigger Method
- Source Table
Verifying Database Trigger Activation
Verify Record Add Trigger for Static Table
To verify the activation of a record add trigger for a static table:
- Trigger: Add a record to the monitored static table.
- Expected Outcome:
- The Database Trigger should be activated.
- The configured workflow should be executed.
Verify Record Modify Trigger for Dynamic Table
To verify the activation of a record modify trigger for a dynamic table:
- Trigger: Modify a record in the monitored dynamic table.
- Expected Outcome:
- The Database Trigger should be activated.
- The configured workflow should be executed.
Verify Record Delete Trigger for Static Table
To verify the activation of a record delete trigger for a static table:
- Trigger: Delete a record from the monitored static table.
- Expected Outcome:
- The Database Trigger should be activated.
- The configured workflow should be executed.
Verify Record Restore Trigger for Dynamic Table
To verify the activation of a record restore trigger for a dynamic table:
- Trigger: Restore a record in the monitored dynamic table.
- Expected Outcome:
- The Database Trigger should be activated.
- The configured workflow should be executed.
Summary
Database Triggers in the Workflow Management module provide a powerful way to automate responses to changes in database records. By configuring and validating these triggers, users can ensure that workflows react appropriately to data changes, whether they involve adding, modifying, deleting, or restoring records.