Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Flow issue with optimistic lock



A case is configured to use Optimistic lock. When two users are working on the same case and submit it simultaneously, error occurs. This is working correctly. However, if the second user opens a flow in a modal dialog instead of submitting the case, the case is saved without an error. This overrides the changes made to the case by the first user. This is an incorrect behavior.

Error Messages

Not Applicable

Steps to Reproduce

  1. Create a case with a flow having a Split join with two assignments. Assign the case to two different operators.
  2. Configure the flow with an Optimistic lock.
  3. On the first assignment, in the screen, add a button such that it opens a flow in a modal dialog.
  4. Add a property of type text on the case to check the value when changing from both sides.
  5. Open the assignments from both users simultaneously.
  6. On the second assignment, the second user changes the property value in the text box and clicks Submit.
  7. The first user submits the assignment. An error is generated. This is expected behavior.
  8. Reopen each assignment on both the users.
  9. The second user changes values and clicks Submit.
  10. The first user clicks the button on the screen to open a flow in a modal, submit the modal, and submit the assignment. Error does not display and this version of the case is committed.

Root Cause

When a flow is executed, there is no check to determine if the work object is modified elsewhere. Once the flow is executed, the pxUpdateDateTime property is set with the current timestamp. Thus, pzShowConflicts activity does not return a conflict since it views this as the latest copy when compared with the one from the database.


Use the following workaround to address the problem: 
  1. Configure another action item on click of a button to run the Work-.pzShowConflicts activity before the 'Flow in modal dialog' action. 
  2. Perform either of the following based on the requirement: 
    • Create a section to use it as  a modal template by performing a Save As or a section include of the pzModalFlowTemplate. Add a When condition to check if conflicts are present and display the modal dialog with or without the error message. 
    • Launch the modal dialog if no conflicts are found or refresh the case harness to display the error message.

Published December 13, 2018 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us