|
| 1 | +Durable Workflow CLI 2.8.0 |
| 2 | + |
| 3 | +## Read an update's outcome later |
| 4 | + |
| 5 | +2.8.0 adds `dw workflow:update-outcome` for native Server 3.6.0's update |
| 6 | +outcome reads (server#1131, durable-workflow/.github#212, cli#144). When |
| 7 | +`dw workflow:update` returns before the update finishes, for example after its |
| 8 | +`--wait=completed` wait runs out, you can read the outcome later by update id |
| 9 | +instead of sending the update again. |
| 10 | + |
| 11 | +```bash |
| 12 | +dw workflow:update-outcome order-123 01JUPDATE00000000000000000 |
| 13 | +dw workflow:update-outcome order-123 01JUPDATE00000000000000000 --wait=completed --wait-timeout=30 |
| 14 | +``` |
| 15 | + |
| 16 | +- **One read, never a resend.** The command sends one |
| 17 | + `GET /api/workflows/{workflow_id}/updates/{update_id}`. It never sends a |
| 18 | + POST and never submits the update again. |
| 19 | +- **Pending is not null.** A 202 `accepted` answer prints "Update accepted, |
| 20 | + not finished yet" with a hint to run again with `--wait=completed`. A |
| 21 | + completed update prints its `result_envelope`, even when it encodes null. |
| 22 | +- **Final outcomes keep their exit codes.** A failed update exits 2 with the |
| 23 | + Server's `failure_message`, as `workflow:update` does. A rejected update |
| 24 | + keeps its original rejection status. An unknown or pruned update id |
| 25 | + (404 `update_not_found`) exits 5; that does not prove the update was never |
| 26 | + admitted. |
| 27 | +- **`--wait`** is `accepted` (the default, answers at once) or `completed`. |
| 28 | + **`--wait-timeout`** needs `--wait=completed` and a whole number of seconds |
| 29 | + of at least 1. Bad values send nothing. |
| 30 | +- **`--json`** returns the Server receipt with `namespace` added. Nothing is |
| 31 | + printed until the receipt is checked against the requested workflow and |
| 32 | + update ids. |
| 33 | +- **`workflow:update`** now prints the matching `workflow:update-outcome` |
| 34 | + command after an accepted but unfinished update, only when the Server |
| 35 | + advertises the capability. |
| 36 | + |
| 37 | +The command needs a Server that advertises |
| 38 | +`capabilities.update_outcome_reads` (native 3.6.0 or later). Against any other |
| 39 | +Server, including published PHP Server 2.x, it exits with code 8 before sending |
| 40 | +anything, and `workflow:update` output is unchanged. The new command makes |
| 41 | +abbreviations such as `workflow:upd` ambiguous; the exact name |
| 42 | +`workflow:update` still resolves. |
| 43 | + |
| 44 | +## Release builds |
| 45 | + |
| 46 | +Every Linux job that reaches `setup-php`, in CI and in the release workflows, |
| 47 | +now turns off APT retries first (cli#143, durable-workflow/.github#295). This |
| 48 | +changes how release artifacts are built, not what they contain. |
| 49 | + |
| 50 | +## Unchanged |
| 51 | + |
| 52 | +Every other command behaves as in 2.7.0. A parity suite still compares `dw` |
| 53 | +with the 2.x CLI on every change, offline and against published PHP Server |
| 54 | +2.11.8 and native Servers 3.0.5 and 3.5.0. The 2.3.x PHAR line receives |
| 55 | +security fixes only until 2027-02-28. |
0 commit comments