Support Article
SLA escalation activity fails when using worklist and workbasket
SA-62333
Summary
A Service Level Agreement (SLA) rule has been configured for an assignment. When the goal time is reached, the request is escalated to the work group manager. When the deadline time is reached, the request is escalated to a workbasket. When the passed deadline time is reached, an error occurs because the system is looking for the assignment in the worklist and not the workbasket.
Error Messages
Unable to open an instance using the given inputs: ASSIGN-WORKLIST ORG-WORK G20180718-00027!APPROVEREQUEST
Steps to Reproduce
- Create an SLA for an assignment with escalation activities configured for the goal and deadline.
- When the goal time is reached, escalate the request to the work group manager.
- When the deadline time is reached, escalate the request to a workbasket.
- Create a Request and route it to a workbasket.
- Wait for the SLA events to be processed.
Root Cause
A defect in Pegasystems’ code or rules where the SLA queue item was not updated. In the Reassign activity, Step 9 is used to update the SLA queue item. This has been modified in later Pega releases to update the data on the queue page if it is deferred.
Resolution
Best practice: Update or upgrade to the latest Pega release, where changes have been made to the Reassign activity.
Alternative: Until you can update or upgrade to the latest Pega releaese, perform the following local-change:
- Create a separate activity to run the Java code provided below from the Reassign activity in Pega 7.4.
- Include the activity as a second escalation activity for the goal and deadline events to reset the SLA queue item.
- Set the Step page in the activity to newAssignPage and use a deferred Obj-Save to save the data.
// We need to dequeue the entry with the old assignment handle and put
// one on with the new handle
try {
PRQueueManager QM = tools.getThread().getQueueManager();
// First dequeue the sla queue item for update
ClipboardPage queuePage = QM.dequeueForUpdate(myStepPage.getString(".pxRefQueueKey"));
if (queuePage != null)
{
// Now update it with the new handle
queuePage.putString(".pxAssignmentHandle", tools.getDatabase().getHandle(myStepPage));
QM.updateDeferred(queuePage);
}
else {
// BUG-170092 :If Queue item is deferred enqueued in the processevent activity, QueueManager will not find it. So use the queuePage page instead.
// This is happening while SLA agent processing it.
queuePage = tools.findPage("queuePage");
if(queuePage != null){
queuePage.putString(".pxAssignmentHandle", tools.getDatabase().getHandle(myStepPage));
tools.getDatabase().saveDeferred(queuePage,false,false);
}
}
} catch (DatabaseException de) {
throw new PRRuntimeException(de);
}
Published January 10, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.