Skip to main content

Class: ScheduleActivity

Represents a ScheduleActivity.

Properties​

activityId​

activityId: string

ScheduleActivity activityId.


activityType​

activityType: string

ScheduleActivity activityType.


arguments​

arguments: $Properties[]

Arguments/input to the activity. Called "input" upstream.


cancellationType​

cancellationType: ActivityCancellationType

Defines how the workflow will wait (or not) for cancellation of the activity to be confirmed


doNotEagerlyExecute​

doNotEagerlyExecute: boolean

If set, the worker will not tell the service that it can immediately start executing this activity. When unset/default, workers will always attempt to do so if activity execution slots are available.


headers​

headers: object

ScheduleActivity headers.

Index Signature​

[k: string]: $Properties


heartbeatTimeout?​

optional heartbeatTimeout?: $Properties | null

Maximum time allowed between successful worker heartbeats.


priority?​

optional priority?: $Properties | null

The Priority to use for this activity


retryPolicy?​

optional retryPolicy?: $Properties | null

Activities are provided by a default retry policy controlled through the service dynamic configuration. Retries are happening up to schedule_to_close_timeout. To disable retries set retry_policy.maximum_attempts to 1.


scheduleToCloseTimeout?​

optional scheduleToCloseTimeout?: $Properties | null

Indicates how long the caller is willing to wait for an activity completion. Limits how long retries will be attempted. Either this or start_to_close_timeout_seconds must be specified. When not specified defaults to the workflow execution timeout.


scheduleToStartTimeout?​

optional scheduleToStartTimeout?: $Properties | null

Limits time an activity task can stay in a task queue before a worker picks it up. 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 or workflow execution timeout if not specified.


seq​

seq: number

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


startToCloseTimeout?​

optional startToCloseTimeout?: $Properties | null

Maximum time an activity is allowed to execute after a pick up by a worker. This timeout is always retryable. Either this or schedule_to_close_timeout must be specified.


taskQueue​

taskQueue: string

The name of the task queue to place this activity request in


versioningIntent​

versioningIntent: VersioningIntent

Whether this activity should run on a worker with a compatible build id or not.

Methods​

toJSON()​

toJSON(): object

Converts this ScheduleActivity to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): ScheduleActivity & $Properties

Creates a new ScheduleActivity instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

ScheduleActivity & $Properties

ScheduleActivity instance

Call Signature​

static create(properties?): ScheduleActivity

Creates a new ScheduleActivity instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

ScheduleActivity

ScheduleActivity instance


decode()​

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

Decodes a ScheduleActivity 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​

ScheduleActivity & $Properties

ScheduleActivity

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): ScheduleActivity & $Properties

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

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

ScheduleActivity & $Properties

ScheduleActivity

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 ScheduleActivity message. Does not implicitly coresdk.workflow_commands.ScheduleActivity.verify|verify messages.

Parameters​

message​

$Properties

ScheduleActivity message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

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

Parameters​

message​

$Properties

ScheduleActivity message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): ScheduleActivity

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

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

ScheduleActivity

ScheduleActivity


toObject()​

static toObject(message, options?): object

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

Parameters​

message​

ScheduleActivity

ScheduleActivity

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object