@@ -171,7 +171,7 @@ paths:
171171 description: |-
172172 RespondActivityTaskFailed is called by workers when processing an activity task fails.
173173
174- This results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history
174+ For workflow activities, this results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history
175175 and a new workflow task created for the workflow. Fails with `NotFound` if the task token is
176176 no longer valid due to activity timeout, already being completed, or never having existed.
177177 operationId: RespondActivityTaskCanceled
@@ -245,7 +245,7 @@ paths:
245245 RespondActivityTaskCompleted is called by workers when they successfully complete an activity
246246 task.
247247
248- This results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history
248+ For workflow activities, this results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history
249249 and a new workflow task created for the workflow. Fails with `NotFound` if the task token is
250250 no longer valid due to activity timeout, already being completed, or never having existed.
251251 operationId: RespondActivityTaskCompleted
@@ -391,10 +391,17 @@ paths:
391391 description: |-
392392 RecordActivityTaskHeartbeat is optionally called by workers while they execute activities.
393393
394- If worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task,
395- then it will be marked as timed out and an `ACTIVITY_TASK_TIMED_OUT` event will be written to
396- the workflow history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in
397- such situations, in that event, the SDK should request cancellation of the activity.
394+ If a worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task,
395+ then the current attempt times out. Depending on RetryPolicy, this may trigger a retry or
396+ time out the activity.
397+
398+ For workflow activities, an `ACTIVITY_TASK_TIMED_OUT` event will be written to the workflow
399+ history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in such situations,
400+ in that event, the SDK should request cancellation of the activity.
401+
402+ The request may contain response `details` which will be persisted by the server and may be
403+ used by the activity to checkpoint progress. The `cancel_requested` field in the response
404+ indicates whether cancellation has been requested for the activity.
398405 operationId: RecordActivityTaskHeartbeat
399406 parameters:
400407 - name: namespace
@@ -648,7 +655,7 @@ paths:
648655 - WorkflowService
649656 description: |-
650657 DescribeActivityExecution returns information about an activity execution.
651- Supported use cases include :
658+ It can be used to :
652659 - Get current activity info without waiting
653660 - Long-poll for next state change and return new activity info
654661 Response can optionally include activity input or outcome (if the activity has completed).
@@ -710,7 +717,7 @@ paths:
710717 description: |-
711718 StartActivityExecution starts a new activity execution.
712719
713- Returns an `ExecutionAlreadyStarted ` error if an instance already exists with same activity ID in this namespace
720+ Returns an `ActivityExecutionAlreadyStarted ` error if an instance already exists with same activity ID in this namespace
714721 unless permitted by the specified ID conflict policy.
715722 operationId: StartActivityExecution
716723 parameters:
@@ -721,6 +728,10 @@ paths:
721728 type: string
722729 - name: activityId
723730 in: path
731+ description: |-
732+ Identifier for this activity. Required. This identifier should be meaningful in the user's
733+ own system. It must be unique among activities in the same namespace, subject to the rules
734+ imposed by id_reuse_policy and id_conflict_policy.
724735 required: true
725736 schema:
726737 type: string
@@ -750,13 +761,10 @@ paths:
750761 description: |-
751762 RequestCancelActivityExecution requests cancellation of an activity execution.
752763
753- Requesting to cancel an activity does not automatically transition the activity to canceled status. If the
754- activity has a currently running attempt, the activity will only transition to canceled status if the current
755- attempt is unsuccessful.
756- TODO: Clarify what happens if there are no more allowed retries after the current attempt.
757-
758- It returns success if the requested activity is already closed.
759- TODO: This ^^ is copied from RequestCancelWorkflowExecution, do we want to preserve this behavior?
764+ Cancellation is cooperative: this call records the request, but the activity must detect and
765+ acknowledge it for the activity to reach CANCELED status. The cancellation signal is
766+ delivered via `cancel_requested` in the heartbeat response; SDKs surface this via
767+ language-idiomatic mechanisms (context cancellation, exceptions, abort signals).
760768 operationId: RequestCancelActivityExecution
761769 parameters:
762770 - name: namespace
@@ -833,7 +841,7 @@ paths:
833841 TerminateActivityExecution terminates an existing activity execution immediately.
834842
835843 Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a
836- running attempt and will be requested to be canceled by the server when it heartbeats .
844+ running attempt.
837845 operationId: TerminateActivityExecution
838846 parameters:
839847 - name: namespace
@@ -869,7 +877,7 @@ paths:
869877 get:
870878 tags:
871879 - WorkflowService
872- description: CountActivityExecutions is a visibility API to count of activity executions in a specific namespace.
880+ description: CountActivityExecutions is a visibility API to count activity executions in a specific namespace.
873881 operationId: CountActivityExecutions
874882 parameters:
875883 - name: namespace
@@ -3957,7 +3965,7 @@ paths:
39573965 description: |-
39583966 RespondActivityTaskFailed is called by workers when processing an activity task fails.
39593967
3960- This results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history
3968+ For workflow activities, this results in a new `ACTIVITY_TASK_CANCELED` event being written to the workflow history
39613969 and a new workflow task created for the workflow. Fails with `NotFound` if the task token is
39623970 no longer valid due to activity timeout, already being completed, or never having existed.
39633971 operationId: RespondActivityTaskCanceled
@@ -4031,7 +4039,7 @@ paths:
40314039 RespondActivityTaskCompleted is called by workers when they successfully complete an activity
40324040 task.
40334041
4034- This results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history
4042+ For workflow activities, this results in a new `ACTIVITY_TASK_COMPLETED` event being written to the workflow history
40354043 and a new workflow task created for the workflow. Fails with `NotFound` if the task token is
40364044 no longer valid due to activity timeout, already being completed, or never having existed.
40374045 operationId: RespondActivityTaskCompleted
@@ -4177,10 +4185,17 @@ paths:
41774185 description: |-
41784186 RecordActivityTaskHeartbeat is optionally called by workers while they execute activities.
41794187
4180- If worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task,
4181- then it will be marked as timed out and an `ACTIVITY_TASK_TIMED_OUT` event will be written to
4182- the workflow history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in
4183- such situations, in that event, the SDK should request cancellation of the activity.
4188+ If a worker fails to heartbeat within the `heartbeat_timeout` interval for the activity task,
4189+ then the current attempt times out. Depending on RetryPolicy, this may trigger a retry or
4190+ time out the activity.
4191+
4192+ For workflow activities, an `ACTIVITY_TASK_TIMED_OUT` event will be written to the workflow
4193+ history. Calling `RecordActivityTaskHeartbeat` will fail with `NotFound` in such situations,
4194+ in that event, the SDK should request cancellation of the activity.
4195+
4196+ The request may contain response `details` which will be persisted by the server and may be
4197+ used by the activity to checkpoint progress. The `cancel_requested` field in the response
4198+ indicates whether cancellation has been requested for the activity.
41844199 operationId: RecordActivityTaskHeartbeat
41854200 parameters:
41864201 - name: namespace
@@ -4434,7 +4449,7 @@ paths:
44344449 - WorkflowService
44354450 description: |-
44364451 DescribeActivityExecution returns information about an activity execution.
4437- Supported use cases include :
4452+ It can be used to :
44384453 - Get current activity info without waiting
44394454 - Long-poll for next state change and return new activity info
44404455 Response can optionally include activity input or outcome (if the activity has completed).
@@ -4496,7 +4511,7 @@ paths:
44964511 description: |-
44974512 StartActivityExecution starts a new activity execution.
44984513
4499- Returns an `ExecutionAlreadyStarted ` error if an instance already exists with same activity ID in this namespace
4514+ Returns an `ActivityExecutionAlreadyStarted ` error if an instance already exists with same activity ID in this namespace
45004515 unless permitted by the specified ID conflict policy.
45014516 operationId: StartActivityExecution
45024517 parameters:
@@ -4507,6 +4522,10 @@ paths:
45074522 type: string
45084523 - name: activityId
45094524 in: path
4525+ description: |-
4526+ Identifier for this activity. Required. This identifier should be meaningful in the user's
4527+ own system. It must be unique among activities in the same namespace, subject to the rules
4528+ imposed by id_reuse_policy and id_conflict_policy.
45104529 required: true
45114530 schema:
45124531 type: string
@@ -4536,13 +4555,10 @@ paths:
45364555 description: |-
45374556 RequestCancelActivityExecution requests cancellation of an activity execution.
45384557
4539- Requesting to cancel an activity does not automatically transition the activity to canceled status. If the
4540- activity has a currently running attempt, the activity will only transition to canceled status if the current
4541- attempt is unsuccessful.
4542- TODO: Clarify what happens if there are no more allowed retries after the current attempt.
4543-
4544- It returns success if the requested activity is already closed.
4545- TODO: This ^^ is copied from RequestCancelWorkflowExecution, do we want to preserve this behavior?
4558+ Cancellation is cooperative: this call records the request, but the activity must detect and
4559+ acknowledge it for the activity to reach CANCELED status. The cancellation signal is
4560+ delivered via `cancel_requested` in the heartbeat response; SDKs surface this via
4561+ language-idiomatic mechanisms (context cancellation, exceptions, abort signals).
45464562 operationId: RequestCancelActivityExecution
45474563 parameters:
45484564 - name: namespace
@@ -4619,7 +4635,7 @@ paths:
46194635 TerminateActivityExecution terminates an existing activity execution immediately.
46204636
46214637 Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a
4622- running attempt and will be requested to be canceled by the server when it heartbeats .
4638+ running attempt.
46234639 operationId: TerminateActivityExecution
46244640 parameters:
46254641 - name: namespace
@@ -4655,7 +4671,7 @@ paths:
46554671 get:
46564672 tags:
46574673 - WorkflowService
4658- description: CountActivityExecutions is a visibility API to count of activity executions in a specific namespace.
4674+ description: CountActivityExecutions is a visibility API to count activity executions in a specific namespace.
46594675 operationId: CountActivityExecutions
46604676 parameters:
46614677 - name: namespace
@@ -7308,10 +7324,7 @@ components:
73087324 format: date-time
73097325 attempt:
73107326 type: integer
7311- description: |-
7312- The attempt this activity is currently on.
7313- Incremented each time a new attempt is started.
7314- TODO(dandavison): Confirm if this is on scheduled or started.
7327+ description: The attempt this activity is currently on. Incremented each time a new attempt is scheduled.
73157328 format: int32
73167329 executionDuration:
73177330 pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$
@@ -7368,6 +7381,9 @@ components:
73687381 stateTransitionCount:
73697382 type: string
73707383 description: Incremented each time the activity's state is mutated in persistence.
7384+ stateSizeBytes:
7385+ type: string
7386+ description: Updated once on scheduled and once on terminal status.
73717387 searchAttributes:
73727388 $ref: '#/components/schemas/SearchAttributes'
73737389 header:
@@ -9867,23 +9883,11 @@ components:
98679883 $ref: '#/components/schemas/Link_WorkflowEvent'
98689884 batchJob:
98699885 $ref: '#/components/schemas/Link_BatchJob'
9870- activity:
9871- $ref: '#/components/schemas/Link_Activity'
98729886 description: |-
98739887 Link can be associated with history events. It might contain information about an external entity
98749888 related to the history event. For example, workflow A makes a Nexus call that starts workflow B:
98759889 in this case, a history event in workflow A could contain a Link to the workflow started event in
98769890 workflow B, and vice-versa.
9877- Link_Activity:
9878- type: object
9879- properties:
9880- namespace:
9881- type: string
9882- activityId:
9883- type: string
9884- runId:
9885- type: string
9886- description: A link to an activity.
98879891 Link_BatchJob:
98889892 type: object
98899893 properties:
@@ -13048,8 +13052,14 @@ components:
1304813052 description: A unique identifier for this start request. Typically UUIDv4.
1304913053 activityId:
1305013054 type: string
13055+ description: |-
13056+ Identifier for this activity. Required. This identifier should be meaningful in the user's
13057+ own system. It must be unique among activities in the same namespace, subject to the rules
13058+ imposed by id_reuse_policy and id_conflict_policy.
1305113059 activityType:
13052- $ref: '#/components/schemas/ActivityType'
13060+ allOf:
13061+ - $ref: '#/components/schemas/ActivityType'
13062+ description: The type of the activity, a string that corresponds to a registered activity on a worker.
1305313063 taskQueue:
1305413064 allOf:
1305513065 - $ref: '#/components/schemas/TaskQueue'
0 commit comments