Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Carlos Henriques
229
Views
1
Comments
Solved
ActivityClose Timeout
Question
If both the destination screen of an human activity and the OnClose event of the activity try to update the same entity I get an timeout error and the process aborts.
Scenario:
- Web Screen where the user closes the human activity. When the user hits the submit button, the web screen action does an update to ENTITY1 setting the value of two attributes and then calls ActivityClose action.
- OnClose event of the human activity is fired and tries to update ENTITY1 to set one more attribute (set the new status), and I think it gets a timetout because the entity is locked by the update in the web screen.
I can solve this by doing a commit after the first update in the web screen. But, is there a better solution for this problem?
Thanks.
André Vieira
Staff
Solution
Hi Carlos,
That's right the OnClose is executed in a separte transaction, therefore you may get into situations of dead-lock, as describe
here
. I only see two ways of solving this, the first being the one you followed which is commit all application logic in the screen and then close the task. The second one is to use the
CloseOn
property of the human activity. For this second one you need to have your entity modeled in a way that you can trap that update in the process to determine the activity should close. You can also combine the CloseOn property with the OnClose callback for situations where you expect more that one such event, this is common in a Wait activity when you are waiting for 3 reviews of a proposal for instance, you try to close the wait on a create of a Review for a Proposal and on the OnClose you validate if you have 3 Reviews to close the Wait activity.
I hope this helps,
Cheers
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...