Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Avoid workflow getting cancelled due to reaching maximum activity count, usually found in a loop design involving a timer activity - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Avoid workflow getting cancelled due to reaching maximum activity count, usually found in a loop design involving a timer activity
KB0662341

Avoid workflow getting cancelled due to reaching maximum activity count, usually found in a loop design involving a timer activity


8807 Views Last updated : Mar 17, 2025 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Issue

  • I have a loop in a workflow that sometimes is not completing. Workflow gets canceled after x iterations.
  • Why avoid a looping design involving a timer activity

workflow timer loop design

Release

All

Cause

workflows have a maximum activity count, the default value is 100. Once the workflow executes this number of activities the workflow will be canceled.

Resolution

  • you can set the maximum activity count to a high number, found in the workflow properties under the "activities" tab
  • however, this type of design should be avoided, this could potentially flood the scheduler if a lot of workflows are executing this looping design, another problem with this design is the amount of data being generated for tables [wf_history] & [wf_transition_history] if a lot of these workflows get generated and run for a long time
  • the problem with the design is that the workflow does not know when to proceed hence the looping design
  • usually, we find this design where a REST call is waiting for a particular response for the workflow to proceed
  • ideally, the workflow should stop on a wait for condition activity, and then an external REST (Table API) call should be made to the platform updating the record the workflow is running against, moving the workflow forward
  • If an external REST call to the platform can not be achieved, then perhaps a scheduled job running every so often that would handle a REST call to get the appropriate response and update ALL records where workflow is waiting

Related Links

When the workflow reaches the maximum number of executing activities allowed by this setting, the workflow stops. The default maximum setting is 100. Use a setting that is at least 10% greater than the total number of executing activities you anticipate in your workflow.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.