Why don't you try with simple("${body} ==blabla") instead of isequalto ?
Den 11 maj 2016 5:44 em skrev "Kriti [via Camel]" <
[email protected]>:
Hi,
I have a camel route like this -
public void configure() {
-------------------------
-------------------------
from('mina2:tcp://'+ incomingHL7Listener.getIp() + ':' +
incomingHL7Listener.getPort() +'?codec=#rcmhl7codec')
.choice()
.when(body().isEqualTo("Error decoding
HL7")).to('direct:failure').endChoice()
.otherwise().to('direct:success');
from('direct:failure')
.process{
--------------
}
.marshal().hl7();
from('direct:success')
.process{
--------------
}
.marshal().hl7();
The route is executing the when part i.e from('direct:failure')
irrespective of whether the condition gets satisfied or not. Even if the
body is not equal to 'Error decoding HL7', it is going to the failure part
of the route.
I need to get a solution for this as soon as possible. Any suggestions
would be welcome.
Thanks and Regards,
Kriti
------------------------------
If you reply to this email, your message will be added to the discussion
below:
http://camel.465427.n5.nabble.com/choice-when-not-working-as-expected-in-the-camel-route-tp5782452.html
To start a new topic under Camel - Users, email
[email protected]
To unsubscribe from Camel - Users, click here
<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
.
NAML
<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context:
http://camel.465427.n5.nabble.com/choice-when-not-working-as-expected-in-the-camel-route-tp5782452p5782454.html
Sent from the Camel - Users mailing list archive at Nabble.com.