GreenPepper supports OGNL expressions. Here are some examples, using the Calculator system:
| < , <= , > , >= , and , or |
GreenPepper supports these simple mathematical expressions. Use the question mark to specify the position of the value returned by the system. For example, if the expected value should be greater than 15, you will write "? > 15" in the cell. |
| + , - , / , * |
GreenPepper performs simple operations as a resulting expression. To specify you want to evaluate those operations prior to the comparison, insert an equal sign at the beginning of the operation (ex: =4+1-3). |
| Import |
| com.greenpepper.samples.application.calculator |
| rule for |
calculator |
| x |
y |
sum? |
product? |
quotient? |
| 6 |
2 |
8 |
12 |
3 |
| 7 |
0 |
7 |
0 |
error |
| 40 |
50 |
90 |
? > 100 |
|
| 4 |
-5 |
? <= 0 |
-20 |
? <= 0 |
| 3 |
3 |
? < 1 or ? > 4 |
? >= 9 and ? < 12 |
"1" |
| 4 |
2 |
=4+2-0 |
=2*4 |
=4/2 |