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

Attachment data clears when SendSimpleEmail is triggered



Attached files clear when user calls OnSend Email activity using Optimistic Locking.

Error Messages

Not Applicable

Steps to Reproduce

  1. Enable Optimistic Locking for the case type
  2. Add the attachment screen
  3. Capture the Attachment name, Type, Attached by user information in a pagelist that is embedded in the work object pyWorkPage

Root Cause

An issue in the custom application code or rules. After adding an attachment to trigger the notification, the SendSimpleEmail activity is called from Pega-ProcessEngine Ruleset. This triggers the OnSend activity where the work object lock is checked. If the work object lock is not locked, the WorkLock activity is called. This uses the  Obj-Refresh-Lock method where the work object is reloaded and the attached data is lost. The Obj-Refresh-Lock during the Email Send action clears the changes since no lock is held on the work object for changes in the attachment due to the Optimistic Locking. 


Perform the following local-change: 
Change the code to send the mail during the FinishAssignment.



Published November 29, 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