Query Window
SET SERVEROUTPUT ON / declare in_start_action_id number(12) := true; type tt_action_mark_list is table of char(1) index by varchar2(12); tab_action_mark_list tt_action_mark_list; type t_action_row is record ( action_name true.action.action_name%type, action_type true.action.action_type_id%type, native_command true.action.action_native_command%type, object_type_id true.action.object_type_id%type ); type tt_obj_list is table of t_action_row index by varchar2(12); tab_action_list tt_obj_list; type t_result_row is record ( action_id true.action.action_id%type, result_action_id true.action.action_id%type, result_string varchar2(500) ); type tt_result_list is table of t_result_row index by varchar2(12); tab_action_result_list tt_result_list; v_index varchar2(12); v_first_item_tf char(1) := 'T'; v_object_type_name varchar2(200); procedure sp_parse_action(in_action_id in true.action.action_id%type) is v_result_str varchar2(500); begin -- Populate the Action list select a.action_name, a.action_type_id, a.action_native_command, a.object_type_id into tab_action_list(in_action_id).action_name, tab_action_list(in_action_id).action_type, tab_action_list(in_action_id).native_command, tab_action_list(in_action_id).object_type_id from true.action a where a.action_id = in_action_id; for r_result in ( select ar.action_result_id, ar.action_outcome_id, ar.exchange_id, (select e.exchange_name from true.exchange e where e.exchange_id = ar.exchange_id) as exchange_text, (select o.outcome_name from true.outcome o where o.outcome_id = ar.action_outcome_id) as outcome_text, ar.reflexive_tf, case when ar.reflexive_tf = 'T' then ar.action_id else ar.result_action_id end as result_action_id from true.action_result ar where ar.action_id = in_action_id ) loop v_result_str := r_result.action_outcome_id || '-' || nvl(r_result.outcome_text, r_result.action_outcome_id); tab_action_result_list(r_result.action_result_id).action_id := in_action_id; tab_action_result_list(r_result.action_result_id).result_action_id := r_result.result_action_id; tab_action_result_list(r_result.action_result_id).result_string := v_result_str; -- controlled recursion if not tab_action_list.exists(r_result.result_action_id) then sp_parse_action(r_result.result_action_id); end if; end loop; end; begin sp_parse_action(in_start_action_id); dbms_output.put_line('@startuml'); v_index := tab_action_list.first; while v_index is not null loop select object_type_name into v_object_type_name from true.object_type where object_type_id = tab_action_list(v_index).object_type_id; dbms_output.put_line('state "' || v_index || '\n' || tab_action_list(v_index).action_name || '\nContext object: '|| v_object_type_name || case when tab_action_list(v_index).native_command is not null then '\n' || 'Native command: ' || tab_action_list(v_index).native_command end || '" as action' || v_index); v_index := tab_action_list.next(v_index); end loop; v_index := tab_action_result_list.first; while v_index is not null loop if v_first_item_tf = 'T' then dbms_output.put_line('[*] --> action' || in_start_action_id); v_first_item_tf := 'F'; end if; dbms_output.put_line('action' || tab_action_result_list(v_index).action_id || ' --> action' || tab_action_result_list(v_index).result_action_id || ': ' || tab_action_result_list(v_index).result_string); -- Is this a terminating action, ie a page? if tab_action_list(tab_action_result_list(v_index).result_action_id).action_type = 1 then if not tab_action_mark_list.exists(tab_action_result_list(v_index).result_action_id) then dbms_output.put_line('action' || tab_action_result_list(v_index).result_action_id || ' --> [*]'); tab_action_mark_list(tab_action_result_list(v_index).result_action_id) := 'T'; end if; end if; v_index := tab_action_result_list.next(v_index); end loop; dbms_output.put_line('@enduml'); end;
Select all
Close
Open Query Window
Dragon Development Toolset
Paste UML code here
Generated actions
Clear all
How to use (two ways)
---> First <---
1. Enter starting action ID
2. Grab the query by clicking on Open Query Window button.
3. Run the query in API schema
4. Copy the output and paste it in textarea -
Click to see example
5. Click on --- Generate using UML --- button
6. To open diagram in new tab click on action ID
---> Second <---
1. Enter starting action ID
2. Click on --- Generate using ActionID --- button
3. To open diagram in new tab click on action ID
Note: Make sure to add Database credentials before generating diagram.
-
Note
Sometimes it can take up to 120 seconds for diagram to be generated, if the character length is over 100000
-
Current number of characters:
0
-
SCHEMA NAME
Clear
Config Page
Adding schema name is optional.
Generate using UML
Generate using ActionID
User Session Tools
BV Tools
Object Explorer