joinDataTransition

fun <D : Any> IState.joinDataTransition(vararg joinPoints: IState, name: String? = null, targetState: DataState<D>, dataProducer: suspend () -> D)

Type-safe variant of joinTransition that targets a DataState.

dataProducer is called once, synchronously, at the moment all join-point states become simultaneously active. Its return value is fed to targetState as its entry data, replacing the need for a matching DataEvent on the triggering event.

Parameters

joinPoints

at least 2 states, one per parallel region.

name

optional name for the transition (also used as the <<join>> node name in exports).

targetState

the DataState to enter after all regions have joined.

dataProducer

lambda invoked at join time to produce the data for targetState.