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
- Enter a value, Value1, for any property.
- Click Submit. Verify from the database and the Clipboard that the property is set to Value1.
- Create any activity that uses the Obj-Refresh-And-Lock step.
- Update the value for the same property to Value2.
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.