Running Workflows
Workflows can be started/resumed using triggers. There are 3 types of triggers:
Webhook
- A webhook is a URL that can be called to start/resume a workflow.Schedule
- A schedule is a cron expression that can be used to start/resume a workflow on a schedule.Workspace Event
- An event within the Modernbanc workspace can be used to start a workflow.
Usage
Note: Make sure the workflow is active before trying to start/resume it. Otherwise you'll get an error response as shown below.
{
"code": "ERR_BAD_REQUEST",
"message": "The workflow version with id 'b76c6dea-d0dd-4235-a2ba-448278028ceb' is not active in your current environment."
}
Webhook
- Navigate to the
Workflows page
, or pressG
and thenW
. - Click on the workflow you want to run.
- Select the executions tab from left sidebar.
- Click on the Run Workflow button.
- Select
start/resume
,workflow
,workflow_version
,step
andenvironment
from the dropdowns. Current workflow, workflow_version and environment will be pre selected by default. - Optionally add
headers
andbody
to the request. - Click on the Run button.
Schedule
Workflows with a schedule trigger attached, are triggered by cron expressions. Learn more about available cron expressions here.
Example - A workflow that has a trigger with a cron expression of */5 * * * *
will be triggered every 5 minutes.
Workspace Event
A workflow with a workspace event trigger attached, will be triggered when the selected event in the trigger occurs in the workspace.
Example - A workflow that has a workspace event trigger which is listening to Create
Transaction
events will be triggered when a Transaction
is created
in the modernbanc workspace.