cancel
Showing results for 
Search instead for 
Did you mean: 

groovy

tomi87
Champ in-the-making
Champ in-the-making
Can I use this in groovy?   ${StudentAppInfo.month <= 30}
If not, how can i use this ?

out:println "Checking month for " + studentName
         needVisa = true
         if(${StudentAppInfo.month <= 30} ) {
         needVisa= false
         }
4 REPLIES 4

jbarrez
Star Contributor
Star Contributor
No, you don't need expression in a groovy script … it's just programming.

tomi87
Champ in-the-making
Champ in-the-making
So If I want to get my month from the class StudentAppInfo I can just write : 

<scriptTask id="studentStayLongerThen3MonthInTargetCountry" name="student stay longer then 3 month in target country" scriptFormat="groovy">
      <script>out:smileytongue:rintln "Checking month for " + studentName
   needVisa= true
   if(month <= 30 ) {
   needVisa= false
   }
   out:smileytongue:rintln "Checked month for " + studentName+ " Month: " + ${StudentAppInfo.month};</script>
    </scriptTask>

?

jbarrez
Star Contributor
Star Contributor
If month is a variable yes. But I assume you just need to type something like yourObject.month.
Only way one though is by trying it 😉

tomi87
Champ in-the-making
Champ in-the-making
Thank you !