Discussion

how to avoid warning message when commit used

Hi , When am using obj-save with error now checked or when using commit. Am getting warning saying "Use of the "write now" option should be carefully considered to insure data integrity. In most cases, you will want to allow PRPC to handle committing a transaction". I have two doubts in this 1) Warning says that PRPC will handle commit so in this case when soes it commit my Object.is that been done by system pulse? 2) I want my data to be saved in data table immediately so that the lock can also be released(Am using obj-open in prev method)So is there any way for me to avoid this warning as well as save the data immediately. Thank you in Advance, Arun.K

***Updated by moderator: Marissa to close post***
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

Pega
July 17, 2008 - 10:13am

PRPC commits at the end of a transaction. Feel free to watch the Pega-ProCom ruleset in the tracer if you want to see how everything works. You will see activities like Add and FinishAssignment call WorkCommit which then calls CommitWithErrorHandling which then does the actual commit.

It is important to understand the concept of transactionality. If an error occurs at any point in the transaction, a rollback should be able to wipe the whole transaction off the books. However, if you have obj-save-with-write-now or a commit embedded somewhere in the middle of the transaction, the rollback won't be entirely successful.

We provide obj-save-write-now because it has a few legitimate uses, such as writing to a log to indicate progress during a transaction. Commit we provide in case you are writing your own sequence of activities, such as from a custom button on a harness. But you should never issue a commit from a post-processing activity or a utility activity called from a flow.

The standard way for an object to join a transaction is that you obj-open with lock, then make whatever changes you need, do an obj-save deferred, then commit processing will release the lock.

February 26, 2015 - 9:18am

Can any one please explain how to use write now(save),immediate(delete),commit method  in case of Standard/Advanced agents whenever agent is processing records in a data table?

 

Thanks in advance