TeleFlow Forums
http://teleflow.org/phpbb/

User defined global event
http://teleflow.org/phpbb/viewtopic.php?f=7&t=259
Page 1 of 1

Author:  Awgeewhiz [ Tue Aug 09, 2005 2:30 pm ]
Post subject: 

There currently are only two global events. Fatal and Hangup. A user defined global event would be nice.

Author:  Chris [ Wed Aug 10, 2005 9:49 am ]
Post subject: 

How do you see this working? <br> <br>At present, the global events in place are events that occur / are detected at a level the TeleFlow Application programmer doesn't have access to. As such, how would one set / detect / use such a user defined global?

Author:  Awgeewhiz [ Wed Aug 10, 2005 11:10 am ]
Post subject: 

Well, actually, you can. <br> <br>You can force a fatal error with a fatal stop step. <br> <br>What I do, depending where in the code flow I want to change major event handling is I use the Set Global Event step to change the global label to jump to when either an application error is encounter or when I force a fatal error condition with the Fatal Stop step. <br> <br>This way I have control over reentry points in my main program.

Author:  Awgeewhiz [ Wed Aug 10, 2005 12:48 pm ]
Post subject: 

Update: <br> <br>I found after setting global event for the first time, subsequent settings in other flowcharts does not change the label target. <br> <br>The simple workaround was create a global variable named Event_Type <br>and load it with whatever I want. <br>e.g. HANGUP, TCP_TIMEOUT, etc. <br> <br>Then in the main flowchart where the first instance of set global event points to the label, use a case statement on Even_Type and branch from there. <br> <br>I could then load Event_Type in other flowcharts depending on what I want to trap, do a HANGUP with goto Global Event.

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/