Filter mule中的过滤消息

Filter mule中的过滤消息,filter,mule,Filter,Mule,我想传递一些信息来分析逻辑, 假设如果(flowVars.status==x或flowVars.status==y),则不应传递它。 任何关于如何在mule with filter或任何其他组件中实现此功能的想法您可以使用表达式过滤器 <expression-filter expression="#[!(flowVars['status'] == 'X' || flowVars['status'] == 'Y')]" doc:name="Do not Process status of X

我想传递一些信息来分析逻辑, 假设如果(flowVars.status==x或flowVars.status==y),则不应传递它。
任何关于如何在mule with filter或任何其他组件中实现此功能的想法

您可以使用表达式过滤器

<expression-filter expression="#[!(flowVars['status'] == 'X' || flowVars['status'] == 'Y')]" doc:name="Do not Process status of X and Y"/>

您也可以使用Choice Connector,根据状态值,它将遵循默认路径或跳过默认路径

 <choice doc:name="Choice">
            <when expression="flowVars.status=='x' || flowVars.name=='y'">
                <logger message="#['Condition Matched , Skipping the processing']" level="INFO" doc:name="Logger"/>
            </when>
            <otherwise>
                <logger message="#['Default condition']" level="INFO" doc:name="Logger"/>
            </otherwise>
        </choice>