Class: StartActivityExecutionRequest
Represents a StartActivityExecutionRequest.
Properties
activityId
activityId:
string
Identifier for this activity. Required. This identifier should be meaningful in the user's own system. It must be unique among activities in the same namespace, subject to the rules imposed by id_reuse_policy and id_conflict_policy.
activityType?
optionalactivityType?:$Properties|null
The type of the activity, a string that corresponds to a registered activity on a worker.
completionCallbacks
completionCallbacks:
$Properties[]
Callbacks to be called by the server when this activity reaches a terminal state. Callback addresses must be whitelisted in the server's dynamic configuration.
header?
optionalheader?:$Properties|null
Header for context propagation and tracing purposes.
heartbeatTimeout?
optionalheartbeatTimeout?:$Properties|null
Maximum permitted time between successful worker heartbeats.
idConflictPolicy
idConflictPolicy:
ActivityIdConflictPolicy
Defines how to resolve an activity id conflict with a running activity. The default policy is ACTIVITY_ID_CONFLICT_POLICY_FAIL.
identity
identity:
string
The identity of the client who initiated this request
idReusePolicy
idReusePolicy:
ActivityIdReusePolicy
Defines whether to allow re-using the activity id from a previously closed activity. The default policy is ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE.
input?
optionalinput?:$Properties|null
Serialized arguments to the activity. These are passed as arguments to the activity function.
links
links:
$Properties[]
Links to be associated with the activity. Callbacks may also have associated links; links already included with a callback should not be duplicated here.
namespace
namespace:
string
StartActivityExecutionRequest namespace.
onConflictOptions?
optionalonConflictOptions?:$Properties|null
Options for handling conflicts when using ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING.
priority?
optionalpriority?:$Properties|null
Priority metadata.
propagatedNexusSerializationContext?
optionalpropagatedNexusSerializationContext?:$Properties|null
Serialization context propagated from the Nexus caller that started this activity.
requestEagerExecution
requestEagerExecution:
boolean
Request that the first activity task be returned directly in the start response instead of being dispatched through a task queue. If set to true, the caller is expected to have a worker available and capable of processing the task. The returned task will be marked as started. The server may ignore this request.
requestId
requestId:
string
A unique identifier for this start request. Typically UUIDv4.
retryPolicy?
optionalretryPolicy?:$Properties|null
The retry policy for the activity. Will never exceed schedule_to_close_timeout.
scheduleToCloseTimeout?
optionalscheduleToCloseTimeout?:$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 must be specified.
(-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --)
scheduleToStartTimeout?
optionalscheduleToStartTimeout?:$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 if not specified.
(-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --)
searchAttributes?
optionalsearchAttributes?:$Properties|null
Search attributes for indexing.
startDelay?
optionalstartDelay?:$Properties|null
Time to wait before making the first activity task available for dispatch. This delay is not applied to retry attempts.
startToCloseTimeout?
optionalstartToCloseTimeout?:$Properties|null
Maximum time an activity is allowed to execute after being picked up by a worker. This
timeout is always retryable. Either this or schedule_to_close_timeout must be
specified.
(-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: "to" is used to indicate interval. --)
taskQueue?
optionaltaskQueue?:$Properties|null
Task queue to schedule this activity on.
userMetadata?
optionaluserMetadata?:$Properties|null
Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity.
Methods
toJSON()
toJSON():
object
Converts this StartActivityExecutionRequest to JSON.
Returns
object
JSON object
create()
Call Signature
staticcreate(properties?):StartActivityExecutionRequest&$Shape
Creates a new StartActivityExecutionRequest instance using the specified properties.
Parameters
properties?
Properties to set
Returns
StartActivityExecutionRequest & $Shape
StartActivityExecutionRequest instance
Call Signature
staticcreate(properties?):StartActivityExecutionRequest
Creates a new StartActivityExecutionRequest instance using the specified properties.
Parameters
properties?
Properties to set
Returns
StartActivityExecutionRequest
StartActivityExecutionRequest instance
decode()
staticdecode(reader,length?):StartActivityExecutionRequest&$Shape
Decodes a StartActivityExecutionRequest 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
StartActivityExecutionRequest & $Shape
StartActivityExecutionRequest
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited()
staticdecodeDelimited(reader):StartActivityExecutionRequest&$Shape
Decodes a StartActivityExecutionRequest message from the specified reader or buffer, length delimited.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
Returns
StartActivityExecutionRequest & $Shape
StartActivityExecutionRequest
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 StartActivityExecutionRequest message. Does not implicitly temporal.api.workflowservice.v1.StartActivityExecutionRequest.verify|verify messages.
Parameters
message
StartActivityExecutionRequest message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(message,writer?):Writer
Encodes the specified StartActivityExecutionRequest message, length delimited. Does not implicitly temporal.api.workflowservice.v1.StartActivityExecutionRequest.verify|verify messages.
Parameters
message
StartActivityExecutionRequest message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(object):StartActivityExecutionRequest
Creates a StartActivityExecutionRequest message from a plain object. Also converts values to their respective internal types.
Parameters
object
Plain object
Returns
StartActivityExecutionRequest
StartActivityExecutionRequest
toObject()
statictoObject(message,options?):object
Creates a plain object from a StartActivityExecutionRequest message. Also converts values to other types if specified.
Parameters
message
StartActivityExecutionRequest
StartActivityExecutionRequest
options?
IConversionOptions
Conversion options
Returns
object
Plain object