Class: InitializeWorkflow
coresdk.workflow_activation.InitializeWorkflow
Initialize a new workflow
Implements
Constructors
constructor
• new InitializeWorkflow(properties?
): InitializeWorkflow
Constructs a new InitializeWorkflow.
Parameters
Name | Type | Description |
---|---|---|
properties? | IInitializeWorkflow | 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
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
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
IInitializeWorkflow.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
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
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
Name | Type | Description |
---|---|---|
properties? | IInitializeWorkflow | Properties to set |
Returns
InitializeWorkflow instance
decode
▸ decode(reader
, length?
): InitializeWorkflow
Decodes an InitializeWorkflow 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
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
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
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
Name | Type | Description |
---|---|---|
message | IInitializeWorkflow | InitializeWorkflow message or plain object to encode |
writer? | Writer | Writer 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
Name | Type | Description |
---|---|---|
message | IInitializeWorkflow | InitializeWorkflow message or plain object to encode |
writer? | Writer | Writer 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
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
InitializeWorkflow
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?
): string
Gets the default type url for InitializeWorkflow
Parameters
Name | Type | Description |
---|---|---|
typeUrlPrefix? | string | your 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
Name | Type | Description |
---|---|---|
message | InitializeWorkflow | InitializeWorkflow |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object