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

Declare Trigger set on committed save fires before the commit

SA-30488

Summary



A Declare Trigger configured to execute on "Committed Save" runs an activity that queues the item for an agent.

When the agent runs to process the queue item, it fails sporadically with a 'Database-Instance-NotFound' error.


Error Messages



Database-Instance-NotFound


Steps to Reproduce

  1. Configure a Declare Trigger to execute on "Committed Save".
  2. In the Declare Trigger activity, call the Queue-For-Agent method.
  3. Run a process that will cause the Declare Trigger to execute.


Root Cause



An issue in the custom application code or rules. The "Deferred" parameter was not checked when calling the Queue-For-Agent method so the queue item was committed immediately.

On occasion, the agent tried to process the queue item before the actual work object was committed.


Resolution



Perform the following local-change:

Check the "Deferred" parameter when calling the Queue-For-Agent method, so the queue item will be created when the next commit occurs.

 

 

Published November 22, 2016 - 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