Mule< foreach>中是否有break语句? [英] Is there a break statement in Mule <foreach>
本文介绍了Mule< foreach>中是否有break语句?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个array list
值,我使用<foreach>
和<choice>
进行了循环.一旦在choice
中出现第一个匹配项,我就想退出foreach
循环.有没有办法break
循环?
I have an array list
values which I loop using <foreach>
and <choice>
. As soon as the first hit happens in choice
I want to come out of the foreach
loop. Is there a way to break
the loop?
推荐答案
foreach
看起来像是程序构造,但在后台使用标准的消息拆分器,因此实际上从原始集合中产生了一堆消息.
foreach
may look like a procedural construct but behind the scene it uses a standard message splitter so it actually produces a bunch of messages out of the original collection.
因此没有办法破坏任何东西:用choice
或filter
进行过滤是解决问题的方法.
So there is no mean to break anything: filtering with a choice
or filter
is the way to go.
这篇关于Mule< foreach>中是否有break语句?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文