Exploring subflows
Summarize
Summary of Exploring Subflows
Subflows in ServiceNow automate repeatable multi-step processes that produce outputs for use in other workflows. Unlike flows, subflows do not have triggers and run only when called from a playbook, flow, another subflow, or script. They consist of reusable actions and flow logic, with defined inputs and outputs, enabling modular and efficient process automation.
Show less
Subflows are especially useful for automating processes that need to be reused across different workflows, improving efficiency and consistency. Building and managing subflows requires familiarity with ServiceNow AI Platform tables and fields.
Key Components
- Subflow Inputs: Data elements with defined names and data types required to run the subflow.
- Subflow Outputs: Data produced by the subflow that can be used by calling workflows, set with Assign subflow outputs logic.
- Actions: Reusable operations that automate platform features without coding, such as creating records. Application-specific actions can be created for consistent configurations.
- Flow Error Handler: Mechanism to catch and report errors during subflow execution, allowing for corrective actions like logging or notifications.
- Execution Details: Provides runtime information on subflow execution including actions run, outputs generated, and errors, accessible from the design environment.
Benefits for ServiceNow Customers
- Automates repetitive tasks to increase operational efficiency and improve user experience.
- Uses natural language and visual diagrams to make workflows understandable and manageable for both technical and non-technical users.
- Enables creation, testing, and management of workflows from a single interface.
- Supports reuse and sharing of actions among subject matter experts and flow authors, promoting collaboration.
- Reduces development and upgrade costs by replacing complex custom scripts with upgrade-safe platform logic.
- Scales effectively with options for integration and Robotic Process Automation (RPA) subscriptions.
Practical Application
ServiceNow customers can leverage subflows to build modular, reusable automation components that simplify complex processes. Subflows can be integrated into playbooks, flows, or scripts to streamline operations such as task creation or error handling. Additionally, subflows can be invoked conversationally from Now Assist, enabling automation triggered by user interactions.
For those developing subflows, familiarity with AI Platform data structures is important, and leveraging existing actions or creating application-specific actions helps maintain consistency and reduce configuration errors.
Subflows automate a repeatable multi-step process that also produces an output needed by another process. When a playbook, flow, or script calls a subflow, the subflow runs a sequence of reusable actions and flow logic to complete the process and produce output values.
Subflows overview
A subflow is an automated process consisting of a sequence of reusable actions and flow logic, data inputs, and outputs. In contrast to flows, subflows do not have a trigger but instead run when called from a playbook, flow, another subflow, or a script. The inputs describe the data used to run the subflow. The actions perform a sequence of operations on your data. For example, the Change - Implementation tasks subflow creates an implementation and a post implementation task given a input change record.
Building and managing subflows requires that you have some familiarity with the ServiceNow AI Platform tables and fields that the application or process uses. Process analysts can create subflows using available actions or use an existing subflow as a template. See Building subflows.
Subflows consists of the following components.
- Subflow Inputs
- A subflow input stores data used to run the subflow. Each input has a name and a data type. You can define one or more inputs that are available to the subflow. When calling a subflow, flow authors must provide data values for the subflow inputs.
- Subflow outputs
- A subflow output stores data generated by a subflow. Each output has a name and a data type. You can define one or more outputs that are available to the subflow. When calling a subflow, flow authors can use subflow outputs as data for operations later in the flow. You can use the Assign subflow outputs flow logic to set output values.
- Subflow execution details
- A subflow execution details page allows a flow author to view run-time information about an action or flow directly from the design environment. You can view details such as the current sate, actions or steps run, output values generated, and errors produced. See Flow execution details.
- Flow error handler
- A flow error handler enables a subflow to catch and report errors from the subflow execution details. Run a sequence of actions and subflows to identify and correct issues. For example, have subflows log output values, send notifications, and run corrective subflows when they produce an error. See Flow error handler.
- Actions
- An action is a reusable operation that enables process analysts to automate ServiceNow AI Platform features without having to write code. For example, the Create Record action allows process analysts to generate records in a particular table with particular values when certain conditions occur. ServiceNow core actions like Create Record require some familiarity with ServiceNow AI Platform tables and fields. Action designers can create application-specific actions to pre-set configuration details. For example, creating a Create Incident Task action ensures that the process analyst uses the correct table and field configuration each time the action is used. You can add application-specific actions by activating the associated spoke. See Workflow Studio actions.
For detailed instructions for creating a subflow, see Create a subflow in Workflow Studio.
Subflows benefits
- Automates repetitive work to improve efficiency and experience.
- Describes a workflow in natural language to help non-technical users understand what it does.
- Displays a workflow as a diagram to help builders see available paths and connections.
- Enables creating and testing a workflow from a single interface to ensure it works as expected.
- Promotes process automation by enabling subject matter experts to develop and share reusable actions with flow authors.
- Reduces upgrade costs, with upgrade-safe ServiceNow AI Platform logic replacing complex custom script.
- Reduces development costs by providing a library of reusable actions.
- Scales with separate subscriptions for integration and Robotic Process Automation (RPA) functionality.
| Benefit | Feature | Users |
|---|---|---|
| Build an automated workflow from an existing library of automated operations. | Subflow | Application developer, process owner, or administrator |
| Run an automated workflow on demand. | Subflow | Application developer, process owner, or administrator |
| Specify the input data that an automated workflow uses to run. | Subflow | Application developer, process owner, or administrator |
| Store one or more outputs as data for use by other automated workflows. | Subflow | Application developer, process owner, or administrator |
| Build an automated operation from an existing library of automated steps. | Action | Application developer, integration owner, or process owner |
| Run an automated operation on demand. | Action | Application developer, integration owner, or process owner |
| Use one or more inputs as data to run an automated operation. | Action | Application developer, integration owner, or process owner |
| Store one or more outputs as data for use by other automated operations. | Action | Application developer, integration owner, or process owner |