<h2>Flow or subflow stages</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2025" /><meta name="DC.rights.owner" content="(C) Copyright 2025" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="concept" /><meta name="DC.title" content="Flow or subflow stages" /><meta name="abstract" content="Communicate the current stage of a request, flow, or subflow with an end user." /><meta name="description" content="Communicate the current stage of a request, flow, or subflow with an end user." /><meta name="DC.relation" scheme="URI" content="../../../administer/flow-designer/concept/flows.html" /><meta name="DC.relation" scheme="URI" content="../../../administer/build-workflows/concept/build-workflows.html" /><meta name="DC.relation" scheme="URI" content="../../../administer/flow-designer/concept/flow-designer.html" /><meta name="DC.relation" scheme="URI" content="../../../administer/flow-designer/task/add-stages.html" /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2023-08-03" /><meta name="DC.date.modified" content="2024-04-23" /><meta name="page-type" content="automation-engine" /><meta name="page-type" content="platform" /><meta name="mini-toc" content="yes" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="flow-designer-stages" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>Flow or subflow stages</title></head><body id="flow-designer-stages"> <div class="breadcrumb"><a class="link" href="../../../administer/build-workflows/concept/build-workflows.html" title="Transform manual tasks and mundane work into digital workflows. Modernize legacy processes with hyperautomation. Enable citizen automation from one platform.">Build workflows</a> > <a class="link" href="../../../administer/flow-designer/concept/flow-designer.html" title="Flow Designer is a Now Platform feature that enables process owners to automate work. Build multi-step flows from reusable components without having to code.">Flow Designer</a> > </div> <h1 class="title topictitle1" id="ariaid-title1">Flow or subflow stages</h1> <div class="body conbody"><p class="shortdesc"><span class="ph">Communicate the current stage of a request, flow, or subflow with an end user. </span></p> <p class="p">When configuring stages in <span class="ph">Flow Designer</span>, you can:</p> <div class="p"><ul class="ul" id="flow-designer-stages__ul_sdb_b3c_cdb"><li class="li">Create any number of stages.</li><li class="li">Change stage labels and names.</li><li class="li">Set the estimated duration for a stage.</li><li class="li">Import a copy of a pre-defined stage set from the Stage Sets table. To learn more about stage sets, see <a class="xref" href="../../using-workflows/concept/c_WorkflowStageSets.html" title="Stage sets are named groups of workflow stages commonly used together. Create a stage set and assign it as a default set to any number of tables. You can import the choice list values of a workflow field as stages for a workflow, and export a stage set to create a new one.">Workflow stage sets</a>. Any changes made to the copy do not affect the original stage set record.</li></ul> </div> <p class="p"><span class="ph">While you can add stages to a flow that has a scheduled trigger, the stages are never displayed to an end user because there is no associated trigger record for the stage field. Only add stages to flows and subflows that have a trigger or input record.</span></p> <p class="p">View the stages of a flow or subflow in the flow execution details.</p> <div class="section" id="flow-designer-stages__section_h4v_gmv_bdb"><h2 class="title sectiontitle">Displaying stages in a stage field</h2> <p class="p"><span class="ph">A stage field is a field of type Workflow that displays the stages of a flow to a user.</span> The <span class="ph">Service Catalog</span> table uses a <span class="ph uicontrol">Stage</span> field to indicate the progress of a request as it is processed.</p> <p class="p">Stage fields display:</p> <div class="p"><ul class="ul" id="flow-designer-stages__ul_bn3_z5m_ddb"><li class="li">Stages from flows with record or <span class="ph">Service Catalog</span> triggers.</li><li class="li">Stages from the associated flow or subflow. If the associated flow calls another flow, stages set on the child flow do not display.</li><li class="li">Stages from flows or subflows that have started.</li></ul> </div> <p class="p">State icons in stage fields cannot be modified. Limit the number of stages and the length of each stage name to prevent wrapping text and icons onto multiple lines.</p> <div class="p"><div class="note"><span class="notetitle">Note:</span> Only add one stage field per table. If there is more than one stage field, the system only displays stages from the first stage field defined in the table dictionary entry.</div> </div> </div> <div class="section" id="flow-designer-stages__section_fjb_nxt_ddb"><h2 class="title sectiontitle">Stage field and trigger types</h2> <p class="p">Associating a flow to a stage field depends on the flow trigger type.</p> <div class="p"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="flow-designer-stages__table_i5y_rxt_ddb" class="table" frame="border" border="1" rules="all"><colgroup><col style="width:33.33333333333333%" /><col style="width:66.66666666666666%" /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry nocellnorowborder" style="vertical-align:top;" id="d36974e145">Flow trigger type</th><th class="entry cell-norowborder" style="vertical-align:top;" id="d36974e148">Requirements</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d36974e145 ">Record</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d36974e148 "><p class="p"><span class="ph">For a stage field to report stages on a record-based flow, a stage field must be present on the same table as the triggering record.</span> When a flow has stages, <span class="ph">Flow Designer</span> communicates the status of each stage back to the triggering table and displays the current stage state as an icon. If more than one stage field exists on the table, only the first stage field defined in the table's dictionary definition is used.</p> <div class="p"><div class="note"><span class="notetitle">Note:</span> Avoid creating stages for multiple flows that trigger from the same table. A stage field only displays the stages of the final flow to run. Add different conditions to each flow to ensure that the stages of one flow do not overwrite another flow.</div> </div> </td></tr><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d36974e145 "><span class="ph">Service Catalog</span></td><td class="entry cellrowborder" style="vertical-align:top;" headers="d36974e148 ">If using the <a class="xref" href="../task/create-sc-flow.html" title="Start a flow when a Service Catalog item is requested to automate the fulfillment process."><span class="ph">Service Catalog</span> trigger</a>, the flow must be associated with the <span class="ph">Service Catalog</span> item through the <span class="ph uicontrol">Flow</span> field. Remove any workflows associated with the item by clearing the <span class="ph uicontrol">Workflow</span> and <span class="ph uicontrol">Execution Plan</span> fields. The <span class="ph uicontrol">Stage</span> field displays the current stage state on any list view of the Requested Items [sc_req_item] table.</td></tr></tbody></table> </div> </div> </div> <div class="section" id="flow-designer-stages__section_opc_tpj_cdb"><h2 class="title sectiontitle">Stage states</h2> <p class="p">During flow or subflow execution, each stage can be in one of six states.</p> <div class="p"> <div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="flow-designer-stages__table_wwy_pgk_cdb" class="table" frame="border" border="1" rules="all"><colgroup><col style="width:19.011406844106464%" /><col style="width:80.98859315589354%" /></colgroup><thead class="thead" style="text-align:left;"><tr class="row"><th class="entry nocellnorowborder" style="vertical-align:top;" id="d36974e239">State</th><th class="entry cell-norowborder" style="vertical-align:top;" id="d36974e242">Description</th></tr></thead><tbody class="tbody"><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d36974e239 ">Pending</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d36974e242 ">This stage has not yet started.</td></tr><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d36974e239 ">In progress</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d36974e242 ">This stage is executing.</td></tr><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d36974e239 ">Skipped</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d36974e242 ">This stage was skipped and did not run. Typically, this state is reached when a conditional flow logic block is not executed.</td></tr><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d36974e239 ">Complete</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d36974e242 ">This stage is complete.</td></tr><tr class="row"><td class="entry nocellnorowborder" style="vertical-align:top;" headers="d36974e239 ">Cancelled</td><td class="entry cell-norowborder" style="vertical-align:top;" headers="d36974e242 ">This stage was cancelled.</td></tr><tr class="row"><td class="entry row-nocellborder" style="vertical-align:top;" headers="d36974e239 ">Error</td><td class="entry cellrowborder" style="vertical-align:top;" headers="d36974e242 "> <p class="p">This stage has reached an error condition.</p> <div class="p">When designing a flow or subflow, you can manually set its to report an Error state. To set an Error state: <ul class="ul" id="flow-designer-stages__ul_ab2_qfn_ddb"><li class="li">The flow must have at least one stage defined.</li><li class="li">The Error can only be set within a stage. When an Error condition is reached, the current stage is set to Error.</li><li class="li">The Error can only be set within a conditional flow logic block.</li></ul> </div> </td></tr></tbody></table> </div> </div> <p class="p">Each stage can have its own custom state labels. For example, suppose that you have a flow with two stages. Stage 1 could have the Pending state with the label Waiting, and Stage 2 could have a Pending state with a label of Not yet started. <span class="ph">Flow Designer</span> provides options to generate either the default states or approval states.</p> </div> <div class="section" id="flow-designer-stages__id_mf4_ysb_ptb"><h2 class="title sectiontitle">General guidelines</h2> <div class="p">Follow these general guidelines when creating flows or subflows with stages.<dl class="dl" id="flow-designer-stages__ul_dq5_4wm_xsb"> <dt class="dt dlterm">Avoid defining stages that depend on a For Each flow logic</dt> <dd class="dd">Flow Designer prevents you from adding stages within a <span class="ph uicontrol">For Each</span> block. You can only add stages before or after a <span class="ph uicontrol">For Each</span> block.</dd> <dt class="dt dlterm">Avoid creating stages for the same records in different flows or subflows</dt> <dd class="dd">A stage field always displays the stage information provided by the last flow or subflow to run on a table's record. If multiple flows or subflows run on the same records, then the stages defined in one flow or subflow can in theory overwrite the stages from another flow or subflow. To avoid multiple flows or subflows overwriting each other's stages, define unique trigger or start conditions for each flow or subflow.</dd> <dt class="dt dlterm">Avoid updating stage fields from outside a flow or subflow</dt> <dd class="dd">If you manage stages with a flow, avoid directly updating stage fields from outside the flow or subflow. Manually updating the value of a stage field may produce unexpected or undesired results.</dd> <dt class="dt dlterm">Ensure that each flow on a table has unique trigger conditions</dt> <dd class="dd">Adding unique trigger conditions to each flow ensures the flows only run under those conditions and prevents the stages from one flow overwriting the stages of another flow. Specifying unique trigger conditions makes it easier to troubleshoot flows by limiting the number of flow executions that can produce record changes.</dd> <dt class="dt dlterm">Use error stages to communicate with the user</dt> <dd class="dd">The flow error state does not affect flow execution. A flow continues running even if it reaches an error stage. Use a conditional flow logic block to set the error stage and communicate to the user that the state of the current stage is Error. For example, if an approval is not approved within the required limit, you may want to communicate an error to the user.</dd> <dt class="dt dlterm">Use the error stage to stop processing a flow</dt> <dd class="dd">Use a conditional flow logic block to identify when a flow enters the error stage. Use the flow logic to stop processing the flow or take some kind of remediation action. For example, you may want to change the record state or assignment when a flow reaches an error state.</dd> </dl> </div> </div> </div> <div class="related-links"> <ul class="ullinks"><li class="link ulchildlink"><strong><a href="../../../administer/flow-designer/task/add-stages.html">Configure stages and add them to a flow</a></strong><br /> Configure when stages display to a user, define stage state labels, and add stages to a flow within <span class="ph">Flow Designer</span>.</li></ul> <div class="familylinks"> <div class="parentlink"><strong>Parent Topic:</strong> <a class="link" href="../../../administer/flow-designer/concept/flows.html" title="Flows automate a repeatable multi-step process. When the flow trigger conditions are met, the flow runs a sequence of reusable actions and flow logic to complete the process.">Building flows</a></div> </div> </div></body></html></div>