Preventing SuiteCRM workflow loops with repeated runs

A workflow that keeps re-firing on the same record can flood email, reassign records and load the server. This page explains how Repeated Runs, run-on choices and conditions stop that, and how to find workflows whose own actions undo their conditions.

On this page

Why SuiteCRM workflows loop and how to stop a workflow firing endlessly

A workflow loop happens when a SuiteCRM Workflows (formerly AOW) rule fires on a record, its actions change a field or create a related record, and that change satisfies the same trigger again. The fix is controlling when a workflow may run on a given record, so the trigger fires once per intended event rather than on every save. In practice the symptom is a record whose modified date keeps moving, a notification or task that is created again and again, or a related record that multiplies. Teams usually notice it after a workflow goes live on a busy module such as Cases or Leads, or after someone adds an action that edits the same module the workflow watches. Because the trigger and the action can both sit on one record, a loop can start from a single save that nobody in the team considered risky.

This work is needed whenever a workflow runs on a record type that other workflows, users or integrations also update, and whenever an action writes back to the triggering module. Before you change anything, list each workflow's module, trigger (on save, on create or from the scheduler), conditions and actions, then ask which actions can make a condition true again. The controls to review are the Repeated Runs setting, the run-on choices and the conditions themselves. Confirm in your own instance how each setting behaves for your SuiteCRM version, since the labels and the order of checks are the details that most often differ from what a team expects. Check your release against the SuiteCRM 8 compatibility matrix and your test instance before relying on any default.

Plan the change as a small, testable decision: decide whether a workflow should run once per record, once per field change or every time it is saved, and write the condition that makes that true. Test with a record that a real user would edit, not only the sample record you created, and watch for side effects on the related records the actions touch. Keep a note of which workflows write to which modules, because that map is what tells you a loop is possible before a user reports one. Note that this section covers the loop itself, so for the separate question of why a workflow does nothing at all, see the troubleshooting guidance linked elsewhere on this page.

Which loop control fits which workflow

This table compares the controls available for stopping a SuiteCRM workflow from firing again on the same record: Repeated Runs, run-on choices, field-change conditions and status or flag fields. Read each row for when the control fits and what it costs in behavior, then confirm the exact labels and options in your SuiteCRM version before relying on them.

ControlWhen it fitsTrade-off
Repeated Runs settingWorkflows that should run once per record, or only a set number of times, such as a single reminder emailBlocks re-execution, but it can also block a legitimate second run when a record must be handled again later
Run on createTriggers that should act only when a record is first saved, such as assigning a new leadDoes not catch changes made later, so updates that need the action will be missed
Run on updateTriggers that react to edits, such as recalculating a field after a status changeFires on every save, so a workflow that edits its own record can re-trigger itself without a guard
Field-change conditionWorkflows that should act only when a specific field has changed to a specific valueDepends on the condition matching exactly; a changed field set back by another action can still cause repeats
Status or flag fieldWorkflows that must mark a record as processed, such as a custom checkbox set by the final actionNeeds every path, including manual edits and other workflows, to respect the flag, so it must be documented
Scheduler-based runDate-driven jobs where the record should be picked up once per period, such as overdue checksRuns at scheduled intervals, so timing and the processed records list need checking to confirm each record is handled once
Combined controlsWorkflows that edit their own trigger field or related records, where one control alone is not enoughMore settings to maintain and test, so each combination should be verified on a staging instance

Configuring a workflow so it cannot re-fire on the same record

This sequence turns a workflow that could loop into one that fires once per intended change, with a guard that stops its own actions from re-triggering it. Each step ends with a check you can record before the workflow reaches production data.

  1. Back up and test on staging

    Before changing anything, take a backup of the SuiteCRM database and files and make the change on a staging instance that holds a copy of production data. Your admin or the implementation partner does this, and the output is a staging environment where you can see exactly what the workflow does. The SuiteCRM migration documentation also recommends backing up files and the database before any significant change, so use the same discipline here. Confirm the backup restores before you go further.

  2. Inventory workflows touching the same module

    List every active workflow whose trigger or any action writes to the same module, including workflows that update related records, create follow-up records or send email. Record each workflow's module, run-on setting, Repeated Runs setting and each field its actions change. The output is a short table that shows where one workflow's action can satisfy another workflow's condition. Look for pairs where workflow A sets a field that workflow B uses as its trigger, because those pairs are the usual source of loops.

  3. Set run-on and Repeated Runs

    For each workflow, choose the run-on option that matches the business event, such as on record creation only or on record update, and set Repeated Runs to the smallest value that still does the job. Keep Repeated Runs off or at its most restrictive setting for workflows that should act once per record. Document the chosen values next to the inventory. The output is a configuration in which no workflow is left at a permissive default by accident. Confirm the exact options in your SuiteCRM version's workflow screens, since labels can differ between releases.

  4. Add a guard condition or marker field

    Give each workflow a condition that is false after its own action has run. A common pattern is a dedicated marker field, such as a checkbox or date field, that the workflow sets once and checks before acting. Another is a condition on the field the workflow writes, so an update that already produced the target value does not match again. Keep the marker field out of user layouts unless users need to see it. The output is a workflow whose condition cannot be true for the record it just changed.

  5. Test with a single record

    Pick one test record on staging and trigger the change that starts the workflow. Save the record once, then save it again without changing the trigger values, and confirm nothing else happens. Repeat with a second edit that matches the trigger. The output is a written test log with the record ID, each save, and the result after each save. Limiting the test to one record makes it easy to see whether the workflow repeats.

  6. Check the processed records list

    After each test save, open the processed records list for the workflow and confirm the record appears once for the intended run and does not reappear on later saves. Compare the list with your test log. If the record shows up repeatedly, the guard condition or Repeated Runs setting is not working, so return to the previous step. The output is a confirmed match between the processed list and the expected number of runs for that record.

  7. Verify email and field changes after each save

    After each test save, check the field values and the sent email, if the workflow sends any, against the expected result. Confirm that no second notification was sent and that no field changed on a save where the trigger did not change. Check related records too, since an action that updates a parent or child record can start another workflow. The output is a signed-off test result for each workflow, which you keep with the configuration record before enabling it on production data.

  8. Enable on production and monitor

    Once staging tests pass, make the same configuration changes in production, enable the workflows and review the processed records list and any notification mail during the first real business cycle. Record anything unexpected and feed it back into the inventory. The output is a production configuration that matches the tested staging version, with a dated note of who approved it.

Spotting workflows whose actions undo their own conditions

Most SuiteCRM workflow loops come from an action that changes the record in a way that makes the trigger true again. The patterns below share that cause, and each one can be confirmed from the record's history and the workflow's run-on and repeated-run settings.

A workflow sets the field its own condition checks

A workflow fires when Status equals Open, then sets Status to Open again or to a value that still meets the condition. Each save re-triggers the workflow on the same record. Check the workflow's conditions against the fields its actions write, and look in the record's audit history for repeated saves with the same field value. Confirm the Repeated Runs setting and whether the action changes the value at all.

Two workflows reverting each other

Workflow A sets a field to one value, and workflow B sets it back when A's result is present. Each run looks like a valid change, so neither workflow appears broken on its own. Review every active workflow on the same module and list which fields each one writes. The audit history will show the field alternating between two values across consecutive saves.

Reassignment retriggers an assignment rule

A round robin or least busy workflow assigns the record, and a second workflow or an action on the assigned user field fires the assignment again. The record moves between users on every pass. Check whether the assignment condition still matches after reassignment, and compare the Assigned User history entries for the same record in a short window.

Notification updates the triggering record

An email or notification action writes a timestamp, flag or last-notified field on the record that triggered it. That write fires the workflow again, which sends another notification. Confirm by checking whether the notification's send time appears in the record history immediately after each run, and whether the workflow's condition includes a field the notification step modifies.

Calculated field changes its own input

A calculated field writes a result into a field that the same formula reads, or into a field that feeds another calculation. Each run then produces a new input, and the workflow runs again on the changed value. Trace each calculated field's parameters, and check whether the target field appears among them. A value that keeps changing with each save points to this cause.

Checks for admins, developers and the server team

Admins own the workflow definition, so most loops start or end in the conditions and run-on settings they chose. Start with the workflow record and the module it runs against, then trace each action to the fields it changes.

  • Repeated runs: Confirm whether the workflow allows repeated runs. If it does, check that a later run cannot meet the trigger condition again on the same record.
  • Run-on choices: Check whether the workflow runs on new records, on updated records or both, and whether a save made by the workflow itself counts as an update.
  • Conditions that undo themselves: Compare each condition with the actions. If an action sets a field to a value that fails the condition, the record can keep re-entering the workflow.
  • Processed records: Open the processed records list for the workflow and look for one record appearing many times.

Before you activate a changed workflow, test it on one record in a staging instance and confirm the processed records list shows a single pass.

Security and operational risks of a runaway workflow

A workflow that re-fires on the same record can email customers repeatedly, reassign ownership back and forth and rewrite data until nobody can explain what changed. The cards below cover the damage a loop can do and the controls that keep workflow edits reviewable before they reach production.

Mass email to customers

A workflow that sends email on every save can message the same customer many times if its condition stays true across repeated runs. Customers and partners see the noise first, and it can damage trust and create unsubscribe or consent questions. Check every email action for a guard that stops it after the first send, and confirm which recipients the action reaches when a record has several related contacts.

Unintended reassignment

When one action sets the assigned user and another condition checks that same field, ownership can flip between users on each run. Leads and cases then appear in several queues, and reports on ownership stop being reliable. Look for any action that writes a field used by a condition in the same workflow, and test reassignment on a sample of records before go-live.

Data changes that break audit trails

Repeated updates overwrite values and add history entries that look like normal user activity. An auditor or incident responder may not be able to tell a workflow edit from a person's edit, or find the value a record held before the loop began. Confirm which workflow, action and run caused each change, and check the record's audit history on staging before the workflow is enabled.

Who can edit workflows

Anyone with rights to create or change a workflow can change the records every other user relies on. Limit workflow administration to a named group, separate people who build workflows from people who approve them, and review role assignments on a schedule. Confirm in your own instance which SuiteCRM roles and admin permissions allow workflow editing.

Change control and staging tests

A workflow change should move through the same path as other configuration changes: a written description of the trigger, conditions and actions, a test on a staging copy with realistic records, and a rollback plan. Repeated-run settings and run-on choices belong in that description, because a small change to either can alter how often the workflow fires in production.

Recording who approved each automation

Keep a register that names each active workflow, its owner, the business reason, the approver, the approval date and the last reviewed version. When a loop is reported, this register shows who can answer for the automation and what it was meant to do. Ask your SuiteCRM administrators which tool or document will hold this record, since SuiteCRM does not supply one for you.

Questions teams ask about SuiteCRM workflow loops

How long does it take to fix a SuiteCRM workflow loop?

The time depends on how many workflows touch the same record type, how well their actions are understood, and whether the loop is one clear case or several interacting ones. A single workflow that sets a field it also checks can often be corrected quickly once it is found. Effort grows when several workflows update each other, when logic hooks or custom code also save the record, or when the fix must be proven on staging before it reaches production. Ask any partner for a written scope that lists the workflows to be reviewed, the record modules involved, and the testing steps, since those items set the effort more than the bug itself.

What drives the cost of fixing workflow loops?

Cost follows the amount of analysis and testing needed. The main drivers are the number of active workflows on the affected modules, the number of conditions and actions in each, whether developers must review logic hooks or custom code alongside them, and how many test records and environments are needed to reproduce the behavior. Fixes are usually one-time work, but a review process for new workflows, which keeps future loops from appearing, is a recurring practice that someone must own. When requesting a quote, ask what is included in the inventory, what testing is covered, and whether a retest is part of the fixed scope.

Can our admins fix repeated-run loops without developers?

Often yes, for loops that come from a single workflow whose action changes a field that its own condition checks. Admins can review run-on settings, the Repeated Runs option, and conditions in the workflow editor, then test on a copy of the record. Developers are more likely to be needed when logic hooks, custom code, or integrations also write to the same records, or when the loop only appears under load. Confirm with your team which admins have the access and time to make changes in staging, and keep a written record of each change so it can be reversed.

What do we need to provide for a workflow loop review?

A useful review starts with a complete workflow inventory: each workflow's module, trigger, run-on setting, Repeated Runs setting, conditions, and actions, plus whether it is active. You will also need a set of test records that reproduce the behavior, and access to a staging instance that matches production's version, configuration, and scheduler setup. Provide recent logs or the processed records list if you have them, and name the people who can approve changes. Ask the partner to confirm in writing which of these items it expects from you, because missing inputs are a common cause of delay.

How can we tell a workflow loop from a slow scheduler?

A loop usually shows the same workflow running again and again against the same record, with its action changing a value that the condition checks, so the record keeps re-qualifying. A slow scheduler shows records being processed late or in batches, with work eventually completing and no repeated effect on one record. Check the processed records list for a single record appearing many times, compare the values before and after each run, and look at whether the Process Workflow Tasks job is queued behind other work. Running on a staging copy with one test record makes the difference easier to see.

When should we bring in outside help for SuiteCRM workflow loops?

Bring in outside help when a loop affects live records, when several workflows or custom code interact, or when your team cannot safely test changes on staging. Outside help is also useful when you need a documented inventory and a repeatable review before adding new automation. DeployOpen implements, customizes, hardens, and documents self-hosted platforms inside the client's own infrastructure, and most engagements are fixed-scope with agreed deliverables and timelines in writing before work starts. Ask for a written scope that names the workflows, the testing, and what handover documentation you will receive.

Does fixing the loop guarantee our workflows will never misfire again?

No review can promise that. A fix removes the cause of the loop found in the reviewed workflows, but later changes, new workflows, logic hooks, or integrations can introduce similar behavior. What reduces the risk is a documented inventory, a standard for run-on and repeated-run settings, staging tests before each change, and periodic review of the processed records list. Ask any partner to describe what is verified, what is not covered by the scope, and what ongoing checks your team should run.

How a save or scheduler run decides whether a workflow fires

A workflow check starts from a record save or a scheduler run. SuiteCRM first confirms the workflow is active, then checks that the run-on choice matches the event, then evaluates the conditions. Only after those pass does the Repeated Runs setting decide whether the record may be processed again, using the processed records list as its memory. Check the final hand-off closely: when an action writes a field that a condition reads, the next save can start the cycle over, so repeated runs and conditions must be designed together.

Decision path from a record change or scheduler run through the workflow checks.

What a DeployOpen engagement covers for workflow loop fixes

A DeployOpen review of looping SuiteCRM workflows is a fixed-scope engagement. The written scope lists the workflows in question, and for each one the review checks the trigger settings that decide when it fires: whether it runs on record save, on record creation or from the scheduler, the Run On choice, the Repeated Runs setting, and the conditions that gate each action. The reviewer then traces what each action writes to the record, because the most common loop is an action that changes a field the workflow's own condition reads, so the workflow re-qualifies on every pass. The output is a written findings list tied to specific workflow names, the conditions that match, and the fields that change. Each finding is reproduced on a staging instance before any fix is recommended, so the client can see the loop happen and confirm it stops.

The fixes themselves are scoped separately in the same document. Typical changes include tightening a condition so it only matches a genuine state change, moving a one-time action behind a flag field, limiting Repeated Runs to the intended number of passes, or splitting a workflow that mixes assignment and notification logic. Where a fix belongs in code instead of the admin interface, the scope says so and names the logic hook or custom code involved, so it can be planned as development work. Retesting is included in the agreed scope: the reviewer reruns the same test records through the changed workflows and checks the processed records and the scheduler output against the expected result. Any retest that finds remaining looping behavior is reported in the same way as the first pass.

The client provides the access and information that make the review possible. That means a staging copy of the SuiteCRM 8 instance with representative data, read access to the workflow definitions and their processed records, the list of business rules each workflow is meant to enforce, and a named person who can approve changes to production. The client should also confirm the SuiteCRM version and the scheduler setup in use, since the behavior of the scheduler and repeated runs can differ between releases and must be checked against the version actually installed. Pricing and timing are set out in the written quote once this scope is agreed, and any ongoing monitoring of workflow behavior is offered as a separate retainer.

How DeployOpen works on this

DeployOpen starts by reading the workflows that fire repeatedly, mapping each action against the conditions that should stop it, and agreeing the fix in writing before any change is made. The work is delivered inside your own SuiteCRM environment, with testing on a copy of the data and a handover your admins can run without us.

How we scope

  • We list every workflow that triggers on the affected module and record which run-on and repeated-run settings each one uses.
  • The written scope names the workflows in question, the records and test cases to check, and the fixes we will deliver.
  • Engagements are fixed-scope, so deliverables and timelines are agreed in writing before work starts, and a quote follows from that scope.

How we build

  • We trace each action to the field changes it makes, then check whether those changes satisfy the workflow's own conditions.
  • Fixes use repeated-run limits, run-on choices and tighter conditions, with changes tested on a staging instance first.
  • We test with records that should trigger once, records that should never trigger, and edits that re-save the same record.

How we hand over

  • You receive a written record of each changed workflow, its conditions, its repeated-run setting and the reason for each change.
  • Your admins receive a short checklist for spotting workflows whose actions undo their own conditions before they go live.
  • Changes are documented against your environment so your team can review them in the same way as any other configuration change.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer if new workflows or SuiteCRM releases change the picture.
  • A retest after changes confirms the loop is closed under the same test cases used in the original scope.
  • Before any SuiteCRM upgrade, we can check that existing workflow conditions and repeated-run settings still behave as documented.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.