Workflow still continue after cancelling the RITM

Al-jhon
Kilo Sage

Hello,

maybe someone from the community can help me, we have this UI Action ="Cancel" in RITM form that can cancel the request.

In some request items, when the support person normally cancel the request:
State = Closed Incomplete
Stage = Request Cancelled

find_real_file.png

which is correct but in some cases, the state and stage after cancelling still updating to Work Inprogress and Fulfillment which is base on the workflow.

How to fix this one?
find_real_file.png

 

 

1 ACCEPTED SOLUTION

Hello Al-john,

Yes you can put this in UI action. but I think best way to do is to put in the after update BR if RITM is cancelled then if the RITM is cancelled from anywhere the workflow will also be cancelled. Also please make sure to check if there is any existing BR that is doing this thing already.

Please mark my respsone as helpful/correct, if it answer your question.

Thanks

View solution in original post

6 REPLIES 6

Mahendra RC
Mega Sage

Hello @Al-jhon 

Can you please share the screenshot of your workflow to understand the workflow?

Thanks

Hello @Mahendra thank you for reply.

I looked on our script for the cancel feature in RITM.

script include:
find_real_file.png

 

UI Action script:

find_real_file.png

on the function cancelItemServer

can i put new Workflow().cancelItem(current); to cancel the item workflow?

Hello Al-john,

Yes you can put this in UI action. but I think best way to do is to put in the after update BR if RITM is cancelled then if the RITM is cancelled from anywhere the workflow will also be cancelled. Also please make sure to check if there is any existing BR that is doing this thing already.

Please mark my respsone as helpful/correct, if it answer your question.

Thanks

Hello Mahendar, there is no BR created for this.
As per our partner vendor who automate our ServiceNow, once the item is canceled the flow and everything in the RITM will be also canceled.

On our case, RITM cancelation works for some request items but sometimes the it is not and the workflow continue like updating the state and stage again and create next catalog task.

Anyway, i updated the UI Action script into:

find_real_file.png

Will do more testing and get back to you for the result.