Scripting a delay in a wait-for condition

tahnalos
Kilo Sage

Hello all.

I have a wait for condition in my workflow that is supposed to look at a field and run if the field is a particular value.   That field is being set by a UI action.

The problem I am having is that the wait for condition does not trigger when the UI action is pressed.   If I press the UI action again, then it runs.   I am strongly suspecting that the issue involves some sort of delay when the UI action is run so I would like to have the wait for condition have a delay built in before evaluating the field.

Ideas on how I can accomplish this?

Thanks

7 REPLIES 7

So it looks like the Wait For condition isn't just running once.   Observe:


find_real_file.png



First of all, I added a gs.log ('current.u_reject_reason') to the wait for condition before the if.


I hit the Resubmit Schedule button twice, once at 16:46:00 and again at 16:46:54. You'll notice that after I hit the resubmit button at 16:46:00 it runs a bunch of times, and ultimately does not update because the last log shows current.u_reject_reason = schedule.   Then later on, I press the button again.   Only this time, the gs.log only runs once and is the correct value.



Is there a reason why the workflow is doing this the first time and not the second?



Thanks


I have no additional information at this time. If nobody else offers anything, I recommend reaching out to customer support. I'll be interested to hear what they have to say.


HI Service Portal - ServiceNow


Contact Support | ServiceNow


Yes, a HI incident has been opened in response to this anomalous behaviour.



Thanks