Class: DoUpdate
coresdk.workflow_activation.DoUpdate
Lang is requested to invoke an update handler on the workflow. Lang should invoke the update
validator first (if requested). If it accepts the update, immediately invoke the update handler.
Lang must reply to the activation containing this job with an UpdateResponse
.
Implements
Constructors
constructor
• new DoUpdate(properties?
): DoUpdate
Constructs a new DoUpdate.
Parameters
Name | Type | Description |
---|---|---|
properties? | IDoUpdate | Properties to set |
Returns
Properties
headers
• headers: Object
Headers attached to the update
Index signature
▪ [k: string
]: IPayload
Implementation of
id
• id: string
A workflow-unique identifier for this update
Implementation of
input
• input: IPayload
[]
The input to the update
Implementation of
meta
• Optional
meta: null
| IMeta
Remaining metadata associated with the update. The update_id
field is stripped from here
and moved to id
, since it is guaranteed to be present.
Implementation of
name
• name: string
The name of the update handler
Implementation of
protocolInstanceId
• protocolInstanceId: string
The protocol message instance ID - this is used to uniquely track the ID server side and internally.
Implementation of
runValidator
• runValidator: boolean
If set true, lang must run the update's validator before running the handler. This will be set false during replay, since validation is not re-run during replay.
Implementation of
Methods
toJSON
▸ toJSON(): Object
Converts this DoUpdate to JSON.
Returns
Object
JSON object
create
▸ create(properties?
): DoUpdate
Creates a new DoUpdate instance using the specified properties.
Parameters
Name | Type | Description |
---|---|---|
properties? | IDoUpdate | Properties to set |
Returns
DoUpdate instance
decode
▸ decode(reader
, length?
): DoUpdate
Decodes a DoUpdate 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
DoUpdate
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader
): DoUpdate
Decodes a DoUpdate message from the specified reader or buffer, length delimited.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
DoUpdate
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 DoUpdate message. Does not implicitly coresdk.workflow_activation.DoUpdate.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | IDoUpdate | DoUpdate message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message
, writer?
): Writer
Encodes the specified DoUpdate message, length delimited. Does not implicitly coresdk.workflow_activation.DoUpdate.verify|verify messages.
Parameters
Name | Type | Description |
---|---|---|
message | IDoUpdate | DoUpdate message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object
): DoUpdate
Creates a DoUpdate message from a plain object. Also converts values to their respective internal types.
Parameters
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
DoUpdate
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?
): string
Gets the default type url for DoUpdate
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 DoUpdate message. Also converts values to other types if specified.
Parameters
Name | Type | Description |
---|---|---|
message | DoUpdate | DoUpdate |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object