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

Calling UpdateStatus via an agent doesn't fully update the case



The developers have built a flow which is designed to update a child case to Resolved-Completed through an agent.

After the agent has processed the activity to set the child case to Resolved-Completed the history does included entries to suggest the update had happened and the parent case pyCoveredCountOpen gets decremented, however the child case status still appears to be "New".

Subsequently when the administrator tries to make a second call to UpdateStatus but this time through a UI Action, this returns the error message below and they are unable to resolve the case.

Error Messages

** The cover open count is incorrect; it is -1

Steps to Reproduce

1. Create an activity that includes a call to UpdateStatus, setting the status to Resolved-Completed.
2. Create an agent to call the above activity.
3. Ensure that the agent is currently stopped.
4. Define a parent case and child case.
5. For the child case; Create flow which includes a shape that will queue a job for the above agent.
6. Create a parent case case and a child case
7. Process the child case until it reaches the shape which will call the agent.
8. Close both parent and child case tabs in the UI.
9. In SMA start the agent.
10. In the UI, reopen the child case.
11. Observe that the audit notes includes recent entries saying the status has changed to Resolved-Completed, but the child case still has an open status.
12. Reopen the parent case and open the clipboard on pyWorkPage.
13. Observe that the pyCoveredCountOpen is 0.

Root Cause

When UpdateStatus is called though the UI this will cause the case to be updated.

However, when called via a background activity, such as an agent, the work object itself won't be updated automatically.


When calling UpdateStatus through a background activity it is imperative that user must also make a call to Obj-Save in order to fully update the work object.

Published May 9, 2017 - Updated October 8, 2020

Was this useful?

80% 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