Hi, Thanks Susan for the resume of the method.
>From IBM U2U UK, I read announcement for new "Rapid Triggers" on Universe 10.3 >(or 11) ; I receive no specs but I hope the new implementation consider theses stuffs. Regards. Manu. > -----Message d'origine----- > De : [EMAIL PROTECTED] [mailto:owner-u2- > [EMAIL PROTECTED] De la part de Susan Joslyn > Envoyi : mardi 2 dicembre 2008 14:16 > @ : [email protected] > Objet : Re: [U2] Universe triggers (still more) > > Thanks to the folks who gave me info on Unidata triggers. I've had > those > implemented for years and they do work very simply and well. Universe > has > been a whole different ballgame. > > It turns out that Universe has cleverly adapted the triggers from SQL. > I > say cleverly because it probably really is on some esoteric > mathematical > level. And certain from a viewpoint of 'using what you have'. But for > an > old Pickie like me it has been very foreign. Also they have made use > of the > Begin Transaction business - so that the writes can be rolled back > using > that existing logic, I reckon. Again, good re-use. But this is also an > area > that I'm not familiar with. > > The three problems that I had were with: > 1) The SB+ COMMON block - this was resolved by adding $OPTIONS PICK to > the > trigger program - and to all the programs down the line that it called. > > 2) WRITES requiring locks: The Begin Transaction relies on a system > variable > called ISOMODE which can be set to 0,1 or 2 to control how rigorous the > locking requirements are - as part of the 'transaction/rollback' stuff. > I > was able to get my programs working by making sure I had a READU before > each > WRITE (which I didn't have in some cases - where I had decided in my > own > wisdom that it was safe not to do it - audit logs, new items, etc.) but > I > can't get into the SB+ code and the authors thereof were also of this > same > wisdom. But it turned out that by using Uniadmin to set ISOMODE to 0, > this > problem was alleviated. > > 3) Last, I wanted to be able to control whether the write should occur. > I > can do it - the manual was not clear on the syntax and I kept thinking > there > was something more, but apparently as long as I put: > DUMMY = SetDiagnostics("This message is about why the item cannot be > written"), the trigger will fail the write and display that message. I > don't > display that message, I don't use the variable DUMMY, I don't set any > particular flag. The display and the failure to write is not pretty. > > 4) One thing I cannot overcome is that the triggers in Universe will > not > permit any interaction. So my program can't explain to the user why it > doesn't think they should write and then allow them to make a decision. > It > throws them back into their item, though, so I guess they can save the > item > somewhere else or something from there. > > Again, thanks to Manu in particular who has obviously fought the exact > same > battle - and to those of you who offered up the "how to" in Unidata. > You > are so lucky you are doing it in Unidata! > > Hope this helps someone else, some day. > > Susan Joslyn > SJ+ Systems Associates, Inc. > PRC(r) Complete software development life-cycle management for U2. > ------- > u2-users mailing list > [email protected] > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
