Workflow stuck at wait for condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2020 05:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 10:30 PM
Thanks all for your response.
I see there is 1 business rule .Please confirm would it cause an issue if yes then removing set workflow false and abort action step.Would it resolve issue .Please help.Hereby I am giving state value also for change request.
Thanks .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 10:45 PM
Hi Abhishek,
I assume this is before update business rule on change request table and this BR would trigger when workflow tries to move the state to implement state
So it won't update change request state until all associated change tasks are closed; So if this is by design then you need to add wait for condition in workflow before moving to implement state and check whether all change tasks are completed or not
Does your change request has any change task which is still open if yes then this BR is blocking the update
Do you want this BR to work only when somebody manually tries to change state to implement and you are ok for any script which updates change request to implement having pending change tasks?
if yes then you can ensure this BR runs only for interactive session and not when something runs from script
gs.getSession().isInteractive()
OR else if you remove setAbortAction the workflow should proceed but that won't be a real time scenario
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2020 10:53 PM
Hi Abhishek,
The wait for Condition only gets executed when the record is updated So check with record update.
Please mark correct and Helpful if it helps
Thanks & Regards
Himanshu Dubey