Hi All,

I have the below route:
*<route>
        <from uri="direct:parsedData" />
        <log message="Received xml from MocC ${body}  
[${in.header.inputDataType}] 
[${header.CamelFileNameOnly}]"/>
        <choice>
                <when>
                        <simple> ${header.batchSize} == 2000 </simple>
                        <log message="processing batch of size == 2000 ---
[${header.inputDataType}]"/>
                        <choice>
                                <when>
                                <simple> $'header.inputDataType' = 'TAP' 
</simple>
                                        <log message="persisting TAP file 
${header.CamelFileNameOnly}"/>
                                        <threads 
executorServiceRef="threadpool2">
                                                <to 
uri="jms:queue:test_request_2"/>
                                                <marshal ref="gzip"/>
                                                <to
uri="file:C://Camel//tap//out?fileName=${header.CamelFileNameOnly}.gz"/>
                                        </threads>
                                </when>
                                <when>
                                <simple> $'header.inputDataType' = 'TDR' 
</simple>
                                        <log message="persisting TDR file 
${header.CamelFileNameOnly}"/>
                                        <threads 
executorServiceRef="threadpool2">
                                                <to 
uri="jms:queue:test_request_1"/>
                                                <marshal ref="gzip"/>
                                                <to
uri="file:C://Camel//tdr//out?fileName=${header.CamelFileNameOnly}.gz"/>
                                        </threads>
                                </when>
                        </choice>
                </when>
        </choice>
</route>*

But for some reason, the first part "<simple> $'header.inputDataType' =
'TAP' </simple>" is being executed.
The log shows that the header data is set properly.
Please help out. I am breaking my head with this for hours now not knowing
what's really wrong.


2012-05-21 11:11:43,011 INFO  [Camel (camel-1) thread #0 - file:///tdr/in]
route3            - processing batch of size == 2000 --- [TDR]
2012-05-21 11:11:43,011 INFO  [Camel (camel-1) thread #0 - file:///tdr/in]
route3            - persisting TAP file
ID-WNY46231LBITDBO-1074-1337613100949-0-2
2012-05-21 11:11:43,995 INFO  [main] parser.LteL0TDRParserTest -
********************************************************************************
2012-05-21 11:11:43,995 INFO  [main] parser.LteL0TDRParserTest - Testing
done: sendData(com.vzw.fp.camel.parser.LteL0TDRParserTest)
2012-05-21 11:11:43,995 INFO  [main] parser.LteL0TDRParserTest - Took: 2.015
seconds (2015 millis)
2012-05-21 11:11:43,995 INFO  [main] parser.LteL0TDRParserTest -
********************************************************************************

Thanks,
Ebe

--
View this message in context: 
http://camel.465427.n5.nabble.com/Issue-Choice-not-working-tp5712978.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to