Class: ScheduleLocalActivity
coresdk.workflow_commands.ScheduleLocalActivity
Represents a ScheduleLocalActivity.
Implements
Constructors
constructor
• new ScheduleLocalActivity(properties?
): ScheduleLocalActivity
Constructs a new ScheduleLocalActivity.
Parameters
Name | Type | Description |
---|---|---|
properties? | IScheduleLocalActivity | Properties to set |
Returns
Properties
activityId
• activityId: string
ScheduleLocalActivity activityId.
Implementation of
IScheduleLocalActivity.activityId
activityType
• activityType: string
ScheduleLocalActivity activityType.
Implementation of
IScheduleLocalActivity.activityType
arguments
• arguments: IPayload
[]
Arguments/input to the activity.
Implementation of
IScheduleLocalActivity.arguments
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.
Implementation of
IScheduleLocalActivity.attempt
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.
Implementation of
IScheduleLocalActivity.cancellationType
headers
• headers: Object
ScheduleLocalActivity headers.
Index signature
▪ [k: string
]: IPayload
Implementation of
IScheduleLocalActivity.headers
localRetryThreshold
• Optional
localRetryThreshold: null
| IDuration
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.
Implementation of
IScheduleLocalActivity.localRetryThreshold
originalScheduleTime
• Optional
originalScheduleTime: null
| ITimestamp
If this local activity is a retry (as per the attempt field) this needs to be the original
scheduling time (as provided in DoBackoff
)
Implementation of
IScheduleLocalActivity.originalScheduleTime
retryPolicy
• Optional
retryPolicy: null
| IRetryPolicy
Specify a retry policy for the local activity. By default local activities will be retried indefinitely.
Implementation of
IScheduleLocalActivity.retryPolicy
scheduleToCloseTimeout
• Optional
scheduleToCloseTimeout: null
| IDuration
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).
Implementation of
IScheduleLocalActivity.scheduleToCloseTimeout
scheduleToStartTimeout
• Optional
scheduleToStartTimeout: null
| IDuration
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.
Implementation of
IScheduleLocalActivity.scheduleToStartTimeout
seq
• seq: number
Lang's incremental sequence number, used as the operation identifier
Implementation of
startToCloseTimeout
• Optional
startToCloseTimeout: null
| IDuration
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.
Implementation of
IScheduleLocalActivity.startToCloseTimeout
Methods
toJSON
▸ toJSON(): Object
Converts this ScheduleLocalActivity to JSON.
Returns
Object
JSON object
create
▸ create(properties?
): ScheduleLocalActivity
Creates a new ScheduleLocalActivity instance using the specified properties.
Parameters
Name | Type | Description |
---|---|---|
properties? | IScheduleLocalActivity | Properties to set |
Returns
ScheduleLocalActivity instance
decode
▸ decode(reader
, length?
): ScheduleLocalActivity
Decodes a ScheduleLocalActivity 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
ScheduleLocalActivity
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader
): ScheduleLocalActivity
Decodes a ScheduleLocalActivity message from the specified reader or buffer, length delimited.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
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
Name | Type | Description |
---|---|---|
message | IScheduleLocalActivity | ScheduleLocalActivity message or plain object to encode |
writer? | Writer | Writer 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
Name | Type | Description |
---|---|---|
message | IScheduleLocalActivity | ScheduleLocalActivity message or plain object to encode |
writer? | Writer | Writer 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
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
ScheduleLocalActivity
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?
): string
Gets the default type url for ScheduleLocalActivity
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 ScheduleLocalActivity message. Also converts values to other types if specified.
Parameters
Name | Type | Description |
---|---|---|
message | ScheduleLocalActivity | ScheduleLocalActivity |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object