Results 1 to 5 of 5

Thread: selector-expression with '<' gives syntax error in Router element

  1. #1
    Join Date
    Jan 2010
    Posts
    124

    Thumbs down selector-expression with '<' gives syntax error in Router element

    Code:
    	<int:chain id="leadRetryChain" input-channel="leadExportRetryRequestChannel">     
         	        <int:header-enricher>
            	         <int:header name="LeadSource" value="RetryQueue"/>
            	        <int:header name="LeadsRetryCount" expression="headers['JMSXDeliveryCount']+1"/>
         	        </int:header-enricher>
    		<int:recipient-list-router>
    			<int:recipient channel="leadsErrorChannel" selector-expression="headers['LeadsRetryCount']>5"/>
    			<int:recipient channel="leadExportRequestChannel" selector-expression="headers['LeadsRetryCount']<5"/>
    		</int:recipient-list-router>    	   	
     	</int:chain>
    The second int:recipient selector expression is not accepting '<' than symbol. Is there a way i can get this functionality work?
    I am using Latest Spring and Spring integration versions with 1.6 java

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello

    On SI documentation appear an example in this way

    Code:
    release-strategy-expression="#this.size() gt 5"
    therefore gt replaces or is equivalent than >
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3
    Join Date
    Jan 2010
    Posts
    124

    Default

    Hi pompeii,
    Thanks for the pointer. gt and lt are working fine now, but i tried 'lte' for Less Than or Equal to functionality and it looks like it doesn't recognize 'lte'. Is there anyway i can get lte to work?
    sri

  4. #4
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,020

    Default

    Please see the SpEL reference

    http://static.springsource.org/sprin....html#d0e11931

    Each symbolic operator can also be specified as a purely alphabetic equivalent. This avoids problems where the symbols used have special meaning for the document type in which the expression is embedded (eg. an XML document). The textual equivalents are shown here: lt ('<'), gt ('>'), le ('<='), ge ('>='), eq ('=='), ne ('!='), div ('/'), mod ('%'), not ('!'). These are case insensitive.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  5. #5
    Join Date
    Jan 2010
    Posts
    124

    Default

    Thank you Gary. I was using lte rather than le
    --sri

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •