ECO approval matrix not working for multi-level approvals with dynamic user assignment

We’re experiencing issues with our ECO approval workflow in Agile 9.3.6. The multi-level approval matrix stops progressing after the first approval level completes. Our configuration uses PX extensions for dynamic user assignment based on cost impact thresholds.

The approval matrix has three levels:

  • Level 1: Department managers (cost < $10k)
  • Level 2: Directors (cost $10k-$50k)
  • Level 3: VP approval (cost > $50k)

We’re using PX to dynamically assign approvers based on the affected item’s cost attribute. The workflow stalls after Level 1 approval with status “Pending” but no users are assigned to Level 2. Our user group mappings appear correct in the Admin Console, and the PX logic worked fine in our test environment.

IUser[] approvers = getApproversByRole("DIRECTOR", costImpact);
workflow.addApprovers(approvers, 2); // Level 2

Has anyone encountered similar issues with multi-level approval matrices when using dynamic PX assignment logic? The ECO workflows are now backing up and impacting our change release schedule.

I think the problem is in your PX code. The workflow.addApprovers method needs to be called with the proper context. You’re passing the level number, but you also need to ensure the workflow state is correctly set before adding approvers. Try adding a status check before your addApprovers call to make sure the workflow is in the right state to accept Level 2 approvers. Also, are you handling the case where getApproversByRole returns an empty array? That could cause the workflow to stall.

We had this exact issue last year. The root cause was a combination of three factors related to your focus areas:

Multi-level Approval Matrix Configuration: The approval matrix wasn’t properly configured to handle dynamic approver assignment between levels. You need to ensure each level has the “Allow Dynamic Approvers” flag enabled in the matrix definition. Without this, the matrix locks the approver list at workflow initiation and won’t accept PX-driven changes.

PX Dynamic Assignment Logic: Your PX code needs to be enhanced to properly handle the workflow context. Here’s the corrected approach:

// Get workflow context and current level
IWorkflow workflow = (IWorkflow) obj;
int currentLevel = workflow.getCurrentApprovalLevel();
int nextLevel = currentLevel + 1;

// Retrieve cost impact and determine approvers
INumber costImpact = change.getValue("CostImpact");
IUser[] approvers = getApproversByRole("DIRECTOR", costImpact);

// Set workflow to accept next level approvers
workflow.setApprovalLevelStatus(nextLevel, WorkflowStatus.PENDING);
workflow.addApprovers(approvers, nextLevel);
workflow.notifyApprovers(nextLevel);

The key is calling setApprovalLevelStatus before adding approvers and then explicitly notifying them.

User Group Mapping: Verify your user group definitions match between Admin Console and your PX logic. Run this query to validate:

SELECT ug.name, ur.role_name, u.user_name
FROM user_groups ug
JOIN user_roles ur ON ug.id = ur.group_id
JOIN users u ON ur.user_id = u.id
WHERE ug.name IN ('DIRECTOR', 'VP_APPROVAL')

If the role names don’t match what your PX expects, the getApproversByRole method will return empty arrays, causing the stall.

Additional Configuration Steps:

  1. In Process Extensions, ensure your PX is registered for the “Before Approval Level Advance” event, not “After”
  2. Set the execution order to run before any standard approval handlers
  3. Add error handling to log when approver arrays are empty
  4. Enable workflow audit trail to track approval level transitions
  5. Test with a single-level approval first to isolate the PX logic from matrix issues

After making these changes, reset any stalled ECOs using the Workflow Reset utility and resubmit for approval. The multi-level progression should work correctly with dynamic assignment.

Check the approval matrix configuration itself. Go to Admin > Settings > Workflow > Approval Matrix and verify that Level 2 is properly configured with the correct user groups. Sometimes when you migrate configurations between environments, the user group IDs don’t match up correctly. Also make sure your PX is being triggered at the right workflow event - it should fire before the level transition, not after.

I’ve seen this before. The issue is usually related to how the approval matrix evaluates the user group membership at runtime. When you use PX for dynamic assignment, the matrix might not be refreshing the approver list between levels. Check your workflow configuration in Process Extensions - specifically the timing of when approvers are resolved versus when the approval status advances.