Update SLA/Timer/Wait due to wait shape on a case.

We have a case (say, CaseA) where we are putting it on hold by routing it into a WB for a certain period of time, for which we have used a wait shape in the flow.

Now, due to certain actions by the user in another case (say, case B), the waiting time on CaseA has to change.

I have used the below approach to achieve this. Let me know if you have any other suggestions.

I have created an activity (to make it reusable) in which:

  1. Open CaseA & update .pxFlow(RoutingToWorkBasket_Flow).pxAssignDeadTime with the new time.

  2. Open CaseA related Assign-WorkBasket instance (w.r.t WB mentioned in wait shape) and update .pxDeadlineTime with the new time

  3. Get AssignWB.pxRefQueueKey (same assign-Wb instance from step 2) and set a param

Param.SystemSLAQueueKey ="SYSTEM-QUEUE-SERVICELEVEL "+AssignWB.pxRefQueueKey

  1. Open instance of System-Queue-ServiceLevel using Param.SystemSLAQueueKey as pzInsKey and update .pyMinimumDateTimeForProcessing with the new time.