Skip to content

workflow-runtime

workflow-runtime / com.squareup.workflow

Package com.squareup.workflow

Types

Name Summary
RenderingAndSnapshot data class RenderingAndSnapshot<out RenderingT>
Tuple of rendering and snapshot used by launchWorkflowIn.

Functions

Name Summary
launchWorkflowForTestFromStateIn fun <PropsT, StateT, OutputT :Any, RenderingT, RunnerT> launchWorkflowForTestFromStateIn(scope: CoroutineScope, workflow: StatefulWorkflow<PropsT,StateT,OutputT,RenderingT>, props: Flow<PropsT>, initialState:StateT, beforeStart: CoroutineScope.(renderingsAndSnapshots: Flow<RenderingAndSnapshot<RenderingT>>, outputs: Flow<OutputT>) ->RunnerT):RunnerT
Launches the workflow in a new coroutine in scope. The workflow tree is seeded with initialState and the first value emitted by props. Subsequent values emitted from props will be used to re-render the workflow.
launchWorkflowIn fun <PropsT, OutputT :Any, RenderingT, RunnerT> launchWorkflowIn(scope: CoroutineScope, workflow: Workflow<PropsT,OutputT,RenderingT>, props: Flow<PropsT>, initialSnapshot: Snapshot? = null, beforeStart: CoroutineScope.(renderingsAndSnapshots: Flow<RenderingAndSnapshot<RenderingT>>, outputs: Flow<OutputT>) ->RunnerT):RunnerT
Launches the workflow in a new coroutine in scope. The workflow tree is seeded with initialSnapshot and the first value emitted by props. Subsequent values emitted from props will be used to re-render the workflow.