How does the flow context relationship is working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Community,
I am looking for a deep-dive technical explanation or official documentation regarding the lifecycle relationship between a Parent Flow and an Asynchronous Subflow.
The Scenario:
A Parent Flow calls a Subflow.
The "Wait for completion" checkbox is unchecked (False).
The Parent Flow moves to the next step and enters a "Waiting" state (e.g., waiting for a record update).
The Subflow also enters a "Waiting" state (e.g., a timer or a wait for condition).
The Observation:
When the Parent Flow Context is cancelled manually or through any script, the Subflow Context is also being cancelled automatically, despite being triggered asynchronously.
I would appreciate any insights from those who have explored the sys_flow_context hierarchy in detail and helping me to understand this in detail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Follow this KB or SN doc links . Hope it will help you.
1. KB2565934:How to show subflow stages in a parent flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks for your response @Tanushree Maiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @SHREEDHARANM,
In ServiceNow, even when Wait for completion is false, the subflow is only asynchronous in execution, not independent in lifecycle.
It still runs as a child context of the parent in sys_flow_context.
So both parent and subflow remain part of the same execution hierarchy.
When the parent flow is cancelled, the engine automatically cascades cancellation to all child contexts.
This includes subflows, even if they are in a waiting state.
Async just means non-blocking, not detached.
To make it fully independent, you need to trigger it via FlowAPI or events, not a direct subflow call.
Let me know if this
If you find my answer useful, please mark it as helpful and correct. 😊
Regards,
Soham Tipnis
ServiceNow Developer || Technical Consultant
LinkedIn: www.linkedin.com/in/sohamtipnis10
