Running workflows

Running workflows

A workflow fires on a content event and runs a list of actions. barakoBrew has two screens for them: Workflows, where you define one, and Workflow runs, where you see what each firing did. This page covers the run screens in barakoBrew 1.10.0.

Workflows

Under Workflows, a workflow names the content type and event that trigger it (the event is Created, Updated, Published or a named transition of the type's lifecycle), optional conditions, and its actions. A workflow's page has two tabs.

  • Recent runs lists its last ten runs, each linking to the run. Against an API too old to filter runs by workflow it shows the debug log instead.
  • Dry run runs the workflow against sample content you paste as JSON. Actions are simulated and nothing is sent. It lists each action with its resolved parameters.

Run now starts a workflow by hand, offered when the workflow is switched on.

What a run records

Workflow runs lists every firing, newest first, 25 to a page. Filter by status: Pending, Running, Succeeded, Failed, PartiallyFailed or Cancelled. Each status chip shows the API's count over all pages. The list updates while the page is open, and says so when updates pause. Older runs are removed by a retention sweep, and the page says which finished-before dates are gone when the API reports them.

Picking a run opens it on the right and puts its id in the address, so the link can be shared. A run records:

  • the trigger event, the content type and the content id
  • when it started and finished, and when it was abandoned
  • the rollback state and the executor it ran on, when there is one
  • its actions, in the order they execute

Each action shows its type, its status and how many attempts it took, how long it took, the HTTP response status when it made a request, and when the next attempt is due. It also shows whether a failure stops the run, which action's failure caused it to be skipped, the outputs it kept and how it was undone. When an action was tried more than once, every try is listed with its outcome, duration and time. Earlier tries past the API's cap are counted as no longer kept.

A failed action is labelled Temporary or Permanent when the API says which. A run in the list carries the label of its worst failed action.

Retry

Retry is offered on an action whose status is Failed or Unknown, never on one that Succeeded, since a second send is the hazard retry guards against. Pressing it queues that one action to run again, and barakoBrew confirms with "Queued that action to run again."

A Permanent failure still gets the button, but asks first: "This failure will not fix itself by retrying. Retry anyway?" If the runner picks the action up while you are reading, the API answers 409 and barakoBrew shows its message.

There is no retry on a run that was cancelled or is being rolled back. The API refuses it. Retry needs the retry_workflow_actions capability.

Cancel and abandon

Cancel run is offered on a Pending or Running run, and needs manage_workflows. Actions that have not started will not run, an action already out finishes and is recorded, and a cancelled run cannot be retried.

Abandon run is offered on a run that did not fully succeed and has at least one Succeeded action. It needs retry_workflow_actions. Nothing in the run runs again. What went out is undone by the compensation each action declares, and an action that declares none is reported as "Nothing undoes it".

Where the response body is and is not shown

The run screen never shows a response body. An action's error is text the server truncated, and barakoBrew shows it as plain text. It records the HTTP status and the error, not what the other side sent.

Response bodies appear on Settings, Deliveries, which lists what workflow actions sent, as requests through a connector and as webhooks. Open Response body on a row to read it. Request headers and response bodies need the capability to read response bodies, view_webhook_response_bodies, which is not in the default Admin capabilities. A body the retention sweep has removed reads "Response body cleared by retention."