From 924b5429bfb9483c73206887319b862a96da527b Mon Sep 17 00:00:00 2001 From: Richard McDaniel <1130888+rmcdaniel@users.noreply.github.com> Date: Fri, 20 Nov 2026 00:59:21 +0000 Subject: [PATCH] Describe embedded signal-external delivery after the sender commits workflow#1247 now records the request, commits, then delivers and records the outcome, retrying database conflicts. Co-Authored-By: Claude Opus 5.5 --- docs/features/signals.md | 8 +++++--- .../current/features/signals.md | 8 +++++--- i18n/de/source-hashes.json | 2 +- .../current/features/signals.md | 9 +++++---- i18n/es/source-hashes.json | 2 +- .../current/features/signals.md | 10 ++++++---- i18n/fr/source-hashes.json | 2 +- .../current/features/signals.md | 2 +- i18n/ja/source-hashes.json | 2 +- .../current/features/signals.md | 8 +++++--- i18n/pt-BR/source-hashes.json | 2 +- .../current/features/signals.md | 8 +++++--- i18n/uk/source-hashes.json | 2 +- .../current/features/signals.md | 2 +- i18n/zh-Hans/source-hashes.json | 2 +- 15 files changed, 40 insertions(+), 29 deletions(-) diff --git a/docs/features/signals.md b/docs/features/signals.md index 1946c45afbb..adb061872c0 100644 --- a/docs/features/signals.md +++ b/docs/features/signals.md @@ -139,9 +139,11 @@ experimental. ::: Workflow code can signal another workflow in its namespace with -`signalExternalWorkflow()`. The request and its outcome are recorded once in -this workflow's history, in the same transaction that admits the signal on the -target, and replay returns the recorded outcome without sending again: +`signalExternalWorkflow()`. This workflow records the request once and waits. +After that commits, the runtime admits the signal on the target and records +the outcome in this workflow's history, retrying database conflicts instead of +failing either workflow. Replay returns the recorded outcome without sending +again: ```php use Workflow\V2\Attributes\Type; diff --git a/i18n/de/docusaurus-plugin-content-docs/current/features/signals.md b/i18n/de/docusaurus-plugin-content-docs/current/features/signals.md index 22c2ebe142f..41be0fdba77 100644 --- a/i18n/de/docusaurus-plugin-content-docs/current/features/signals.md +++ b/i18n/de/docusaurus-plugin-content-docs/current/features/signals.md @@ -150,9 +150,11 @@ ist experimentell. ::: Workflow-Code kann mit `signalExternalWorkflow()` einen anderen Workflow in -seinem Namespace signalisieren. Die Anfrage und ihr Ergebnis werden einmal in -der Historie dieses Workflows aufgezeichnet, in derselben Transaktion, die das -Signal beim Ziel annimmt. Replay gibt das aufgezeichnete Ergebnis zurück, ohne +seinem Namespace signalisieren. Dieser Workflow zeichnet die Anfrage einmal auf +und wartet. Nachdem dies festgeschrieben ist, nimmt die Laufzeit das Signal beim +Ziel an und zeichnet das Ergebnis in der Historie dieses Workflows auf. Dabei +werden Datenbankkonflikte erneut versucht, statt einen der beiden Workflows +fehlschlagen zu lassen. Replay gibt das aufgezeichnete Ergebnis zurück, ohne erneut zu senden: ```php diff --git a/i18n/de/source-hashes.json b/i18n/de/source-hashes.json index 3c6324df3ac..2d759df2251 100644 --- a/i18n/de/source-hashes.json +++ b/i18n/de/source-hashes.json @@ -51,7 +51,7 @@ "features/service-operations.md": "912131c0a8ef393040a933fb4a66e68abcb9d475a3ebd47c85287d4032f45a0e", "features/side-effects.md": "abdccab8d6fc1a12b3eff8a4ccc58730ac36f523559b4ad89c5c2a8d201a3b86", "features/signal+timer.md": "a05fc480544fa71f6c9b215ad3417f71b8475dd81f9de8ee18d7a3b69ac33a23", - "features/signals.md": "b6ed104dbe57bc7ff01bcc45dc30740129a328954b8242d3548c2c54f5766315", + "features/signals.md": "bcf10742b5879b2c89c68706d3410154a51c2b41e1c4e4ec3a9c10c56cf1cb27", "features/sticky-execution.md": "d54fe85283d633d5cba10a03c716a707bf3b6a4e6d47ec9859e17f5f676a89b8", "features/timeouts.md": "c0d2d4108b195d10a759a4cc5368e0d13a48bde4a46005601ec15d58198f409a", "features/timers.md": "8ef45889325eb3358dd7c894511dfbd647e2813fd2eb368069f17d56c90a5d27", diff --git a/i18n/es/docusaurus-plugin-content-docs/current/features/signals.md b/i18n/es/docusaurus-plugin-content-docs/current/features/signals.md index aee73105fa9..5587caa2939 100644 --- a/i18n/es/docusaurus-plugin-content-docs/current/features/signals.md +++ b/i18n/es/docusaurus-plugin-content-docs/current/features/signals.md @@ -121,10 +121,11 @@ experimental. ::: El código de un workflow puede enviar una señal a otro workflow de su espacio -de nombres con `signalExternalWorkflow()`. La solicitud y su resultado se -registran una sola vez en el historial de este workflow, en la misma -transacción que admite la señal en el destino, y la reproducción devuelve el -resultado registrado sin volver a enviar: +de nombres con `signalExternalWorkflow()`. Este workflow registra la solicitud +una sola vez y espera. Una vez confirmado eso, el runtime admite la señal en el +destino y registra el resultado en el historial de este workflow, reintentando +los conflictos de base de datos en lugar de hacer fallar a cualquiera de los dos +workflows. La reproducción devuelve el resultado registrado sin volver a enviar: ```php use Workflow\V2\Attributes\Type; diff --git a/i18n/es/source-hashes.json b/i18n/es/source-hashes.json index 3c6324df3ac..2d759df2251 100644 --- a/i18n/es/source-hashes.json +++ b/i18n/es/source-hashes.json @@ -51,7 +51,7 @@ "features/service-operations.md": "912131c0a8ef393040a933fb4a66e68abcb9d475a3ebd47c85287d4032f45a0e", "features/side-effects.md": "abdccab8d6fc1a12b3eff8a4ccc58730ac36f523559b4ad89c5c2a8d201a3b86", "features/signal+timer.md": "a05fc480544fa71f6c9b215ad3417f71b8475dd81f9de8ee18d7a3b69ac33a23", - "features/signals.md": "b6ed104dbe57bc7ff01bcc45dc30740129a328954b8242d3548c2c54f5766315", + "features/signals.md": "bcf10742b5879b2c89c68706d3410154a51c2b41e1c4e4ec3a9c10c56cf1cb27", "features/sticky-execution.md": "d54fe85283d633d5cba10a03c716a707bf3b6a4e6d47ec9859e17f5f676a89b8", "features/timeouts.md": "c0d2d4108b195d10a759a4cc5368e0d13a48bde4a46005601ec15d58198f409a", "features/timers.md": "8ef45889325eb3358dd7c894511dfbd647e2813fd2eb368069f17d56c90a5d27", diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/features/signals.md b/i18n/fr/docusaurus-plugin-content-docs/current/features/signals.md index 7e8957fb8de..2edb2bea0b1 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/features/signals.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/features/signals.md @@ -141,10 +141,12 @@ expérimentale. ::: Le code d’un workflow peut envoyer un signal à un autre workflow de son espace -de noms avec `signalExternalWorkflow()`. La requête et son résultat sont -enregistrés une seule fois dans l’historique de ce workflow, dans la même -transaction qui admet le signal sur la cible, et le rejeu renvoie le résultat -enregistré sans renvoyer le signal : +de noms avec `signalExternalWorkflow()`. Ce workflow enregistre la requête une +seule fois et attend. Une fois cet enregistrement validé, le runtime admet le +signal sur la cible et enregistre le résultat dans l’historique de ce workflow, +en réessayant les conflits de base de données au lieu de faire échouer l’un ou +l’autre workflow. Le rejeu renvoie le résultat enregistré sans renvoyer le +signal : ```php use Workflow\V2\Attributes\Type; diff --git a/i18n/fr/source-hashes.json b/i18n/fr/source-hashes.json index 3c6324df3ac..2d759df2251 100644 --- a/i18n/fr/source-hashes.json +++ b/i18n/fr/source-hashes.json @@ -51,7 +51,7 @@ "features/service-operations.md": "912131c0a8ef393040a933fb4a66e68abcb9d475a3ebd47c85287d4032f45a0e", "features/side-effects.md": "abdccab8d6fc1a12b3eff8a4ccc58730ac36f523559b4ad89c5c2a8d201a3b86", "features/signal+timer.md": "a05fc480544fa71f6c9b215ad3417f71b8475dd81f9de8ee18d7a3b69ac33a23", - "features/signals.md": "b6ed104dbe57bc7ff01bcc45dc30740129a328954b8242d3548c2c54f5766315", + "features/signals.md": "bcf10742b5879b2c89c68706d3410154a51c2b41e1c4e4ec3a9c10c56cf1cb27", "features/sticky-execution.md": "d54fe85283d633d5cba10a03c716a707bf3b6a4e6d47ec9859e17f5f676a89b8", "features/timeouts.md": "c0d2d4108b195d10a759a4cc5368e0d13a48bde4a46005601ec15d58198f409a", "features/timers.md": "8ef45889325eb3358dd7c894511dfbd647e2813fd2eb368069f17d56c90a5d27", diff --git a/i18n/ja/docusaurus-plugin-content-docs/current/features/signals.md b/i18n/ja/docusaurus-plugin-content-docs/current/features/signals.md index 2538a5002f0..b5df0a632d7 100644 --- a/i18n/ja/docusaurus-plugin-content-docs/current/features/signals.md +++ b/i18n/ja/docusaurus-plugin-content-docs/current/features/signals.md @@ -110,7 +110,7 @@ $result->startOutcome(); // "started_new" or "returned_existing_active" 組み込みワークフロー向けの永続的な signal-external は [Workflow #1247](https://github.com/durable-workflow/workflow/pull/1247) で対応中で、まだリリースされていません。API は実験的です。 ::: -ワークフローコードは `signalExternalWorkflow()` で、同じ名前空間内の別のワークフローへシグナルを送れます。リクエストとその結果は、対象でシグナルを受理するのと同じトランザクションで、このワークフローの履歴に一度だけ記録されます。リプレイは再送せずに記録済みの結果を返します。 +ワークフローコードは `signalExternalWorkflow()` で、同じ名前空間内の別のワークフローへシグナルを送れます。このワークフローはリクエストを一度だけ記録して待機します。その記録がコミットされた後、ランタイムが対象でシグナルを受理し、結果をこのワークフローの履歴に記録します。データベースの競合は、どちらのワークフローも失敗させずに再試行します。リプレイは再送せずに記録済みの結果を返します。 ```php use Workflow\V2\Attributes\Type; diff --git a/i18n/ja/source-hashes.json b/i18n/ja/source-hashes.json index 3c6324df3ac..2d759df2251 100644 --- a/i18n/ja/source-hashes.json +++ b/i18n/ja/source-hashes.json @@ -51,7 +51,7 @@ "features/service-operations.md": "912131c0a8ef393040a933fb4a66e68abcb9d475a3ebd47c85287d4032f45a0e", "features/side-effects.md": "abdccab8d6fc1a12b3eff8a4ccc58730ac36f523559b4ad89c5c2a8d201a3b86", "features/signal+timer.md": "a05fc480544fa71f6c9b215ad3417f71b8475dd81f9de8ee18d7a3b69ac33a23", - "features/signals.md": "b6ed104dbe57bc7ff01bcc45dc30740129a328954b8242d3548c2c54f5766315", + "features/signals.md": "bcf10742b5879b2c89c68706d3410154a51c2b41e1c4e4ec3a9c10c56cf1cb27", "features/sticky-execution.md": "d54fe85283d633d5cba10a03c716a707bf3b6a4e6d47ec9859e17f5f676a89b8", "features/timeouts.md": "c0d2d4108b195d10a759a4cc5368e0d13a48bde4a46005601ec15d58198f409a", "features/timers.md": "8ef45889325eb3358dd7c894511dfbd647e2813fd2eb368069f17d56c90a5d27", diff --git a/i18n/pt-BR/docusaurus-plugin-content-docs/current/features/signals.md b/i18n/pt-BR/docusaurus-plugin-content-docs/current/features/signals.md index 05d0c2da6d4..a5d749ac374 100644 --- a/i18n/pt-BR/docusaurus-plugin-content-docs/current/features/signals.md +++ b/i18n/pt-BR/docusaurus-plugin-content-docs/current/features/signals.md @@ -140,9 +140,11 @@ experimental. ::: O código do workflow pode enviar um sinal a outro workflow em seu namespace com -`signalExternalWorkflow()`. A requisição e seu resultado são registrados uma -única vez no histórico deste workflow, na mesma transação que admite o sinal no -destino, e o replay retorna o resultado registrado sem enviar novamente: +`signalExternalWorkflow()`. Este workflow registra a requisição uma única vez e +aguarda. Depois que isso é confirmado, o runtime admite o sinal no destino e +registra o resultado no histórico deste workflow, tentando novamente em caso de +conflitos de banco de dados em vez de fazer qualquer um dos workflows falhar. O +replay retorna o resultado registrado sem enviar novamente: ```php use Workflow\V2\Attributes\Type; diff --git a/i18n/pt-BR/source-hashes.json b/i18n/pt-BR/source-hashes.json index 3c6324df3ac..2d759df2251 100644 --- a/i18n/pt-BR/source-hashes.json +++ b/i18n/pt-BR/source-hashes.json @@ -51,7 +51,7 @@ "features/service-operations.md": "912131c0a8ef393040a933fb4a66e68abcb9d475a3ebd47c85287d4032f45a0e", "features/side-effects.md": "abdccab8d6fc1a12b3eff8a4ccc58730ac36f523559b4ad89c5c2a8d201a3b86", "features/signal+timer.md": "a05fc480544fa71f6c9b215ad3417f71b8475dd81f9de8ee18d7a3b69ac33a23", - "features/signals.md": "b6ed104dbe57bc7ff01bcc45dc30740129a328954b8242d3548c2c54f5766315", + "features/signals.md": "bcf10742b5879b2c89c68706d3410154a51c2b41e1c4e4ec3a9c10c56cf1cb27", "features/sticky-execution.md": "d54fe85283d633d5cba10a03c716a707bf3b6a4e6d47ec9859e17f5f676a89b8", "features/timeouts.md": "c0d2d4108b195d10a759a4cc5368e0d13a48bde4a46005601ec15d58198f409a", "features/timers.md": "8ef45889325eb3358dd7c894511dfbd647e2813fd2eb368069f17d56c90a5d27", diff --git a/i18n/uk/docusaurus-plugin-content-docs/current/features/signals.md b/i18n/uk/docusaurus-plugin-content-docs/current/features/signals.md index 87298f16061..688e8fd46a7 100644 --- a/i18n/uk/docusaurus-plugin-content-docs/current/features/signals.md +++ b/i18n/uk/docusaurus-plugin-content-docs/current/features/signals.md @@ -138,9 +138,11 @@ Server 3.15.0 або новішого й відхиляє закритий за ::: Код workflow може надіслати signal іншому workflow у своєму namespace через -`signalExternalWorkflow()`. Запит і його результат записуються один раз в -історію цього workflow в тій самій транзакції, що приймає signal у цілі, а -replay повертає записаний результат без повторного надсилання: +`signalExternalWorkflow()`. Цей workflow один раз записує запит і чекає. Після +фіксації цього запису runtime приймає signal у цілі та записує результат в +історію цього workflow, повторюючи спроби при конфліктах бази даних, а не +завершуючи помилкою жоден із workflow. Replay повертає записаний результат без +повторного надсилання: ```php use Workflow\V2\Attributes\Type; diff --git a/i18n/uk/source-hashes.json b/i18n/uk/source-hashes.json index 3c6324df3ac..2d759df2251 100644 --- a/i18n/uk/source-hashes.json +++ b/i18n/uk/source-hashes.json @@ -51,7 +51,7 @@ "features/service-operations.md": "912131c0a8ef393040a933fb4a66e68abcb9d475a3ebd47c85287d4032f45a0e", "features/side-effects.md": "abdccab8d6fc1a12b3eff8a4ccc58730ac36f523559b4ad89c5c2a8d201a3b86", "features/signal+timer.md": "a05fc480544fa71f6c9b215ad3417f71b8475dd81f9de8ee18d7a3b69ac33a23", - "features/signals.md": "b6ed104dbe57bc7ff01bcc45dc30740129a328954b8242d3548c2c54f5766315", + "features/signals.md": "bcf10742b5879b2c89c68706d3410154a51c2b41e1c4e4ec3a9c10c56cf1cb27", "features/sticky-execution.md": "d54fe85283d633d5cba10a03c716a707bf3b6a4e6d47ec9859e17f5f676a89b8", "features/timeouts.md": "c0d2d4108b195d10a759a4cc5368e0d13a48bde4a46005601ec15d58198f409a", "features/timers.md": "8ef45889325eb3358dd7c894511dfbd647e2813fd2eb368069f17d56c90a5d27", diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/features/signals.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/features/signals.md index 5c20d66bf18..794064eecae 100644 --- a/i18n/zh-Hans/docusaurus-plugin-content-docs/current/features/signals.md +++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current/features/signals.md @@ -110,7 +110,7 @@ $result->startOutcome(); // "started_new" or "returned_existing_active" 面向嵌入式工作流的持久 signal-external 位于 [Workflow #1247](https://github.com/durable-workflow/workflow/pull/1247),尚未发布。其 API 为实验性。 ::: -工作流代码可以通过 `signalExternalWorkflow()` 向其命名空间内的另一个工作流发送信号。请求及其结果会在此工作流的历史中只记录一次,与在目标上接收该信号处于同一事务中;重放返回已记录的结果,不会再次发送: +工作流代码可以通过 `signalExternalWorkflow()` 向其命名空间内的另一个工作流发送信号。此工作流只记录一次请求,然后等待。该记录提交后,运行时在目标上接收该信号,并将结果记录到此工作流的历史中;遇到数据库冲突时会重试,而不会使任一工作流失败。重放返回已记录的结果,不会再次发送: ```php use Workflow\V2\Attributes\Type; diff --git a/i18n/zh-Hans/source-hashes.json b/i18n/zh-Hans/source-hashes.json index 3c6324df3ac..2d759df2251 100644 --- a/i18n/zh-Hans/source-hashes.json +++ b/i18n/zh-Hans/source-hashes.json @@ -51,7 +51,7 @@ "features/service-operations.md": "912131c0a8ef393040a933fb4a66e68abcb9d475a3ebd47c85287d4032f45a0e", "features/side-effects.md": "abdccab8d6fc1a12b3eff8a4ccc58730ac36f523559b4ad89c5c2a8d201a3b86", "features/signal+timer.md": "a05fc480544fa71f6c9b215ad3417f71b8475dd81f9de8ee18d7a3b69ac33a23", - "features/signals.md": "b6ed104dbe57bc7ff01bcc45dc30740129a328954b8242d3548c2c54f5766315", + "features/signals.md": "bcf10742b5879b2c89c68706d3410154a51c2b41e1c4e4ec3a9c10c56cf1cb27", "features/sticky-execution.md": "d54fe85283d633d5cba10a03c716a707bf3b6a4e6d47ec9859e17f5f676a89b8", "features/timeouts.md": "c0d2d4108b195d10a759a4cc5368e0d13a48bde4a46005601ec15d58198f409a", "features/timers.md": "8ef45889325eb3358dd7c894511dfbd647e2813fd2eb368069f17d56c90a5d27",