Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Old values are fetched during run time

SA-100051

Summary


While updating the work object, a value is updated from Value1 to Value2 for a property. At runtime, the property value is refreshed and reset to Value1.


Error Messages



Not Applicable


Steps to Reproduce

  1. Enter a value, Value1, for any property.
  2. Click Submit. Verify from the database and the Clipboard that the property is set to Value1.
  3. Create any activity that uses the Obj-Refresh-And-Lock step.
  4. Update the value for the same property to Value2.
  5. Invoke the activity created on the click of a button. Verify that the value is refreshed and reset to Value1.


Root Cause



The activity that is invoked uses the Obj-Refresh-And-Lock step. This step refreshes the data, reads the entire content from the database, and compares the pxUpdateDateTime of the Clipboard page with the pxUpdateDateTime column of the instance in the database. If pxUpdateDateTime is not set on either, then it compares the pxCreateDateTime. If the pxUpdateDateTime is the same in both versions (within a tolerance that accounts for rounding in the database column), then the Obj-Refresh-And-Lock knows that the version of the instance on the Clipboard page is the most up-to-date. Hence, the Obj-Refresh-And-Lock need not read the instance from the  database. If pxUpdateDateTime is different in the two versions as in this scenario, then it must be the case where the instance in the database is updated since the instance on the Clipboard page is read. Hence, the Obj-Refresh-And-Lock reads the entire instance from the database.



Resolution



Perform the following local-change:

Comment the Obj-Refresh-And-Lock step in the activity.

Published February 12, 2020 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us