Skip to main content

Class: InitializeWorkflow

coresdk.workflow_activation.InitializeWorkflow

Initialize a new workflow

Implements

Constructors

constructor

new InitializeWorkflow(properties?): InitializeWorkflow

Constructs a new InitializeWorkflow.

Parameters

NameTypeDescription
properties?IInitializeWorkflowProperties to set

Returns

InitializeWorkflow

Properties

arguments

arguments: IPayload[]

Inputs to the workflow code

Implementation of

IInitializeWorkflow.arguments


attempt

attempt: number

Starting at 1, the number of times we have tried to execute this workflow

Implementation of

IInitializeWorkflow.attempt


continuedFailure

Optional continuedFailure: null | IFailure

If this workflow was a continuation and that continuation failed, the details of that.

Implementation of

IInitializeWorkflow.continuedFailure


continuedFromExecutionRunId

continuedFromExecutionRunId: string

Run id of the previous workflow which continued-as-new or retired or cron executed into this workflow, if any.

Implementation of

IInitializeWorkflow.continuedFromExecutionRunId


continuedInitiator

continuedInitiator: ContinueAsNewInitiator

If this workflow was a continuation, indicates the type of continuation.

Implementation of

IInitializeWorkflow.continuedInitiator


cronSchedule

cronSchedule: string

If this workflow runs on a cron schedule, it will appear here

Implementation of

IInitializeWorkflow.cronSchedule


cronScheduleToScheduleInterval

Optional cronScheduleToScheduleInterval: null | IDuration

For a cron workflow, this contains the amount of time between when this iteration of the cron workflow was scheduled and when it should run next per its cron_schedule.

Implementation of

IInitializeWorkflow.cronScheduleToScheduleInterval


firstExecutionRunId

firstExecutionRunId: string

This is the very first run id the workflow ever had, following continuation chains.

Implementation of

IInitializeWorkflow.firstExecutionRunId


headers

headers: Object

Used to add metadata e.g. for tracing and auth, meant to be read and written to by interceptors.

Index signature

▪ [k: string]: IPayload

Implementation of

IInitializeWorkflow.headers


identity

identity: string

Identity of the client who requested this execution

Implementation of

IInitializeWorkflow.identity


lastCompletionResult

Optional lastCompletionResult: null | IPayloads

If this workflow was a continuation and that continuation completed, the details of that.

Implementation of

IInitializeWorkflow.lastCompletionResult


memo

Optional memo: null | IMemo

User-defined memo

Implementation of

IInitializeWorkflow.memo


parentWorkflowInfo

Optional parentWorkflowInfo: null | INamespacedWorkflowExecution

If this workflow is a child, information about the parent

Implementation of

IInitializeWorkflow.parentWorkflowInfo


randomnessSeed

randomnessSeed: Long

The seed must be used to initialize the random generator used by SDK. RandomSeedUpdatedAttributes are used to deliver seed updates.

Implementation of

IInitializeWorkflow.randomnessSeed


retryPolicy

Optional retryPolicy: null | IRetryPolicy

This workflow's retry policy

Implementation of

IInitializeWorkflow.retryPolicy


searchAttributes

Optional searchAttributes: null | ISearchAttributes

Search attributes created/updated when this workflow was started

Implementation of

IInitializeWorkflow.searchAttributes


startTime

Optional startTime: null | ITimestamp

When the workflow execution started event was first written

Implementation of

IInitializeWorkflow.startTime


workflowExecutionExpirationTime

Optional workflowExecutionExpirationTime: null | ITimestamp

The absolute time at which the workflow will be timed out. This is passed without change to the next run/retry of a workflow.

Implementation of

IInitializeWorkflow.workflowExecutionExpirationTime


workflowExecutionTimeout

Optional workflowExecutionTimeout: null | IDuration

Total workflow execution timeout including retries and continue as new.

Implementation of

IInitializeWorkflow.workflowExecutionTimeout


workflowId

workflowId: string

The workflow id used on the temporal server

Implementation of

IInitializeWorkflow.workflowId


workflowRunTimeout

Optional workflowRunTimeout: null | IDuration

Timeout of a single workflow run.

Implementation of

IInitializeWorkflow.workflowRunTimeout


workflowTaskTimeout

Optional workflowTaskTimeout: null | IDuration

Timeout of a single workflow task.

Implementation of

IInitializeWorkflow.workflowTaskTimeout


workflowType

workflowType: string

The identifier the lang-specific sdk uses to execute workflow code

Implementation of

IInitializeWorkflow.workflowType

Methods

toJSON

toJSON(): Object

Converts this InitializeWorkflow to JSON.

Returns

Object

JSON object


create

create(properties?): InitializeWorkflow

Creates a new InitializeWorkflow instance using the specified properties.

Parameters

NameTypeDescription
properties?IInitializeWorkflowProperties to set

Returns

InitializeWorkflow

InitializeWorkflow instance


decode

decode(reader, length?): InitializeWorkflow

Decodes an InitializeWorkflow message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

InitializeWorkflow

InitializeWorkflow

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): InitializeWorkflow

Decodes an InitializeWorkflow message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

InitializeWorkflow

InitializeWorkflow

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 InitializeWorkflow message. Does not implicitly coresdk.workflow_activation.InitializeWorkflow.verify|verify messages.

Parameters

NameTypeDescription
messageIInitializeWorkflowInitializeWorkflow message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified InitializeWorkflow message, length delimited. Does not implicitly coresdk.workflow_activation.InitializeWorkflow.verify|verify messages.

Parameters

NameTypeDescription
messageIInitializeWorkflowInitializeWorkflow message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): InitializeWorkflow

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

InitializeWorkflow

InitializeWorkflow


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for InitializeWorkflow

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageInitializeWorkflowInitializeWorkflow
options?IConversionOptionsConversion options

Returns

Object

Plain object