Skip to content

Commit ca53a22

Browse files
committed
Review comments
1 parent 75babb9 commit ca53a22

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

docs/encyclopedia/workflow/workflow-definition.mdx

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -159,33 +159,34 @@ We strongly recommend that you write a Workflow Definition in a language that ha
159159
A critical aspect of developing Workflow Definitions is ensuring they are deterministic. Generally
160160
speaking, this means you must take care to ensure that any time your Workflow code is executed it
161161
makes the same Workflow API calls in the same sequence, given the same input. Some changes to those
162-
163162
API calls are safe to make. For example, you can change:
164163

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)
169169

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):
172172

173173
- Starting or cancelling a Timer
174-
- Scheduling or cancelling Activity executions (including local Activities)
174+
- Scheduling or cancelling Activity Executions (including local Activities)
175175
- Starting or cancelling Child Workflow executions
176-
- Signalling or cancelling signals to external Workflow executions
176+
- Signalling or cancelling signals to external Workflow Executions
177177
- 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
182183

183184
More formally, the use of certain Workflow APIs in the function is what generates
184185
[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.
189190

190191
For example, using an SDK's "Execute Activity" API generates the [ScheduleActivityTask](/references/commands#scheduleactivitytask) Command.
191192
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

Comments
 (0)