Yes, having UI in transaction is not ideal (at least in our design) and that's 
why we never used that approach. 

Update pricing is pretty routine for us as well (in our retail module) but we 
never need nested transaction.

if no ui is involved, 

Master transaction
nested transaction 1 for task 1
nested transaction n for task n
End Master transaction

or

Transaction
update task 1
update task n
End transaction

Any difference?

Alan Chan

4D iNug Technical <4d_tech@lists.4d.com> writes:
>I have a slightly different take from Peter's - consider attempting to make
>changes in a database with many users who may or may not be 'touching' or
>accessing data involved in the chain of updating. Inventory updates are a
>classic example. Pricing can be another. Ideally these sorts of things
>would be done during off-hours but that's not always possible and a given
>update may take a few seconds to run sometimes. This is the sort of case
>where I find nested transactions really helpful. It's not possible to know
>ahead of time everything that might be touched and things may be changing
>in the meantime anyway. I like to break down a complex task into logical
>components each of which may be used in other situations so it makes sense
>to wrap each one in its own transaction and let the master transaction
>decide whether any of those subsidiary ones warrant cancelling the whole.
>
>To be honest I hadn't even considered the issue of working with components
>but Peter does a lot more of that than I do. Plus I rarely have components
>doing much of their own processing - just offering support and
>functionality to the parent db.
>
>I'll just add I think it's a bad idea to wrap any UI in a transaction. As
>Peter notes I know some folks do it and it works for them but my experience
>has never born that out.

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to