Posted in Groovy, Java EE, JSON

Groovy String comparison in WorkFusion

For instance I have this variable of json expression:

<var-def name=”successFlag”>
<json expression   =”$….Response…..SuccessFlag”>
<var name=”HTTP_RESPONSE” />

to compare it with for an if else condition case, I need to create a boolean variable then put it in the condition; this was really tricky to use, I tried equals, == and some converting ones but this one works like a piece of cake:


<if condition=”${eduSuccess.equals(‘true’)}”>







Posted in Core Java, Groovy, Java EE

Groovy vs Java

  Java Groovy
Access modifier (by default) package public
getters and setters Need to provide for fields Are automatically generated for class members
Utility methods System.out.println println
Support substitution   Can print dynamic content without string concatation

Println(“Hello $name !”)


Specifying type definition   Instead use keyword def

Mandatory for methods, optional for method arguments

Using semicolons Every statements end with semicolon optional
main method To make a class executable Don’t need
Initializing String arrays, static arrays Curly braces { “abc”, “dfg”} Square brackets [“abc”, “dfg”]
autoboxing/unboxing/conversion of primitives yes No, everything is Object and uses only Objects
Inner static classes yes no
Anonymous classes yes no