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.