William Baeyens (baeyw)
Sr. System Architect - Pega Consulting
Pegasystems Inc.
baeyw Member since 2019 8 posts
Posted: April 23, 2021
Last activity: April 27, 2021
Posted: 23 Apr 2021 12:13 EDT
Last activity: 27 Apr 2021 11:32 EDT

Are there clear best practices in regards to commits ?


There is a lot of contradicting information that is circulating in the community in regards to commits. 

As a general rule, it's accepted that commits are "bad" and we should almost always let Pega handle commits through flow or case processing. 

That lead to some weird practices like using wait shape to force a commit during flow processing. 

So here is my question : 

- What is the danger in calling "CommitWitherrorHandling" in a utility shape in a flow?

- What is the danger in calling a "manual" call to commitwithErrorHandling in an activity that is executed during case processing?

- Finally, if you have no other choices and have to make a manual commit outside of a case, so you have no access to commitwithErrorHandling activity.  What should you pay attention to?  What kind of error handling / rollbacking should you put in place? 

Kind regards

***Edited by Moderator Marissa to update Platform Capability tags****
Pega Platform 8.5.3 Case Management Senior System Architect