Skip to main content

Class: StartWorkflow

coresdk.workflow_activation.StartWorkflow

Start a new workflow

Implements

Constructors

constructor

new StartWorkflow(properties?): StartWorkflow

Constructs a new StartWorkflow.

Parameters

NameTypeDescription
properties?IStartWorkflowProperties to set

Returns

StartWorkflow

Properties

arguments

arguments: IPayload[]

Inputs to the workflow code

Implementation of

IStartWorkflow.arguments


attempt

attempt: number

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

Implementation of

IStartWorkflow.attempt


continuedFailure

Optional continuedFailure: null | IFailure

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

Implementation of

IStartWorkflow.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

IStartWorkflow.continuedFromExecutionRunId


continuedInitiator

continuedInitiator: ContinueAsNewInitiator

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

Implementation of

IStartWorkflow.continuedInitiator


cronSchedule

cronSchedule: string

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

Implementation of

IStartWorkflow.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

IStartWorkflow.cronScheduleToScheduleInterval


firstExecutionRunId

firstExecutionRunId: string

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

Implementation of

IStartWorkflow.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

IStartWorkflow.headers


identity

identity: string

Identity of the client who requested this execution

Implementation of

IStartWorkflow.identity


lastCompletionResult

Optional lastCompletionResult: null | IPayloads

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

Implementation of

IStartWorkflow.lastCompletionResult


memo

Optional memo: null | IMemo

User-defined memo

Implementation of

IStartWorkflow.memo


parentWorkflowInfo

Optional parentWorkflowInfo: null | INamespacedWorkflowExecution

If this workflow is a child, information about the parent

Implementation of

IStartWorkflow.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

IStartWorkflow.randomnessSeed


retryPolicy

Optional retryPolicy: null | IRetryPolicy

This workflow's retry policy

Implementation of

IStartWorkflow.retryPolicy


searchAttributes

Optional searchAttributes: null | ISearchAttributes

Search attributes created/updated when this workflow was started

Implementation of

IStartWorkflow.searchAttributes


startTime

Optional startTime: null | ITimestamp

When the workflow execution started event was first written

Implementation of

IStartWorkflow.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

IStartWorkflow.workflowExecutionExpirationTime


workflowExecutionTimeout

Optional workflowExecutionTimeout: null | IDuration

Total workflow execution timeout including retries and continue as new.

Implementation of

IStartWorkflow.workflowExecutionTimeout


workflowId

workflowId: string

The workflow id used on the temporal server

Implementation of

IStartWorkflow.workflowId


workflowRunTimeout

Optional workflowRunTimeout: null | IDuration

Timeout of a single workflow run.

Implementation of

IStartWorkflow.workflowRunTimeout


workflowTaskTimeout

Optional workflowTaskTimeout: null | IDuration

Timeout of a single workflow task.

Implementation of

IStartWorkflow.workflowTaskTimeout


workflowType

workflowType: string

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

Implementation of

IStartWorkflow.workflowType

Methods

toJSON

toJSON(): Object

Converts this StartWorkflow to JSON.

Returns

Object

JSON object


create

create(properties?): StartWorkflow

Creates a new StartWorkflow instance using the specified properties.

Parameters

NameTypeDescription
properties?IStartWorkflowProperties to set

Returns

StartWorkflow

StartWorkflow instance


decode

decode(reader, length?): StartWorkflow

Decodes a StartWorkflow message from the specified reader or buffer.

Parameters

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

Returns

StartWorkflow

StartWorkflow

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): StartWorkflow

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

StartWorkflow

StartWorkflow

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

Parameters

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

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

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

Returns

Writer

Writer


fromObject

fromObject(object): StartWorkflow

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

StartWorkflow

StartWorkflow


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for StartWorkflow

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 a StartWorkflow message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageStartWorkflowStartWorkflow
options?IConversionOptionsConversion options

Returns

Object

Plain object