Class: Command
Represents a Command.
Properties
attributes?
optionalattributes?:"scheduleActivityTaskCommandAttributes"|"startTimerCommandAttributes"|"completeWorkflowExecutionCommandAttributes"|"failWorkflowExecutionCommandAttributes"|"requestCancelActivityTaskCommandAttributes"|"cancelTimerCommandAttributes"|"cancelWorkflowExecutionCommandAttributes"|"requestCancelExternalWorkflowExecutionCommandAttributes"|"recordMarkerCommandAttributes"|"continueAsNewWorkflowExecutionCommandAttributes"|"startChildWorkflowExecutionCommandAttributes"|"signalExternalWorkflowExecutionCommandAttributes"|"upsertWorkflowSearchAttributesCommandAttributes"|"protocolMessageCommandAttributes"|"modifyWorkflowPropertiesCommandAttributes"|"scheduleNexusOperationCommandAttributes"|"requestCancelNexusOperationCommandAttributes"
The command details. The type must match that in command_type.
cancelTimerCommandAttributes?
optionalcancelTimerCommandAttributes?:$Properties|null
Command cancelTimerCommandAttributes.
cancelWorkflowExecutionCommandAttributes?
optionalcancelWorkflowExecutionCommandAttributes?:$Properties|null
Command cancelWorkflowExecutionCommandAttributes.
commandType
commandType:
CommandType
Command commandType.
completeWorkflowExecutionCommandAttributes?
optionalcompleteWorkflowExecutionCommandAttributes?:$Properties|null
Command completeWorkflowExecutionCommandAttributes.
continueAsNewWorkflowExecutionCommandAttributes?
optionalcontinueAsNewWorkflowExecutionCommandAttributes?:$Properties|null
Command continueAsNewWorkflowExecutionCommandAttributes.
eventGroupMarkers
eventGroupMarkers:
$Properties[]
Event Group Markers attached to the command by the workflow author.
failWorkflowExecutionCommandAttributes?
optionalfailWorkflowExecutionCommandAttributes?:$Properties|null
Command failWorkflowExecutionCommandAttributes.
modifyWorkflowPropertiesCommandAttributes?
optionalmodifyWorkflowPropertiesCommandAttributes?:$Properties|null
16 is available for use - it was used as part of a prototype that never made it into a release
protocolMessageCommandAttributes?
optionalprotocolMessageCommandAttributes?:$Properties|null
Command protocolMessageCommandAttributes.
recordMarkerCommandAttributes?
optionalrecordMarkerCommandAttributes?:$Properties|null
Command recordMarkerCommandAttributes.
requestCancelActivityTaskCommandAttributes?
optionalrequestCancelActivityTaskCommandAttributes?:$Properties|null
Command requestCancelActivityTaskCommandAttributes.
requestCancelExternalWorkflowExecutionCommandAttributes?
optionalrequestCancelExternalWorkflowExecutionCommandAttributes?:$Properties|null
Command requestCancelExternalWorkflowExecutionCommandAttributes.
requestCancelNexusOperationCommandAttributes?
optionalrequestCancelNexusOperationCommandAttributes?:$Properties|null
Command requestCancelNexusOperationCommandAttributes.
scheduleActivityTaskCommandAttributes?
optionalscheduleActivityTaskCommandAttributes?:$Properties|null
Command scheduleActivityTaskCommandAttributes.
scheduleNexusOperationCommandAttributes?
optionalscheduleNexusOperationCommandAttributes?:$Properties|null
Command scheduleNexusOperationCommandAttributes.
signalExternalWorkflowExecutionCommandAttributes?
optionalsignalExternalWorkflowExecutionCommandAttributes?:$Properties|null
Command signalExternalWorkflowExecutionCommandAttributes.
startChildWorkflowExecutionCommandAttributes?
optionalstartChildWorkflowExecutionCommandAttributes?:$Properties|null
Command startChildWorkflowExecutionCommandAttributes.
startTimerCommandAttributes?
optionalstartTimerCommandAttributes?:$Properties|null
Command startTimerCommandAttributes.
upsertWorkflowSearchAttributesCommandAttributes?
optionalupsertWorkflowSearchAttributesCommandAttributes?:$Properties|null
Command upsertWorkflowSearchAttributesCommandAttributes.
userMetadata?
optionaluserMetadata?:$Properties|null
Metadata on the command. This is sometimes carried over to the history event if one is created as a result of the command. Most commands won't have this information, and how this information is used is dependent upon the interface that reads it.
Current well-known uses:
- start_child_workflow_execution_command_attributes - populates temporal.api.workflow.v1.WorkflowExecutionInfo.user_metadata where the summary and details are used by user interfaces to show fixed as-of-start workflow summary and details.
- start_timer_command_attributes - populates temporal.api.history.v1.HistoryEvent for timer started where the summary is used to identify the timer.
Methods
toJSON()
toJSON():
object
Converts this Command to JSON.
Returns
object
JSON object
create()
Call Signature
staticcreate(properties?):Command&$Shape
Creates a new Command instance using the specified properties.
Parameters
properties?
Properties to set
Returns
Command & $Shape
Command instance
Call Signature
staticcreate(properties?):Command
Creates a new Command instance using the specified properties.
Parameters
properties?
Properties to set
Returns
Command
Command instance
decode()
staticdecode(reader,length?):Command&$Shape
Decodes a Command 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
Command & $Shape
Command
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited()
staticdecodeDelimited(reader):Command&$Shape
Decodes a Command message from the specified reader or buffer, length delimited.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
Returns
Command & $Shape
Command
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 Command message. Does not implicitly temporal.api.command.v1.Command.verify|verify messages.
Parameters
message
Command message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(message,writer?):Writer
Encodes the specified Command message, length delimited. Does not implicitly temporal.api.command.v1.Command.verify|verify messages.
Parameters
message
Command message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(object):Command
Creates a Command message from a plain object. Also converts values to their respective internal types.
Parameters
object
Plain object
Returns
Command
Command
toObject()
statictoObject(message,options?):object
Creates a plain object from a Command message. Also converts values to other types if specified.
Parameters
message
Command
Command
options?
IConversionOptions
Conversion options
Returns
object
Plain object