emo / me.eater.emo.utils / Workflow

Workflow

class Workflow<C>

Workflow object

Constructors

<init>

Workflow(processes: HashMap<String, Process<C>>, steps: HashMap<String, ProcessChain<C>>, start: String, context: C)

Workflow object

Properties

context

var context: C

Context of this workflow

finished

var finished: Boolean

processStarted

val processStarted: Event<ProcessStartedEvent<C>>

workflowFinished

val workflowFinished: Event<WorkflowEvent<C>>

Functions

execute

fun execute(executionScope: CoroutineScope = GlobalScope): Unit

Run this workflow in given CoroutineScope, default is GlobalScope

waitFor

suspend fun waitFor(): Unit

Suspend until workflow is done, may throw if workflow failed