Workflow Task Activity set to cancelled

Brian Lancaster
Tera Sage

So a RITM was set to closed incomplete when the requester asked for it to be canceled.  However in set the task to closed incomplete but cancelled it in the workflow.  It then did not close out the workflow and cause the request to remain open.  How can I get around this?  I tried adding another condition but of cancelled but that did not work.  See screenshot below of what I'm seeing in the workflow.

find_real_file.png

1 ACCEPTED SOLUTION

Brian Lancaster
Tera Sage

We didn't want to change any of the OOB BRs so I created a new one that runs before update with condition of State is one of (Closed Incomplete, Closed Skipped) and stage is fulfillment.  It then sets the stage to Request Canceled.

View solution in original post

4 REPLIES 4

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Have to reproduce. This is because you've cancelled the RITM? You didn't set the Catalog Task on Closed Incomplete? Setting the Catalog Task to Closed Incomplete, should result in the Task being handled. Result (out-of-the-box) should then be 4, which equals Closed Incomplete.

For example:
find_real_file.png

In your case howerer, the Catalog Task step is not finished. It's really cancelled. In my opinion (have to reproduce) no mather what condition you will add, those conditions will not be followed, the utility is cancelled.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Mark Roethof
Tera Patron
Tera Patron

 

Just reproduced. Indeed handling the RITM state manually causes this issue, the workflow is cancelled like expected, the Catalog Task automatically closed incomplete.

Also out-of-the-box, the Request remains open! So already an out-of-the-box issue unfortunately.

Workaround could be, a Business Rule on sc_req_item, on update, condition state changes to Closed Incomplete:

Then GlideRecord get the parent request, and update the state.

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Brad Bowman
Kilo Patron
Kilo Patron

Changing the State of the RITM to Closed Incomplete triggers the Business Rule Cancel Workflows Upon Cancellation.  The Business Rule Close Tasks Due to Cancellations is also triggered which is changing the task state, but since the workflow is already cancelled, that's why you're seeing these results.  A workaround would be to inactivate the cancel workflow BR if all of your flows have incomplete paths that will cause them to complete execution. 

Brian Lancaster
Tera Sage

We didn't want to change any of the OOB BRs so I created a new one that runs before update with condition of State is one of (Closed Incomplete, Closed Skipped) and stage is fulfillment.  It then sets the stage to Request Canceled.