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
- Configure a Declare Trigger to execute on "Committed Save".
- In the Declare Trigger activity, call the Queue-For-Agent method.
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.