Search

Home

Home

Creating a Database Notification Trigger

Creating a Database Notification Trigger

If you want to configure application execution using a database notification mechanism (based on a signal originating from the database), you need to select TRIGGERS from the main menu.

Database notification is supported in the GRAVITY system for the following three database types:

  • PostgreSQL
  • SQLServer
  • Oracle

By selecting New... you can add a new configuration for automatic execution of the GRAVITY application.

image

After selecting New…, you must choose the type of automatic trigger from the list.

image

If you choose the database notification mechanism, select DATA BASE from the list.

In the PROPERTIES section, you need to specify the GRAVITY application (project) that will be associated with this trigger.

image

To complete the configuration, you need to select a database connection (from the list of configured connections) and, depending on the database type, specify either the channel the system will listen on (PostgreSQL) or the table it will monitor (SQL Server).

image

To activate the trigger, you need to set the Enabled switch to ON.

image

If you want the system to send an email to specified recipients when a process error occurs, you need to enable the Send mail when error option.

If the project uses parameters, they will appear in the Parameters panel as a list of name–value pairs. Clicking a value allows you to define a default value for the trigger.

image

The default value will be used if the trigger does not receive this parameter value from the invocation (for example, REST API, database, RabbitMQ, etc.) and will be passed to the executed project.