Add New State on Catalog Task: Workflow Not Working

Ishan Bajaj
Giga Expert

Hello Team,

This is regarding the new state on Catalog Task table.

Issue: Have added new state choice as 'Closed Cancelled (9)' under catalog task/task table. Now, when my workflow reaches the catalog task where I have two conditions i.e. Closed Complete: activity.result == 3  & Closed Cancelled: activity.result == 9

If user mark the task as closed complete no issue workflow works and goes to next activity BUT if user mark the task as closed cancelled then workflow gets stuck and doesn't move forward.

Troubleshooting:

1. Have checked with different closure states i.e. Closed Incomplete, Closed Skipped its working as these states are defined OOTB

2. Have checked one BR i.e. SNC - Run parent workflows + associated Script Include - TaskStateUtil().canRunParentWF(current) and added the new state but it doesn't work.

ScreenShot:

1. Task state:-

find_real_file.png

2. Sample Workflow - Have created to check the conditions:-

find_real_file.png

 

Has anyone done these changes in your engagements. If yes, can you please provide solution.

21 REPLIES 21

Hi,

Points below

1) Your workflow is on RITM table and update will happen on SC Task; so wait for condition won't work. It only works when update happens on same record

2) So what we are doing is making the workflow wait till your task is completed

3) Once it gets completed then we are pretending for the workflow that an update happened on RITM so now check the wait for condition and now it would evaluate to true as task got closed

So it would proceed further

Regards
Ankur

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

Hello Ankur,

 

Have tried all the steps provided by you but it doesn't work.

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Can you share details from an actual run of your workflow? And then hover over the Catalog Task utility, to see what the result was?

(just an example from a random workflow)

find_real_file.png

What does the Result in your case show? Does this show Result: 9?

Can you also share details (a screenshot) of how the condition actually looks like? Where it should mention something like activity.result == 9.

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

Hello Mark,

 

Thank you for your response. Kindly find the below screenshot details:-

My only requirement is:-

- if user mark the catalog task is Closed Cancelled then RITM must be Closed Cancelled and Workflow end. This part is not working as I believe the value of Closed Cancelled is not reaching to the workflow activity.

- Or If user mark the catalog task is Closed Complete then workflow should proceed with further activity. This part is working. No issues on that.

 

find_real_file.png

can you validate the "Closed cancelled" value ? is this correct ? while hover the mouse on running workflow context activity , what is showing there ? is it stuck there ?