You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update UwS docs to reflect GA
* Pricing updates
* PHP supports side effects
* Tweak availability wording
* Correct signal-with-start docs per Stephan
* Remove Generally Available notices
* Rebase on #3640
* CI: Automatic .md and .mdx formatting
---------
Co-authored-by: Drew Hoskins <drew.hoskins@temporal.io>
Co-authored-by: Brian MacDonald <brian.macdonald@temporal.io>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/encyclopedia/workflow-message-passing/sending-messages.mdx
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,9 +130,13 @@ For open source server users, Temporal Server version [Temporal Server version 1
130
130
131
131
:::
132
132
133
-
Update-With-Start sends an Update that checks whether an already-running Workflow with that ID exists.
134
-
If it does, the Update is processed normally.
135
-
If not, it starts a new Workflow Execution with the supplied ID, and immediately processes the Update.
133
+
Update-with-Start sends an Update request, starting a Workflow if necessary.
134
+
A [`WorkflowIDConflictPolicy`](https://docs.temporal.io/workflow-execution/workflowid-runid#workflow-id-conflict-policy) must be specified.
135
+
Workflow ID and Update ID can be used as idempotency keys as follows:
136
+
137
+
- If the Workflow exists and you provided an Update ID, and the Update exists in the latest Workflow Run, then Update-With-Start attaches to the existing Update (regardless of `WorkflowIDConflictPolicy`)
138
+
- If the Workflow is closed, it attaches only if the Update has completed.
139
+
- Otherwise it uses [`WorkflowIDConflictPolicy`](https://docs.temporal.io/workflow-execution/workflowid-runid#workflow-id-conflict-policy) and [`WorkflowIDReusePolicy`](https://docs.temporal.io/workflow-execution/workflowid-runid#workflow-id-reuse-policy) as usual to determine whether to start a Workflow, and then starts a new Update immediately.
136
140
137
141
Update-With-Start is great for latency-sensitive use cases:
138
142
@@ -142,10 +146,12 @@ Update-With-Start is great for latency-sensitive use cases:
142
146
Updates let you add and remove items from the cart.
143
147
Update-With-Start lets the customer start shopping, whether the cart already exists or they've just started shopping.
144
148
It ensures the cart, modeled by a Workflow Execution, exists before applying any Update that changes the state of items within the cart.
149
+
Set your `WorkflowIDConflictPolicy` to `USE_EXISTING` for this pattern.
145
150
-**Early Return** -
146
151
Using Update-With-Start you can begin a new Workflow Execution and synchronously receive a response, while the Workflow Execution continues to run to completion.
147
152
For example, you might model a payment process using Update-With-Start.
148
153
This allows you to send the payment validation results back to the client synchronously, while the transaction Workflow continues in the background.
154
+
Set your `WorkflowIDConflictPolicy` to `FAIL` and use a unique Update ID for this pattern if you want to assert it does not reuse an existing Workflow.
0 commit comments