Package-level declarations
Types
Link copied to clipboard
A WorkflowInterceptor that does not intercept anything.
Link copied to clipboard
Tuple of rendering and snapshot used by renderWorkflowIn.
Link copied to clipboard
Link copied to clipboard
A specification of the possible Workflow Runtime options.
Link copied to clipboard
A WorkflowInterceptor that just prints all method calls using log.
Link copied to clipboard
class TreeSnapshot
Aggregate of all the snapshots of a tree of workflows.
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FUNCTION, AnnotationTarget.TYPEALIAS] )
This is used to mark any experimental runtimes.
Link copied to clipboard
interface WorkflowInterceptor
Provides hooks into the workflow runtime that can be used to instrument or modify the behavior of workflows.
Functions
Link copied to clipboard
fun <PropsT, OutputT, RenderingT> renderWorkflowIn(workflow: Workflow<PropsT, OutputT, RenderingT>, scope: CoroutineScope, props: StateFlow<PropsT>, initialSnapshot: TreeSnapshot? = null, interceptors: List<WorkflowInterceptor> = emptyList(), runtimeConfig: RuntimeConfig = RuntimeConfigOptions.DEFAULT_CONFIG, onOutput: suspend (OutputT) -> Unit): StateFlow<RenderingAndSnapshot<RenderingT>>
Launches the workflow in a new coroutine in scope and returns a StateFlow of its renderings and snapshots. The workflow tree is seeded with initialSnapshot and the current value value of props. Subsequent values emitted from props will be used to re-render the workflow.