I have also tried <camel:el>{$body == "ALLREADY_PROCESSED"}</camel:el> <camel:el>{$body eq "ALLREADY_PROCESSED"}</camel:el> <camel:el>{$body.equals( "ALLREADY_PROCESSED")}</camel:el> <camel:el>${in.body == "INCIDENT_ALLREADY_PROCESSED"}</camel:el>
but still the otherwise continues to be executed ? Does any one have any clues? --Matt SoaMattH wrote: > > > Just to clarify the body is Body:ALLREADY_PROCESSED > > > SoaMattH wrote: >> >> >> The syntax on the el has me a little stumped? >> I put some logging in to se what is in the Exchange and the two points of >> interest are: >> >> BodyType:afullyqualified.ProcessedStatusEnum.ProcessedStatusEnum, >> Body:ALLREADY_PROCESSED >> >> I have tried: >> <camel:el>{$body == 'ALLREADY_PROCESSED'}</camel:el> >> <camel:el>{$body = 'ALLREADY_PROCESSED'}</camel:el> >> <camel:el>{$body.equals('ALLREADY_PROCESSED')}</camel:el> >> And the </camel:otherwise> is always executed ....... >> >> What am I doing wrong in the el ? >> >> .... >> <camel:to uri="bean:receiverFile?method=process" /> >> <camel:choice> >> <camel:when> >> <camel:el>{$body == 'ALLREADY_PROCESSED'}</camel:el> >> <camel:to ref="incidentFilePriorProcessedEndPoint"/> >> </camel:when> >> <camel:when> >> <camel:el>{$body == 'INCIDENT_PROCESSED_FAILURE'}</camel:el> >> <camel:to ref="incidentFileDeadLetterEndPoint"/> >> </camel:when> >> <camel:when> >> <camel:el>{$body == 'NOT_PROCESSED_YET'}</camel:el> >> <camel:to ref="incidentFileDeadLetterEndPoint"/> >> </camel:when> >> <camel:otherwise> >> <camel:to uri="log:afullyqualified?showAll=true&level=FATAL"/> >> <camel:to ref="incidentFileProcessedEndPoint"/> >> </camel:otherwise> >> </camel:choice> >> >> >> >> Claus Ibsen-2 wrote: >>> >>> On Mon, Jan 4, 2010 at 11:59 PM, SoaMattH <matt...@netpacket.com.au> >>> wrote: >>>> >>>> >>>> I have also made the assumption that the return object ends up in >>>> out.body is this the case? >>>> >>> >>> You should just use ${body} in 99% of the cases as Camel uses the >>> Pipes And Filters EIP pattern (pipeline) in a route when you have >>> multiple steps, which you have as you got: to + choice = 2 steps. So >>> the OUT from to becomes IN for the choice. >>> >>> >>>> --Matt >>>> >>>> >>>> >>>> SoaMattH wrote: >>>>> >>>>> >>>>> I am just having a little difficulty on the syntax and the doco at the >>>>> juel web site >>>>> on el is a bit light on >>>>> >>>>> What I have done: >>>>> >>>>> <camel:to uri="bean:receiverBean?method=processData" /> >>>>> <camel:choice> >>>>> <camel:when> >>>>> <camel:el>{$out.body == >>>>> 'fullyqualified.ProcessedStatusEnum.ALLREADY_PROCESSED'}</camel:el> >>>>> <camel:to ref="incidentFilePriorProcessedEndPoint"/> >>>>> </camel:when> >>>>> <camel:when> >>>>> <camel:el>{$out.body == >>>>> 'fullyqualified.ProcessedStatusEnum.PROCESSED_FAILURE'}</camel:el> >>>>> <camel:to ref="incidentFileDeadLetterEndPoint"/> >>>>> </camel:when> >>>>> <camel:when> >>>>> <camel:el>{$out.body == >>>>> 'fullyqualified.ProcessedStatusEnum.NOT_PROCESSED_YET'}</camel:el> >>>>> <camel:to ref="incidentFileDeadLetterEndPoint"/> >>>>> </camel:when> >>>>> <camel:otherwise> >>>>> <camel:to ref="incidentFileProcessedEndPoint"/> >>>>> </camel:otherwise> >>>>> </camel:choice> >>>>> >>>>> Every thing is going through the otherwise clause so I am thinking >>>>> that I am acessing and comparing the return enum incorrectly? >>>>> Any help on syntax would be appreciated. Usually in in JSP's you go eq >>>>> rather than == >>>>> >>>>> --Matt >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Claus Ibsen-2 wrote: >>>>>> >>>>>> Yeah >>>>>> >>>>>> There should be a <camel:method> to call a method on a bean. >>>>>> >>>>>> >>>>>> On Thu, Dec 31, 2009 at 8:32 AM, SoaMattH <matt...@netpacket.com.au> >>>>>> wrote: >>>>>>> >>>>>>> >>>>>>> I am just looking at >>>>>>> http://camel.apache.org/content-based-router.html >>>>>>> so seems like my initial thoughts were close. >>>>>>> >>>>>>> --Matt >>>>>>> >>>>>>> >>>>>>> >>>>>>> SoaMattH wrote: >>>>>>>> >>>>>>>> >>>>>>>> I am using camel 2.0. >>>>>>>> I want to call a bean as part of my xml route configuration and >>>>>>>> then evaluate where to go with somthing like: >>>>>>>> >>>>>>>> .... >>>>>>>> <camel:to uri="bean:recieverA?method=processA" /> >>>>>>>> <camel:choice> >>>>>>>> <camel:when> >>>>>>>> <camel:el></camel:el> >>>>>>>> <camel:to ref="EndPointA"/> >>>>>>>> </camel:when> >>>>>>>> <camel:when> >>>>>>>> <camel:el></camel:el> >>>>>>>> <camel:toref="EndPointB"/> >>>>>>>> </camel:when> >>>>>>>> </camel:choice> >>>>>>>> ..... >>>>>>>> >>>>>>>> are there any examples of how this is done ? >>>>>>>> >>>>>>>> --Matt >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> ----- >>>>>>> /* ---------------------- >>>>>>> ** Matt Hannay >>>>>>> ** Unix Java C >>>>>>> ** Software Engineer >>>>>>> ** ------------------- */ >>>>>>> -- >>>>>>> View this message in context: >>>>>>> http://old.nabble.com/Not-sure-of-syntax-or-if-its-possible-or-an-example-tp26975789p26976141.html >>>>>>> Sent from the Camel - Users mailing list archive at Nabble.com. >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Claus Ibsen >>>>>> Apache Camel Committer >>>>>> >>>>>> Author of Camel in Action: http://www.manning.com/ibsen/ >>>>>> Open Source Integration: http://fusesource.com >>>>>> Blog: http://davsclaus.blogspot.com/ >>>>>> Twitter: http://twitter.com/davsclaus >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>>> ----- >>>> /* ---------------------- >>>> ** Matt Hannay >>>> ** Unix Java C >>>> ** Software Engineer >>>> ** ------------------- */ >>>> -- >>>> View this message in context: >>>> http://old.nabble.com/Not-sure-of-syntax-or-if-its-possible-or-an-example-tp26975789p27020826.html >>>> Sent from the Camel - Users mailing list archive at Nabble.com. >>>> >>>> >>> >>> >>> >>> -- >>> Claus Ibsen >>> Apache Camel Committer >>> >>> Author of Camel in Action: http://www.manning.com/ibsen/ >>> Open Source Integration: http://fusesource.com >>> Blog: http://davsclaus.blogspot.com/ >>> Twitter: http://twitter.com/davsclaus >>> >>> >> >> > > ----- /* ---------------------- ** Matt Hannay ** Unix Java C ** Software Engineer ** ------------------- */ -- View this message in context: http://old.nabble.com/Not-sure-of-syntax-or-if-its-possible-or-an-example-tp26975789p27031498.html Sent from the Camel - Users mailing list archive at Nabble.com.