mule-choice组件中的整数比较

mule-choice组件中的整数比较,mule,mule-el,mule-component,Mule,Mule El,Mule Component,我有一个非常简单的流程,我试图对入站属性和有效负载进行比较,它们是choice组件中的整数,尽管值相同,但choice组件将其路由到默认部分 我想得到一些帮助,使这项工作 先谢谢你 <mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/

我有一个非常简单的流程,我试图对入站属性和有效负载进行比较,它们是choice组件中的整数,尽管值相同,但choice组件将其路由到默认部分

我想得到一些帮助,使这项工作

先谢谢你

<mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
    <flow name="flow_testFlow1" doc:name="flow_testFlow1">
        <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
        <set-payload value="#[12]" doc:name="Set Payload"/>
        <set-property propertyName="trial" value="#[12]" doc:name="Property"/>
        <choice doc:name="Choice">
            <when expression="#[payload == message.inboundProperties['trial']]">
                <logger level="INFO" doc:name="Logger" message="Success"/>
            </when>
            <otherwise>
                <logger level="INFO" doc:name="Logger" message="error"/>
            </otherwise>
        </choice>
    </flow>
</mule>

设置属性
在出站作用域中设置属性,入站作用域是只读的(由入站端点创建)

因此,您需要像下面这样修复您的选择路由表达式:

<when expression="#[payload == message.outboundProperties['trial']]">


然后它工作。

设置属性设置出站作用域中的属性,入站作用域是只读的(由入站端点创建)

因此,您需要像下面这样修复您的选择路由表达式:

<when expression="#[payload == message.outboundProperties['trial']]">


然后它工作。

设置属性设置出站作用域中的属性,入站作用域是只读的(由入站端点创建)

因此,您需要像下面这样修复您的选择路由表达式:

<when expression="#[payload == message.outboundProperties['trial']]">


然后它工作。

设置属性设置出站作用域中的属性,入站作用域是只读的(由入站端点创建)

因此,您需要像下面这样修复您的选择路由表达式:

<when expression="#[payload == message.outboundProperties['trial']]">

然后它就起作用了