Package-level declarations
Types
Result of applying an action.
An ActionProcessingResult is any possible outcome after the runtime does a loop of processing.
If your Workflow caches its WorkflowIdentifier (to avoid frequent lookups) then implement this interface. Note that StatefulWorkflow and StatelessWorkflow already implement this, so you only need to do so if you do not extend one of those classes.
Optional interface that Workflows should implement if they need the runtime to consider their identity to include a child workflow's identity. Two ImpostorWorkflows with the same concrete class, but different realIdentifiers will be considered different workflows by the runtime.
Worker that performs some action when the worker is started and/or stopped.
An extension of StatefulWorkflow that gives initialState a CoroutineScope that corresponds with the lifetime of session driven by this Workflow.
An object that receives values (commonly events or WorkflowAction). BaseRenderContext.actionSink implements this interface.
A composable, stateful object that can handle events, delegate to children, subscribe to arbitrary asynchronous events from the outside world, and be saved to a serialized form to be restored later.
Minimal implementation of Workflow that maintains no state of its own.
A composable, optionally-stateful object that can handle events, delegate to children, subscribe to arbitrary asynchronous events from the outside world.
An atomic operation that updates the state of a Workflow, and also optionally emits an output.
This is used to mark new core Workflow API that is still considered experimental.
Represents a Workflow's "identity" and is used by the runtime to determine whether a workflow is the same as one that was rendered in a previous render pass, in which case its state should be re-used; or if it's a new workflow and needs to be started.
Represents a subset of KAnnotatedElement, namely KClass or KType. Used by the runtime to determine whether a WorkflowIdentifier, and thus the Workflow it identifies, is serializable or not via the Snapshot mechanism.
Box around a potentially nullable OutputT
Properties
The computed WorkflowIdentifier for this Workflow. Any IdCacheable Workflow should call this and then store the value in the cachedIdentifier property so as to prevent the extra work needed to create the WorkflowIdentifier and look up the class name each time.
The WorkflowIdentifier that identifies this Workflow.
The WorkflowIdentifier that identifies the workflow this KClass represents.
Functions
Creates a WorkflowAction from the apply lambda. The returned object will include the string returned from name in its toString.
Convenience to create a WorkflowAction with parameter types matching those of the receiving StatefulWorkflow. The action will invoke the given lambda when it is applied.
Uses the given function to transform a Workflow that renders FromRenderingT to one renders ToRenderingT,
Convenience alias of BaseRenderContext.renderChild for children that don't take props or emit output.
Convenience alias of BaseRenderContext.renderChild for workflows that don't emit output.
Convenience alias of BaseRenderContext.renderChild for workflows that don't take props.
Creates a RenderContext
from a BaseRenderContext for the given StatelessWorkflow.
Creates a RenderContext
from a BaseRenderContext for the given StatefulWorkflow.
Returns a workflow that does nothing but echo the given rendering. Handy for testing.
Ensures a LifecycleWorker is running. Since worker can't emit anything, it can't trigger any WorkflowActions.
Ensures worker is running. When the Worker emits an output, handler is called to determine the WorkflowAction to take. When the worker finishes, nothing happens (although another render pass may be triggered).
Returns a SessionWorkflow, with no props, implemented via the given function.
Returns a SessionWorkflow implemented via the given functions.
Returns a SessionWorkflow, with no props, implemented via the given functions.
Returns a stateful Workflow, with no props, implemented via the given function.
Returns a stateful Workflow implemented via the given functions.
Returns a stateful Workflow, with no props, implemented via the given functions.
Creates a WorkflowIdentifier that is not capable of being snapshotted and will cause any ImpostorWorkflow workflow identified by it to also not be snapshotted.