Wait For Condition on SLA Task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello Community,
I have a requirement in a flow in Flow Designer to detect a business elapsed percentage on an SLA task where it reaches 75% or when it has breached. I am aware that the best practice is to use the 'SLA Task' for its trigger and then use the 'SLA Percentage Timer' action. However, the SLA definition configured in this use-case does not have any start conditions hence I am not able to use that 'SLA Percentage Timer' action.
I am using the record created on 'Task SLA' table for the flow's trigger. I have tried using the 'Wait for Condition' where the Task SLA's business elapsed percentage IS 75. However when the SLA duration has passed the elapsed time, the flow is still 'stuck'. However when I look up the SCTASK record in the RITM on ServiceNow UI, it will somehow 'wake' the flow. Then the flow gets completed.
Appreciate if the community has any inputs, thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
31m ago
Hey @shahiedsali
What you're experiencing is expected behavior based on how Flow Designer evaluates a Wait for Condition and how the SLA Engine processes Task SLA records.
Why does the flow remain in the "Waiting" state?
The Wait for Condition action is event-driven and only re-evaluates when the monitored record is updated in the database.
In your case, the flow is waiting for:
Business Elapsed Percentage = 75%
The challenge is that business_elapsed_percentage is not continuously written to the database as business time progresses. Instead, it is calculated and updated by the SLA Engine during its processing cycle or when the Task SLA record is refreshed.
As a result:
- The SLA may have already reached 75%, but no database update has occurred.
- Since there is no update on the task_sla record, Wait for Condition is never re-evaluated.
- When you open the related SCTASK, RITM, or Task SLA record, the SLA Engine recalculates and updates the SLA information, generating a database update that allows the waiting flow to continue.
Why can't the SLA Percentage Timer be used?
The SLA Percentage Timer action is the recommended solution because it schedules the flow based on the SLA timeline rather than relying on record updates.
However, as you've mentioned, your SLA definition does not have any Start Conditions, so this action isn't available for your use case.
Approaches
- Scheduled Flow
Create a Scheduled Flow that periodically queries the Task SLA table for records where:
Active = true
Business Elapsed Percentage >= 75
Stage is not Completed or Cancelled
A custom "processed" flag = false
Perform the required action and then update the processed flag to prevent duplicate executions.
- Calculate the 75% milestone
If the SLA duration is known when the Task SLA is created, calculate the expected datetime for the 75% milestone and use a Wait Until Date action instead of Wait for Condition. This avoids relying on updates to business_elapsed_percentage.
- Breach detection
If the requirement is simply to detect SLA breaches, consider monitoring the has_breached field (using a scheduled process if necessary) or leveraging the standard SLA breach events/notifications instead of monitoring business_elapsed_percentage.
*************************************************************************************************************************************
If this response helps, please mark it as Accept as Solution and Helpful.
Doing so helps others in the community and encourages me to keep contributing.
Regards
Vaishali Singh
Servicenow Developer
Linkedin - https://www.linkedin.com/in/vaishali-singh-2273361bb