Skip to main content

Class: ScheduleLocalActivity

Represents a ScheduleLocalActivity.

Properties​

activityId​

activityId: string

ScheduleLocalActivity activityId.


activityType​

activityType: string

ScheduleLocalActivity activityType.


arguments​

arguments: $Properties[]

Arguments/input to the activity.


attempt​

attempt: number

Local activities can start with a non-1 attempt, if lang has been told to backoff using a timer before retrying. It should pass the attempt number from a DoBackoff activity resolution.


cancellationType​

cancellationType: ActivityCancellationType

Defines how the workflow will wait (or not) for cancellation of the activity to be confirmed. Lang should default this to WAIT_CANCELLATION_COMPLETED, even though proto will default to TRY_CANCEL automatically.


headers​

headers: object

ScheduleLocalActivity headers.

Index Signature​

[k: string]: $Properties


includeArgumentsInMarker​

includeArgumentsInMarker: boolean

If set, the local activity arguments will be included in the resulting marker under the input key. This is disabled by default to avoid increasing history size unless the lang SDK explicitly chooses to expose it.


localRetryThreshold?​

optional localRetryThreshold?: $Properties | null

If the activity is retrying and backoff would exceed this value, lang will be told to schedule a timer and retry the activity after. Otherwise, backoff will happen internally in core. Defaults to 1 minute.


originalScheduleTime?​

optional originalScheduleTime?: $Properties | null

If this local activity is a retry (as per the attempt field) this needs to be the original scheduling time (as provided in DoBackoff)


retryPolicy?​

optional retryPolicy?: $Properties | null

Specify a retry policy for the local activity. By default local activities will be retried indefinitely.


scheduleToCloseTimeout?​

optional scheduleToCloseTimeout?: $Properties | null

Indicates how long the caller is willing to wait for local activity completion. Limits how long retries will be attempted. When not specified defaults to the workflow execution timeout (which may be unset).


scheduleToStartTimeout?​

optional scheduleToStartTimeout?: $Properties | null

Limits time the local activity can idle internally before being executed. That can happen if the worker is currently at max concurrent local activity executions. This timeout is always non retryable as all a retry would achieve is to put it back into the same queue. Defaults to schedule_to_close_timeout if not specified and that is set. Must be <= schedule_to_close_timeout when set, otherwise, it will be clamped down.


seq​

seq: number

Lang's incremental sequence number, used as the operation identifier


startToCloseTimeout?​

optional startToCloseTimeout?: $Properties | null

Maximum time the local activity is allowed to execute after the task is dispatched. This timeout is always retryable. Either or both of schedule_to_close_timeout and this must be specified. If set, this must be <= schedule_to_close_timeout, otherwise, it will be clamped down.

Methods​

toJSON()​

toJSON(): object

Converts this ScheduleLocalActivity to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): ScheduleLocalActivity & $Properties

Creates a new ScheduleLocalActivity instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

ScheduleLocalActivity & $Properties

ScheduleLocalActivity instance

Call Signature​

static create(properties?): ScheduleLocalActivity

Creates a new ScheduleLocalActivity instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

ScheduleLocalActivity

ScheduleLocalActivity instance


decode()​

static decode(reader, length?): ScheduleLocalActivity & $Properties

Decodes a ScheduleLocalActivity message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

ScheduleLocalActivity & $Properties

ScheduleLocalActivity

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): ScheduleLocalActivity & $Properties

Decodes a ScheduleLocalActivity message from the specified reader or buffer, length delimited.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

ScheduleLocalActivity & $Properties

ScheduleLocalActivity

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified ScheduleLocalActivity message. Does not implicitly coresdk.workflow_commands.ScheduleLocalActivity.verify|verify messages.

Parameters​

message​

$Properties

ScheduleLocalActivity message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified ScheduleLocalActivity message, length delimited. Does not implicitly coresdk.workflow_commands.ScheduleLocalActivity.verify|verify messages.

Parameters​

message​

$Properties

ScheduleLocalActivity message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): ScheduleLocalActivity

Creates a ScheduleLocalActivity message from a plain object. Also converts values to their respective internal types.

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

ScheduleLocalActivity

ScheduleLocalActivity


toObject()​

static toObject(message, options?): object

Creates a plain object from a ScheduleLocalActivity message. Also converts values to other types if specified.

Parameters​

message​

ScheduleLocalActivity

ScheduleLocalActivity

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object