Cancel UI Action

Al-JhonV
Mega Sage

Hello All,

Once again our Cancel UI button did not cancel the running workflow.

UI Action script:

Aljhon_0-1664865829625.png
Here's what is happening after clicking cancel button:

State = Closed Incomplete
Stage = Request Cancelled

then the state and stage will change according on the stage set in the Workflow:

Aljhon_1-1664866104487.png


This is our workflow:

Aljhon_2-1664866169916.png



Is my script on UI Action is not correct? Please help. T__T

 

 

 

1 ACCEPTED SOLUTION

Hello Ankur, sorry for delay reply. I fixed the issue by updating the existing BR from After to Before update/insert.

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron

Hi,

you have flow running on your record but you are cancelling workflow from UI action script

check this link

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0959612

Hello Ankur, 

The Cancel UI Action should cancel any running workflow from different catalog item of RITM.

the link you provided i think need to cancel a specific name of the workflow. How to cancel the workflow for different catalog item that has different workflow? I mean the global cancelation of workflow not just a specific one.

TIA

Hello @Ankur Bawiskar , my issue right now is clear.
My workflow has been cancelled whenever i click the cancel UI action BUT the flow stages of the Workflow(Flow designer) still active.

That's why after updating the state and stage to Closed Incomplete/Request Cancelled, the flow stage still updating it.

How to kill the flow stages too? Do you have any idea?

@Al-JhonV 

check this link

Cancelling flow does not update the stage state 

If my response helped please mark it correct and close the thread so that it benefits future readers.