Can I recursively call a flow or subflow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2024 10:37 PM
I was trying to develop a flow and this question came to my mind. Is it possible to create loops using a flow? Can I recursively call a flow to achieve this goal? I have tried many ways and I have not found how to do it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2024 10:54 PM
Not certain why you would want to recurve flow.
It is possible to create a recursive flow as is written in the following page but there is usually a better way to define a flow without recursion.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0830765
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2025 04:42 AM
You maybe given a record and need to find all associated sub records / flows to it and any children.
Cannot do in a single call as there is now way of getting the values until you know the next level
Your RITM calls a flow, so the first record is the RITM sys_id
You now search on the sys_id of the sys_flow_context to get all sub flows from the first flow.
Repeat until you have no further flow contexts
Likewise for RITM/Task or anykind. Seen many where the flow will do some work and a customer has allowed their itil users to add another type of record, and the parent value is not the calling REQ/RITM, but maybe a sc_task, vtb_task and so on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2024 12:09 AM
Hello @jordimsant,
If you are talking about looping, you can always use Do the following flow logic to create a loop that repeatedly applies one or more actions. This flow logic requires a condition specifying when to stop the loop.
You can go through product documentation!
Please hit the thumbs up if this info helps!
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2025 04:44 AM
Maybe, but too many loop steps or overall steps will stop a flow
By calling a subflow recursively you eliminate that
For the example above, on the sys_flow_context, no idea how many flows or subflows are called, so where does you loop end and how many steps.
You can call a sub flow and run 100 steps with no worries, can't do that as an all in one flow