Wait For Condition on catalog variable in Flow Designer

JJG_SNOW
Mega Guru

I have a Wait For Condition flow action that I want to wait until a checkbox variable is checked on the RITM. I am using a script to achieve this, but its not working.

 

its throwing this error: 

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')
 

 

Wait For Condition script:

 

var checkbox = fd_data.trigger.request_item.variables.send_confirmation_email;

if(checkbox == "true"){
  return true;
}
else{
    return false;
}

 

 

JohnGilmore_1-1681742394561.png

 

 

5 REPLIES 5

ritesh94
Tera Contributor

Hi John,

 

If my understanding is correct and 'send_verification_email' variable is a Boolean, then you need to update this line

if(checkbox == "true"){

in your script to 

if(checkbox == true){

 

because double quotes means a string value and system is unable to compare boolean to string value.

 

Regards,

Ritesh

I tried that but got the same result

JJG_SNOW
Mega Guru

I tried that but its the same result

SNOW44
Mega Guru

Hello,

Any progress on this issue?

I to have same issue when I was trying to use "Wait for condition" script.