ServiceNow Subflows and Actions

Priyanka_Ghosh
Tera Contributor

Scenario - I have a Flow Action which has a script step. The script is calling a subflow. 

 

Challenge - The script has to wait until the subflow completes. Only when the subflow completes its execution, the script should proceed with the further steps.

 

Note - Actually there is approval in the subflow, so only when the Approval is true (approved), the script should resume its further execution.

 

 

Any help on achieving the above condition would be appreciated.

Thanks,

Priyanka

 

4 REPLIES 4

bevo
Tera Expert

I also have most of my approvals in a standardized subflow, so I appreciate where you are coming from.

My only recommendation is to break the script into two discrete actions, then call part A) before the subflow, and part B) after.

Bidduam
Tera Guru

@Priyanka_Ghosh 

 

You really should just be able to add a wait for condition action

Bidduam_0-1746664200526.png

Perhaps even set something via the flow to update and make the condition true so it knows to continue at that point.

DanielCordick
Mega Patron
Mega Patron

Why call a subflow from a script action when you can use wait for conditions along with do the following in parallel actions?

 

i guess I don’t see why you would need to call a subflow from a custom action when there is usually another way 

Agreed, there is an action for calling a script, one for calling a sub-flow. There really shouldn't be the need, but in case it is totally needed a wait for condition would be the way to go