Fork
val doA = WIO.pure(MyState(1)).autoNamed
val doB = WIO.pure(MyState(2)).autoNamed
val fork: WIO[MyState, Nothing, MyState] =
WIO
.fork[MyState]
.matchCondition(_.counter > 0, "Is counter positive?")(
onTrue = doA,
onFalse = doB,
)
- Flowchart
- BPMN
- Model
{
"branches" : [
{
"meta" : {
"name" : "Do A",
"error" : null
},
"_type" : "Pure"
},
{
"meta" : {
"name" : "Do B",
"error" : null
},
"_type" : "Pure"
}
],
"meta" : {
"name" : "Is counter positive?",
"branches" : [
{
"name" : "Yes"
},
{
"name" : "No"
}
]
},
"_type" : "Fork"
}