BO.Save, Transaction and EditingState


Author
Message
Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I am developing web application. In one of my web page, I bind my PrimaryBO to it. When user click a button, I call the PrimaryBO.Save() and then some other BOs.Save() as well. They are within Transaction, try...catch block.



If that is any exception caused by some other BOs.Save() which called after PrinmaryBO.Save(), I call BusinessLayer.TransactionRollback().



I have problem that, even though is rollbacked, PrimaryBO.EditingState() will still Idle. It caused user unable to "re-edit" it on UI. How to solve this?



Thank you
Chan
Chan
Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)Advanced StrataFrame User (713 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Any advice? It is urgent!



Thank you
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The only way that this would happen when calling the Save of a BO directly is if there is a relationship setup between multiple BOs.  For example, if you have a foreign key setup and the ParentBusinessObject is set on the child BO, when the child saves, it will check to see if parent needs to save first to gain a real primary key.  In this instance, another BO other than the one you called would get saved as well.  But past that, that should be the only way. 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search