We have a requirement to increment assignment urgency on a daily basis until the deadline day occurs.
For now, for the assignment “Review Second Presentment”, which has a 30-day deadline, the expectation is to increase urgency day by day based on the remaining days. For example:
25 days remaining → urgency = 30
24 days remaining → urgency = 32
(i.e., urgency increases by 2 each day)
Currently, pxUrgencyAssign is calculated using a Declare Expression, and we attempted to use a Job Scheduler to update urgency daily. However, we are facing the following challenges:
We are unable to persist the updated urgency because the class Assign-Workbasket is read-only.
We want to control assignment urgency independently of case urgency. Currently, assignment urgency is derived from case urgency, but our requirement is to reset or start urgency calculation fresh when the case reaches this assignment.
Since pxUrgencyAssign is driven by a Declare Expression @min(100,@max(0, .pxUrgencyWork + .pxUrgencyAssignSLA + .pyUrgencyAssignAdjust), we are unable to directly set or override its value.
Could you please advise:
Is it possible to control assignment urgency independently of case urgency?
What would be the recommended approach to achieve this requirement?
Pega calculates .pxUrgencyAssign from .pxUrgencyWork + .pxUrgencyAssignSLA + .pyUrgencyAssignAdjust, so the supported way to control assignment urgency separately is through assignment SLA configuration and/or .pyUrgencyAssignAdjust, not by trying to persist a value directly into Assign-Workbasket.
pxUrgencyAssign is not meant to be set directly. It is a declare-expression property, so the recommended design is to influence it through the supported inputs, mainly pxUrgencyAssignSLA and pyUrgencyAssignAdjust.
If the requirement is “increase urgency every day until the deadline,” the most Pega-aligned solution is to model that behavior in the assignment SLA, because assignment urgency growth over time is exactly what SLA urgency is for.
If you need the urgency for this assignment to behave differently from the case urgency, then use an assignment-level adjustment such as pyUrgencyAssignAdjust or configure a dedicated assignment SLA for this step. That gives you assignment-specific urgency behavior without trying to update the read-only assignment table directly.
Thank you for the detailed explanation. We can use pyUrgencyAssignAdjust to control the urgency as you mentioned. My understanding is that SLA actions are triggered when the goal or deadline is reached. If that is the case, could you please clarify how we can update pyUrgencyAssignAdjust on a daily basis?
AH ok, I missed that part… so then your only option is to use Goal? In this scenario, there is no configuration for repeat.
In which case, could you not make goal time dynamic? Using a property, you could set the goal time and urgency to “level 1”, when that time hits, have an action that:
Increases the property to “level 2”
Recreates the assignment in question (via say ‘change stage’ or another activity)
Then the assignment starts again, with ‘level 2’ urgency - deadline remains unchanged
If we take a step back, the business need is “I want to user the deadline is achieved”. The solution, incrementing urgency, using a custom approach to SLA is one way. But could you not look at how work is assigned or ordered in worklists?
Assignments could be sorted / prioritised (get next work) by deadline date, so the closer to the deadline the more likely it is worked?
Create a “time to deadline” field in your data model, to make this even more implicit or enforced?
Education - deadline isn’t a bad thing, its about work allocation. If we see deadline ensuring work completion on time, and past deadline as a way of prioritising then the OOTB approach might work? We see all kinds of requests for custom SLA’s, when some education on the mechanisms to help see this as more than “Red-Amber-Green” and to set the right values, could achieve a satisfactory outcome?
Case Deadline vs Assignment Deadline - these can be different, perhaps looking at these to help set the right values and triggers could help?
Once the goal time breached, excecute an activity and increase the goal time
Update the pyUrgencyAssignAdjust property and add a ticket to recreate same assignment.
As we expected, SLA is excecuting repeatedly.
But the Assignment urgency is not updated. When check the tracer, we could observe that the calculated pxUrgencyAssign is available in the newAssignPage - Not persisted to the DB.And there is a Page-New for the newAssignPage, each time SLA runs. Tried to keep the last updated pxUrgencyAssignAdjust value and do the calculation using that when the activity execute for the next time. Still we have an issue with saving this value to the DB.
Tried to modify the case level urgency by updating pyUrgencyWorkAdjust. We could observe the Assignment urgency is increasing as expected. But the same time Case level urgency is also updating. Meaning that, this urgency will carry forward for the other assignments.
pxUrgencyAssign is a derived value, so when the SLA runs and creates newAssignPage, you can see the calculated urgency on that page, but that does not mean it will persist automatically to the database. In your case, repeatedly recreating the assignment page is causing the value to be recalculated in memory, but the underlying assignment record is not being updated in the way you expect
Also, changing pyUrgencyWorkAdjust will affect case urgency first, and because assignment urgency is derived from case urgency plus assignment components, the urgency change carries forward into other assignments. That is expected behaviour and is exactly why this property is not a clean way to make only one assignment behave differently.
In this scenario, the ticket is recreating a new assignment each time, so the issue is that the accumulated pyUrgencyAssignAdjust is not being carried forward. I think the safer approach is to persist the running increment on the case, e.g. in a dedicated property, and then reapply that value when the new assignment is created. That way the assignment can be recreated as many times as needed, but the accumulated assignment-specific urgency is preserved which would also affect case urgency and future assignments.
If I understood you correctly, we should keep the latest value in a property Ex. LastAssignUrgency which is in the case level, and once the newAssignpage is created again, set the LastAssignUrgency property to the pyUrgencyAssignAdjust, this way pxUrgencyAssign will recalculated with the last value. We tried this but still it is not persisting to the work basket table. Still we could see the initial amount in the Urgency field. Please correct me if I am wrong.
Your understanding is close, but the key point is you are not really trying to persist pxUrgencyAssign itself. You are trying to ensure that when the assignment is recreated, the new assignment is created with the correct driver value in pyUrgencyAssignAdjust, so that Pega calculates the right urgency for that assignment. pxUrgencyAssign is derived from pxUrgencyWork + pxUrgencyAssignSLA + pyUrgencyAssignAdjust, so the durable value to carry is the adjuster, not the final urgency
If the value is being set directly on newAssignPage, I would avoid that approach because newAssignPage is part of assignment creation processing and may not be the most reliable place to drive persisted urgency values. At assignment creation, copy that value into pyUrgencyAssignAdjust if you want it to affect the assignment’s urgency. Let Pega recalculate pxUrgencyAssign from the standard formula rather than setting pxUrgencyAssign directly.
compute the value you need in a property and use that to populate pyUrgencyAssignAdjust during assignment creation or the post processing of the current assignment before it is redirected to the same assignment for SLA computation., or you can also leverage the Assign-.NewDefaults activity which is invoked for every Assignment creation.
Once the goal time breach, execute an activity and increase the goal time.
Update the pyUrgencyAssignAdjust property and set this value to a property in the case level and add a ticket to recreate the same assignment in the activity.
Modify the Assign- NewDefaults to set the Case level property to pyUrgencyAssignAdjust.
As we expected, SLA is excecuting repeatedly. And the updated urgency is displaying in the Work queue Urgency column.