← Back to Patterns

transition-actions

Demonstrates explicit transition actions (STOP, CONTINUE, COMPLETE)

transition

Source


# Transition Actions

Demonstrates explicit actions for PASS and FAIL transitions.

## 1. PASS STOP
- PASS: STOP "Runbook halted on success"
- FAIL: CONTINUE

Stops the runbook immediately if the step passes.

```bash
rd echo "critical check"
```

## 2. FAIL CONTINUE
- PASS: COMPLETE
- FAIL: CONTINUE

Proceeds to the next step even if this step fails.
"Best effort" execution.

```bash
rd echo "optional step"
```

## 3. Cleanup (for FAIL CONTINUE)
- PASS: COMPLETE

Executes after Step 2, even if Step 2 failed.

```bash
rd echo "cleanup"
```

## 4. FAIL COMPLETE
- PASS: CONTINUE
- FAIL: COMPLETE "Completed with warnings"

Completes the runbook if the step fails.
Useful for "early exit success" or "handled failure".

```bash
rd echo "check condition"
```

Try It

PASS triggers STOP, runbook halts successfully

Initializing...

Initializing...

Step/
ExpectedSTOP
Env idle