Question
1
Replies
3260
Views
Posted: January 6, 2017
Last activity: January 12, 2017
Closed
Solved
What is the difference between obj-save and obj-cancle
Hi All,
I'm new to Pega. so can u pls tel me what is diffence b/w obj-save and obj-cancel?
***Updated by moderator: Lochan to update Categories***
Obj-Save method :
Use this method to request that the system save a clipboard page to the PegaRULES database or (if the page belongs to an external class) an external database.
The Obj-Save method uses properties on the page to derive the internal key under which it will be saved. This method can create a new database instance or overwrite a previous instance with that key.
An object that is stored in the PegaRULES database is persistent. The object is available to other users, and remains after the requestor session that created it ends.
This method does not always cause the object to be written immediately to the database. Often, developers use this method to perform a "deferred write" operation. In such cases, later execution of the Commit method, in the same Thread, completes the database update.
Select the WriteNow parameter to force this page (and only this page) to be written to the database as part of the Obj-Save method. Unlike the Commit method, the Obj-Save method does not operate on all previously marked-for-commit objects, only on the current page, and does not release locks.
You can reverse the effect of an Obj-Save method — if it has not yet been committed — with the Obj-Save-Cancel or the Rollback method.
For more details refer this link --> https://pdn.pega.com/sites/pdn.pega.com/files/help_v719/procomhelpmain.htm#methods/obj-save/obj-save.htm
Obj-Save-Cancel method:
Use this method to cancel the most recent uncommitted Obj-Save method, so that the instance is not written as part of a later Commit operation. You can also use this method to undo an Obj-Delete that has not yet been committed.
Use the similar Rollback method to cancel all uncommitted Obj-Save and Obj-Delete operations, not only the most recent one.
For more details refer this link --> https://pdn.pega.com/sites/pdn.pega.com/files/help_v719/procomhelpmain.htm#methods/obj-save-cancel/obj-save-cancel.htm
Regards,
Sudhish OP