在此流程中,我已验证过滤器何时返回' 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的顶部,并将其传递给流后的下一部分。包含过滤器的选择分支。