- 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 08:34 AM
Chuck,
Well no, it's not the answer to my question. I wasn't asking how max activity count works, I was asking if there is a way to ignore it. So if what you're trying to get at is "It is not possible to ignore/bypass the Max Activity Count in a Workflow or reset the current Activity Count. The only work-around is refactoring your Workflow, and/or setting Max Activity Count to a really high number." Then I'd accept that. Otherwise, I leave it open to the possibility that this could potentially be done somehow.

- 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
01-20-2022 02:27 PM
You can increase the max activity account for the published Workflow Version using the following script.
First, you'll need to visit the Workflow Context to get the sys_id of the Workflow Version. Update that (as well as the max activity count) before running the script.
Note that this would be at your own risk and I suggest wearing a hoodie and sunglasses for maximum protection:
var wf = new GlideRecord('wf_workflow_version');
wf.get('ac7d37691b0af450d2b1a9fbbc4bcbe8');
wf.setValue('max_activity_count', '200');
wf.setWorkflow(false);
wf.update();