---
sourceDocument: Brazil ServiceNow AI Platform Capabilities
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/servicenow-platform

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# ValidateSubflows

# ValidateSubflows {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of ValidateSubflows

The ValidateSubflows validator in ServiceNow identifies subflows within workflows that are inactive, deleted, or not published for the current user.
Such conditions cause the workflow to hang indefinitely when the subflow activity is reached, resulting in a critical error that prevents the workflow from running.
Show full answer Show less  

## Key Features

* **Detection of Invalid Subflows:** Flags subflows that are inactive, deleted, or unpublished for the user executing the main workflow.
* **Validation Results:** Provides clear messages indicating the count of valid and invalid subflows within a workflow.
* **Critical Error Identification:** Marks workflows with invalid subflows as critical errors that halt execution.
* **Actionable Guidance:** Suggests removing or correcting invalid subflows by ensuring they are valid and published or checked out to the current user.

## Troubleshooting and Practical Application

The validator addresses scenarios where workflow execution hangs due to subflow availability issues:

* If a subflow is checked out by User A but the parent workflow is run by User B, and no published version exists, the workflow will hang at the subflow activity.
* If a subflow is deleted or has no published or active versions, the parent workflow cannot execute properly.

In both cases, the workflow logs a critical error in the Workflow Context record and halts execution.

To resolve these issues, ServiceNow customers should:

* Remove or unlink invalid subflows from the parent workflow.
* Ensure subflows are published and available to all relevant users.
* Re-run the validation after corrections to confirm workflow integrity.

## Why This Matters

Ensuring subflows are valid and accessible prevents workflows from hanging and ensures smooth automation processes. This validation helps maintain workflow reliability and avoids critical failures that can disrupt business operations.  
The ValidateSubflows validator detects any workflows included as
subflows that are either inactive, deleted, or not available as a published workflow for the
current user.
Any of these conditions cause the workflow to hang when the workflow activity in the main flow is encountered.  
Warning:  
This is a critical error that prevents a workflow from running.

## Validation summary

* Risk: A parent workflow that transitions to a deleted subflow hangs indefinitely, with no recovery options.
* Severity Level: Critical
* Valid Result: Valid
* Valid Message: This workflow contains \<count\> valid subflows.
* Invalid Result: Invalid
* Invalid Message: This workflow contains \<invalid count\> invalid subflow(s) of \<total subflow count\> total subflows.
* Suggested Action: Remove the link in the parent workflow to the questionable subflow, examine the subflow to ensure that it is valid and published, or that it is checked out to the current user. After making the correction to the state of the subflow, run the validation again to test your changes.
* Publishable: No
* Runnable: No
* Related Information: [Workflows used as subflows](https://servicenow-prod.fluidtopics.net/qroh4souFTQcEK~vjEw6Bg "A workflow can launch another workflow as an activity.")

## Troubleshooting

When a workflow runs, regardless of whether it is a subflow or a main flow, the script engine determines which version of a workflow should execute,
given the current user and workflow conditions. When a workflow is checked out by the same user who is running the workflow, the checked out version
is the version that executes. If the user is not the same person who has the workflow checked out, the published version of the workflow executes.
If there is no published workflow, no workflow runs.

One scenario addressed by the ValidateSubflows validator is when a
workflow:

* Is checked out to User A.
* Is a subflow in a parent workflow being run by User B.
* Has no published alternative to the subflow being run by User B.

When this occurs, the parent workflow runs to the execution of the unpublished subflow and
then hangs at that activity, with no means to transition forward. Main flows that encounter
this condition in a subflow are not permitted to execute against a current record's
transaction. Instead, a critical log entry detailing the subflow's state is added to the
current workflow's Workflow Context record. To correct the problem, remove the subflow from
the main flow, or publish the subflow so it is available to User B. This allows the workflow
to execute on the next appropriate transaction.

Another scenario addressed by the ValidateSubflow validator is when
a workflow:

* Is a subflow in a parent workflow being run by any user.
* Has no published alternative to the subflow, because the workflow has been deleted or all versions of the workflow are unpublished or inactive.

Note:  
You cannot delete a from a list or form workflow that is a subflow. However, you can create one of these unstable conditions with advanced scripting, SQL options, or incomplete update sets that contain main flows, but not the referenced subflows. When troubleshooting a workflow that triggered this validator, consider the history of the subflow while assessing the error condition.

