Interface: ActivityHandle<R>
client.ActivityHandle
Handle that can be used to perform operations on the associated Activity. Can be obtained by calling ActivityClient.start or ActivityClient.getHandle.
Type parameters
| Name | Type | Description |
|---|---|---|
R | any | Result type of the activity. Use ActivityClient.typed to start activities in a type-safe way. |
Properties
activityId
• Readonly activityId: string
ID of the Activity this handle refers to.
runId
• Optional Readonly runId: string
Run ID of the specific Activity execution this handle refers to. If empty, this handle refers to the latest execution of the Activity with given ID.
Methods
cancel
▸ cancel(reason): Promise<void>
Requests cancellation of the Activity execution. Note that cancellations are cooperative and not guaranteed to happen.
Parameters
| Name | Type |
|---|---|
reason | string |
Returns
Promise<void>
describe
▸ describe(options?): Promise<ActivityExecutionDescription>
Returns information about the Activity execution.
Parameters
| Name | Type |
|---|---|
options? | ActivityDescribeOptions |
Returns
Promise<ActivityExecutionDescription>
pause
▸ pause(options?): Promise<void>
Requests Activity execution pause. Note that pausing is cooperative and not guaranteed to happen.
Activity Operator Commands are experimental. APIs may be subject to change.
Parameters
| Name | Type |
|---|---|
options? | ActivityPauseOptions |
Returns
Promise<void>
restoreOriginalOptions
▸ restoreOriginalOptions(): Promise<ActivityOptionsUpdate>
Restores activity options of a running activity execution that it was originally started with.
Returns current options after restoring.
Activity Operator Commands are experimental. APIs may be subject to change.
Returns
Promise<ActivityOptionsUpdate>