Suspension/Pause and Conditional Resumption of Flow Run

In cases where a flow run needs to be suspended temporarily and resumed, subject to one or more conditions being met in the application being tested, this feature provides necessary flexibility to configure the flow steps. A simple example would be an integration test flow, where in the application/cloud service being tested sends out a message to a 3rd party application as part of the test scenario and the flow run needs to be in a wait state until the 3rd party application sends back an asynchronous message to the application/cloud servicer being tested. In such a case, the flow run needs to be suspended and the state of objects needs to be constantly monitored in the application being tested the flow run can continue, if the objects show that the asynchronous message has been received from the 3rd party application.

A new Suspend step can be added to the flow definition succeeding a component step, at which point the flow needs to be suspended until a predetermined condition in met. The predetermined condition is defined as a component/subroutine under the suspend-resume flow control structure.

The concept is simple, in that the flow will suspend the run and will resume execution if the component or subroutine step defined under the suspend-resume control structure pass.

The predetermined condition is deemed to be met if the component/subroutine step under the suspend-resume control structure passes. The validations in the component/subroutine step act as the condition verification steps.

The suspend step holds the time interval details, that specify the time/duration after which the flow run needs to check for the pre-determined condition, regularly. There is also a max time limit, after which the flow will be deemed as failed if the pre-determined condition is not met.

The following set up needs to be done to add the conditions for suspend-resume of flow run:

  1. Login to the application and navigate to the Flows tab.
  2. On the left navigation pane, right-click the flow name and select Create/Update Flow Structure.
  3. On the right pane, expand the flow structure.
  4. Right-click on the component step in the flow definition at which point the flow run needs to be suspended.
  5. Select Add Suspend Step. A suspend step flow control structure is added to the flow definition and the component is moved under the structure. Subroutines can also be added under this feature as a condition.
  6. Right-click the newly added suspend flow - resume control structure in the flow definition and select Edit.
  7. In the pop-up window, provide the Verification Interval details that specify how often the flow run needs to check for the resume condition. This determines how often the flow run executes the component/subroutine under the suspend-resume control structure and checks for the validations to pass.
  8. Provide the maximum time limit from the start of flow run suspension, until which the condition to resume needs to be verified, at the specified verification intervals. After this limit, the flow will be automatically failed if the condition to resume is not met.
  9. Click Save to save the definition.

Note:

  • If one or more components listed above a suspend step fail, and if the continue execution on failure flag in the flow configuration set or user configuration set is set to true, then the suspend step will be ignored and the flow run will progress to completion without suspending the flow run.
  • Multiple suspend-resume steps can be added to the same flow.
  • Subroutines can also be added under a suspend-resume flow control step.
  • When a flow containing a suspend-resume control step is run, a hour glass icon appears against the corresponding component for which the suspend-resume step has been added.

Also, the flow run status is set as “waiting”, from the time the flow run is suspended, until the time the resumption condition is met or the flow has failed. If the resumption condition is met, the flow run will proceed further and flow run status is updated appropriately.