fstn
10/17/2017, 4:24 PMval validConditions = mutableListOf<Condition>()
validConditions.addAll(
node.nextLinks.map { it as ConditionalLink }
.filter { it.condition.condition.isNotEmpty() && checker.check(it.condition, event.body()) }
.onEach { eventBus.send(it.eventName, event) }
.map { it.condition }
)
if (validConditions.isEmpty()) {
validConditions.addAll(node.nextLinks
.map { it as ConditionalLink }.filter { it.condition == Condition.ELSE }
.onEach {eventBus.send(it.eventName, event) }
.map { it.condition })
}
Thanks all