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?
optionallocalRetryThreshold?:$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?
optionaloriginalScheduleTime?:$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?
optionalretryPolicy?:$Properties|null
Specify a retry policy for the local activity. By default local activities will be retried indefinitely.
scheduleToCloseTimeout?
optionalscheduleToCloseTimeout?:$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?
optionalscheduleToStartTimeout?:$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?
optionalstartToCloseTimeout?:$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
staticcreate(properties?):ScheduleLocalActivity&$Properties
Creates a new ScheduleLocalActivity instance using the specified properties.
Parameters
properties?
Properties to set
Returns
ScheduleLocalActivity & $Properties
ScheduleLocalActivity instance
Call Signature
staticcreate(properties?):ScheduleLocalActivity
Creates a new ScheduleLocalActivity instance using the specified properties.
Parameters
properties?
Properties to set
Returns
ScheduleLocalActivity
ScheduleLocalActivity instance
decode()
staticdecode(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()
staticdecodeDelimited(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()
staticencode(message,writer?):Writer
Encodes the specified ScheduleLocalActivity message. Does not implicitly coresdk.workflow_commands.ScheduleLocalActivity.verify|verify messages.
Parameters
message
ScheduleLocalActivity message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(message,writer?):Writer
Encodes the specified ScheduleLocalActivity message, length delimited. Does not implicitly coresdk.workflow_commands.ScheduleLocalActivity.verify|verify messages.
Parameters
message
ScheduleLocalActivity message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(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()
statictoObject(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