FlowmageDocs

Recover from a failed step

Choose what happens when a node fails in a run: stop the flow, carry on with the error, try it again, or catch it with a Try/Catch node and go on.

Steps

Open How it runs

Open the node and click How it runs at the bottom of its settings. Closed, its line sums it up, such as Stops after 30 s · stops the flow on an error · tries again up to 2×.

How it runs open on Check the site: Give up after 30 seconds, If it fails, Try again automatically, If Flowmage restarts and Fixed IP address

Choose what a failure does

Under If it fails, pick:

  • Stop the flow: a failed step fails the run.
  • Carry on with the error: the node hands the error on as its output, and the run goes on.
If it fails open, offering Stop the flow and Carry on with the error

With Try again automatically on, a step that fails for a passing reason, such as a busy service, is tried again first: Up to 2 more tries, waiting up to 1 s, then up to 30 s. A Condition, a Switch and a Raise error node have no If it fails.

Add a Try/Catch

To catch the failures of several nodes at once, type Try in Add a step and pick Try/Catch.

Add a step with Try typed in the search and Try/Catch listed
PortLink to it
TryThe nodes that may fail.
If it workedWhat runs when they all worked.
If it failedThe nodes that deal with a failure.

When a step under Try fails, the run goes on through If it failed instead of failing, and shows that step as Caught. There, Input offers Error message, Error code and Failed step name.

The Try/Catch Try the booking, with Book the delivery on Try and Note the failed booking on If it failed

To fail on purpose, such as when a booking is already taken, put a Raise error node under Try and write its Error message.

How it works
SettingWhat it does
Give up afterSet in seconds or minutes. A step that runs longer fails with NODE_TIMEOUT.
Try again automaticallyA run starts a step at most three times. Each start is an attempt.
If Flowmage restartsFlowmage restarted mid-step: a step that reads runs again; for one that writes, you choose Stop the run or Repeat (may happen twice).
Raise errorIts error code is FLOW_ERROR unless you set Error code under Advanced.

If it did not work

  • The run still stops at the node. Link it under Try, or set If it fails to Carry on with the error.
  • "Error message is required." A Raise error node needs a message before you can publish.
  • The step fails with NODE_TIMEOUT. The service took longer than Give up after. Raise it, or check the service.

Next