Skip to main content

Arazzo workflows

Route/ade/dashboard/catalog/[id]?tab=workflows

An Arazzo document describes workflows: ordered steps, each calling an operation of an API (or another workflow), with the inputs the workflow takes, the outputs it returns, and what happens when a step succeeds or fails. The Workflows tab shows each workflow as that flow — a list of steps, a step graph, and the operation each step calls — instead of as a file. How importing, checking, comparing, exporting and running workflows fit together is on Arazzo in Apiome.

Where the tab appears​

  • A catalog item imported from an Arazzo document. Open the item from Catalog and select the “Workflows” tab, the last tab on the item's page. Its count is the number of workflows in the item's latest revision. The address is ?tab=workflows, so you can send it to a teammate.
  • A project whose HEAD revision holds workflows. Open the project on Versions and select the “Workflows” tab beside Dependencies. The tab reads the HEAD revision, and a project with no workflows has no tab. ?tab=workflows opens it directly.

The tab reads nothing until you select it.

The Workflows tab: the checkout and send-receipt workflows on the left; on the right the checkout workflow's source descriptions (shop resolved, payments missing), its inputs and outputs, its three steps, and the step graphThe Workflows tab: the checkout and send-receipt workflows on the left; on the right the checkout workflow's source descriptions (shop resolved, payments missing), its inputs and outputs, its three steps, and the step graph
Route/ade/dashboard/catalog/[id]

Read a workflow​

  1. Pick a workflow in the Workflows list on the left. Each entry shows its workflowId, its summary, how many steps it has and, in red, how many of its sources are missing. The first workflow is open when the tab loads.

  2. Read Source descriptions: every API description the workflow's steps call, with its status.

    StatusMeaning
    ResolvedThe import found the description — from fileset (in the same upload, archive or repository selection), from catalog (a spec you had already imported) or from remote (fetched from its URL)
    MissingNo source was found. The reason code beside it — such as not-in-fileset or resolution-disabled — says why; hover it for the detail. See Import an Arazzo workflow with its API files
    Not recordedThe revision was imported before Apiome recorded where sources came from. Re-import it to find out
  3. Read Inputs — each top-level property of the workflow's inputs schema, its type and whether it is required (or the $ref the schema points at) — and Outputs, each name with the runtime expression that produces it, such as $steps.pay.outputs.receipt.

  4. Read Steps, in the order the document declares them. Each row shows the stepId and what it calls: the method and route of the operation (GET /carts/{cartId}), the raw operationId or operationRef when it was not resolved (marked Not resolved), or Calls workflow for a step that runs another workflow.

The step graph​

Under the steps, Step graph draws the workflow's routing from Start to End:

EdgeDrawn when
Next step (grey)A step has no onSuccess actions, so it continues to the next step — or, as the last step, to End
On success (green)An onSuccess action: goto a step or workflow, or end
On failure (red, dashed)An onFailure action, or — when a step has none — the step failing the workflow, drawn to Failed
Retry (amber, dotted)A retry action that names another step or workflow

Each edge is labelled with its action's name. A step that retries itself carries a retry ×3 badge instead of a loop. When every action of a step is conditional (has criteria), the default path is drawn as well, since the step falls through when no criteria match. A called workflow sits above the row — select it to show that workflow — and so does a reusable $components action, which the graph labels but does not follow.

The step graph of the checkout workflow: Start, load-cart, pay with a retry ×3 badge, notify and End along one row, a green to-pay edge from load-cart to pay, and red dashed edges down to FailedThe step graph of the checkout workflow: Start, load-cart, pay with a retry ×3 badge, notify and End along one row, a green to-pay edge from load-cart to pay, and red dashed edges down to Failed
Route/ade/dashboard/catalog/[id]

Open a step and its operation​

Click a step in Steps or in the graph (or Tab to it and press Enter) to open its drawer:

  • Operation — for a resolved step, the operation it calls: method and route, summary, description, operationId, the project or catalog item that holds it, its Parameters and its Responses. “Open project” (or “Open catalog item”) at the bottom goes there. A step whose reference was not resolved says why instead, and shows the reference as written; a step that calls a workflow offers “Show workflow”.
  • Step parameters, Request body, Success criteria, On success, On failure and Outputs — the step as the document wrote it, with each action spelled out, such as Go to step pay or Retry up to 3 times, 1 s apart.
The step drawer for load-cart open over the Workflows tab: GET /carts/{cartId}, its parameters and responses, the step's success criteria and its on-success and on-failure actionsThe step drawer for load-cart open over the Workflows tab: GET /carts/{cartId}, its parameters and responses, the step's success criteria and its on-success and on-failure actions
Route/ade/dashboard/catalog/[id]

Press Esc or “Close” to return to the tab.

A step resolves when the operation it names was imported in the same scan — for example, the OpenAPI file in the same archive or repository selection. The link is kept by id, so deleting that operation later turns the step back into an unresolved one.

Empty and error states​

  • No workflows — the revision holds no Arazzo workflows (for example, the document declares none).
  • Couldn't load the workflows — the read failed; the message says why, and “Try again” retries it.
  • In the drawer, Couldn't load the operation — the operation could not be read; “Try again” retries it.

Run a workflow against a target​

apiome arazzo run runs a stored workflow end to end against a verification target: a deployment, or a target whose environment is mock and whose base URL is an Apiome mock. (Set targets up as described in Check a live deployment.)

  1. Name the workflow, its revision and the target:

    apiome arazzo run checkout --project checkout-flow --version 1.0.0 --target checkout-mock \
    --input cartId=42

    Use --catalog <item-uuid> (with --revision <version-uuid> for an older revision) instead of --project and --version for a catalog item. Pass each workflow input as --input NAME=VALUE — a JSON value keeps its type, so count=3 is a number — or put them all in a JSON or YAML file with --inputs ./inputs.yaml. A missing input takes the default of the workflow's inputs schema; inputs the schema rejects stop the run before anything is sent.

  2. Read the report. The steps run in order. Each step's parameters and request body are built from runtime expressions — $inputs.cartId, $steps.load-cart.outputs.total, or a template such as Bearer {$steps.login.outputs.token} — and each of its successCriteria is checked. Every step prints its request, the status that came back and each criterion: ok with the condition, or FAIL with the condition and the actual value beside it, such as FAIL $response.body#/status == 'paid' — actual: 'pending' == 'paid'.

  3. Check the exit code in CI: 0 when every step passed, 7 when a step failed or errored, 3 when a write step was refused (below). --json prints the whole response.

How the run moves between steps follows the document:

The step…What happens next
passes, with no onSuccessThe next step runs; after the last one the workflow's outputs are evaluated
fails, with no onFailureThe run stops and fails; the steps it never reached are listed
has an action whose criteria holdend stops, goto jumps to that step, retry sends the step again (retryLimit times, 1 by default, waiting retryAfter seconds, at most 10)
declares no successCriteriaIt passes on any 2XX status, marked (implicit)

A step that failed still fails the run even when an onFailure goto moves past it, and a step that passes on a retry counts as passed. Criteria can be simple conditions ($statusCode == 200 && $response.body#/items/0/id != null; text compares without regard to case), regex or jsonpath; an xpath criterion is reported as not supported. A run stops after 100 step executions, so a goto loop cannot run forever.

Steps that write​

Only GET, HEAD and OPTIONS steps are sent by default. A POST, PUT, PATCH or DELETE step is sent only when all three hold:

  1. the target's policy allows mutating methods;

  2. the run opts in with --allow-mutating;

  3. a fixture in --fixtures names the step's operation — and, with case_id, the step:

    # fixtures.yaml
    - operation_key: POST /carts
    note: Creates a throwaway cart in the mock
    - operation_key: DELETE /carts/{cartId}
    case_id: cleanup

    A fixture's path_parameters, query_parameters, headers and body replace what the step would send; it cannot carry credentials.

If any write step misses one of the three, nothing is sent: the command lists each refused step and why (mutating-method-blocked or mutating-fixture-missing) and exits 3. A run is refused the same way (exit 7) when a step's operation was not resolved, a step calls another workflow, or the inputs do not match the workflow's inputs schema. Every run that starts is recorded as verification evidence, one record per step, whatever its outcome.

With the API or the CLI​

  • GET /v1/workflows/{tenant_slug}/catalog/{item_id} — the workflows of a catalog item's latest revision; add /revisions/{version_id} for another revision.
  • GET /v1/workflows/{tenant_slug}/versions/{version_id} — the workflows of any revision; add /workflows/{workflow_id} for one workflow, then /steps or /steps/{step_id} for its steps.
  • GET /v1/workflows/{tenant_slug}/operations/{path_operation_id} — one operation a step calls, with its parameters and responses.
  • POST /v1/workflows/{tenant_slug}/versions/{version_id}/workflows/{workflow_id}/run — run one workflow against a target (target_ref, inputs, verification.allow_mutating, verification.fixtures); ok: false with refusals when it was refused.
  • apiome arazzo list, apiome arazzo show <workflowId> and apiome arazzo validate read the same records from a terminal, and validate fails when a step did not resolve; apiome arazzo run runs a workflow.

Arazzo workflow records describes every field and resolution state. See also Arazzo workflows in the REST reference and apiome arazzo in the CLI reference.

Where next​