Looping a flow or a subflow
To loop a flow or subflow, you define exception handlers and exit codes for looping in the Flow Attributes. You then define in the Completion Attributes to determine the flow state according to the exit code of the last failed work item or the last successful work item.
About this task
You can define a flow or subflow that loops until a specific condition is met, such as the exit code of a work item in the flow. This is useful to rerun a group of jobs until you achieve specific results.
By default, an exit code of 0 indicates success. Any other exit code indicates failure, unless you define other non-zero success exit codes in the work item.
You can define that the flow get its exit code from the last finished work item if the flow is successful, or the last failed work item if the flow failed.
You want the flow to rerun until the exit code of the last job Examine_Data is 0.
You also want the flow exit code to inherit the exit code of the last successful work item if the flow was successful or the last failed work item if the flow failed.