flow designer wait for condition builder script not working?

KM SN
Tera Expert

I have used below script to check the devicehash and if it consist any value it can go further otherwise it should wait until it get the value. Please check below otherwise suggest me another base practice if any?

 

var devicehash = fd_data.trigger.request_item.variables.device_hash.getValue();
if(devicehash != ""){
    answer = true;
}
else{
answer = false;
}

h-1.png

2 REPLIES 2

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Instead of answer try 

return true;

return false;

-Anurag

I also tried with return but it just thrown below as error.

java.lang.ClassCastException: class java.lang.Boolean cannot be cast to class java.lang.String (java.lang.Boolean and java.lang.String are in module java.base of loader 'bootstrap')