Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ The embedded package and the service-mode SDK have separate support contracts.

| Package line | PHP | Laravel |
| --- | --- | --- |
| Current embedded Workflow 2.27 | PHP 8.2+ in 8.x; PHP 8.3+ for Laravel 13 | `^12.69.0` or `^13.30.0` |
| Current embedded Workflow 2.28 | PHP 8.2+ in 8.x; PHP 8.3+ for Laravel 13 | `^12.69.0` or `^13.30.0` |
| Embedded Workflow 2.20.5 | PHP `^8.1`, subject to Laravel's own minimum | `^10.50.4`, `^11.56.1`, `^12.69.0` or `^13.30.0` |
| Published PHP SDK 3.14 | Bare SDK PHP `^8.1`; the Laravel bridge needs PHP `^8.2`, and PHP 8.3+ for Laravel 13 | `^12.69.0` or `^13.30.0` |
| PHP SDK 3.9.5 | Bare SDK PHP `^8.1`; the Laravel bridge also follows Laravel's PHP minimum | `^10.50.4`, `^11.56.1`, `^12.69.0` or `^13.30.0` |

The [published embedded upgrade contract](https://github.com/durable-workflow/workflow/blob/2.27.0/resources/laravel-embedded-upgrade-contract.json)
The [published embedded upgrade contract](https://github.com/durable-workflow/workflow/blob/2.28.0/resources/laravel-embedded-upgrade-contract.json)
and each release's `composer.json` are the package authorities. The current
embedded release was verified on Laravel 12 with PHP 8.2–8.4 and Laravel 13 with
PHP 8.3–8.4. Its PHP 8.1 and Laravel 10/11 support has been removed. This does
Expand Down Expand Up @@ -200,6 +200,12 @@ Workflow 2.27 keeps the 2.21 support floors and the embedded worker protocol `1.

See the [2.27.0 release notes](https://github.com/durable-workflow/workflow/releases/tag/2.27.0).

Workflow 2.28 keeps the 2.21 support floors and the embedded worker protocol `1.22`, and adds no database migration. Behavior change to check before upgrading:

- From 2.28, a run that completes, fails or continues as new cancels the activities and timers it never awaited, such as `select()` losers, in the same transaction, instead of leaving them running. A late result from such an activity is refused with `run_closed`. If a workflow needs a loser's effect, await it before returning. See [Losers when the run closes](./features/concurrency.md#selection-losers-at-close).

See the [2.28.0 release notes](https://github.com/durable-workflow/workflow/releases/tag/2.28.0).

## Stability Levels

Every public surface in Durable Workflow carries exactly one of these
Expand Down
6 changes: 6 additions & 0 deletions docs/features/concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ idempotent. Concurrent inputs are ordered by their committed durable history;
an input that arrives while an activity runs is visible on the next workflow
task, and a late or duplicate input cannot replace an already recorded winner.

### Losers when the run closes {#selection-losers-at-close}

From Workflow 2.28, if the run closes while a non-winning member is still open, the close cancels it in the same transaction. This applies when the run completes, fails or continues as new. An open activity gets `ActivityCancelled` with `cancellation_reason: run_closed`, and a pending timer gets `TimerCancelled`, both recorded before the terminal event. Nothing is appended after the terminal event, and a late result from the cancelled activity is refused. Replay ignores these cancellations, because the workflow never saw them.

If the workflow needs a loser's effect, await the loser before returning. In service mode, an activity scheduled with `cancellation_policy: abandon` keeps running instead. The terminal event lists it under `abandoned_activities`, and its outcome is never recorded on the closed run. Child workflows follow their parent-close policy.

## Nested Barriers

Nested `all([...])` groups let one workflow step express a tree of durable fan-out and fan-in work. The runtime schedules every activity or child workflow as a durable leaf sequence, records the leaf's full `parallel_group_path`, waits until every enclosing barrier can make progress, and then rebuilds the original nested result shape before resuming the workflow body. During replay, an activity or child leaf from an `all([...])` step must still match that recorded group path; typed leaf history that has no group metadata is treated as incompatible older preview history instead of being guessed into the current barrier.
Expand Down
2 changes: 2 additions & 0 deletions docs/features/continue-as-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ explicitly on the predecessor.

Long-lived loops can shed history without inventing a new public workflow id every time the run rolls forward.

From Workflow 2.28, activities and timers the closing run never awaited are cancelled when it continues as new; children are handed to the continued run instead. See [Losers when the run closes](./concurrency.md#selection-losers-at-close).

## History Budget {#history-budget}

Workflow code can observe its current history length and a continue-as-new suggestion flag through explicit runtime context. This lets long-lived loops hand off deliberately before they hit history-budget cliffs.
Expand Down
10 changes: 8 additions & 2 deletions i18n/de/docusaurus-plugin-content-docs/current/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ Das eingebettete Paket und das Service-Modus-SDK haben eigene Supportverträge.

| Paketlinie | PHP | Laravel |
| --- | --- | --- |
| Aktuelles eingebettetes Workflow 2.27 | PHP 8.2+ in 8.x; PHP 8.3+ für Laravel 13 | `^12.69.0` oder `^13.30.0` |
| Aktuelles eingebettetes Workflow 2.28 | PHP 8.2+ in 8.x; PHP 8.3+ für Laravel 13 | `^12.69.0` oder `^13.30.0` |
| Eingebettetes Workflow 2.20.5 | PHP `^8.1`, zusätzlich gilt das Framework-Minimum | `^10.50.4`, `^11.56.1`, `^12.69.0` oder `^13.30.0` |
| Veröffentlichtes PHP-SDK 3.14 | Reines SDK PHP `^8.1`; die Laravel-Bridge benötigt PHP `^8.2` und für Laravel 13 PHP 8.3+ | `^12.69.0` oder `^13.30.0` |
| PHP-SDK 3.9.5 | Reines SDK PHP `^8.1`; die Laravel-Bridge beachtet ebenfalls das Framework-Minimum | `^10.50.4`, `^11.56.1`, `^12.69.0` oder `^13.30.0` |

Maßgeblich sind der [veröffentlichte eingebettete Upgrade-Vertrag](https://github.com/durable-workflow/workflow/blob/2.27.0/resources/laravel-embedded-upgrade-contract.json)
Maßgeblich sind der [veröffentlichte eingebettete Upgrade-Vertrag](https://github.com/durable-workflow/workflow/blob/2.28.0/resources/laravel-embedded-upgrade-contract.json)
und die jeweilige `composer.json`. Das aktuelle eingebettete Release wurde mit
Laravel 12/PHP 8.2–8.4 und Laravel 13/PHP 8.3–8.4 geprüft. Es entfernt PHP 8.1
und Laravel 10/11. Die [historische stabile v1-Anleitung](/docs/1.x/installation/)
Expand Down Expand Up @@ -131,6 +131,12 @@ Workflow 2.27 behält die Mindestanforderungen von 2.21 und das eingebettete Wor

Siehe die [Versionshinweise zu 2.27.0](https://github.com/durable-workflow/workflow/releases/tag/2.27.0).

Workflow 2.28 behält die Mindestanforderungen von 2.21 und das eingebettete Worker-Protokoll `1.22` bei und fügt keine Datenbankmigration hinzu. Vor dem Upgrade zu prüfende Verhaltensänderung:

- Ab 2.28 bricht ein Lauf, der abgeschlossen wird, fehlschlägt oder mit Continue-as-new fortgesetzt wird, die Aktivitäten und Timer, auf die er nie gewartet hat, etwa `select()`-Verlierer, in derselben Transaktion ab, statt sie weiterlaufen zu lassen. Ein verspätetes Ergebnis einer solchen Aktivität wird mit `run_closed` abgelehnt. Braucht ein Workflow die Wirkung eines Verlierers, warten Sie vor der Rückgabe auf ihn. Siehe [Verlierer beim Schließen des Laufs](./features/concurrency.md#selection-losers-at-close).

Siehe die [Versionshinweise zu 2.28.0](https://github.com/durable-workflow/workflow/releases/tag/2.28.0).

## Stabilitätsstufen {#stability-levels}

Jede öffentliche Durable-Workflow-Schnittstelle trägt genau eine dieser Stabilitätsstufen. Die Stufen sind explizit: Eine nicht klassifizierte Schnittstelle ist nicht öffentlich.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ eintreffende Eingabe wird in der nächsten Workflow-Aufgabe sichtbar. Eine
späte oder doppelte Eingabe kann keinen bereits aufgezeichneten Gewinner
ersetzen.

### Verlierer beim Schließen des Laufs {#selection-losers-at-close}

Ab Workflow 2.28 bricht das Schließen eines Laufs ein noch offenes, nicht gewinnendes Mitglied in derselben Transaktion ab. Das gilt, wenn der Lauf abgeschlossen wird, fehlschlägt oder mit Continue-as-new fortgesetzt wird. Eine offene Aktivität erhält `ActivityCancelled` mit `cancellation_reason: run_closed` und ein ausstehender Timer `TimerCancelled`, beide vor dem Abschlussereignis aufgezeichnet. Nach dem Abschlussereignis wird nichts mehr angehängt, und ein verspätetes Ergebnis der abgebrochenen Aktivität wird abgelehnt. Das Replay ignoriert diese Abbrüche, weil der Workflow sie nie gesehen hat.

Braucht der Workflow die Wirkung eines Verlierers, warten Sie vor der Rückgabe auf ihn. Im Service-Modus läuft eine Aktivität, die mit `cancellation_policy: abandon` geplant wurde, stattdessen weiter. Das Abschlussereignis führt sie unter `abandoned_activities` auf, und ihr Ergebnis wird nie auf dem geschlossenen Lauf aufgezeichnet. Untergeordnete Workflows folgen ihrer Parent-close-Richtlinie.

## Verschachtelte Barrieren {#nested-barriers}

Verschachtelte `all([...])`-Gruppen lassen einen Workflow-Schritt einen Baum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ auf dem Vorgänger explizit abgeschlossen.
Langlebige Schleifen können so ihre Historie abwerfen, ohne bei jedem
Laufwechsel eine neue öffentliche Workflow-ID zu erfinden.

Ab Workflow 2.28 werden Aktivitäten und Timer, auf die der schließende Lauf nie gewartet hat, bei Continue-as-new abgebrochen; untergeordnete Workflows werden stattdessen an den fortgesetzten Lauf übergeben. Siehe [Verlierer beim Schließen des Laufs](./concurrency.md#selection-losers-at-close).

## Historienbudget {#history-budget}

Workflow-Code kann über expliziten Laufzeitkontext seine aktuelle
Expand Down
6 changes: 3 additions & 3 deletions i18n/de/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"ai-agent-workflow-engine.md": "28016466b179adbabdff6467ce351100c9bee48529a8bec9df7ec22c8d786d4d",
"ai-assisted-development.md": "b246bb60585fb7a69bc534978f470f3f16e899e1f8f203ba0847d2d11b8a1ec3",
"capabilities.md": "d9a2bbc0d04adf8cb3f4c7f42d779a43aafab60791210305e7e476c0499528fc",
"compatibility.md": "a1b478309cdb159ee2c15b3e1ced7aba7f8c5172ad7431b2e3db907b0c868147",
"compatibility.md": "d2e8f2add0f4e59823adbe8245bf8befa4820bc4ea51cbc96a0a07d62256cde6",
"configuration/customization-matrix.md": "3d115863eaee7852b541bcd01615f424cc19c5847c7cd7d75e5ae63bc3f5cc78",
"configuration/database-connection.md": "cc83ae77133236309506fa44d39bfd0c939c32a6154c0bd6099bc64c83bdaec9",
"configuration/ensuring-same-server.md": "6c665f37cc198c7b1a775a60a94aab5ff4e55383385e76f1834c7840559b512a",
Expand Down Expand Up @@ -33,9 +33,9 @@
"features/activity-execution-model.md": "e8c37520ae46a7efb30438f4fc06bf893c1df430cb1f92c48963697adaf09082",
"features/cancel-and-terminate.md": "cedd1e6c51dfa551e00edc1d39739ff1f67d558d2a0be92143f478cb6111536b",
"features/child-workflows.md": "30dd8e1a131654d6320641446b6bd661f27cd591353a60d007574955749cf8fb",
"features/concurrency.md": "a7a3eb2274f7b14faf722494569b7663c07ab48afdf2e9225e58914b84cacbb4",
"features/concurrency.md": "c6c10761dc0cd1bb167a385d4237412b8e81589e380a1b4f0d21ee4f03f74e76",
"features/condition-waits.md": "451261eda990c9591a0db69839d872184b5c64da6b537a582133095b8d4b599e",
"features/continue-as-new.md": "a5309192c685abeb5295071d423824ae2287e68d247a6661f18d3ab21f9bdc9c",
"features/continue-as-new.md": "63b6ac32d5371a57d48cca7594a93e73d3f24394fba18d8a808eefe6eff017fb",
"features/events.md": "c466df05908748489226a3d1410c9203cf6f2986a4bb7539db1c5f82715abc7b",
"features/external-payload-storage.md": "acc312fa2f50a43c96e1d235439124d28a7048f0bf3abac34319467fcbf7e898",
"features/heartbeats.md": "4fce9636d68c89f29f259d52e463cd67eccf0bc55ad4d53338ed03329892b365",
Expand Down
10 changes: 8 additions & 2 deletions i18n/es/docusaurus-plugin-content-docs/current/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ El paquete integrado y el SDK de modo servicio tienen contratos distintos.

| Línea del paquete | PHP | Laravel |
| --- | --- | --- |
| Workflow integrado 2.27 actual | PHP 8.2+ de 8.x; PHP 8.3+ para Laravel 13 | `^12.69.0` o `^13.30.0` |
| Workflow integrado 2.28 actual | PHP 8.2+ de 8.x; PHP 8.3+ para Laravel 13 | `^12.69.0` o `^13.30.0` |
| Workflow integrado 2.20.5 | PHP `^8.1`, sujeto al mínimo del framework | `^10.50.4`, `^11.56.1`, `^12.69.0` o `^13.30.0` |
| SDK PHP 3.14 publicado | SDK básico PHP `^8.1`; el puente Laravel necesita PHP `^8.2`, y PHP 8.3+ para Laravel 13 | `^12.69.0` o `^13.30.0` |
| SDK PHP 3.9.5 | SDK básico PHP `^8.1`; el puente Laravel también exige el mínimo del framework | `^10.50.4`, `^11.56.1`, `^12.69.0` o `^13.30.0` |

Las autoridades son el [contrato integrado publicado](https://github.com/durable-workflow/workflow/blob/2.27.0/resources/laravel-embedded-upgrade-contract.json)
Las autoridades son el [contrato integrado publicado](https://github.com/durable-workflow/workflow/blob/2.28.0/resources/laravel-embedded-upgrade-contract.json)
y el `composer.json` de cada versión. La versión integrada actual se verificó
con Laravel 12/PHP 8.2–8.4 y Laravel 13/PHP 8.3–8.4. Retira PHP 8.1 y Laravel
10/11. No cambia la [guía histórica de v1 estable](/docs/1.x/installation/)
Expand Down Expand Up @@ -164,6 +164,12 @@ Workflow 2.27 mantiene los mínimos de soporte de 2.21 y el protocolo de workers

Consulte las [notas de la versión 2.27.0](https://github.com/durable-workflow/workflow/releases/tag/2.27.0).

Workflow 2.28 mantiene los mínimos de soporte de 2.21 y el protocolo de workers integrado `1.22`, y no añade ninguna migración de base de datos. Cambio de comportamiento que conviene revisar antes de actualizar:

- Desde 2.28, una ejecución que se completa, falla o continúa como nueva cancela en la misma transacción las actividades y los temporizadores que nunca esperó, como los perdedores de `select()`, en lugar de dejarlos en ejecución. Un resultado tardío de esa actividad se rechaza con `run_closed`. Si un workflow necesita el efecto de un perdedor, espérelo antes de retornar. Consulte [Perdedores cuando se cierra la ejecución](./features/concurrency.md#selection-losers-at-close).

Consulte las [notas de la versión 2.28.0](https://github.com/durable-workflow/workflow/releases/tag/2.28.0).

## Niveles de estabilidad {#stability-levels}

Cada interfaz pública tiene exactamente uno de estos niveles de estabilidad.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ El resultado contiene clave e índice estables del miembro, tipo e identidad dur

El runtime registra la primera resolución apta mientras mantiene el bloqueo de confirmación del padre. Por eso, reinicios en frío, recargas del historial persistido, consultas y finalizaciones posteriores de perdedores reutilizan el ganador registrado, sin competir con futuros locales del lenguaje ni reinterpretar el orden. Las entregas exactamente duplicadas son idempotentes. Las entradas concurrentes se ordenan por historial duradero confirmado; una entrada que llega mientras corre una actividad es visible en la siguiente tarea de workflow, y una entrada tardía o duplicada no reemplaza al ganador registrado.

### Perdedores cuando se cierra la ejecución {#selection-losers-at-close}

Desde Workflow 2.28, si la ejecución se cierra mientras un miembro no ganador sigue abierto, el cierre lo cancela en la misma transacción. Esto se aplica cuando la ejecución se completa, falla o continúa como nueva. Una actividad abierta recibe `ActivityCancelled` con `cancellation_reason: run_closed` y un temporizador pendiente recibe `TimerCancelled`, ambos registrados antes del evento terminal. No se añade nada después del evento terminal y se rechaza un resultado tardío de la actividad cancelada. El replay ignora estas cancelaciones, porque el workflow nunca las vio.

Si el workflow necesita el efecto de un perdedor, espérelo antes de retornar. En el modo de servicio, una actividad programada con `cancellation_policy: abandon` sigue ejecutándose. El evento terminal la incluye en `abandoned_activities`, y su resultado nunca se registra en la ejecución cerrada. Los workflows hijos siguen su política de cierre del padre.

## Barreras anidadas {#nested-barriers}

Los grupos anidados `all([...])` permiten expresar en un paso un árbol duradero de distribución y reunión de trabajo. El runtime programa cada actividad o hijo como secuencia hoja duradera, registra su `parallel_group_path` completo, espera hasta que todas las barreras que la contienen puedan avanzar y reconstruye la forma anidada original del resultado antes de reanudar. Al reproducir, cada hoja de actividad o hijo debe coincidir con esa ruta registrada. El historial tipado de hojas sin metadatos de grupo se considera historial incompatible de una versión preliminar antigua, sin suponer su encaje en la barrera actual.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ Una señal dirigida a una ejecución nunca cambia de destino. Si no puede aplica

Los bucles prolongados pueden desprenderse del historial sin inventar otro id público de workflow en cada transición.

Desde Workflow 2.28, las actividades y los temporizadores que la ejecución que se cierra nunca esperó se cancelan al continuar como nueva ejecución; los hijos, en cambio, se entregan a la ejecución continuada. Consulte [Perdedores cuando se cierra la ejecución](./concurrency.md#selection-losers-at-close).

## Presupuesto de historial {#history-budget}

El código puede observar la longitud actual del historial y una sugerencia de continuación mediante contexto explícito del runtime. Así puede traspasar deliberadamente antes de alcanzar límites costosos.
Expand Down
6 changes: 3 additions & 3 deletions i18n/es/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"ai-agent-workflow-engine.md": "28016466b179adbabdff6467ce351100c9bee48529a8bec9df7ec22c8d786d4d",
"ai-assisted-development.md": "b246bb60585fb7a69bc534978f470f3f16e899e1f8f203ba0847d2d11b8a1ec3",
"capabilities.md": "d9a2bbc0d04adf8cb3f4c7f42d779a43aafab60791210305e7e476c0499528fc",
"compatibility.md": "a1b478309cdb159ee2c15b3e1ced7aba7f8c5172ad7431b2e3db907b0c868147",
"compatibility.md": "d2e8f2add0f4e59823adbe8245bf8befa4820bc4ea51cbc96a0a07d62256cde6",
"configuration/customization-matrix.md": "3d115863eaee7852b541bcd01615f424cc19c5847c7cd7d75e5ae63bc3f5cc78",
"configuration/database-connection.md": "cc83ae77133236309506fa44d39bfd0c939c32a6154c0bd6099bc64c83bdaec9",
"configuration/ensuring-same-server.md": "6c665f37cc198c7b1a775a60a94aab5ff4e55383385e76f1834c7840559b512a",
Expand Down Expand Up @@ -33,9 +33,9 @@
"features/activity-execution-model.md": "e8c37520ae46a7efb30438f4fc06bf893c1df430cb1f92c48963697adaf09082",
"features/cancel-and-terminate.md": "cedd1e6c51dfa551e00edc1d39739ff1f67d558d2a0be92143f478cb6111536b",
"features/child-workflows.md": "30dd8e1a131654d6320641446b6bd661f27cd591353a60d007574955749cf8fb",
"features/concurrency.md": "a7a3eb2274f7b14faf722494569b7663c07ab48afdf2e9225e58914b84cacbb4",
"features/concurrency.md": "c6c10761dc0cd1bb167a385d4237412b8e81589e380a1b4f0d21ee4f03f74e76",
"features/condition-waits.md": "451261eda990c9591a0db69839d872184b5c64da6b537a582133095b8d4b599e",
"features/continue-as-new.md": "a5309192c685abeb5295071d423824ae2287e68d247a6661f18d3ab21f9bdc9c",
"features/continue-as-new.md": "63b6ac32d5371a57d48cca7594a93e73d3f24394fba18d8a808eefe6eff017fb",
"features/events.md": "c466df05908748489226a3d1410c9203cf6f2986a4bb7539db1c5f82715abc7b",
"features/external-payload-storage.md": "acc312fa2f50a43c96e1d235439124d28a7048f0bf3abac34319467fcbf7e898",
"features/heartbeats.md": "4fce9636d68c89f29f259d52e463cd67eccf0bc55ad4d53338ed03329892b365",
Expand Down
Loading
Loading