Class: TimeSkippingConfig
workflow.v1.TimeSkippingConfig
Configuration for time skipping during a workflow execution. When 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. When time advances, it skips to the earlier of the next user timer or the configured bound, if either exists.
Propagation behavior of time skipping: The enabled flag, bound fields, and accumulated skipped duration are propagated to related executions as follows: (1) Child workflows and continue-as-new: both the configuration and the accumulated skipped duration are inherited from the current execution. The configured bound is shared between the inherited skipped duration and any additional duration skipped by the new run. (2) Retry and cron: the configuration and accumulated skipped duration are inherited as recorded when the current workflow started; the accumulated skipped duration of the current run is not propagated. (3) Reset: the new run retains the time-skipping configuration of the current execution. Because reset replays all events up to the reset point and re-applies any UpdateWorkflowExecutionOptions changes made after that point, the resulting run ends up with the same final time-skipping configuration as the previous run.
Implements
Constructors
constructor
• new TimeSkippingConfig(properties?): TimeSkippingConfig
Constructs a new TimeSkippingConfig.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | ITimeSkippingConfig | Properties to set |
Returns
Properties
bound
• Optional bound: "maxSkippedDuration" | "maxElapsedDuration"
Optional bound that limits the gap between the virtual time of this execution and wall-clock time.
Once the bound is reached, time skipping is automatically disabled,
but can be re-enabled by setting enabled to true via UpdateWorkflowExecutionOptions.
This bound cannot be set to a value smaller than the execution's currently skipped duration.
This is useful in testing scenarios where a workflow is expected to receive signals, updates, or other external events while timers are in progress.
enabled
• enabled: boolean
Enables or disables time skipping for this workflow execution.
Implementation of
maxElapsedDuration
• Optional maxElapsedDuration: null | IDuration
Maximum elapsed time since time skipping was enabled. This includes both skipped time and real time elapsing. (-- api-linter: core::0142::time-field-names=disabled --)
Implementation of
ITimeSkippingConfig.maxElapsedDuration
maxSkippedDuration
• Optional maxSkippedDuration: null | IDuration
Maximum total virtual time that can be skipped.
Implementation of
ITimeSkippingConfig.maxSkippedDuration
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.workflow.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.workflow.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