Class: TimeSkippingConfig
The configuration for time skipping of a workflow execution (a chain of runs including retries, cron, continue-as-new). When time skipping is enabled, virtual time advances automatically whenever there is no in-flight work. In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations, and possibly other features added in the future. User timers are not classified as in-flight work and will be skipped over; the virtual clock may also skip to the time point of the registered fast forward when there is no in-flight work. When time is skipped, a WorkflowExecutionTimeSkippingTransitionedEvent will be added to the workflow history to capture the state changes.
For child workflows, by default, if the parent execution is skipping time, the child execution will also skip time, but a parent's fast_forward won't affect its child's execution. A flag is provided to disable propagation of the "enabled" flag to child workflows; regardless of that flag, a child workflow inherits the virtual time from the parent execution as its start time.
Implements
Constructors
constructor
• new TimeSkippingConfig(properties?): TimeSkippingConfig
Constructs a new TimeSkippingConfig.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | ITimeSkippingConfig | Properties to set |
Returns
Properties
disableChildPropagation
• disableChildPropagation: boolean
By default, child workflows inherit the "enabled" flag when they are started. This flag disables that inheritance.
Implementation of
ITimeSkippingConfig.disableChildPropagation
enabled
• enabled: boolean
Enables or disables time skipping for this workflow execution.
Implementation of
fastForward
• Optional fastForward: null | IDuration
Optionally fast-forward the current workflow execution by this duration ahead of current workflow execution time.
After the fast-forward completes, time skipping is disabled, and this
action is recorded in the WorkflowExecutionTimeSkippingTransitionedEvent. It can be re-enabled by
setting enabled to true or setting fast_forward again via UpdateWorkflowExecutionOptions.
The current workflow execution is a chain of runs (retries, cron, continue-as-new);
child workflows are separate executions, so this fast_forward won't affect them.
For a given workflow execution, only one active fast-forward is allowed at a time. If a new fast-forward is set via UpdateWorkflowExecutionOptions before the previous one completes, the new one will override the previous one. If the fast-forward duration exceeds the remaining execution timeout, time will only be fast-forwarded up to the end of the execution.
Implementation of
ITimeSkippingConfig.fastForward
Methods
toJSON
▸ toJSON(): Object
Converts this TimeSkippingConfig to JSON.
Returns
Object
JSON object
create
▸ create(properties?): TimeSkippingConfig
Creates a new TimeSkippingConfig instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | ITimeSkippingConfig | Properties to set |
Returns
TimeSkippingConfig instance
decode
▸ decode(reader, length?): TimeSkippingConfig
Decodes a TimeSkippingConfig 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
TimeSkippingConfig
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): TimeSkippingConfig
Decodes a TimeSkippingConfig message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
TimeSkippingConfig
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 TimeSkippingConfig message. Does not implicitly temporal.api.common.v1.TimeSkippingConfig.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | ITimeSkippingConfig | TimeSkippingConfig message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message, writer?): Writer
Encodes the specified TimeSkippingConfig message, length delimited. Does not implicitly temporal.api.common.v1.TimeSkippingConfig.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | ITimeSkippingConfig | TimeSkippingConfig message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object): TimeSkippingConfig
Creates a TimeSkippingConfig message from a plain object. Also converts values to their respective internal types.
Parameters
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
TimeSkippingConfig
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?): string
Gets the default type url for TimeSkippingConfig
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 a TimeSkippingConfig message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | TimeSkippingConfig | TimeSkippingConfig |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object