Mule< foreach>中是否有break语句? [英] Is there a break statement in Mule <foreach>

查看:134
本文介绍了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.

因此没有办法破坏任何东西:用choicefilter进行过滤是解决问题的方法.

So there is no mean to break anything: filtering with a choice or filter is the way to go.

这篇关于Mule&lt; foreach&gt;中是否有break语句?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆