I'm new to mule, please help me on this logic. Actually in my flow i have choice message processor, Expression which is not satisfy it will go to default in choice. After that i have flow reference. I don't want message goes to default(choice) has to be populate to flow reference.Instead it has to go to choice exception strategy which i configured in that flow. So i need to throw some exception in default. Actually i have a very big flow, i made it simple to understand. Please find by xml config.
<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>
Kindly suggest me any standard way to throw exception in Mule.I also tried keeping
<test:component throwException="true"/>
but it is throwing exception like - "The prefix "test" for element "test:component" is not bound".