直到在MULE ESB中成功返回布尔值为止

直到在MULE ESB中成功返回布尔值为止,mule,esb,Mule,Esb,我正在为出站端点使用一个直到成功的作用域。我得到一个正确的响应,但当它出来时,直到成功我得到布尔值,我的流程如下所示 <flow name="testFlow1" doc:name="testFlow1"> <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="test" doc:name="HTTP"/> <

我正在为出站端点使用一个直到成功的作用域。我得到一个正确的响应,但当它出来时,直到成功我得到布尔值,我的流程如下所示

    <flow name="testFlow1" doc:name="testFlow1">
    <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="test" doc:name="HTTP"/>
    <until-successful maxRetries="5" failureExpression="#[message.inboundProperties['http.status'] != 200]" synchronous="true" doc:name="Until Successful">
        <http:outbound-endpoint exchange-pattern="request-response" method="POST" address="www.example.com" doc:name="HTTP"/>
    </until-successful>
    <logger message="`From outbound #[payload]`" level="INFO" doc:name="Logger"/>
</flow>
</mule>

您好,我不确定会发生什么,但下面是一个在3.6.0中运行的示例,它工作正常:

 <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="9090" doc:name="HTTP Listener Configuration"/>
    <spring:beans>
        <spring:bean id="objectStore" class="org.mule.util.store.SimpleMemoryObjectStore"/>
    </spring:beans>
    <http:request-config name="HTTP_Request_Configuration" host="localhost" port="9090" doc:name="HTTP Request Configuration"/>
    <flow name="zzzFlow1" >
        <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
        <set-payload value="#['laleros']" doc:name="Set Payload"/>
        <logger message="*************************** #[payload]" level="INFO" doc:name="Logger"/>
        <until-successful maxRetries="5" doc:name="Until Successful" synchronous="true">
            <http:request config-ref="HTTP_Request_Configuration" path="/t" method="POST" doc:name="HTTP"/>
        </until-successful>
        <object-to-string-transformer doc:name="Object to String"/>
        <logger message="*************************** #[payload]" level="INFO" doc:name="Logger"/>
    </flow>

    <flow name="tFlow1" >
        <http:listener config-ref="HTTP_Listener_Configuration" path="/t" doc:name="HTTP"/>
        <object-to-string-transformer doc:name="Object to String"/>
        <logger message="#[payload]" level="INFO" doc:name="Logger"/>
    </flow>
仅供参考,我认为您需要在http请求之后使用转换器来序列化响应,因为它通常将流作为有效负载返回


HIH

您定义的直到成功的作用域需要进行额外的配置。 浏览下面的链接


您好,在本例中,您没有给出任何失败或返回条件您是正确的,但您甚至修改了这些条件并添加了诸如true之类的条件!=false总是正确的,false总是错误的我没有像你说的那样让它失败:
 <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="9090" doc:name="HTTP Listener Configuration"/>
    <spring:beans>
        <spring:bean id="objectStore" class="org.mule.util.store.SimpleMemoryObjectStore"/>
    </spring:beans>
    <http:request-config name="HTTP_Request_Configuration" host="localhost" port="9090" doc:name="HTTP Request Configuration"/>
    <flow name="zzzFlow1" >
        <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
        <set-payload value="#['laleros']" doc:name="Set Payload"/>
        <logger message="*************************** #[payload]" level="INFO" doc:name="Logger"/>
        <until-successful maxRetries="5" doc:name="Until Successful" synchronous="true">
            <http:request config-ref="HTTP_Request_Configuration" path="/t" method="POST" doc:name="HTTP"/>
        </until-successful>
        <object-to-string-transformer doc:name="Object to String"/>
        <logger message="*************************** #[payload]" level="INFO" doc:name="Logger"/>
    </flow>

    <flow name="tFlow1" >
        <http:listener config-ref="HTTP_Listener_Configuration" path="/t" doc:name="HTTP"/>
        <object-to-string-transformer doc:name="Object to String"/>
        <logger message="#[payload]" level="INFO" doc:name="Logger"/>
    </flow>
*******************************************************************************************************
*            - - + APPLICATION + - -            *       - - + DOMAIN + - -       * - - + STATUS + - - *
*******************************************************************************************************
* zzz                                           * default                        * DEPLOYED           *
*******************************************************************************************************

INFO  2015-02-23 14:10:17,540 [[zzz].HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor: *************************** laleros
INFO  2015-02-23 14:10:17,593 [[zzz].HTTP_Listener_Configuration.worker.02] org.mule.api.processor.LoggerMessageProcessor: laleros
INFO  2015-02-23 14:10:17,670 [[zzz].HTTP_Listener_Configuration.worker.01] org.mule.api.processor.LoggerMessageProcessor: *************************** laleros