the way of cancelling the SLA flow including some conditions

_imuya
Tera Contributor

I would like to cancel the records(the past SLA execution records) in the Flow engine context【sys_flow_context】, which meet the below conditions, at once.
------------------------------------------------------------
Condition
(the stage of task SLA of the flow is Completed or Cancelled)
AND
(the state of flow is Waiting)

*we are using the our unique SLA flow but Task SLA is trigger of the flow like Defalut SLA flow
------------------------------------------------------------
Is there any effective way to do the above cancellation?
I think script seems to be effective but I am not sure how content should I write on the script.
Could you inform me how script should I write to realize this?


#SLA #flow

1 ACCEPTED SOLUTION

Great, if you have cause sorted then this guide from SNC should help you with the syntax

How to Cancel In Progress Flow Executions - Support and Troubleshooting (servicenow.com)

View solution in original post

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi, before looking at how to cancel active contexts my first action would be to investigate how\why the contexts are not completing during normal task life-cycle? It may be that your issue is with sla definition conditions meaning the contexts should be active and your tasks need updating, or incorrectly configured flow which if not fixed will simply result in you having to revisit this again in future.
Whenever unexpected behavior is encountered the first action should always be to identify and resolve the cause, then look at remediating any impact.

 

Hi,
Thank you for your reply.
Actually, the root cause has already been identified.
System property "com.glideapp.workflow.duration.relative_uses_schedule" is not set, that was a cause, so that I will make this system property true as permanent solution.

The purpose of  performing this action is to cancel the execution history of an existing flow.
Is it possible to execute the cancellation process at once according to the above conditions?

Great, if you have cause sorted then this guide from SNC should help you with the syntax

How to Cancel In Progress Flow Executions - Support and Troubleshooting (servicenow.com)