Parallel access of node level data page show inconsistent result
When accessing the same read-only data page, node level data page consisting of multiple entries displays different results for the same IsInPageList expression. When the page exists in the page list, the output changes from True to False depending on the access time.
Steps to Reproduce
- Create the Employees data type with a UserName property in it.
1.1. Set the Param.Output1 value with @Utilities.IsInPageList("mahesh",UserName,D_EmployeesList.pxResults) expression.
1.2. Log the message to display Param.Output1 value using the Log-Message method.
- Add a record with a UserName value of 'ABC'.
- Add a local storage for the data type which internally creates a data page list (that is, D_EmployeesList).
- Create a node level read-only data page sourced with a report definition.
- Create an Activity1 with a For loop iteration of 10.000 in Step1.
- Repeat the same steps in Activity2 with same IsInPageList expression.
- Log in to the application in two different browsers with the same operator credentials.
- Run Activity1 in browser1 and Activity2 in browser2 parallelly. Verify log messages in PegaRULES where it returns false for some iterations.
Node level data pages with data source set to a report definition are not thread safe. This was because the underlying data structure was a virtual list which is not thread safe. Since node level data pages were accessed by and operated upon by multiple threads, parallel operations caused issues.
Perform the following local-change:
- Create an activity.
- Call the sourced report definition using the Call Rule-Obj-Report-Definition.pxRetrieveReportData.
- Copy the loaded page in to the primary page using the Page-Copy method.
- Source the node level data page with the activity.
0% found this useful