Running workflows
Workflows can be executed in several ways:
- Manually: Directly from the workflow builder, either fully or for selected steps only.
- Scheduled: At a fixed time or on a recurring pattern using the UI or CRON-like syntax.
- From a notification: Triggered automatically in response to an Avantra event, such as a critical check.
- Via API: Using the SOAP API or command line tools to start and monitor workflows from external systems.
Variants
A variant is a saved set of input parameter values for a workflow. Variants simplify execution by letting users pick a pre-configured set of inputs rather than entering values each time.
Creating a variant
- Navigate Automation > Workflows and double click on the workflow that you wish to add a variant to.
- Open the Variants tab and click New.
- Enter a Name and optionally a Description. Variant names must be unique
- Select a Customer to control execution permissions for this variant.
- Tick Default configuration to use this variant automatically on new executions (only one variant can be default).
- Tick Exportable to include this variant in workflow exports.
- In the Values section, set the default values for each input parameter.
- Click Apply.
The variant is now created for use at execution or assigned to schedules.
Executing a workflow
- Navigate to Automation > Workflows and double click on the workflow that you wish to execute.
- Click Execute.
- If the workflow has input parameters, select from one of the pre-created variants, or enter values for any input parameters as required.
- Click Run.
The execution log opens and can be monitored live, or closed and reviewed later from the Executions tab or Automation > Executions.
Workflows can be executed partially by selecting the steps to execute and clicking Execute selected.
During a partial execution, inputs normally produced by unselected steps become manual workflow inputs. Ensure the correct format is used to avoid errors.
Schedules
Schedules are used to execute workflows automatically at regular intervals. A schedule can be defined either using our UI or by using a CRON-like syntax.
Creating a schedule
- Navigate to Automation > Workflows and double click on the workflow that you wish to schedule.
- Open the Schedules tab and click New.
- Enter a unique Name, then double-click the new line to edit its properties.
- If the workflow has inputs, select the variants to use.
- Click the Edit Schedule to add a timezone and a schedule pattern:
- Non-Recurrent: Runs once at a specified date and time.
- Recurrent: Repeats on a daily, weekly, monthly, or yearly pattern, with start and end dates.
- Advanced: Uses CRON-like syntax for complex patterns. See cron-like syntax for details.
- Click Info to check the schedule and to see when it the next run is.
- Click OK to close.
- Click Active to enable the schedule.
- Click Apply to save the schedule.
CRON-like syntax
The Advanced schedule tab accepts five space-separated values when defining a schedule. For example, 0 11 * * * means that a schedule will run every day at 11:00 AM. The values are explained in the table below:
| Name | Values | Special Characters |
|---|---|---|
| Minute | 0-59 | , - * / |
| Hour | 0-23 | , - * / |
| day of the month | 1-31 | , - * / |
| month | 1-12 or JAN-DEC | , - * / |
| day of the week | 0-7 (0 or 7 is Sunday) or MON-SUN | , - * / |
Examples:
| Expression | Meaning |
|---|---|
0/5 **** | Every 5 minutes |
0 **** | Every hour |
0,30 **** | Every 30 mins |
0 11 ** * | Every day at 11:00 AM |
0 11 ** MON-FRI | Monday to Friday at 11:00 AM |
0 9-17 ** MON-FRI | Every hour from 9 AM to 5 PM on Monday to Friday |
0 11 1/5 ** | 11:00 AM every 5 days starting first day of the month |
Use the Info button on the Schedule dialog to validate the expression and preview the next run time.
Monitoring workflows
When a workflow runs, a status dialog shows the current step and its outputs. For long-running workflows, close the dialog and monitor progress later from the Executions tab or Automation > Executions.
Manual activities
When workflows reach a manual step, it pauses and waits for user input. Open the execution and click Confirm to continue the workflow or stop the workflow.
Stopping a workflow
When viewing an execution, click Stop execition in the toolbar to stop it. Workflows can be stopped:
- When executing a step
- When a step has failed
- When waiting for a manual step to be confirmed.
If a step is currently executing, it will complete before the workflow stops — subsequent steps will not start.
Error handling
If a step is configured with On Failure value of Stop - Ask to resume or Retry and the step fails with an error, the workflow pauses. You then choose from:
- Stop to end the workflow, or
- Resume to skip the failed step or retry it.
Changing variables
While a workflow is paused, click Change variables to inspect and edit workflow inputs or previous step outputs. This is useful when an incorrect value (such as a password or file path) has caused a step to fail.
Take care when editing step outputs, as incorrect values can cause further errors in subsequent steps.
Notifications
When starting a workflow, tick the relevant checkboxes to receive notifications for events such as errors, manual steps, or workflow completion.