You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Bean
IntegrationFlow foreach() {
return IntegrationFlows.from(Http.inboundChannelAdapter("/foreach")).handle((p, h) -> p)
//TODO: translate expression #[[1, 2, 3, 4]] which must produces an array
// to iterate over
.split()
/* TODO: LinkedMultiValueMap might not be apt, substitute with right input type*/
.<LinkedMultiValueMap<String, String>, String>route(
p -> p.getFirst("dataKey") /*TODO: use apt condition*/,
m -> m
.subFlowMapping("dataValue" /*TODO: Translate dataValue to #[payload == 1]*/,
sf -> sf.log(LoggingHandler.Level.INFO, "Ondu")
)
.subFlowMapping("dataValue" /*TODO: Translate dataValue to #[payload == 2]*/,
sf -> sf.log(LoggingHandler.Level.INFO, "Eradu")
)
.subFlowMapping("dataValue" /*TODO: Translate dataValue to #[payload == 3]*/,
sf -> sf.log(LoggingHandler.Level.INFO, "Mooru")
)
.resolutionRequired(false)
.defaultSubFlowMapping(sf -> sf.log(LoggingHandler.Level.INFO, "Moorina mele"))
)
.aggregate()
.log(LoggingHandler.Level.INFO, "Done with for looping")
.get();
}
More information of foreach mule component can be found here
Additional notes
Batch sizing using foreach can be supported later
The text was updated successfully, but these errors were encountered:
What needs to be done
When component is detected, translate it to appropriate spring DSL translation
Example inputs and outputs
Sample 1
input
output:
Sample 2
Children of foreach can be complex such as choice
output
More information of foreach mule component can be found here
Additional notes
Batch sizing using foreach can be supported later
The text was updated successfully, but these errors were encountered: