Skip to main content

Operate and Debug

View as Markdown

Dex Web shows a Flow run in application terms. dexcli prints the same data as JSON, for scripts and incident records.

Find and read a Flow

Open Flows in Dex Web to find a Flow and its status. In the run, State shows active Steps, Attributes, and Channels. Events shows the events in order on Timeline, or the Step executions on Graph.

Here Failed narrows the list to failed runs. The run shows its error, the failed Step, its attempts, and the Attributes the Step read. After a fixed Worker is deployed, Time travel #3 runs that Step again and the Flow completes:

Dex Web: Failed narrows Flows to the failed invoice runs; invoice-2054 shows the error payment provider rejected charge on its Charge Card Step, attempt 3 in the Failure panel, and amount-usd 1249.00 under Attributes read; Time travel #3 with a reason runs Charge Card again under the fixed Worker, and the run shows Completed on Attempt 2 of 2

From a terminal, read the same run by Flow ID and Run ID. These commands only read:

  1. Find the run: dexcli flow search --query 'ExecutionStatus = "Failed"', or "Running" for a run that seems stuck. It prints each run's Flow ID and Run ID.
  2. Read the run: dexcli flow inspect FLOW_ID --run-id RUN_ID prints the summary, a page of history, and, for a running run, the current state.
  3. Read its Attributes and what each active Step waits for: dexcli flow state FLOW_ID --run-id RUN_ID.
  4. Read every event, with each failed Step's error, attempt, and Worker: dexcli flow history FLOW_ID --run-id RUN_ID --all.
  5. Check the Worker those events name: its logs, and the Flow, Step, and RPC names it registers. Worker logs are outside dexcli.

Every dexcli flow command that changes a Flow, such as stop, skip-timer, and time-travel, requires --yes. So does clone-fork, which starts a new Flow. The CLI reference lists their flags.

Fix a stuck or failed Flow

A ready Step needs a compatible Worker to run its method. A waiting Step needs its conditions, which State shows. Dex Server resolves waits, Timers, stops, and timeouts itself.

SymptomWhere to lookAction
A Step stays active, or its retry count grows.Worker logs, its server connection, and the Flow, Step, and RPC names it registers.Fix the Worker. While the Step can still retry, a connected compatible Worker takes it.
The Flow failed: a Step ran out of retries, or the Flow timeout fired, under the configured failure policy.The failed event's Failure panel in Dex Web.Deploy a fix, verify it with a new run, then Time Travel.
The Flow must not continue.The run page in Dex Web.Stop it from Dex Web, a Client, or dexcli flow stop.
A Timer should fire now, as in a test.The waiting Step under State.Skip the Timer from a Client or dexcli flow skip-timer. Execute starts once the rest of the Wait is met.

A ready retry can go to any available compatible Worker while it remains eligible, so do not restart or time travel a Flow only to test connectivity. Troubleshoot a Flow run has the full checklist and the read-only workflow.

Recover a Flow with Time Travel

Time Travel moves a run back to an earlier point in its history and runs it again from there. Use it after you deploy a fix for a failed Step and a new run proves the fix. The run keeps its Run ID and starts a new attempt.

Work after that point can run again, with its external calls, and can take another path under new code or new input. So each call needs an idempotency key.

Time Travel restores the run's state at that point: Attributes, Channel messages, and the Steps that were waiting or ready. Write reapply then applies again the eligible recorded writes that reached the run from outside after the point: the writes of RPC calls, Channel publications, and Client Attribute writes. It runs no RPC handler again. You choose it for each time travel. Without it, a Step that waits for outside input, such as a human approval, waits for new input. Dex Web, the CLI, and a Client each have their own default; see Time travel dialog fields.

The point must be inside the run's recent history window. The beginning of the run is always available.

After a deploy, Time Travel to a waiting Step's WaitFor applies the new WaitFor code to that Step. See Update waiting Steps with Time Travel.

Start Time Travel from Dex Web, a Client, or dexcli flow time-travel (CLI flags). Time travel in the server reference covers the request, the history window, the memory budget of write reapply, and the other limits.

Branch a Flow with Clone Fork

Clone Fork creates a new Flow, with its own Flow ID, from another run's state at one point: the current state or an earlier one.

Use Clone Fork to branch an agent session while the original continues, or to try another path from a past point. Use Time Travel when the same Flow should go back.

BehaviorTime TravelClone Fork
Flow identityThe same Flow ID and Run ID.A new Flow ID.
Source runIt goes back to the point.It is only read. A running source keeps running.
HistoryIts history, with a new attempt.A new history of its own.
Outside input after the pointApplied again with write reapply.Left out, except current hard-delete Attribute values.

Steps that were running at the point run again in the new Flow, with their external calls, so each call needs an idempotency key. Give the new Flow its own task queue when Workers pick Flows by task queue, as they do for an agent session. Otherwise the source's Workers also run the new Flow.

Start Clone Fork from Dex Web, a Client, or dexcli flow clone-fork (CLI flags). Clone fork in the server reference covers the request, the point types, what the new run copies, SubFlows, and the limits.

Next