나는 노새를 처음 사용하므로이 논리를 이해하도록 도와주세요. 사실 내 흐름에 나는 선택의 여지가 메시지 프로세서, 그것을 만족하지 않는 표현이 기본으로 갈 것입니다. 그 후 나는 흐름 참조가있다. 메시지가 기본값 (선택 사항)으로 이동하지 않도록하려면 참조 흐름을 채 웁니다. 대신 해당 흐름에서 구성한 선택 예외 전략으로 이동해야합니다. 그래서 기본적으로 예외를 던질 필요가 있습니다. 사실 나는 매우 큰 흐름을 가지고 있으며 이해하기 쉽도록 만들었습니다. xml config 파일을 찾으십시오.자바 코드를 사용하지 않고 Mule ESB에서 수동으로 예외를 throw하는 방법
<flow name="Choice" doc:name="Choice">
<file:inbound-endpoint path="C:\Users\Star\Desktop\Mule\FilePath1" responseTimeout="10000" doc:name="File"/>
<byte-array-to-string-transformer doc:name="Byte Array to String"/>
<choice doc:name="Choice">
<when expression="#[xpath('fn:local-name(/root/*[2])')=='book']">
<file:outbound-endpoint path="C:\Users\Star\Desktop\Mule\FilePath2" responseTimeout="10000" doc:name="File"/>
</when>
<otherwise>
<file:outbound-endpoint path="C:\Users\Star\Desktop\Mule\FilePath3" responseTimeout="10000" doc:name="File"/>
</otherwise>
</choice>
<flow-ref name="SampleService" doc:name="Flow Reference"/>
<catch-exception-strategy doc:name="Catch Exception Strategy">
<logger message="*****#[exception]****" level="INFO" doc:name="Logger"/>
</catch-exception-strategy>
</flow>
<flow name="SampleService" doc:name="SampleService">
<file:inbound-endpoint path="C:\Users\Star\Desktop\Mule\FilePath4" responseTimeout="10000" doc:name="File"/>
</flow>
친절하게 나에게
<test:component throwException="true"/>
유지도 시도 Mule.I에 예외를 throw하는 표준 방법을 제안하지만 같은 예외를 던지고있다 - 테스트 "요소" "접두사"테스트 : 구성 요소 " 바운드되지 않습니다 ".
제안 된이 링크의 스크립트에 사용 된 groovy 구성 요소 : http://stackoverflow.com/questions/18689573/how-do-i-force-an-exception-in-mule/18691490#18691490. 그것은 작동합니다. 고맙습니다. – star