Skip to main content

Class: ScheduleLocalActivity

coresdk.workflow_commands.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: null | $Properties

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: null | $Properties

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: null | $Properties

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


scheduleToCloseTimeout​

• Optional scheduleToCloseTimeout: null | $Properties

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: null | $Properties

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: null | $Properties

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​

▸ create(properties?): ScheduleLocalActivity & $Properties

Creates a new ScheduleLocalActivity instance using the specified properties.

Parameters​

NameTypeDescription
properties?$PropertiesProperties to set

Returns​

ScheduleLocalActivity & $Properties

ScheduleLocalActivity instance

▸ create(properties?): ScheduleLocalActivity

Parameters​

NameType
properties?$Properties

Returns​

ScheduleLocalActivity


decode​

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

Decodes a ScheduleLocalActivity message from the specified reader or buffer.

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage 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​

▸ decodeDelimited(reader): ScheduleLocalActivity & $Properties

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

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader 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​

▸ encode(message, writer?): Writer

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

Parameters​

NameTypeDescription
message$PropertiesScheduleLocalActivity message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


encodeDelimited​

▸ encodeDelimited(message, writer?): Writer

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

Parameters​

NameTypeDescription
message$PropertiesScheduleLocalActivity message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


fromObject​

▸ fromObject(object): ScheduleLocalActivity

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

Parameters​

NameTypeDescription
objectObjectPlain object

Returns​

ScheduleLocalActivity

ScheduleLocalActivity


toObject​

▸ toObject(message, options?): Object

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

Parameters​

NameTypeDescription
messageScheduleLocalActivityScheduleLocalActivity
options?IConversionOptionsConversion options

Returns​

Object

Plain object