emo / me.eater.emo.utils / WorkflowBuilder

WorkflowBuilder

class WorkflowBuilder<C>

Workflow builder, used to create a new workflow

Constructors

<init>

WorkflowBuilder()

Workflow builder, used to create a new workflow

Functions

bind

fun bind(process: Process<C>): Unit

Bind new Process to this Workflow

build

fun build(context: C): Workflow<C>

Build the workflow with given context

start

fun start(step: String): Unit

Set start step

step

fun step(process: String, router: Router<C>, name: String = process, description: String = processes[process]!!.getDescription()): Unit
fun step(process: String, nextStep: String?, name: String = process, description: String = processes[process]!!.getDescription()): Unit
fun step(process: String, router: (context: C) -> String?, name: String = process, description: String = processes[process]!!.getDescription()): Unit
fun step(process: Process<C>, router: Router<C>, name: String = process.getName(), description: String = process.getDescription()): Unit
fun step(process: Process<C>, nextStep: String?, name: String = process.getName(), description: String = process.getDescription()): Unit
fun step(process: Process<C>, router: (context: C) -> String?, name: String = process.getName(), description: String = process.getDescription()): Unit

Add new step