wait for condition in flow designer always Cancelled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
I have created a basic Flow Designer configuration to copy the Resolve SLA business elapsed time value into a custom resolve time field.
To achieve this, I used a “Wait for condition” step to wait until the record is resolved. However, the flow is getting canceled consistently, and I’m not sure why this is happening.
Could you please review the condition I’ve configured (attached below) and let me know if I am missing anything or if there is any misconfiguration?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Have you clicked into the details for the flow execution? Reviewed the flow logs?
Out of curiosity, why are you trying to copy the resolve time into a custom field?
Can you set the trigger to when the SLA itself reaches a resolved state, to then set the value? So instead of having a wait for, the flow only triggers when the condition is met.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @jcmings
Thank you for your response.
Our requirement is to bring the business elapsed time value directly into the case form, rather than using a separate database view.
We have reviewed the logs and observed that the flow is failing only when it runs automatically—i.e., when the case is created and then resolved, the flow gets canceled. However, when we test it manually by selecting a record, the flow completes successfully and the value is populated. The logs also show that the resolve value is being captured.
Additionally, we tried using the “SLA is breached” condition instead of a lookup record, but that scenario is also getting canceled during execution, while it works correctly during manual testing.
Could you please review and advise what might be causing this behavior?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hmm I'm not sure why this is happening. I'd encourage you to do a deeper dive into the logs. Maybe there is something else failing the flow. It's probably worth running a few debuggers (in particular, Debug Business Rules (search for that in your filter navigator), maybe Debug Security Rules). Does the flow need certain permissions to run (e.g. "run as system user" rather than "current user")?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Does your task reach a terminal state as in does it get inactivated when status is set as resolved? Completed slas end up canceling the flow. Just change your trigger to something like when active is set to false on either the task or the sla record.
You can follow these script includes and line numbers from this stack trace to see how exactly a completed sla ends up canceling the sla flow:
at [global] 'TaskSLAFlowSNC' [sys_script_include:2495841273633300e289235f04f6a797 ➚]:147
at [global] 'TaskSLA' [sys_script_include:10d0c7590a0a2c394e2b1766a6e5fbad ➚ ➚]:657
at [global] 'TaskSLA' [sys_script_include:10d0c7590a0a2c394e2b1766a6e5fbad ➚ ➚]:218
at [global] 'TaskSLAController' [sys_script_include:24a759e30a0a2c3960e024ad3b60d9e8 ➚ ➚ ➚ ➚ ➚ ➚]:877
at [global] 'TaskSLAController' [sys_script_include:24a759e30a0a2c3960e024ad3b60d9e8 ➚ ➚ ➚ ➚ ➚ ➚]:798
at [global] 'TaskSLAController' [sys_script_include:24a759e30a0a2c3960e024ad3b60d9e8 ➚ ➚ ➚ ➚ ➚ ➚]:722
at [global] 'Mutex' [sys_script_include:c1bc1dc90a0a2c391faa7cf7cc1cb267 ➚]:99
at [global] 'SelfCleaningMutex' [sys_script_include:e617cd109f2020008f88ed93ee4bcc57 ➚]:18
at [global] 'TaskSLAController' [sys_script_include:24a759e30a0a2c3960e024ad3b60d9e8 ➚ ➚ ➚ ➚ ➚ ➚]:633
at [global] 'TaskSLAController' [sys_script_include:24a759e30a0a2c3960e024ad3b60d9e8 ➚ ➚ ➚ ➚ ➚ ➚]:171
at [global] 'TaskSLAController' [sys_script_include:24a759e30a0a2c3960e024ad3b60d9e8 ➚ ➚ ➚ ➚ ➚ ➚]:133
at [global] 'Run SLAs' [sys_script:6cdfa0737f0000016f6bc23171995b41 ➚]:6
at [global] 'Save' [sys_ui_action:47fd7f4dc0a8000600a552278b5232ab ➚]:2
Also if your requirement is for reporting you can just dot walk to task without a database view from task_sla. Dotwalking a field to a list is just a left join anyway.
SELECT
--all task_slafields
--+ dotwalked fields from task
FROM
task_sla
LEFT JOIN task ON task_sla.task = task.sys_id