- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2017 01:24 PM
Is there a way to either remove the limit of max activities run on a Workflow, or a way to hard reset the Workflow's current activity count?
I reached a count of 100 activities in 20 minutes and need to be able to run my Workflow for forever essentially. Trying to avoid just setting the max activity count to a really high number, and workflow.activity_count = 0 does not work nor does workflow.setVariable('activity_count', 0). And even if I design my Workflow to be more efficient, at the end of the day, I am constantly looping through it so will potentially reach max activity count eventually.
And yes, I understand that this logic is atypical.
Appreciate any help. Thanks.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2017 08:38 AM
Hi Nathan,
The short answer is: There's no workaround. It is not possible to bypass it.
http://wiki.servicenow.com/index.php?title=Creating_a_Workflow#gsc.tab=0

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2017 05:41 AM
Hi Nathan,
That field is there as a safety catch (or watchdog) to prevent your workflow from running away endlessly. If you set it to a really high value (say 10,000 or 100,000) and you are running out, I would look at redesigning the workflow. That seems a bit excessive for a single process to be running through activities that long.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2017 07:54 AM
Chuck, I was afraid this was going to be the response. I will definitely look into refactoring my Workflow or finding a work-around for my needs and will post what I end up doing.
In case someone else has a similar thought to mine, my reasoning behind this is being able to run a single Workflow on an Incident for the entire duration that it is unresolved. So if for whatever reason an Incident is left open for a year (or more), I would still like the Workflow to be running on that Incident (so at 100 activities in 20 minutes, the really high value for max activity count I'm looking at is 2,890,800+).
More FYI: I need to keep track of how long an Incident is in a certain Priority so reattaching the SLA will prevent me from being able to do this (only want to use one SLA for Incident). And yes, I am aware that I am using SLAs in a funky/unintended fashion. I'm already ignoring the breach functionality of them so they can run longer than intended.
I would be curious to hear if anybody out there has tried/thought of doing the same thing (or if this is too weird, I could be the only one).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2017 08:02 AM
Hi, Nathan
I am also thinking for the same, but could not able to get solution for it. I would be curious to know we can achieve this.
Reset count is good idea, we make request to snow to make enhancement in next upgrade if not till yet.
Thanks
Ziaur Rahman

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2017 08:08 AM
HI Nathan,
Even though it's not the answer you were looking for, it is the answer (how the Max activity count works.)
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
If you are viewing this from the community inbox you will not see the correct answer button. If so, please review How to Mark Answers Correct From Inbox View.
Thank you