Supply plan approval workflow stuck in loop after adding conditional step

We implemented a conditional approval step in our supply planning workflow last week, and now the workflow enters an infinite loop when certain conditions are met. The approval routing works fine for standard scenarios, but when the supply plan value exceeds $500K AND requires multi-site coordination, it cycles back to the initial approver instead of moving to the executive review stage.

The transition rule configuration seems correct on paper, but I’m wondering if there’s an issue with how we’re handling the exit criteria. Here’s our current conditional logic:

IF plan.totalValue > 500000 AND plan.multiSite == true
  ROUTE TO executiveReview
ELSE
  ROUTE TO standardApproval

The loop happens specifically when both conditions are true. Planning delays are now affecting our entire procurement cycle. Has anyone dealt with similar workflow loop issues when adding conditional branches?

Here’s what you need to do - I’ll address all three aspects of your workflow loop issue:

Conditional Workflow Logic Fix: Your conditional logic needs to be evaluated only once at workflow initiation and the result stored as a routing decision variable. Modify your workflow to capture the routing path at the start:

WORKFLOW_START:
  SET routingPath = (plan.totalValue > 500000 AND plan.multiSite == true) ? "executive" : "standard"
  LOCK routingPath

This prevents re-evaluation that causes loops.

Transition Rule Configuration: Your executiveReview state needs explicit exit transitions. Update your state definition:

STATE executiveReview:
  ON APPROVE: TRANSITION TO completed
  ON REJECT: TRANSITION TO rejected
  ON TIMEOUT: TRANSITION TO escalation

Every possible outcome must have a defined next state. The loop occurs because there’s no “completed” transition, so the workflow engine returns to the initial state by default.

Exit Criteria Setup: Add explicit exit criteria to prevent the loop-back behavior. In your workflow configuration, define completion conditions:

EXIT_CRITERIA executiveReview:
  WHEN approval.status == "APPROVED" AND approval.signature != null
  THEN COMPLETE workflow
  ELSE IF approval.status == "REJECTED"
  THEN ROUTE TO rejection_handler

The key insight is that Infor OS Workflow requires explicit exit paths from every state. Without them, it implements a safety mechanism that returns to the workflow start. Your multiSite variable issue is also critical - declare it as a workflow-scoped persistent variable in your workflow header:

WORKFLOW supply_plan_approval:
  VARIABLES:
    PERSISTENT multiSite AS Boolean
    PERSISTENT totalValue AS Decimal
    PERSISTENT routingPath AS String

This ensures these values persist throughout the workflow lifecycle and aren’t lost during state transitions. The combination of locked routing decisions, explicit exit transitions, and persistent variables will resolve your loop issue. Test thoroughly with both conditional scenarios before deploying to production.


This draft is based on general Infor CloudSuite knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.

I’ve seen this exact behavior before. The issue is usually that your exit criteria isn’t properly defined for the executiveReview state. When the workflow reaches that stage, it needs an explicit exit condition or it defaults back to the entry point. Check your workflow definition to ensure executiveReview has a clear completion transition. Also verify that your conditional logic isn’t being re-evaluated after the executive stage begins.

Adding to what workflow_admin_22 said - I’d also look at your transition rule sequence. In Infor OS Workflow, when you have multiple conditions, the order matters. If your executiveReview transition doesn’t have priority over the loop-back logic, the system might be defaulting to the safer option of returning to start. Try adding an explicit priority attribute to your executive routing rule and make sure it evaluates BEFORE any return-to-sender logic kicks in.

Tested this on CloudSuite Industrial 2023.x — locking the routingPath variable at workflow initiation stopped the conditional re-evaluation loop immediately after our first deployment.

Good points. I checked the executiveReview state and you’re right - there’s no explicit exit defined. It just has an approval action but no transition OUT of that state. That would definitely cause it to loop back. I’m also noticing that our multiSite flag might not be persisting correctly through the workflow context. When I look at the workflow instance data, sometimes that value shows as null even though it was set initially.

The null value issue is critical here. If multiSite becomes null mid-workflow, your conditional logic will fail to evaluate properly and the workflow engine won’t know which path to take. This often happens when the workflow context isn’t being passed correctly between states. Make sure you’re using persistent workflow variables, not just transient request parameters. In your workflow definition, explicitly declare multiSite as a workflow-scoped variable and verify it’s being carried through each transition.

I dealt with something similar last year on ics-2023-1. The problem was that our conditional branches didn’t account for the workflow state machine’s requirement that every state must have at least one valid exit path. When conditions changed mid-approval (like if someone updated the plan value), the workflow couldn’t determine the correct exit and defaulted to the safest option - which was looping back to start. We solved it by adding a state transition validator that locks the key variables once the workflow starts, preventing mid-flight changes that could confuse the routing logic.