2015-02-23 54 views
1

喜的布爾值正在使用,直到成功爲止的範圍爲我出站endpoint.Am得到一個適當的反應,但出來時,直到sucessfull我得到布爾值,我的流程如下Unitl Sucessfull返回在MULE ESB

<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> 
給出

但我得到輸出記錄作爲

From outbound true 

回答

0

您好不知道可能會發生,但這裏是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> 

這是我得到的輸出:

******************************************************************************************************* 
*   - - + 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 

而只是僅供參考,我想你需要的HTTP請求後,變壓器連載於響應的通常返回流的有效載荷。

HIH

+0

嗨在這個例子中,你不給任何故障或找回狀態 – 2015-02-24 01:16:00

+0

你是正確的,但即使修改和添加條件,像真正的!=假(這將永遠是真)和真==假(總是假)我不設法使它失敗,你說它失敗的方式:( – Dds 2015-02-24 13:14:32