Class: StartWorkflow
coresdk.workflow_activation.StartWorkflow
Start a new workflow
Implements
Constructors
constructor
• new StartWorkflow(properties?
): StartWorkflow
Constructs a new StartWorkflow.
Parameters
Name | Type | Description |
---|---|---|
properties? | IStartWorkflow | Properties to set |
Returns
Properties
arguments
• arguments: IPayload
[]
Inputs to the workflow code
Implementation of
attempt
• attempt: number
Starting at 1, the number of times we have tried to execute this workflow
Implementation of
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
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
identity
• identity: string
Identity of the client who requested this execution
Implementation of
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
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
retryPolicy
• Optional
retryPolicy: null
| IRetryPolicy
This workflow's retry policy
Implementation of
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
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
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
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
Name | Type | Description |
---|---|---|
properties? | IStartWorkflow | Properties to set |
Returns
StartWorkflow instance
decode
▸ decode(reader
, length?
): StartWorkflow
Decodes a StartWorkflow 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
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
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
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
Name | Type | Description |
---|---|---|
message | IStartWorkflow | StartWorkflow message or plain object to encode |
writer? | Writer | Writer 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
Name | Type | Description |
---|---|---|
message | IStartWorkflow | StartWorkflow message or plain object to encode |
writer? | Writer | Writer to encode to |