Announcement Announcement Module
Collapse
No announcement yet.
selector-expression with '<' gives syntax error in Router element Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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 >

    Comment


    • #3
      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

      Comment


      • #4
        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.

        Comment


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

          Comment

          Working...
          X