Class: Command
Represents a Command.
Implements
Constructors
constructor
• new Command(properties?
): Command
Constructs a new Command.
Parameters
Name | Type | Description |
---|---|---|
properties? | ICommand | Properties to set |
Returns
Properties
attributes
• Optional
attributes: "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
• Optional
cancelTimerCommandAttributes: null
| ICancelTimerCommandAttributes
Command cancelTimerCommandAttributes.
Implementation of
ICommand.cancelTimerCommandAttributes
cancelWorkflowExecutionCommandAttributes
• Optional
cancelWorkflowExecutionCommandAttributes: null
| ICancelWorkflowExecutionCommandAttributes
Command cancelWorkflowExecutionCommandAttributes.
Implementation of
ICommand.cancelWorkflowExecutionCommandAttributes
commandType
• commandType: CommandType
Command commandType.
Implementation of
completeWorkflowExecutionCommandAttributes
• Optional
completeWorkflowExecutionCommandAttributes: null
| ICompleteWorkflowExecutionCommandAttributes
Command completeWorkflowExecutionCommandAttributes.
Implementation of
ICommand.completeWorkflowExecutionCommandAttributes
continueAsNewWorkflowExecutionCommandAttributes
• Optional
continueAsNewWorkflowExecutionCommandAttributes: null
| IContinueAsNewWorkflowExecutionCommandAttributes
Command continueAsNewWorkflowExecutionCommandAttributes.
Implementation of
ICommand.continueAsNewWorkflowExecutionCommandAttributes
failWorkflowExecutionCommandAttributes
• Optional
failWorkflowExecutionCommandAttributes: null
| IFailWorkflowExecutionCommandAttributes
Command failWorkflowExecutionCommandAttributes.
Implementation of
ICommand.failWorkflowExecutionCommandAttributes
modifyWorkflowPropertiesCommandAttributes
• Optional
modifyWorkflowPropertiesCommandAttributes: null
| IModifyWorkflowPropertiesCommandAttributes
16 is available for use - it was used as part of a prototype that never made it into a release
Implementation of
ICommand.modifyWorkflowPropertiesCommandAttributes
protocolMessageCommandAttributes
• Optional
protocolMessageCommandAttributes: null
| IProtocolMessageCommandAttributes
Command protocolMessageCommandAttributes.
Implementation of
ICommand.protocolMessageCommandAttributes
recordMarkerCommandAttributes
• Optional
recordMarkerCommandAttributes: null
| IRecordMarkerCommandAttributes
Command recordMarkerCommandAttributes.
Implementation of
ICommand.recordMarkerCommandAttributes
requestCancelActivityTaskCommandAttributes
• Optional
requestCancelActivityTaskCommandAttributes: null
| IRequestCancelActivityTaskCommandAttributes
Command requestCancelActivityTaskCommandAttributes.
Implementation of
ICommand.requestCancelActivityTaskCommandAttributes
requestCancelExternalWorkflowExecutionCommandAttributes
• Optional
requestCancelExternalWorkflowExecutionCommandAttributes: null
| IRequestCancelExternalWorkflowExecutionCommandAttributes
Command requestCancelExternalWorkflowExecutionCommandAttributes.
Implementation of
ICommand.requestCancelExternalWorkflowExecutionCommandAttributes
requestCancelNexusOperationCommandAttributes
• Optional
requestCancelNexusOperationCommandAttributes: null
| IRequestCancelNexusOperationCommandAttributes
Command requestCancelNexusOperationCommandAttributes.
Implementation of
ICommand.requestCancelNexusOperationCommandAttributes
scheduleActivityTaskCommandAttributes
• Optional
scheduleActivityTaskCommandAttributes: null
| IScheduleActivityTaskCommandAttributes
Command scheduleActivityTaskCommandAttributes.
Implementation of
ICommand.scheduleActivityTaskCommandAttributes
scheduleNexusOperationCommandAttributes
• Optional
scheduleNexusOperationCommandAttributes: null
| IScheduleNexusOperationCommandAttributes
Command scheduleNexusOperationCommandAttributes.
Implementation of
ICommand.scheduleNexusOperationCommandAttributes
signalExternalWorkflowExecutionCommandAttributes
• Optional
signalExternalWorkflowExecutionCommandAttributes: null
| ISignalExternalWorkflowExecutionCommandAttributes
Command signalExternalWorkflowExecutionCommandAttributes.
Implementation of
ICommand.signalExternalWorkflowExecutionCommandAttributes
startChildWorkflowExecutionCommandAttributes
• Optional
startChildWorkflowExecutionCommandAttributes: null
| IStartChildWorkflowExecutionCommandAttributes
Command startChildWorkflowExecutionCommandAttributes.
Implementation of
ICommand.startChildWorkflowExecutionCommandAttributes
startTimerCommandAttributes
• Optional
startTimerCommandAttributes: null
| IStartTimerCommandAttributes
Command startTimerCommandAttributes.
Implementation of
ICommand.startTimerCommandAttributes
upsertWorkflowSearchAttributesCommandAttributes
• Optional
upsertWorkflowSearchAttributesCommandAttributes: null
| IUpsertWorkflowSearchAttributesCommandAttributes
Command upsertWorkflowSearchAttributesCommandAttributes.
Implementation of
ICommand.upsertWorkflowSearchAttributesCommandAttributes
userMetadata
• Optional
userMetadata: null
| IUserMetadata
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.
Implementation of
Methods
toJSON
▸ toJSON(): Object
Converts this Command to JSON.
Returns
Object
JSON object
create
▸ create(properties?
): Command
Creates a new Command instance using the specified properties.
Parameters
Name | Type | Description |
---|---|---|
properties? | ICommand | Properties to set |
Returns
Command instance
decode
▸ decode(reader
, length?
): Command
Decodes a Command 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
Command
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader
): Command
Decodes a Command message from the specified reader or buffer, length delimited.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
Command
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 Command message. Does not implicitly temporal.api.command.v1.Command.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | ICommand | Command message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message
, writer?
): Writer
Encodes the specified Command message, length delimited. Does not implicitly temporal.api.command.v1.Command.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | ICommand | Command message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object
): Command
Creates a Command message from a plain object. Also converts values to their respective internal types.
Parameters
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
Command
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?
): string
Gets the default type url for Command
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 Command message. Also converts values to other types if specified.
Parameters
Name | Type | Description |
---|---|---|
message | Command | Command |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object