Scripting a delay in a wait-for condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2017 08:41 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2017 09:25 AM
Can you share with us the details of your UI action and waitfor condition?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2017 09:51 AM
Workflow Wait For Condition:
if (current.u_reject_reason == 'reschedule')
answer = true;
else
answer = false;
UI Action:
resubmitSchedule();
action.setRedirectURL(current);
function resubmitSchedule ()
{
current.u_reject_reason = 'reschedule';
current.update ();
}
I'm thinking a delay needs to be coded either after the update on the UI Action or before the if on the Workflow Wait For Condition. If I press the UI Action again, it works.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2017 09:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2017 10:01 AM
I actually did. Same result. In fact, it was actually in its non-script form before I converted to a script for debugging.