Posted: 12 Dec 2019 5:42 EST Last activity: 19 Dec 2019 4:44 EST
Editable Data Pages
1. I was able to edit the data(on the clipboard side) of a readonly D page and used the edited data in my Test Application, if i am able to edit the data of a readonly D page, then what is the use of editable D page ?
2. why do we see editable D pages under User Pages category and readonly pages D pages under Data Pages category in clipboard ?
***Edited by Moderator: Lochan to update platform capability tags***
The difference in Read-Only and Editable mode of data page and chose which could be best option for your application.
Read Only – Prevent the data page from being modified, except during page load and post-activity processing. The data page displays in the Data Page list on the clipboard.
Editable – Allow the data page to be modified. The data page displays in the User Page list on the clipboard.
So, when a data page is configured to be read-only, you cannot really modify the properties on the data page during the case process unless there is a page load/post load processing in data page configuration. If the data page with read-only mode is attempted to modify without any of the above mentioned conditions, then you might face an error saying readonly data page cannot be modified from ClipboardImpl class.
Hence, if your requirement is supposed to modify the content in data page during processing, then you can go with editable data page.
"If the data page with read-only mode is attempted to modify without any of the above mentioned conditions, then you might face an error saying readonly data page cannot be modified from ClipboardImpl class" - I was hoping for something like this to happen, but i was able to modify the data without any issue, that too in the middle of case processing.
yes , you can edit the Read only data page or Editable data page while using them but you will not be able to do Obj-Save on the read only data page but an Obj-Save on data page for an editable data page will save the record in database. This is the difference between these 2 types of data page. Both data pages allows you to manipulate the data in processing but only editable data page allows you to save.
Think of scenario, where you get the records from DB using editable datapage , edits few properties and want to save them back to DB by calling Obj-Save. With Read only datapage you can't achieve this functionality.
Are you sure that you got error for both Read only and Editable page when you did property set once the data page is loaded ? can you share some screenshots of the things you tried for both read only and editable data page. I tried just now in 7.4. A thread level Read Only data page gave the above(read-only) error when I tried to update a property(pyLabel) with some text and while a thread level Editable does not give the above error. That should explain the difference for them.
This will be little tricky to answer now as my hands on is not complete on savable data page. Based on what I have read(limited) about savable data page, the objective is to save instance of a class. Usually we write Obj-save in activities to save record in DB and sometimes an activity is needed just for saving the record in DB by Obj-Save. this savable data page would eliminate the need of those activities.
Till 7.4 savable data pages were not present and in 7.2.2 in order to save instances I used editable data pages but now , both being present the actual usecase am not sure.
May be someone from Pega Architecture or someone with handons on latest version can let us know.