I've never forgotten a basic tenet from one of my first programming classes....
"Always include a kicker of some sort in a loop".
Can't say I've adhered 100% but if I've done something recursively, I always pass/increment a counter and test for some "reasonableness" value to bail out.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of James H. H. Lampert
Sent: Thursday, April 08, 2010 9:46 AM
To: Midrange Systems Technical Discussion
Subject: Re: Trigger techniques
Charles Wilt wrote:
The only possible issue with this...
If your actual trigger does an update to another file that also has
the gentrigger attached, the process will blow up because RPG doesn't
allow recursive programs.
Or, as happens in my Workflow trigger, you simply catch the recursion
exception and ignore it: while we made Workflow a trigger, so that the
scripts will trip regardless of whether the file modification is done
from our application, we also designated it a "well-known limitation"
that changes made by Workflow scripts don't trip other Workflow scripts.
If you allow recursive calls to a script-driven trigger, it would be far
too easy to go into not just an ordinary infinite loop, but an infinite
recursion. That would be bad. That would be "don't cross the streams" bad.
--
JHHL
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/midrange-l.
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. (Knotts Berry Farm - Cedar Fair L.P.)
As an Amazon Associate we earn from qualifying purchases.