Posted: 18 Aug 2015 0:47 EDT Last activity: 4 Oct 2018 11:08 EDT
Start & Stop SLA
I have a requirement to start/stop SLA on a parent case based on child case's action. Also I need to task duration to be automatically paused when SLA stops.
E.g. I have a Parent case where SLA is 3 days to complete an action, in some situation business users will create a child case to request information from external system. Until the response is received the clock should stop. Task duration and other assignment related parameters should be paused and restarted when response is received.
is there any Out of box way to implement this? I analysed DefineSLATimes but it is useful to start/stop only on child case but not able to figure out how to do it.
K S Jayakumar.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
One idea that comes to mind is that if your parent SLA is associated with a flow assignment shape, rather than associated with the overall parent object, then to cancel the SLA or change it, you would only need to advance the flow to another assignment shape that either has no SLA or has the appropriate SLA value. /Eric
I tried using pxAdjustSLA to change to ‘Default’, it only works for assignment SLA, so I used “ChangeWorkSLA” but still I can see that work object has values for pySLAGoal, pySLADeadline etc and there is entry in SLA queue. I don’t know how to implement ‘PAUSE’ whereby the SLA will simply freeze.
It sounds like what you need to do is well outside the guardrails so you're going to have to do much of the heavy lifting in custom code. There is no pause for an SLA because the underlying queue item's pxMinimumDateTimeToRun value is either in the past (and it runs) or not. If you don't want the database trigger to fire for that item, the simplest solution is to delete the queue item entirely. In that case, you haven't paused the SLA, you have removed it. If you do this, you will then need to build into whatever code would trigger the SLA to be unpaused to determine, is there already a queue item for this SLA? If not, create one and set the values appropriately. Alternately, you could choose some sort of hack for the pause, like set the date to run 100 years into the future and then when you unpause, you reset the date to whenever you really want it.
Thanks for your update, post business discussion we see more questions,
When SLA is paused, the time left should be frozen in all the report/display/wherever referenced. We tried the approach below but we see that time left jumps from 3 hours to 999 days left.
E.g. My Original SLA is 8 hours, when SLA is Paused the time left is 3 hours. The business expectation is that they should see 3 hours everywhere. We tried a approach of using a different property to show value in the report which will be populated when SLA is frozen but we are hitting issues when SLA is normally running in which case it is blank. If we try to add a custom function to arrive at time left based on SLA available in work, it becomes very complex to use in performance related reports.
As part of my LSA endeavours it seems that using pxAdjustSLATimes has some unwanted side-effect. Calling this activity with Fixed adjustments for goal and deadline alters pyWorkPage in some unexpected way. Is the Primary page overriden or not correctly restored by this activity in Pega 7.1.9. perhaps?
Hope to learn more about automation of the Service Level features instead of relying on the manual but functional pyAdjustSLATimes flow action.