Old values are fetched during run time
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.
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.
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.
Perform the following local-change:
Comment the Obj-Refresh-And-Lock step in the activity.
0% found this useful