1. Proxies and Flow

for

Version

Iterates over a collection extracted from the Exchange and applies its nested interceptors for each element. The current element is exposed in the exchange under the property key "it".
for:
in: message.headers['items']
language: SpEL
flow:
- log: {} # nested plugins here
for:
   in: message.headers['items']
   language: SpEL
   flow:
     - log: {} # nested plugins here

Syntax

for:
in: <string> # required
'$ref': <string>
flow:
- <flow>
language: groovy
for:
  in: <string> # required
  '$ref': <string>
  flow:
    - <flow>
  language: groovy

Attributes

NameRequiredDefaultDescriptionExamples
$reffalse-Reference a component defined under components.-
intrue-An expression that evaluates to a collection (e.g., a List). The interceptors nested within the <for> element will be executed for each item in this collection. The current item is available in the exchange property named `it`. Id: ` (if language="xpath")
`message.json.customers` (if language is the default "SpEL") or `/orders/order/
languagefalsegroovythe language of the 'test' conditionSpEL, groovy, jsonpath, xpath

Child Structure

ElementCardinalityDescription
flow0..*Sets the flow of plugins that will be executed.

Can be used in