The Run workflow action allows you to modularize workflow usage by running a workflow as a task in another workflow. We call this type of workflow a sub-workflow. This approach enhances flexibility and maintainability, allowing each sub-workflow to function independently, and you can integrate it based on your needs.
Here are some examples:
The list of available sub-workflows displays only the ones you can access. It also doesn't contain any simple workflows, as running this action requires the full functionality of Workflows.
For the execution to be successful, the actor on the current workflow needs permission to run workflow automation:workflow:run
and access to the selected workflow in the action.
Make sure you have the proper access and permission configuration for the actor to run all workflows you plan to use. For more details, refer to User permissions for workflows.
If you don't have access to a workflow that has already been selected, this is displayed in Workflows. However, you can still edit and adjust the task input and any other task in the workflow.
Direct or indirect recursions of workflow executions are not allowed.
input()
expression in the sub-workflow.The action result is the one defined in the sub-workflow result. For details, see Workflow results.
The Run Workflow action creates a workflow execution for the selected workflow. When opening a monitor with a task that runs another workflow, the monitor will provide a link to the monitor of the respective workflow execution.
In case there are multiple workflow executions, for example, looped run workflow action, the execution list filtered to the respective workflow execution opens.
Vice versa, the trigger on the sub-workflow execution provides information about the triggering workflow and a link to the respective workflow execution.
Cancelling a workflow that contains a task with the Run Workflow action or this task directly cancels recursively all sub-workflow executions and their tasks.
The editor displays a hint when a workflow is used as a sub-workflow in another workflow.