Ankur Bawiskar
Tera Patron

@nameisnani 

Can you try this in DEV?

-> When INC is Resolved/Closed, search for Active flow which is running i.e. this 3 strike one and cancel the flow context
something like this in after update BR

var flow = new GlideRecord("sys_flow_context");
flow.addQuery('name', '3 Strike Rule_VS'); // flow name
flow.addQuery('source_record', current.getUniqueValue());
flow.addEncodedQuery('stateINWAITING,IN_PROGRESS,QUEUED');
flow.query();
if (flow.next()) {
    var gpa = new sn_ph.GlideProcessAutomation(flow.getValue('sys_id'));
    if (!gpa.isTerminated()) {
        //cancel the flow and provide the reason
        gpa.cancel('Cancelling this flow as INC is Resolved/Closed');
    }
}

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar  Thanks - i am doing test ing 

@Ankur Bawiskar 

 

One more thing also noticed that 

 

I kept this incident Onhold and awaitng caller - after some time i changed in progress 

 

still strike has been triggered 

 

@Ankur Bawiskar  could u please help me here please 

 

nameisnani_0-1776244417569.png

 

That's what I already mentioned: you need to put a safeguard in, so you know if the ticket was changed or not. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark