Skip to main content

Class: ActivityResult

coresdk.activity_result.ActivityResult

Used to report activity completion to core and to resolve the activity in a workflow activation

Implements#

Constructors#

constructor#

new ActivityResult(properties?)

Constructs a new ActivityResult.

Parameters#

NameType
properties?IActivityResult

Properties#

cancelled#

Optional cancelled: null | ICancellation

ActivityResult cancelled.

Implementation of#

IActivityResult.cancelled


completed#

Optional completed: null | ISuccess

ActivityResult completed.

Implementation of#

IActivityResult.completed


failed#

Optional failed: null | IFailure

ActivityResult failed.

Implementation of#

IActivityResult.failed


status#

Optional status: "completed" | "failed" | "cancelled"

ActivityResult status.

Methods#

toJSON#

toJSON(): Object

Converts this ActivityResult to JSON.

Returns#

Object

JSON object


decode#

Static decode(reader, length?): ActivityResult

Decodes an ActivityResult 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#

ActivityResult

ActivityResult


decodeDelimited#

Static decodeDelimited(reader): ActivityResult

Decodes an ActivityResult 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#

ActivityResult

ActivityResult


encode#

Static encode(message, writer?): Writer

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

Parameters#

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

Returns#

Writer

Writer


encodeDelimited#

Static encodeDelimited(message, writer?): Writer

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

Parameters#

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

Returns#

Writer

Writer


fromObject#

Static fromObject(object): ActivityResult

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

Parameters#

NameTypeDescription
objectObjectPlain object

Returns#

ActivityResult

ActivityResult


toObject#

Static toObject(message, options?): Object

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

Parameters#

NameTypeDescription
messageActivityResultActivityResult
options?IConversionOptions-

Returns#

Object

Plain object