Class: ScheduleActivity
coresdk.workflow_commands.ScheduleActivity
Represents a ScheduleActivity.
Implements
Constructors
constructor
• new ScheduleActivity(properties?
): ScheduleActivity
Constructs a new ScheduleActivity.
Parameters
Name | Type | Description |
---|---|---|
properties? | IScheduleActivity | Properties to set |
Returns
Properties
activityId
• activityId: string
ScheduleActivity activityId.
Implementation of
activityType
• activityType: string
ScheduleActivity activityType.
Implementation of
IScheduleActivity.activityType
arguments
• arguments: IPayload
[]
Arguments/input to the activity. Called "input" upstream.
Implementation of
cancellationType
• cancellationType: ActivityCancellationType
Defines how the workflow will wait (or not) for cancellation of the activity to be confirmed
Implementation of
IScheduleActivity.cancellationType
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.
Implementation of
IScheduleActivity.doNotEagerlyExecute
headers
• headers: Object
ScheduleActivity headers.
Index signature
▪ [k: string
]: IPayload
Implementation of
heartbeatTimeout
• Optional
heartbeatTimeout: null
| IDuration
Maximum time allowed between successful worker heartbeats.
Implementation of
IScheduleActivity.heartbeatTimeout
retryPolicy
• Optional
retryPolicy: null
| IRetryPolicy
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.
Implementation of
scheduleToCloseTimeout
• Optional
scheduleToCloseTimeout: null
| IDuration
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.
Implementation of
IScheduleActivity.scheduleToCloseTimeout
scheduleToStartTimeout
• Optional
scheduleToStartTimeout: null
| IDuration
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.
Implementation of
IScheduleActivity.scheduleToStartTimeout
seq
• seq: number
Lang's incremental sequence number, used as the operation identifier
Implementation of
startToCloseTimeout
• Optional
startToCloseTimeout: null
| IDuration
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.
Implementation of
IScheduleActivity.startToCloseTimeout
taskQueue
• taskQueue: string
The name of the task queue to place this activity request in
Implementation of
versioningIntent
• versioningIntent: VersioningIntent
Whether this activity should run on a worker with a compatible build id or not.
Implementation of
IScheduleActivity.versioningIntent
Methods
toJSON
▸ toJSON(): Object
Converts this ScheduleActivity to JSON.
Returns
Object
JSON object
create
▸ create(properties?
): ScheduleActivity
Creates a new ScheduleActivity instance using the specified properties.
Parameters
Name | Type | Description |
---|---|---|
properties? | IScheduleActivity | Properties to set |
Returns
ScheduleActivity instance
decode
▸ decode(reader
, length?
): ScheduleActivity
Decodes a ScheduleActivity message from the specified reader or buffer.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
ScheduleActivity
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader
): ScheduleActivity
Decodes a ScheduleActivity message from the specified reader or buffer, length delimited.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
ScheduleActivity
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 ScheduleActivity message. Does not implicitly coresdk.workflow_commands.ScheduleActivity.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | IScheduleActivity | ScheduleActivity message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message
, writer?
): Writer
Encodes the specified ScheduleActivity message, length delimited. Does not implicitly coresdk.workflow_commands.ScheduleActivity.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | IScheduleActivity | ScheduleActivity message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object
): ScheduleActivity
Creates a ScheduleActivity message from a plain object. Also converts values to their respective internal types.
Parameters
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
ScheduleActivity
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?
): string
Gets the default type url for ScheduleActivity
Parameters
Name | Type | Description |
---|---|---|
typeUrlPrefix? | string | your custom typeUrlPrefix(default "type.googleapis.com") |
Returns
string
The default type url
toObject
▸ toObject(message
, options?
): Object
Creates a plain object from a ScheduleActivity message. Also converts values to other types if specified.
Parameters
Name | Type | Description |
---|---|---|
message | ScheduleActivity | ScheduleActivity |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object