@@ -159,33 +159,34 @@ We strongly recommend that you write a Workflow Definition in a language that ha
159
159
A critical aspect of developing Workflow Definitions is ensuring they are deterministic. Generally
160
160
speaking, this means you must take care to ensure that any time your Workflow code is executed it
161
161
makes the same Workflow API calls in the same sequence, given the same input. Some changes to those
162
-
163
162
API calls are safe to make. For example, you can change:
164
163
165
- - The inputs/arguments and timeout values of Child Workflows, Activities, and Signals to external workflows
166
- - But not their type, or id!
167
- - The duration of timers (though changing them to 0 is not safe in all SDKs)
168
- - Add or remove calls to Workflow APIs that don't produce Commands (ex: get Workflow Info)
164
+ - The input parameters, return values, and execution timeouts of Child Workflows and Activities
165
+ - However, it is not safe to change the types or IDs of Child Workflows or Activities
166
+ - The input parameters used to Signal an external Workflow
167
+ - The duration of timers (although changing them to 0 is not safe in all SDKs)
168
+ - Add or remove calls to Workflow APIs that don't produce Commands (e.g., ` workflow.GetInfo ` in the Go SDK or its equivalent in other SDKs)
169
169
170
- The following Workflow API calls all can produce commands , and thus must not be reordered, added, or
171
- removed without proper [ versioning techniques] ( #workflow-versioning ) :
170
+ The following Workflow API calls all can produce Commands , and thus must not be reordered, added, or
171
+ removed without proper [ Versioning techniques] ( #workflow-versioning ) :
172
172
173
173
- Starting or cancelling a Timer
174
- - Scheduling or cancelling Activity executions (including local Activities)
174
+ - Scheduling or cancelling Activity Executions (including local Activities)
175
175
- Starting or cancelling Child Workflow executions
176
- - Signalling or cancelling signals to external Workflow executions
176
+ - Signalling or cancelling signals to external Workflow Executions
177
177
- Scheduling or cancelling Nexus operations
178
- - Ending the Workflow Execution in any way (completing, failing, cancelling, or continuing as new)
179
- - Patched or GetVersion calls for versioning (though they may be added or removed according to the [ patching] ( #patching ) rules)
180
- - Upserting Workflow search attributes
181
- - Upserting Workflow memos
178
+ - Ending the Workflow Execution in any way (completing, failing, cancelling, or continuing-as-new)
179
+ - ` Patched ` or ` GetVersion ` calls for Versioning (although they may be added or removed according to the [ patching] ( #patching ) rules)
180
+ - Upserting Workflow Search Attributes
181
+ - Upserting Workflow Memos
182
+ - Running a SideEffect or MutableSideEffect
182
183
183
184
More formally, the use of certain Workflow APIs in the function is what generates
184
185
[ Commands] ( /workflow-execution#command ) . Commands tell the Temporal Service which Events to create
185
- and add to the Workflow Execution's [ Event History] ( /workflow-execution/event#event-history ) . When a
186
- Workflow Function [ replays] ( /workflow-execution#replay ) , the Commands that are emitted are compared
187
- with the existing Event History. If a corresponding Event already exists within the Event History
188
- that matches that command, then the Function Execution progresses.
186
+ and add to the Workflow Execution's [ Event History] ( /workflow-execution/event#event-history ) . When
187
+ the Workflow's code [ replays] ( /workflow-execution#replay ) , the Commands that are emitted are
188
+ compared with the existing Event History. If a corresponding Event already exists within the Event
189
+ History that matches that command, then the Execution progresses.
189
190
190
191
For example, using an SDK's "Execute Activity" API generates the [ ScheduleActivityTask] ( /references/commands#scheduleactivitytask ) Command.
191
192
When this API is called upon re-execution, that Command is compared with the Event that is in the same location within the sequence.
0 commit comments