WorkflowContext
This interface can be used only within workflow handlers of workflow. It extends Context adding access to the workflow instance key-value state storage and to the DurablePromise API.
NOTE: This interface MUST NOT be accessed concurrently since it can lead to different orderings of user actions, corrupting the execution of the invocation.
See also
Functions
Create an Awakeable using KtSerdes.json deserializer, addressable through Awakeable.id.
Create a new AwakeableHandle for the provided identifier. You can use it to AwakeableHandle.resolve or AwakeableHandle.reject the linked Awakeable.
Create a DurablePromise for the given key.
Create a new DurablePromiseHandle for the provided key. You can use it to DurablePromiseHandle.resolve or DurablePromiseHandle.reject the given DurablePromise.
Create a RestateRandom instance inherently predictable, seeded on the dev.restate.sdk.common.InvocationId, which is not secret.
Execute a non-deterministic closure, recording the result value in the journal. The result value will be re-played in case of re-invocation (e.g. because of failure recovery or suspension point) without re-executing the closure. Use this feature if you want to perform non-deterministic operations.
Execute a non-deterministic closure, recording the result value in the journal using KtSerdes.json. The result value will be re-played in case of re-invocation (e.g. because of failure recovery or suspension point) without re-executing the closure. Use this feature if you want to perform non-deterministic operations.
Gets all the known state keys for this virtual object instance.