Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Operator

Description

==

equals

>

greather than

>=

greather than or equals

<

less than

<=

less than or equals

!=

not equals

contains

For testing if contains in a string based value

not contains

For testinf if not contains in a string based value

regex

For matching against a given regular expression pattern defined as a String value

not regex

For not matching against a given regular expression pattern defined as a String value

in

For matching if in a set of values, each element must be separated by comma.

not in

For matching if not in a set of values, each element must be separated by comma.

...

Code Block
simple("${in.header.type} in 'gold,silver'")

And for all the last 3 we also support the negate test using not:

Code Block

simple("${in.header.type} not in 'gold,silver'")
Tip
titleCan be used in Spring XML

As the Spring XML does not have all the power as the Java DSL with all its various builder methods, you had to resort to use some other languages
for testing with simple operators. Now you can do this with the simple language. In the sample below we want to test if the header is a widget order:

Code Block
xml
xml
    <from uri="seda:orders">
       <filter>
           <simple>${in.header.type} == 'widget'</simple>
           <to uri="bean:orderService?method=handleWidget"/>
       </filter>
    </from>

...