Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

wait for condition script not working in flow designer

Harrys09
Tera Contributor

i'm trying to do scripting in a the wait for condition where the wait for condition should wait till the variable 'ready_to_begin' is set to 'Yes' or it should wait till the state is 'closed complete'. i have written the script below but the wait for condition does not wait it just evaluates to false and the flow continues. Does anyone have any suggestions please on how i can get this script to work in the wait for condition in flow designer:

Harrys09_0-1694096032922.png

 

Thank you

Harry

 

Harrys09_1-1694095716335.png

 

 

1 ACCEPTED SOLUTION

I think that the catalog variables are only checked/collected when the flow initially starts. You might need to do a loop or additional timed variable collection. Or possibly creating a BR on the record to update a system property or flow variable when that catalog variable is updated.

View solution in original post

3 REPLIES 3

jonsan09
Giga Sage
Giga Sage

Have you tried removing the "else { return 'false'}" portion of the statement? You might also want to enable timeout if you don't want the flow to wait indefinitely

hi @jonsan09, thanks. yes i have tried that but the wait for condition still does not wait.

I think that the catalog variables are only checked/collected when the flow initially starts. You might need to do a loop or additional timed variable collection. Or possibly creating a BR on the record to update a system property or flow variable when that catalog variable is updated.