Class: UpdateResponse
A reply to a DoUpdate job - lang must run the update's validator if told to, and then
immediately run the handler, if the update was accepted.
There must always be an accepted or rejected response immediately, in the same activation as this job, to indicate the result of the validator. Accepted for ran and accepted or skipped, or rejected for rejected.
Then, in the same or any subsequent activation, after the update handler has completed, respond with completed or rejected as appropriate for the result of the handler.
Properties
accepted?
optionalaccepted?:$Properties|null
Must be sent if the update's validator has passed (or lang was not asked to run it, and thus should be considered already-accepted, allowing lang to always send the same sequence on replay).
completed?
optionalcompleted?:$Properties|null
Must be sent once the update handler completes successfully.
protocolInstanceId
protocolInstanceId:
string
The protocol message instance ID
rejected?
optionalrejected?:$Properties|null
Must be sent if the update's validator does not pass, or after acceptance if the update handler fails.
response?
optionalresponse?:"completed"|"accepted"|"rejected"
UpdateResponse response.
Methods
toJSON()
toJSON():
object
Converts this UpdateResponse to JSON.
Returns
object
JSON object
create()
Call Signature
staticcreate(properties?):UpdateResponse&$Shape
Creates a new UpdateResponse instance using the specified properties.
Parameters
properties?
Properties to set
Returns
UpdateResponse & $Shape
UpdateResponse instance
Call Signature
staticcreate(properties?):UpdateResponse
Creates a new UpdateResponse instance using the specified properties.
Parameters
properties?
Properties to set
Returns
UpdateResponse
UpdateResponse instance
decode()
staticdecode(reader,length?):UpdateResponse&$Shape
Decodes an UpdateResponse 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
UpdateResponse & $Shape
UpdateResponse
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited()
staticdecodeDelimited(reader):UpdateResponse&$Shape
Decodes an UpdateResponse message from the specified reader or buffer, length delimited.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
Returns
UpdateResponse & $Shape
UpdateResponse
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 UpdateResponse message. Does not implicitly coresdk.workflow_commands.UpdateResponse.verify|verify messages.
Parameters
message
UpdateResponse message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(message,writer?):Writer
Encodes the specified UpdateResponse message, length delimited. Does not implicitly coresdk.workflow_commands.UpdateResponse.verify|verify messages.
Parameters
message
UpdateResponse message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(object):UpdateResponse
Creates an UpdateResponse message from a plain object. Also converts values to their respective internal types.
Parameters
object
{[k: string]: any; }
Plain object
Returns
UpdateResponse
UpdateResponse
toObject()
statictoObject(message,options?):object
Creates a plain object from an UpdateResponse message. Also converts values to other types if specified.
Parameters
message
UpdateResponse
UpdateResponse
options?
IConversionOptions
Conversion options
Returns
object
Plain object