Workflow validation
Summarize
Summary of Workflow validation
Workflow validation in ServiceNow identifies issues in workflows that could prevent publishing or cause failures during execution. It ensures only stable and complete workflows are published and run, helping maintain system reliability. Validation occurs automatically when publishing and can be manually triggered within the Workflow Editor.
Show less
Key Features
- Automatic and manual validation: The system validates workflows when publishing and allows designers to validate workflows directly from the Workflow Editor.
- Graphical error highlighting: Critical errors such as missing subflows are visually indicated within the Workflow Editor, allowing easy identification and correction.
- Validation report: Provides detailed results of each validation check, including notification level (CRITICAL, WARN, INFO) and descriptive messages explaining issues.
- Notification levels:
- CRITICAL: Errors preventing workflow publishing or execution (e.g., missing subflows).
- WARN: Potential issues that allow publishing but may affect workflow behavior (e.g., table mismatches or subflow changes).
- INFO: Informational messages that do not affect publishing but provide useful workflow details.
Practical Implications for ServiceNow Customers
- Publishing control: Workflows with critical errors cannot be published, protecting production environments from unstable workflows.
- Insightful feedback: Validation messages clearly describe the problem, including specifics like table names and update set impacts, enabling efficient troubleshooting.
- Improved workflow stability: By addressing validation warnings and errors, customers can ensure workflows run reliably and avoid runtime failures.
- Support for complex workflows: Validators check for common pitfalls such as disconnected transitions, multiple End activities, and missing dependencies, which are critical for complex workflow designs.
Using Workflow Validation
Customers should regularly validate workflows during development and before publishing. The validation report can be accessed via the Workflow Editor’s validate icon, providing a comprehensive view of any issues to address. Understanding the notification levels helps prioritize fixes to achieve a publishable, error-free workflow.
Workflow validation examines different characteristics of a workflow to locate issues that might prevent the workflow from being published or cause it to fail. The validation report summarizes the results of each separate workflow validation.
Validation prevents workflows with critical flaws from executing and resulting in an unstable or incomplete state. There are a number of validators in the base system that notify workflow designers of potential problems. For example, multiple End activities, disconnected transitions, incorrect table references, missing subflows, and dependencies affected by update sets. A workflow validation report displays the results from each validator, including a message explaining what was found. The system automatically validates a workflow when you publish it. You can also run validation on a workflow directly from controls in the Workflow Editor.
Highlighting critical errors
Validations at publishing
If you attempt to publish an invalid workflow or a workflow with potential problems, the system displays an error message and blocks the operation, if necessary. When validation error messages appear, click the validate icon in the graphical Workflow Editor to see the error report.
- Validation warning
- A validation warning notifies you that a potential problem exists in a workflow but permits
you to publish the workflow. Validation warnings appear when:
- You edit and then attempt to publish a workflow that is included as a subflow in another workflow. The system cannot determine how your changes will affect the parent workflow and alerts you of the relationship.
- A workflow activity uses a different table than the table assigned to the workflow. The system alerts you of the potential conflict.
Figure 2. Validation warning - Validation failure
- A validation failure notifies you that a critical error has occurred in the workflow that prevents you from publishing the workflow. An example of a critical error is a missing subflow.
Figure 3. Validation failure
Workflow validation report
Validators display three notification levels: CRITICAL, WARN, and INFO. The designer can publish a workflow that returns WARN or INFO level validation, but not a workflow that returns an overall validation level of CRITICAL.
- Header summary
- The header of the validation report summarizes the entire validation run against the
specified workflow.
- Validate Summary: The overall score reflects the most severe notification level encountered during the validation.
- Total checks performed: The total number of validations run is also broken down to show the number at each notification level.
- Report columns
- The body of the report displays the results of each individual validation check that was
performed. The columns are Type, Level, and
Message. You can sort and filter these columns as you would any
list.
Table 1. Workflow termination and external dependencies levels Name Implication Info Provides information about the current workflow version. An example of an information level message is one that names the lowest common table in the workflow. Workflows at this validation level are considered valid and publishable. Warning Alerts the user that the validator detected anomalies in the workflow that might compromise its ability to execute. An example of a warning level message is one that alerts you to a missing activity input transition. Workflows at this validation level are considered valid and publishable. Critical Names a workflow element containing a critical error that prevents the workflow from executing successfully. Examples of this are missing or invalid subflows and missing transitions. Workflows at this validation level cannot be published or run in production. - Message
- The validation message provides a detailed description of the results, including table names, update sets, and other specifics.
For the procedure to validate a workflow and generate a validation report, see Validate a workflow