Fix Groovy DSL for new splitter style (#8669)
* Fix Groovy DSL for new splitter style * Introduce a new `GroovyIntegrationFlowDefinition.splitWith()` to avoid clashing with existing method * Deprecate all other `split()` variants, but left one without arguments for a default splitting options * Fix doc for new splitter style * * Fix tab indentations in `groovy-dsl.adoc`
This commit is contained in:
@@ -89,8 +89,15 @@ functionFlow() {
|
||||
transformer { it.toUpperCase() }
|
||||
expectedType String
|
||||
}
|
||||
split Message<?>, { it.payload }
|
||||
split Object, { it }, { id 'splitterEndpoint' }
|
||||
splitWith {
|
||||
expectedType Message<?>
|
||||
function { it.payload }
|
||||
}
|
||||
splitWith {
|
||||
expectedType Object
|
||||
id 'splitterEndpoint'
|
||||
function { it }
|
||||
}
|
||||
resequence()
|
||||
aggregate {
|
||||
id 'aggregator'
|
||||
|
||||
@@ -97,7 +97,10 @@ fun someFlow() =
|
||||
@Bean
|
||||
someFlow() {
|
||||
integrationFlow {
|
||||
split Message<?>, { it.payload }
|
||||
splitWith {
|
||||
expectedType Message<?>
|
||||
function { it.payload }
|
||||
}
|
||||
}
|
||||
}
|
||||
----
|
||||
|
||||
@@ -229,8 +229,12 @@ fun unzipFlow(executor: Executor) =
|
||||
unzipFlow(Executor executor) {
|
||||
integrationFlow 'unzipChannel',
|
||||
{
|
||||
transform new UnZipTransformer()
|
||||
split new UnZipResultSplitter()
|
||||
transformWith {
|
||||
ref new UnZipTransformer()
|
||||
}
|
||||
splitWith {
|
||||
ref new UnZipResultSplitter()
|
||||
}
|
||||
channel { executor 'entriesChannel', executor }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user