在单个序列 WSO2 ESB5 中使用聚合实现 Iterate in parrelel execution

Implement Iterate in parrelel execution with aggregate in a single sequence WSO2 ESB5

我想做的是在单个序列中使用聚合实现并行执行迭代(不使用其中的 call/send 中间值)。

当我在输出序列中实现聚合时,它工作正常,如下所述。

<inSequence>
    <property name="it_count" scope="operation" type="STRING" value="0"/>
    <iterate expression="//symbols/symbol">
        <target>
            <sequence>
                <log level="custom">
                    <property name="ITERATING..."  expression="$body"/>
                </log>
               <enrich>
                    <source type="inline">
                        <out xmlns="">TEST</out>
                    </source>
                    <target xpath="//symbol"/>
                </enrich>
                 <log level="custom">
                    <property name="ITERATING..."  expression="$body"/>
                </log>
                <loopback/>
            </sequence>
        </target>
    </iterate>
</inSequence>

<outSequence>
    <property name="response" scope="default">
        <response xmlns=""/>
    </property>
    <aggregate>
        <completeCondition>
            <messageCount max="-1" min="-1"/>
        </completeCondition>
        <onComplete enclosingElementProperty="response" expression="//out">
            <log level="custom">
                <property name="AGGREGATING..." expression="$body"/>
            </log>
        </onComplete>
    </aggregate>
    <send/>
</outSequence>

但是我很难按照下面的顺序进行操作。它甚至不会出现在 Aggegate 日志中。我尝试了各种方法,但仍然面临。

<inSequence>
    <property name="it_count" scope="operation" type="STRING" value="0"/>
    <iterate expression="//symbols/symbol">
        <target>
            <sequence>
                <log level="custom">
                    <property name="ITERATING..."  expression="$body"/>
                </log>
               <enrich>
                    <source type="inline">
                        <out xmlns="">TEST</out>
                    </source>
                    <target xpath="//symbol"/>
                </enrich>
                 <log level="custom">
                    <property name="ITERATING..."  expression="$body"/>
                </log>
                <loopback/>
            </sequence>
        </target>
    </iterate>
    <property name="response" scope="default">
        <response xmlns=""/>
    </property>
    <aggregate>
        <completeCondition>
            <messageCount max="-1" min="-1"/>
        </completeCondition>
        <onComplete enclosingElementProperty="response" expression="//symbol">
            <log level="custom">
                <property name="AGGREGATING..." expression="$body"/>
            </log>
        </onComplete>
    </aggregate>
    <respond/>
</inSequence>
<outSequence/>

我知道如果我在 Iterate 中使用 Call/Send mediator,我可以在一个序列中执行此操作。但就我而言,我不在那里使用一个。 任何人都可以为此提供线索。

在第二种情况下,在迭代调解器上添加属性 continueParent="true"(您不希望此调解在迭代调解器后停止)并删除环回调解器(您不想向输出发送任何内容序列)