Re: Sql Forms Flow Charting

From: John Strange <jstrange_at_imtn.dsccc.com>
Date: 7 Jul 1999 12:31:52 GMT
Message-ID: <7lvhbo$rk1$1_at_relay1.dsccc.com>


Create a

	table to store trigger info,
	sql statement to create a report
	form triggers,
	program unit to write info to table.

************ table *******************

create table events
(line number (15),
 text varchar2 (36),
 trig_name varchar2 (36),
 cursor_name varchar2 (36)
)
  • report ******************* set line 132 select TEXT, TRIG_NAME, CURSOR_NAME from events order by line /
  • program unit *******************

PROCEDURE log (text in varchar2) IS
 aa number ;
tt varchar2 (32) ;
cc varchar2 (32) ;
counter number ;
BEGIN
  tt := :system.trigger_item ;
  cc := :system.cursor_item ;
  select count (line) + 1 into counter from events ;

	insert into events 
	(line, text, trig_name, cursor_name)
	values (counter, text, tt, cc) ;

END;
  • form triggers *******************

You can use the EVENTS table for block/items to attache triggers. Since you will replace every trigger with the LOG procedure, the form will not change the data. Display 3 or more records for navigation triggers.

now create a trigger for everything and call the LOG procedure. example for a form level trigger I used

log ('f pre-commit') ;

F indicates it is a Form level PRE-COMMIT trigger event.

log ('b pre-text-item') ;
B is a block trigger for a pre-text-item trigger.

In the key-exit trigger you need:
commit ;
commit_form ;
exit_form ;

Dogan Cibiceli (dcib_at_gwl.com) wrote:
: Hi,
: I need a tool for charting out the flow of the SQL Forms. Which
: triggers call which functions and which triggers call which other
: triggers. I know that, it cannot be a single flow because of event
: driven nature but if it could give scenarios considering what happens
: when different triggers fire. Does anyone know such a tool or a way for
: me to derive out this info ? Thanks in advance.

: Dogan

--
While Alcatel may claim ownership of all my ideas (on or off the job),
Alcatel does not claim any responsibility for them. Warranty expired when u
opened this article and I will not be responsible for its contents or use.
Received on Wed Jul 07 1999 - 14:31:52 CEST

Original text of this message