
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
03-01-2020 12:35 AM - edited 08-03-2024 06:49 AM
Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
Workflow Editor is a legacy product to maintain existing workflows already in production. For new use cases and workflows, use ServiceNow Workflow Studio. Workflow Studio is a low-code alternative to Workflow Editor. |
Hi there,
Ever stumbled over the Catalog Task utility within Workflows, which only contains one condition: Always? Out-of-the-box, after performing the Catalog Task activity (directly or after the "Wait for completion") the single Always condition will be triggered. So no matter what the actual result of the Catalog Task activity is, there's just one condition...
How can we change this behavior when working with Workflows? Or even better, how can we change this behavior by default?
Out-of-the-box
To visualize what we are talking about when discussing the Catalog Task activity which contains only one condition:
Conditions
So can we add conditions? Like "Complete" and "Incomplete"? To be short: Yes, that's possible. One side note: checking on the actual result, can only be done when using "Wait for completion".
You can edit conditions through double-clicking on an existing condition. Adding a condition can be done through right-clicking on the activity, and adding a new condition.
Complete Condition
activity.result == 3
Incomplete Condition
activity.result == 4 || activity.result == 7
Permanent adjustment
In the step above, we changed the Conditions on a specific "Catalog Task" activity within one Workflow. Though, could we change this for all future use of the "Catalog Task" activities?
The Conditions which are applied upon drag & drop of a new "Catalog Task" activity onto your Workflow Canvas, are actually stored within the "Condition defaults" table [wf_condition_default].
When searching for the "Catalog Task" Activity definition, actually no results will be found! The reason is simple: there are no conditions set up, therefore automatically Always will be populated as a condition.
So let's set up our own conditions!
Complete
Incomplete
UI Policy
Like already mentioned, these conditions can only be applied when using the Catalog Task utility with "Wait for completion" checked. This checkbox is already checked by default out-of-the-box. To make sure this checkbox won't be manually changed, we'll set up a UI Policy and UI Policy Action to hide the "Wait for completion" field.
Result
When re-running a Workflow with the new Catalog Task activity with Complete and Incomplete conditions, the condition will match the actual results (State) of the Catalog Task. Complete when the state is Closed Complete (3), Incomplete when the state is Closed Incomplete (4) or Closed Closed Skipped (7).
The Catalog Task activity now looks by default like:
Share
An Update Set with these Condition adjustments can be downloaded from Share:
- Workflow Catalog Task conditions
---
And that's it actually. Hope you like it. If any questions or remarks, let me know!
C |
If this content helped you, I would appreciate it if you hit bookmark or mark it as helpful.
Interested in more Articles, Blogs, Videos, Podcasts, Share projects I shared/participated in? |
Kind regards,
Mark Roethof
ServiceNow Technical Consultant @ Quint Technology
1x ServiceNow Developer MVP
1x ServiceNow Community MVP
---
- 8,983 Views

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This is great . Thank you so much Mark. Just one quick question, this default change on catalog task activity condition , Will this impact existing workflows which were built with only "Always" condition ?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Nitin,
This will not impact already existing workflows and active workflow context. "could we change this for all future use of the "Catalog Task" activities?"
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello Mark,
Thank you for your post. I'm also doing the same thing but for the new state and workflow is getting stuck and not working.
Can you please look into this post and if possible help me - https://community.servicenow.com/community?id=community_question&sys_id=a3e7292edb7820104aa5d9d9689619a7
Post Name -
Add New State on Catalog Task: Workflow Not Working
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello Mark,
I have added new state in sc_task table called executed value is 205
i have added the condition as per your article but workflow is not moving forward
Please let me know if there is any other things to be configured.
Thanks
Abhay