Search

Home

Home

Creating a File–Type Trigger

Creating a File–Type Trigger

If you want to configure the application to be invoked when a new file appears in a specified directory, you must select the TRIGGERS option from the main menu.

By selecting New..., you can add a new configuration for automatically launching the GRAVITY application.

image

After selecting the New… option, you have to choose the type of automatic trigger from the list.

image

When you decide to use the file trigger mechanism, you have to select the FILE option from the list.

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

image

A trigger of this type passes the file path to the FILE INPUT operator. Whether or not such an operator exists in the project, the project will still be launched.

To complete the configuration, you have to specify the directory that GRAVITY should monitor to detect the creation of a new file, retrieve its name, and pass the file path to the project.

image

For the trigger to be active, you have to set the Enabled switch to On.

image

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

If the project uses parameters, you will see them in the Parameters panel as a list of name–value pairs. By clicking a value, you can enter a default parameter value for the trigger.

image

The default value will be used if the trigger does not receive a value for this parameter from the call (e.g., REST API, database, RabbitMQ, etc.) and will be passed to the project being launched.