WorkflowBuilder

portals.api.builder.WorkflowBuilder
See theWorkflowBuilder companion object
trait WorkflowBuilder[T, U]

Builder for workflows.

Accessed from the application builder via builder.workflows.

Attributes

Example
builder.workflows[String, Int]("workflowName").source().map(x => x.length()).sink().freeze()
Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def freeze(): Workflow[T, U]

Freeze a workflow, this will prevent any further changes to the workflow.

Freeze a workflow, this will prevent any further changes to the workflow.

In order to use a workflow's output further in the application, it must be frozen so that its output stream can be accessed.

Attributes

Returns

reference to the workflow

def source[TT = T](ref: AtomicStreamRefKind[T]): FlowBuilder[T, U, TT, TT]

Start the workflow from the source stream ref. Returns a flow.

Start the workflow from the source stream ref. Returns a flow.

The additional type parameter is used to make manual checks that the type is correct, i.e. source[Int](ref) ensures that the input type is Int.

Type parameters

TT

type of the source stream

Value parameters

ref

reference to the source stream

Attributes

Returns

a flow starting from the source stream

Example
builder.workflows[String, Int]("workflowName").source(stream).map(x => x.length())