Block reference / Workflow

Workflow state

Stop the current run, optionally as a failure with your own message, or stop other runs.

Only inWarpX Browser

Use Workflow state to end a run on purpose: when a page says you are logged out, when a check fails, when there is nothing left to do. Stop current workflow ends the run at this block. Tick Throw error to end it as a failure with a message you write, so the log shows why. Stop all workflows and Stop specific workflows also stop runs on other profiles.

The Workflow state block's settings, filled in as in the example below.

Settings

Description

A note shown on the block in the canvas.

ExampleStop if logged out
Action

Under Stop workflows: Stop all workflows, Stop current workflow or Stop specific workflows. The first and last reach every run that is going in WarpX Browser, on any profile, whether it was started from the editor, from Profiles with Run automation or by a schedule on Schedule.

ExampleStop current workflow
Execpt for the current workflowwhen Action is Stop all workflows

The label is spelled this way in the app. When on, Stop all workflows leaves only this run going. Other runs of the same workflow, such as the other profiles of the same batch, are still stopped.

ExampleUnchecked
Throw errorwhen Action is Stop current workflow

End the run as a failure instead of a normal stop.

ExampleChecked
Error messagewhen Throw error is on

The message the run fails with. Empty means "Workflow stopped manually". {{references}} work here.

ExampleLogged out: sign in to the shop and run again
Select a workflowwhen Action is Stop specific workflows

Type to find an automation and pick it; repeat to add more. Click the cross on a name to remove it. Every run of a listed automation stops, on every profile. If you list this workflow, this run stops too.

ExamplePrice watcher

Every block also has the shared block settings — a description, Disable block and what to do on an error. Fields that take text accept data from earlier blocks.

What it hands on

Stop current workflow: no output is taken; the run ends here. Stop all workflows and Stop specific workflows leave by the output after stopping the other runs, unless the current run is one of those stopped.

Example: End the run when the account is logged out

  1. Start
  2. New tab
  3. Element exists
  4. Workflow state
Where Workflow state sits in the example workflow.
  1. Add a New tab block with the account page.
  2. Add an Element exists block with Element Selector form#login.
  3. Connect its top output (found) to a Workflow state block with Action Stop current workflow.
  4. Tick Throw error and set Error message to Logged out: sign in to the shop and run again.
  5. Connect the bottom output of Element exists to the rest of the workflow.

Good to know

  • With Throw error on, the block fails like any other block, so its own error settings apply. If you set it to continue on error, the run does not stop.
  • In a batch run from Profiles, every profile runs its own copy of the workflow. When one profile reaches Stop all workflows with Execpt for the current workflow on, that profile carries on and the other profiles in the batch are stopped.
  • Stop all workflows and Stop specific workflows stop the runs that are going at that moment. Profiles still waiting for their turn in a batch run start later as usual.

See also

  • Element exists — Check whether an element is on the page and continue by one of two outputs.
  • Conditions — Send the run down one of several paths, depending on values, page elements or code.
  • Execute workflow — Run another automation from this one and wait for it to finish.