mule过滤器不停止流程处理,选择结束标记后选择

时间:2013-10-03 02:03:48

标签: filter mule

在此流程中,我已验证过滤器何时返回' false'无论如何,流程还在继续。但有效载荷略有不同。我需要完全停止这些消息。

<foreach doc:name="For Each"> 
            <choice doc:name="Choice"> 
                when expression="#[payload['event'] contains 'delete' ]"> 
                    <!-- this path is unrelated to this question -->  
                </when>  
                <otherwise> 
                    <flow-ref name="getMessages" doc:name="FlowToGetMessages"/>  
<!-- this (below) will extract the single row value (a Map) from the array returned from above flow -->
                    <collection-splitter doc:name="Collection Splitter"/> 
                    <expression-filter expression="#[payload['activity'] != null && payload['activity'] != "" ]" doc:name="Block Empty Rows"/>
                    <custom-filter class="package.BlockNullAnnouncementEvents" doc:name="Block null"/>
                </otherwise>  
            </choice>
...

下一个处理器(在选择之后)得到 A)如果消息通过过滤器测试BlockNullAnnouncementEvents或单个值 B)如果存在null并且过滤器未通过相同的测试

,则具有一个值的数组

在我看来,如果消息未通过过滤器测试,则调用流getMessages的结果将返回到for-each的顶部,并将其传递给流后的下一部分。包含过滤器的选择分支。

1 个答案:

答案 0 :(得分:1)

执行后,foreach将恢复原始邮件,如here

所述

如果您希望停止执行,则应使用message filter并将未接受的投掷配置为true