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” />
</json>
</var-def>

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:

then:

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

.

.

</if>

<else>

</else>

</case>