Flow execution settings
Summarize
Summary of Flow execution settings
Flow execution settings in ServiceNow allow you to specify runtime configurations for individual flows, subflows, or actions. These settings include parameters such as run priority, reporting level, and logging level. Execution setting records override system-wide reporting properties for the targeted flow components, enabling selective collection of execution details without impacting the entire system.
Show less
Key Features
- Execution Setting Records: You can create multiple execution setting records ([sysflowexecutionsetting]) for different flows, subflows, or actions to tailor execution detail collection.
- Reporting and Logging Levels: Configure the level of execution detail and logging messages captured during flow runs, which helps in monitoring and troubleshooting.
- Report All Iterations Option: Choose whether to gather execution details for all iterations of a loop or only the first and last, balancing detail with resource consumption.
- Flow Priority: Set the priority for running background flows, although this option is hidden by default and can be enabled if needed.
- Inheritance of Settings: Actions or subflows invoked from a parent flow inherit the parent's execution settings.
- Access: Execution setting records are managed through the Flow administration module.
Best Practices and Guidelines
- Avoid Enabling on Production: To prevent performance degradation, activate and configure execution settings only on non-production instances used for testing.
- Test Thoroughly Before Deployment: Use debug-level execution details to verify flows, subflows, and actions generate the necessary data before moving to production.
- Manage Resource Consumption: Limit memory usage by avoiding the "report all iterations" option unless needed for detailed troubleshooting.
- Use for Troubleshooting Only: Enable detailed reporting and logging settings temporarily during troubleshooting, then disable or delete these records to maintain optimal performance.
Practical Implications for ServiceNow Customers
By using flow execution settings, you gain granular control over monitoring and troubleshooting specific flows without impacting overall system performance. This targeted approach helps optimize resource usage and ensures that you collect only relevant execution data. Following the recommended guidelines will help maintain your instance’s stability while effectively diagnosing and resolving flow-related issues.
Specify the runtime settings for an individual flow, subflow, or action such as the run priority, reporting level, and logging level.
You can create an execution settings record for each flow, subflow, or action for which you want to collect execution details. An execution setting record [sys_flow_execution_setting] overrides the reporting system properties for a particular item. For example, you can keep the system wide reporting level off, and create execution setting records just for the items that you want to collect execution details.
Execution setting records are available from the Flow administration module.
Execution setting record fields
An execution setting record [sys_flow_execution_setting] contains these fields.
| Field | Description |
|---|---|
| Flow/SubFlow/Action | Individual flow, subflow, or action to which the execution settings apply. |
| Report all iterations | Option to gather execution details for all iterations of a loop that have run rather than just storing execution details for the first and last run iterations. If a flow pauses between iterations, then the execution details include all iterations that have run. When this option is false, the execution details only include the first and last iterations run. |
| Reporting | Reporting level at which to gather execution details. |
| Logging | Logging level threshold required for Workflow Studio to write a message generated by the flow engine to the Flow engine log entries [sys_flow_log] table. |
| Flow Priority | Priority value used to run a background flow. For more information about setting flow priority, see Flow priority. Note: .This field is hidden by default. For more information about showing the flow priority field, see Show flow priority field. |
General guidelines
Use these general guidelines when creating execution setting records to capture execution details.
- Avoid reporting on production instances
- Avoid performance issues on your production instance by only activating and configuring reporting on a non-production instance that you use for testing. Generating and storing execution details consumes instance resources, which can lower performance.
- Create execution setting records on a non-production test instance
- Create execution setting records on a non-production testing instance to minimize the performance impact of generating and storing execution details.
- Reduce the amount of memory consumed by flow loops
- Reduce the amount of memory consumed by generating execution details by not using the option to report all iterations. The more iterations you report on, the more memory is required.
- Test flows, subflows, and actions to generate execution details
- Test your flows, subflows to generate execution details at the debug level. Only deploy your items to a production instance after you verify that they generate the data you want and that they perform as expected.
- Use flow reporting and the report all iterations options only during flow troubleshooting
- Use the flow reporting and report all iterations options only when you need to troubleshoot a flow. These settings generate information that consume instance resources. To reduce their performance impact, either turn off these settings or delete the settings record altogether when you are done troubleshooting the flow.