Value<V>
A dataflow value (also known as a value channel) is an asynchronous value of type V. It is used to facilitate dataflow logic in a workflow.
The following methods are available for a dataflow value:
combine( right: Value ) -> Value<Tuple>
Combines the dataflow value with another dataflow value.
Tuples in both the left- and right-hand sources are flattened in the combined tuple. For example, tuple(1, 2) and tuple('red', 'blue') are combined as tuple(1, 2, 'red', 'blue').
combine( [opts] ) -> Value<Record>
Augments a record by adding each named argument as a record field. Each named argument can be a value or dataflow value.
flatMap( transform: (V) -> Iterable<R> ) -> Channel<R>
Transforms the dataflow value into a collection with the given closure and emits the resulting values in a dataflow channel.
map( transform: (V) -> R ) -> Value<R>
Transforms the dataflow value into another dataflow value with the given closure.
mix( other: Channel<V> ) -> Channel<V>
Emits the dataflow value and the values from another channel into a single output channel.
subscribe( action: (V) -> () )
Invokes the given closure on the dataflow value.
view() -> Value<V>
Prints the dataflow value to standard output.
view( transform: (V) -> String ) -> Value<V>
Transforms the dataflow value using the given closure and prints the result to standard output.