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
13 changes: 12 additions & 1 deletion docs/polyglot/server-api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,21 @@ curl -sS -X POST "$DURABLE_WORKFLOW_SERVER_URL/api/workflows" \
"input": ["order-1001"],
"memo": {"source": "api-reference"},
"search_attributes": {"CustomerId": "cust-42"},
"duplicate_policy": "reject"
"duplicate_policy": "fail"
}'
```

`duplicate_policy` accepts only `fail` and `use-existing`. Omitting it or sending
`null` selects `fail`. Both policies create a run when the workflow id is unused.

| Policy | An active run already exists | The existing run has closed |
| --- | --- | --- |
| `fail` (default) | Reject the duplicate start. | Reject the duplicate start. |
| `use-existing` | Return the existing pending, running or waiting run without starting another. | Reject the duplicate start. |

Neither policy reopens a closed run. Use a new workflow id for a new execution.
`reject` is not an accepted value and returns HTTP 422.

### Workflow Commands

The server also provides cooperative
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,23 @@ curl -sS -X POST "$DURABLE_WORKFLOW_SERVER_URL/api/workflows" \
"input": ["order-1001"],
"memo": {"source": "api-reference"},
"search_attributes": {"CustomerId": "cust-42"},
"duplicate_policy": "reject"
"duplicate_policy": "fail"
}'
```

`duplicate_policy` akzeptiert nur `fail` und `use-existing`. Wird das Feld
weggelassen oder als `null` gesendet, gilt `fail`. Beide Richtlinien erstellen
einen Lauf, wenn die Workflow-ID noch nicht verwendet wurde.

| Richtlinie | Ein aktiver Lauf existiert bereits | Der vorhandene Lauf ist geschlossen |
| --- | --- | --- |
| `fail` (Standard) | Den doppelten Start ablehnen. | Den doppelten Start ablehnen. |
| `use-existing` | Den vorhandenen ausstehenden, laufenden oder wartenden Lauf zurückgeben, ohne einen weiteren zu starten. | Den doppelten Start ablehnen. |

Keine der Richtlinien öffnet einen geschlossenen Lauf erneut. Verwenden Sie für
eine neue Ausführung eine neue Workflow-ID. `reject` ist kein zulässiger Wert
und führt zu HTTP 422.

### Workflow-Befehle {#workflow-commands}

Server bietet auch kooperative `request-cancellation`-Routen.
Expand Down
2 changes: 1 addition & 1 deletion i18n/de/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"polyglot/python.md": "9d6f4d4f0d01ec8d6d937892f3ab0f90d13755a93a7e902e821da8938dd2bacf",
"polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3",
"polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0",
"polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a",
"polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83",
"polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7",
"polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2",
"polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,22 @@ curl -sS -X POST "$DURABLE_WORKFLOW_SERVER_URL/api/workflows" \
"input": ["order-1001"],
"memo": {"source": "api-reference"},
"search_attributes": {"CustomerId": "cust-42"},
"duplicate_policy": "reject"
"duplicate_policy": "fail"
}'
```

`duplicate_policy` solo acepta `fail` y `use-existing`. Si se omite el campo o
se envía `null`, se aplica `fail`. Ambas políticas crean una ejecución cuando
el ID del workflow todavía no se ha utilizado.

| Política | Ya existe una ejecución activa | La ejecución existente está cerrada |
| --- | --- | --- |
| `fail` (predeterminada) | Rechazar el inicio duplicado. | Rechazar el inicio duplicado. |
| `use-existing` | Devolver la ejecución existente en estado pending, running o waiting sin iniciar otra. | Rechazar el inicio duplicado. |

Ninguna política reabre una ejecución cerrada. Usa un ID de workflow nuevo para
una nueva ejecución. `reject` no es un valor aceptado y devuelve HTTP 422.

### Comandos de workflow {#workflow-commands}

El servidor también ofrece rutas cooperativas `request-cancellation`. Consulta [Cancelación cooperativa](/docs/polyglot/cancellation/) para el contrato de limpieza acotada y los requisitos de worker.
Expand Down
2 changes: 1 addition & 1 deletion i18n/es/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"polyglot/python.md": "9d6f4d4f0d01ec8d6d937892f3ab0f90d13755a93a7e902e821da8938dd2bacf",
"polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3",
"polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0",
"polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a",
"polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83",
"polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7",
"polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2",
"polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,23 @@ curl -sS -X POST "$DURABLE_WORKFLOW_SERVER_URL/api/workflows" \
"input": ["order-1001"],
"memo": {"source": "api-reference"},
"search_attributes": {"CustomerId": "cust-42"},
"duplicate_policy": "reject"
"duplicate_policy": "fail"
}'
```

`duplicate_policy` accepte uniquement `fail` et `use-existing`. Si le champ est
omis ou vaut `null`, la politique est `fail`. Les deux politiques créent une
exécution si l'identifiant du workflow n'a pas encore été utilisé.

| Politique | Une exécution active existe déjà | L'exécution existante est clôturée |
| --- | --- | --- |
| `fail` (par défaut) | Refuser le démarrage en double. | Refuser le démarrage en double. |
| `use-existing` | Renvoyer l'exécution existante en attente, en cours ou en sommeil, sans en démarrer une autre. | Refuser le démarrage en double. |

Aucune politique ne rouvre une exécution clôturée. Utilisez un nouvel identifiant
de workflow pour une nouvelle exécution. `reject` n'est pas une valeur acceptée
et entraîne une réponse HTTP 422.

### Commandes de workflow {#workflow-commands}

Le serveur fournit aussi les routes coopératives `request-cancellation`.
Expand Down
2 changes: 1 addition & 1 deletion i18n/fr/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"polyglot/python.md": "9d6f4d4f0d01ec8d6d937892f3ab0f90d13755a93a7e902e821da8938dd2bacf",
"polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3",
"polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0",
"polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a",
"polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83",
"polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7",
"polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2",
"polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,22 @@ curl -sS -X POST "$DURABLE_WORKFLOW_SERVER_URL/api/workflows" \
"input": ["order-1001"],
"memo": {"source": "api-reference"},
"search_attributes": {"CustomerId": "cust-42"},
"duplicate_policy": "reject"
"duplicate_policy": "fail"
}'
```

`duplicate_policy` に指定できる値は `fail` と `use-existing` だけです。
省略するか `null` を送信すると `fail` が選択されます。どちらのポリシーも、
ワークフロー ID が未使用であれば新しい実行を作成します。

| ポリシー | アクティブな実行がすでに存在する場合 | 既存の実行が終了している場合 |
| --- | --- | --- |
| `fail`(デフォルト) | 重複した開始要求を拒否します。 | 重複した開始要求を拒否します。 |
| `use-existing` | 新たに開始せず、既存の pending、running、waiting 状態の実行を返します。 | 重複した開始要求を拒否します。 |

どちらのポリシーも終了した実行を再開しません。新しい実行には新しい
ワークフロー ID を使用してください。`reject` は無効な値で、HTTP 422 が返されます。

### ワークフローコマンド {#workflow-commands}

Server は協調的な `request-cancellation` ルートも提供します。時間を制限したクリーンアップ契約と Worker 要件は[協調キャンセル](/docs/polyglot/cancellation/)を参照してください。
Expand Down
2 changes: 1 addition & 1 deletion i18n/ja/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"polyglot/python.md": "9d6f4d4f0d01ec8d6d937892f3ab0f90d13755a93a7e902e821da8938dd2bacf",
"polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3",
"polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0",
"polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a",
"polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83",
"polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7",
"polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2",
"polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,22 @@ curl -sS -X POST "$DURABLE_WORKFLOW_SERVER_URL/api/workflows" \
"input": ["order-1001"],
"memo": {"source": "api-reference"},
"search_attributes": {"CustomerId": "cust-42"},
"duplicate_policy": "reject"
"duplicate_policy": "fail"
}'
```

`duplicate_policy` aceita somente `fail` e `use-existing`. Omitir o campo ou
enviar `null` seleciona `fail`. Ambas as políticas criam uma execução quando o
ID do workflow ainda não foi utilizado.

| Política | Já existe uma execução ativa | A execução existente está encerrada |
| --- | --- | --- |
| `fail` (padrão) | Recusar a inicialização duplicada. | Recusar a inicialização duplicada. |
| `use-existing` | Retornar a execução existente em estado pending, running ou waiting sem iniciar outra. | Recusar a inicialização duplicada. |

Nenhuma política reabre uma execução encerrada. Use um novo ID de workflow para
uma nova execução. `reject` não é um valor aceito e retorna HTTP 422.

### Comandos de workflow {#workflow-commands}

O servidor também fornece rotas cooperativas `request-cancellation`. Veja
Expand Down
2 changes: 1 addition & 1 deletion i18n/pt-BR/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"polyglot/python.md": "9d6f4d4f0d01ec8d6d937892f3ab0f90d13755a93a7e902e821da8938dd2bacf",
"polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3",
"polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0",
"polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a",
"polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83",
"polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7",
"polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2",
"polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,23 @@ curl -sS -X POST "$DURABLE_WORKFLOW_SERVER_URL/api/workflows" \
"input": ["order-1001"],
"memo": {"source": "api-reference"},
"search_attributes": {"CustomerId": "cust-42"},
"duplicate_policy": "reject"
"duplicate_policy": "fail"
}'
```

`duplicate_policy` приймає лише `fail` та `use-existing`. Якщо поле пропущено
або передано `null`, використовується `fail`. Обидві політики створюють запуск,
якщо ідентифікатор workflow ще не використовувався.

| Політика | Активний запуск уже існує | Наявний запуск уже закрито |
| --- | --- | --- |
| `fail` (типово) | Відхилити повторний старт. | Відхилити повторний старт. |
| `use-existing` | Повернути наявний запуск у стані pending, running або waiting, не створюючи нового. | Відхилити повторний старт. |

Жодна політика не відкриває закритий запуск повторно. Для нового виконання
використовуйте новий ідентифікатор workflow. `reject` не є допустимим значенням
і спричиняє відповідь HTTP 422.

### Команди workflow {#workflow-commands}

Server також надає кооперативні маршрути `request-cancellation`.
Expand Down
2 changes: 1 addition & 1 deletion i18n/uk/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"polyglot/python.md": "9d6f4d4f0d01ec8d6d937892f3ab0f90d13755a93a7e902e821da8938dd2bacf",
"polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3",
"polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0",
"polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a",
"polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83",
"polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7",
"polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2",
"polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,21 @@ curl -sS -X POST "$DURABLE_WORKFLOW_SERVER_URL/api/workflows" \
"input": ["order-1001"],
"memo": {"source": "api-reference"},
"search_attributes": {"CustomerId": "cust-42"},
"duplicate_policy": "reject"
"duplicate_policy": "fail"
}'
```

`duplicate_policy` 只接受 `fail` 和 `use-existing`。省略该字段或发送 `null`
时使用 `fail`。工作流 ID 尚未使用时,两种策略都会创建一次运行。

| 策略 | 已存在活动运行 | 现有运行已关闭 |
| --- | --- | --- |
| `fail`(默认) | 拒绝重复启动。 | 拒绝重复启动。 |
| `use-existing` | 返回现有的 pending、running 或 waiting 状态运行,不再启动新运行。 | 拒绝重复启动。 |

两种策略都不会重新打开已关闭的运行。新的执行应使用新的工作流 ID。
`reject` 不是有效值,会返回 HTTP 422。

### 工作流命令 {#workflow-commands}

Server 也提供协作式 `request-cancellation` 路由。有时限清理契约及 Worker 要求见[协作式取消](/docs/polyglot/cancellation/)。
Expand Down
2 changes: 1 addition & 1 deletion i18n/zh-Hans/source-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"polyglot/python.md": "9d6f4d4f0d01ec8d6d937892f3ab0f90d13755a93a7e902e821da8938dd2bacf",
"polyglot/rust-cloud-quickstart.md": "2303434fc9302a81a8381ad4836423ef9952eb3201a4574c432254e3cb68c5f3",
"polyglot/rust.md": "32de05a771b5ee6d8cf54fdd408222372995ce29c8be63102abe58b977ac8ef0",
"polyglot/server-api-reference.md": "6ef29c52e1bdbfa81550b50eab14d48ceb72fbcf23273e64df027177e62d981a",
"polyglot/server-api-reference.md": "e94af77a13b341d6fdc9941d4ee94e5053ab932d2e77069b238eb33351414e83",
"polyglot/server-config-reference.md": "eb62395611f09ae88fc0b6a6c8b902a7ca27e9e8b0112c89b7756b75d56186e7",
"polyglot/server-role-topology.md": "3d048f0c6b5f179399622508f51e67fff8aa5a6d5b2492533fc720eeec2c27f2",
"polyglot/server.md": "7950b0c82dac2940c30b0aa042f3105dc9bdc70b524600cce4ed6d311cda7171",
Expand Down
Loading