Let me provide a comprehensive solution for fixing assignment routing errors during custom SLA escalation actions in Pega workflow management.
Understanding the Core Problem:
Your current approach tries to manually manipulate assignment properties, which bypasses Pega’s assignment routing framework. This causes the routing logic to fail because the necessary internal updates and event triggers aren’t executed.
Proper SLA Escalation Configuration:
1. Custom SLA Escalation Actions - Correct Implementation:
Replace your custom activity code with the standard Pega routing activity:
// Use Work-.TransferAssignment activity
Param.WorkBasket = "SupervisorQueue"
Param.TransferReason = "SLA Escalation"
Call Work-.TransferAssignment
This ensures proper assignment routing logic is executed, including work queue updates and operator notifications.
2. Work Queue Configuration Verification:
In your organizational structure, confirm:
- The work queue “SupervisorQueue” is defined under the correct organization unit
- The queue has active operators assigned with appropriate skills
- The workbasket name matches exactly (case-sensitive) in your escalation activity
- Access rules allow the escalation process to route work to this queue
3. SLA Rule Configuration:
In your flow’s assignment shape, verify the SLA escalation setup:
- Navigate to the assignment shape > Service Level tab
- Under “Escalation Actions”, ensure your custom action is set to “Run Activity”
- The activity should run in the context of the assignment (not background)
- Set the correct privilege level if your activity needs elevated permissions
- Verify the timing - deadline vs. goal time for when escalation should trigger
4. Assignment Routing Logic - Alternative Approach:
If you need more control over the routing decision, create a decision table or when rule that determines the target queue based on case properties:
// In your escalation activity:
Param.TargetQueue = @GetRoutingQueue()
Param.TransferReason = "SLA Breach"
Call Work-.TransferAssignment
Where @GetRoutingQueue() is a custom function that implements your business logic for queue selection.
5. Tracer Analysis for Troubleshooting:
When testing, use Tracer to monitor:
- The SLA rule evaluation events (look for “SLA deadline reached”)
- The escalation action execution (verify the activity is called)
- The Work-.TransferAssignment activity execution
- Any authorization or privilege errors
- The final assignment update events
6. Common Pitfalls to Avoid:
- Don’t use
pxAssignedWorkBasket directly - it’s a read-only display property
- Don’t create custom routing logic that bypasses standard activities
- Ensure operators in the target queue have the right access group and skills
- Verify that the SLA escalation action has “Run immediately” enabled if time-critical
7. Testing Your Fix:
Create a test scenario:
- Set a very short SLA deadline (e.g., 1 minute) for testing
- Create a test case and let it sit without processing
- Monitor in Tracer when the deadline is reached
- Verify the assignment moves to the SupervisorQueue
- Check that supervisor operators can see and open the assignment
Best Practice Recommendation:
Instead of custom activities for standard routing operations, leverage Pega’s built-in assignment routing framework. Use Work-.TransferAssignment for escalations, and configure your work queue structure properly in the organizational hierarchy. This ensures all routing logic, notifications, and audit trails are handled correctly by the platform.
The key fix is replacing your manual property updates with the standard Work-.TransferAssignment activity and ensuring your work queue configuration is correct. This will resolve the routing errors and ensure proper assignment escalation when SLA deadlines are breached.