--- title: End Flow flow logic description: Stop running the current flow. Use End Flow within a branch of the flow to specify an exit condition. For example, end the flow when it reaches a specific If flow logic block. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/build-workflows/workflow-studio/flow-logic-end-action.html release: australia product: Workflow Studio classification: workflow-studio topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 4 breadcrumb: [Flow logic, Flows, subflows, and actions reference, Flows, subflows, and actions, Workflow Studio, Build workflows] --- # End Flow flow logic Stop running the current flow. Use End Flow within a branch of the flow to specify an exit condition. For example, end the flow when it reaches a specific If flow logic block. End Flow logic can be contained within a conditional flow logic block, such as an **If**, **Else If**, or **Else** flow logic block. Use this flow logic to stop a flow when certain conditions are met. You cannot add actions or flow logic after you use the **End Flow** flow logic. All branches of a flow are ended when a flow reaches the **End Flow** flow logic, including the **Wait for a duration** logic. Any branches that run in parallel also stop their progress when you use the **End Flow** flow logic. ## Inputs This flow logic has no inputs. ## Outputs This flow logic has no outputs. When this flow logic ends a flow or subflow, it sets the state to Completed. Subflows that end can only return an output value to a parent flow if there was an Assign subflow outputs flow logic prior to the End subflow flow logic. ## General guidelines Use the general guidelines when adding an End flow or End subflow flow logic. - **Assign subflow outputs prior to End subflow flow logic** If a subflow always needs to return an output value to a parent flow, use an Assign Subflow Outputs flow logic prior to the End Subflow flow logic. By default, an ended subflow does not return any output values. - **Design parent flows to handle an ended subflow** If you call a subflow that has an end branch, make sure that the calling flow can handle not receiving subflow output. It is up to the flow and subflow author to pass data between flows. ## Request Ad hoc Approval subflow \[Omitted image "example-end-subflow-approval.png"\] Alt text: Subflow containing an End Subflow branch This example subflow supports adding arbitrary approvals from a Playbooks activity. The wait condition in steps 5 to 6 checks the flow data record for an end state such as cancelled, complete, error, or skipped. When the flow data record enters one of these states, the subflow ends without assigning any outputs. \[Omitted image "example-end-subflow-approval-execution-details.png"\] Alt text: Execution details of subflow reaching the End branch. When the subflow reaches this branch, it stops the subflow and sets the state to Completed. The actions in other branches are not run. **Parent Topic:**[Workflow Studio flow logic](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/flow-logic.md) **Related topics** [Append to Flow Variables flow logic]() [Assign subflow outputs flow logic]() [Call a workflow flow logic]() [Do the following until flow logic]() [Do the following in parallel flow logic]() [Dynamic flows flow logic]() [Exit Loop flow logic]() [For Each flow logic]() [Get Flow Outputs flow logic]() [Go back to flow logic]() [If flow logic]() [Make a decision flow logic]() [Set Flow Variables flow logic]() [Skip Iteration flow logic]() [Try flow logic]() [Wait for a duration flow logic]()