Skip to main content

Awaiting Signals

Code

val MySignal = SignalDef[MyRequest, MyResponse]()

val doThings: WIO[MyState, Nothing, MyState] =
WIO
.handleSignal(MySignal)
.using[MyState]
.withSideEffects((state, request) => IO(MyEvent()))
.handleEvent((state, event) => state)
.produceResponse((state, event) => MyResponse())
.autoNamed()

BPMN

handle-signal.svg

Model

{
"signalName" : "My Request",
"error" : null,
"operationName" : "Do Things",
"_type" : "HandleSignal"
}