I need to call a subflow in another new subflow in servicenow
- User
I need to call a subflow in another new subflow in servicenow
- Assistant
- User
Subflow is not showing in action
- Assistant
I need to call a subflow in another new subflow in servicenow
Subflow is not showing in action
In ServiceNow, calling a subflow within another subflow can be an efficient way to modularize and reuse workflows. Here’s a step-by-step guide to achieve this:
Create the Main Subflow:
Flow Designer > New > Subflow.Create the Nested Subflow:
Add the Nested Subflow to the Main Subflow:
Save and Test:
Suppose you have a primary subflow Process_Incident_Subflow and you want to call another subflow Notify_User_Subflow within it.
incident_sys_id (type: String)user_id (type: String)message (type: String)Create Process_Incident_Subflow:
Process_Incident_Subflow.Create Notify_User_Subflow:
Notify_User_Subflow.Edit Process_Incident_Subflow:
Process_Incident_Subflow, add a new action.Notify_User_Subflow from the dropdown.user_id: map to a variable or field indicating the user to notify.message: define the notification message.Notify_User_Subflow has outputs, you can map those to variables for further use.Save and Test:
Process_Incident_Subflow.Notify_User_Subflow is called and operates correctly.By following these steps, you can effectively call one subflow within another in ServiceNow's Flow Designer, promoting modularity and reusability in your workflows.
If the subflow is not showing in the action list within your Flow Designer, there could be several reasons for this. Let’s go through some troubleshooting steps to identify and resolve the issue:
Ensure that the subflow you want to call is published and active.
Verify that you have the necessary permissions to access and use the subflows.
admin role or other relevant roles assigned.Sometimes, subflows will not appear if their inputs/outputs don’t align correctly with what the calling (main) subflow or flow can provide.
While adding a subflow, make sure you are correctly searching for the subflow name.
Occasionally, the system might require an update or a synchronization.
Let’s go step by step to ensure everything is configured correctly:
Create the Subflows:
Create Notify_User_Subflow:
user_id and message).Save and publish the subflow.
Create Process_Incident_Subflow:
incident_sys_id).Save and publish the subflow.
Editing Main Subflow to Call Nested Subflow:
Process_Incident_Subflow in Flow Designer.Subflow.Notify_User_Subflow does not appear, try the following:
Save and Test:
Scenario:
Notify_User_Subflow with inputs user_id and message.Process_Incident_Subflow, it doesn’t appear in the search.Steps Taken:
Notify_User_Subflow is published.admin role.Notify_User_Subflow is designed to accept user_id and message, compatible with the data you have.Notify instead of full name, Notify_User_Subflow appeared.Resolution:
Notify helped locate the subflow in the action list.By ensuring everything is configured correctly and employing these troubleshooting steps, you should be able to resolve issues with subflows not appearing in the action list within the Flow Designer.
Not yet included in a published release.