You are here: Building applications > Common design patterns > Building Flows > Understanding locking and transactions during flow executions

  Understanding locking and transactions during flow executions

Concepts and terms

Pega 7 Platformhelps insure transaction integrity in flow executions. During a flow execution, changes to property values can occur through many different facilities. Only certain events cause these changes to be committed to the PegaRULES database.

Commit operations

A commit operation causes locks held by a requestor session to be released (except those for objects opened without selecting the Obj-Open ReleaseOnCommit check box). If — after a commit operation by one requestor — a different requestor acquires a lock on an instance needed by the current requestor session, the current session may be unable to progress. To eliminate this possibility, flow executions perform a commit operation only at specific times:

To prevent inadvertent loss of locks, design activities in your application that execute within a flow so they do not execute a Commit method (or an Obj-Save method with the WriteNow parameter checked). In special cases, where a collection of steps corresponds to a transaction in a business setting, your activity can include a Commit method and then re-acquire any needed locks.

Update mode

Many user forms support the Update function, usually initiated with the update icon (). This function allows user input to sections of the work item that are otherwise presented as read-only. When a user completes these changes, clicking the  Apply   button causes input to be transmitted, validated, and saved. However, the  Apply   button does not cause the changes to be committed; a user must also select and complete a flow action.

Related topics Flows — Concepts and terms
How to create activities for flows
Maximizing user productivity with GetNextWork
Understanding object locks

UpConcepts