Question
Pegasystems Inc.
US
Last activity: 1 Aug 2017 10:40 EDT
Declare OnChange
We have a decision rule type 'Declare OnChange' to watch property .pyStatusWork
This rule calls an activity to write to log file whenever the work status change from/to 'Complete' (for example 'In Progress to Complete' or 'Complete to In Progress').
We enabled this logging so as to debug why in some instances a case does not end up in Complete status.
We found few cases where the work and history (audit) tables do not show that the work object has moved to Complete, even though the above logging says it did. How is this possible?
When does Declare OnChange fire? Is it after the change or before the change of the watched property?
Is it possible that it fired for 'In Progress' to 'Complete' change but the change wasn't successfull and reverted? Where to find these details (can't find any error and audit doesn't show these)
Thanks
***Moderator Edit: Vidyaranjan | Updated thread with SR details and tagged thread as SR Created***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IN
Hello,
On reviewing the SR, it was observed that the issue was due to the AllCoveredResolved ticket not working as expected. On removing this and adding a refersh condition to teh attachments section resolves the issue.
Thank you,
Incessant Technologies
IN
Hi
Generally Declare Onchange will be triggered when there is a change of value in watched property. In your requirement you are witing into log file when the status is changed. Please check the conditions in when rule are met according to requirement and try to trace the onchange rule whether the value is changing or not for the property at that triggered time.
Pegasystems Inc.
US
Hi Manoj,
The When condition checks:
.pyStatusWork != .pyStatusWorkOld
and the activity prints both .pyStatusWorkOld and .pyStatusWork to the log file
What's interesting is that it prints that the status changed from In Progress to Complete, but the case audit trail doesn't have this change entry (this discrepancy happens only in few instances and is currently an issue here)
Pegasystems Inc.
IN
Hello
Considering the case is sporadic and the log entry is not matching to what you are seeing history, best next step could be to do a thorough debugging with help of GCS engineer by raising an SR.
Pegasystems Inc.
IN
Hi Srinivas,
Please let us know the SR number in case you create one with Pega GCS. We will tag that to this post and track it to closure!
Regards,
Lochan | Community Moderator | Pegasystems Inc.
Pegasystems Inc.
US
We haven't created SR yet. Currently adding more logging info, once we have more details available, will open SR and provide the same here.
Thanks
Pegasystems Inc.
IN
Thanks Srinivas :)
Pegasystems Inc.
US
Created helpdesk ticket SR-B15406
Pegasystems Inc.
IN
Thank you Srinivas for sharing the SR details. I'll tag it along with the issue description under related support case number for tracking.
~Vidyaranjan
Accepted Solution
Pegasystems Inc.
IN
Hello,
On reviewing the SR, it was observed that the issue was due to the AllCoveredResolved ticket not working as expected. On removing this and adding a refersh condition to teh attachments section resolves the issue.
Thank you,
-
THARUN K T