Declared return type class java.lang.Integer is not compatible with type class.java.lang.long for expression isCorrect

1
0
-1

I have two business variable sample and sample1

Sample1 elements: name type text

Sample elements : name , type text

sample1,type Sample1

I have write a custom query for sample :counter

Select count(c) from counter c JOIN c.sample1 s where s.name:=name

Return type : long

Then I have a defined a process variable: isCorrect

Return type :long ,default value :0

Then I have added operation on a task name "check".

isCorrect takes values of Sample.counter

On execution of this operation it is showing : Expected return type class java.lang.Integer is not compatible with type class java.lang.long isCorrect.

1 answer

1
0
-1

kindly cast the integer variable to long as shown below

def isCorrect = (long) integerVariable

return isCorrect;

Thanks

Bharathwaj RK

Notifications