It creates union of joined data streams.
This is general usage state transformation.
This is general usage state transformation. It takes previous value of state and transform it using newValue
lambda parameter (having previous
as a parameter). Transformation is done only when transformWhen
expression
is satisfied. States has Time-To-Leave defined by stateTimeoutSeconds
parameter.
So it is generally doing something like this:
newStateValue = if (transformWhen) {
newValue(previous)
} else {
previous
}
It creates union of joined data streams. Produced variable will be a map which looks like:
{ key: result_of_evaluation_of_key_expression_for_branch1 branchId: result_of_evaluation_of_value_expression_for_branchId }
definition
parameter.branchId
field of map will have Unknown type. If you want to specify it, you can pass type as a Map in