-
DarkLight
-
PDF
Triggers
-
DarkLight
-
PDF
Triggers enable you to run automations in four different ways, each described in the table below. You can assign as many triggers as you like to an automation and have more than one of each type. You can find more details about each trigger type in the sections that follow.
Trigger Type | Function |
---|---|
Manual | Runs the automation using its play button, with an optionally assigned JSON Form. |
API Endpoint | Runs the automation from a unique endpoint using a POST call, optionally using the request body of the POST call as the assigned workflow's input. |
Schedule | Runs the automation at some point in the future at an optional repeating frequency. Also includes an optionally assigned JSON Form. |
Event | Runs the automation when a system event occurs. |
Workflows initiated by triggers will mention Operations Manager in the Job Manager job description.
Figure 1: Operations Manager in Job Manager
Creating and Editing Triggers
To create a trigger:
- Click the
+ Trigger
button on the automation details page. - Use the dropdown to select the trigger type you want to create.
- You can edit a trigger using the action icon from the trigger table row.
Manual Triggers
Manual triggers run an automation using the play button.
Figure 2: Create Trigger Modal
Label | UI Element | Function |
---|---|---|
1 | Enabled | Toggle this switch to enable the trigger to run (or not run). |
2 | Name | Add or change the trigger name. |
3 | Type | Dropdown menu to select or change the type of the trigger to create. |
4 | Form | Optional. Dropdown menu to select the JSON Form to run the assigned workflow with. |
5 | Create new form | Click the plus (+) sign to open the Automation Studio create modal in a new tab to create a new JSON Form. |
6 | Current Form Data | The assigned form data for the trigger. Contains the default values from the JSON Form or the form data from the last run. |
7 | Save | Button to save the manual trigger and, if applicable, any assigned JSON Form data and its inputs. |
8 | Save and Run | Button to save the manual trigger and, if applicable, any assigned JSON Form data and its inputs. Immediately runs the automation with the JSON Form data after saving. |
Running Automations from Manual Triggers
To run an automation:
- Click the play button in the top left of the Automation Details page. The Run Automation modal opens.
- Select an enabled manual trigger to run the automation. You can also edit its optional JSON Form data.
- Click Run.
By having multiple manual triggers, you can more easily run an automation with different JSON Form data.
Figure 3: Manual Run Trigger Modal
API Endpoint Triggers
API Endpoint triggers are endpoints that will run the automation with POST
request data. Each API trigger requires a unique route name.
URLs for endpoint triggers use this format:
/operations-manager/triggers/endpoint/:routeName
The routeName
is unique. This endpoint responds with information about the workflow that was started.
Figure 4: Create API Endpoint Trigger
Label | UI Element | Function |
---|---|---|
1 | Action | The HTTP type will always be POST . |
2 | Route | Required name input. The unique route name for the endpoint. /operations-manager/triggers/endpoint/:routeName |
3 | POST-body Schema | Optional. The schema the POST request body must match. |
4 | JST (Optional) | Select the JST to transform the POST body to the assigned workflow's input schema. |
Schedule Triggers
Schedule triggers run the automation at some point in the future at an optional repeating frequency.
⚠ Note: The time and date selected in the modal and shown in the trigger table after saving is based on the user's current time and date.
Figure 5: Create Schedule Trigger
Label | UI Element | Function |
---|---|---|
1 | Start On | Required. Calendar icon to choose date for when to start running the automation. |
2 | Run At | Required. Clock icon to choose time for when to start running the automation. |
3 | Repeat Every | Optional. Select the frequency (how often) the trigger should run the automation. |
4 | Process Missed Runs | Required. Should a scheduled item fail to run, this option sets whether or not Operations Manager should run all, none, or the most recently missed scheduled run. |
5 | Form | Optional. Select the JSON Form to run the assigned workflow with. |
Event Triggers
Event triggers run the automation they are assigned to whenever the event they are configured to listen for occurs. When an event occurs in Itential Automation Platform (IAP):
- The event system of IAP will publish an event object, which is a representation of that event as a JSON object.
- The
payload
key of the event object will be validated against the payload schema filter defined in the event trigger. - If the
payload
passes validation, the event object will be sent to an optional JST defined in the event trigger. - After the JST is applied (if relevant), the
payload
will be made available to the workflow and the automation will run.
⚠ Note: If you wish to use keys and values from the event object in a workflow, you must reference them as job variables within the workflow itself.
For more information:
- Refer to the Variables section of the Tasks documentation in the IAP Automation Studio User Guide.
- Refer to the Event System documentation in the IAP Developer Guide to learn more about event objects.
Figure 6: Edit Event Trigger
Label | UI Element | Function |
---|---|---|
1 | Event | Required. Select the event that should run the automation. |
2 | JST | Optional. Select the JST to transform the event payload . For more information, refer to the JST Tool documentation in the IAP Automation Studio User Guide. |
3 | Payload Schema Filter | The JSON schema that the event payload must conform to. For more information, refer to the Payload Schema Filter section below. |
Payload Schema Filter
The payload schema filter is a JSON schema against which the payload
key of an event object is validated. If the payload
is validated, the event trigger will continue its preparations to run the automation. If the payload
is not validated, the automation will not run.
The payload schema filter uses the following syntax:
{
"type": "object",
"properties": {},
"additionalProperties": true
}
Property | Description |
---|---|
type |
Refers to the payload key of the event object, which is itself a JSON object. |
properties |
This is where the event variables the payload should be validated against are defined. |
additionalProperties |
Allows variables not defined in the properties key of the payload schema filter to be present in the payload without affecting validation. Default is true . |
⚠ Note: For more information on how to construct JSON schemas, refer to the Understanding JSON Schema documentation.
Triggers UI
The triggers table is where to view an automation's triggers. You can view trigger names, types, and if they are enabled. If the trigger is a scheduled trigger, then the table also shows the date and time of the next scheduled run in your local time.
To edit or delete a trigger, hover to the far right of the trigger's row to view the trigger actions. If the trigger is a manual trigger, the option to run the trigger will be available. This will show the manual run modal, and behaves the same as the play button on the left of the Automation Details page and in the Automation Collections view.