Skip to main content

Class: Failure

coresdk.child_workflow.Failure

Used in ChildWorkflowResult to report non successful outcomes such as application failures, timeouts, terminations, and cancellations.

Implements

Constructors

constructor

new Failure(properties?)

Constructs a new Failure.

Parameters

NameType
properties?IFailure

Properties

failure

Optional failure: null | IFailure

Failure failure.

Implementation of

IFailure.failure

Methods

toJSON

toJSON(): Object

Converts this Failure to JSON.

Returns

Object

JSON object


create

Static create(properties?): Failure

Creates a new Failure instance using the specified properties.

Parameters

NameType
properties?IFailure

Returns

Failure

Failure instance


decode

Static decode(reader, length?): Failure

Decodes a Failure message from the specified reader or buffer.

throws {Error} If the payload is not a reader or valid buffer

throws {$protobuf.util.ProtocolError} If required fields are missing

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?number-

Returns

Failure

Failure


decodeDelimited

Static decodeDelimited(reader): Failure

Decodes a Failure message from the specified reader or buffer, length delimited.

throws {Error} If the payload is not a reader or valid buffer

throws {$protobuf.util.ProtocolError} If required fields are missing

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

Failure

Failure


encode

Static encode(message, writer?): Writer

Encodes the specified Failure message. Does not implicitly {@link coresdk.child_workflow.Failure.verify|verify} messages.

Parameters

NameTypeDescription
messageIFailureFailure message or plain object to encode
writer?Writer-

Returns

Writer

Writer


encodeDelimited

Static encodeDelimited(message, writer?): Writer

Encodes the specified Failure message, length delimited. Does not implicitly {@link coresdk.child_workflow.Failure.verify|verify} messages.

Parameters

NameTypeDescription
messageIFailureFailure message or plain object to encode
writer?Writer-

Returns

Writer

Writer


fromObject

Static fromObject(object): Failure

Creates a Failure message from a plain object. Also converts values to their respective internal types.

Parameters

NameTypeDescription
objectObjectPlain object

Returns

Failure

Failure


toObject

Static toObject(message, options?): Object

Creates a plain object from a Failure message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageFailureFailure
options?IConversionOptions-

Returns

Object

Plain object