REM dbdrv: sql ~PROD ~PATH ~FILE none none none package &phase=plb \
REM dbdrv: checkfile:~PROD:~PATH:~FILE
REM +=======================================================================+
REM | Copyright (c) 1996 Oracle Corporation, Redwood Shores, CA, USA |
REM | All rights reserved. |
REM +=======================================================================+
REM | FILENAME
REM | wfmonb.pls
REM |
REM | DESCRIPTION
REM | Java Monitor Tool
REM |
REM | HISTORY
REM | 30 OCT 1996 Created from rou.pls
REM | 14 MAY 2001 JWSMITH, BUG 1708024 - changed tokenized_value from
REM | VARCHAR2(2100) to VARCHAR2(4000)
REM | 06 JUN 2001 JWSMITH BUG 1819232 ADA ENHANCEMENT
REM | - Added ALTS for img tags
REM | - Added ID attr to TD tags
REM | - Added summary attr for table tag
REM | - Added label to form input fields & select fields
REM | 02 JAN 2002 JWSMITH BUG 2001012 - Increased username, admin_role,
REM | owner, l_process_owner, l_person, role_name,
REM | email_address to varchar2(320),role display_name 360
REM +=======================================================================+
SET VERIFY OFF
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
set array 1
set scan off
create or replace package body WF_MONITOR as
/* $Header: wfmonb.pls 26.30 2005/03/11 06:18:33 anachatt ship $: */
type NameArrayTyp is table of varchar2(240) index by binary_integer;
/*
** Set up a table for the list of activity status and there associated
** icons. This is used for the advanced activity filtering capability
** as well as the listing of the activity statuses
*/
/*
** Here is the list of status subscripts that are used to reference the table
** elements
*/
G_FIRST_STATUS PLS_INTEGER := 1;
G_ACTIVE PLS_INTEGER := 1;
G_COMPLETE PLS_INTEGER := 2;
G_ERROR PLS_INTEGER := 3;
G_SUSPEND PLS_INTEGER := 4;
G_LAST_STATUS PLS_INTEGER := 4;
/*
** Here is the record definition that holds the
** list of status_codes and their associated icons
*/
TYPE wf_status_icons_record IS RECORD (
status_code VARCHAR2(8),
icon_file_name VARCHAR2(30)
);
/*
** Here is the table that is populated with the appropriate icon information
*/
TYPE wf_status_icons_table IS TABLE OF wf_status_icons_record
INDEX BY BINARY_INTEGER;
--
-- Error (PRIVATE)
-- Print a page with an error message.
-- Errors are retrieved from these sources in order:
-- 1. wf_core errors
-- 2. Oracle errors
-- 3. Unspecified INTERNAL error
--
procedure Error
as
error_name varchar2(30);
error_message varchar2(2000);
error_stack varchar2(32000);
begin
htp.htmlOpen;
htp.headOpen;
htp.title(wf_core.translate('ERROR'));
htp.headClose;
begin
wfa_sec.Header(background_only=>TRUE, inc_lov_applet=>FALSE);
exception
when others then
htp.bodyOpen;
end;
htp.header(nsize=>1, cheader=>wf_core.translate('ERROR'));
wf_core.get_error(error_name, error_message, error_stack);
--Bug 4215720
error_message:=wf_core.substitutespecialchars(error_message);
error_stack:=wf_core.substitutespecialchars(error_stack);
if (error_name is not null) then
htp.p(error_message);
else
htp.p(sqlerrm);
end if;
htp.hr;
htp.p(wf_core.translate('WFENG_ERRNAME')||': '||error_name);
htp.br;
htp.p(wf_core.translate('WFENG_ERRSTACK')||': '||
replace(error_stack,wf_core.newline,' '));
wfa_sec.Footer;
htp.htmlClose;
end Error;
/*
** Create the status icons table. This table is
** used to draw to advanced options list and the
** status column in the activities list when youre
** in advanced mode
*/
procedure create_status_icons_table (
x_status_icons_table IN OUT NOCOPY wf_status_icons_table
)
IS
BEGIN
x_status_icons_table(G_ACTIVE).status_code := 'ACTIVE';
x_status_icons_table(G_ACTIVE).icon_file_name := 'FNDIACTV.gif';
x_status_icons_table(G_COMPLETE).status_code := 'COMPLETE';
x_status_icons_table(G_COMPLETE).icon_file_name := 'FNDIDONE.gif';
x_status_icons_table(G_ERROR).status_code := 'ERROR';
x_status_icons_table(G_ERROR).icon_file_name := 'FNDIREDL.gif';
x_status_icons_table(G_SUSPEND).status_code := 'SUSPEND';
x_status_icons_table(G_SUSPEND).icon_file_name := 'FNDIYLWL.gif';
EXCEPTION
WHEN OTHERS THEN
Wf_Core.Context('wf_monitor',
'create_status_icons_table');
wf_monitor.error;
END create_status_icons_table;
-- GetAccessKey
function GetAccessKey(
x_item_type varchar2,
x_item_key varchar2,
x_admin_mode varchar2) return varchar2 is
access_key varchar2(2000);
begin
if (upper(substr(x_admin_mode, 1, 1)) <> 'Y') then
access_key := Wf_Engine.GetItemAttrText(x_item_type,
x_item_key, '.MONITOR_KEY');
else
access_key := Wf_Engine.GetItemAttrText(x_item_type,
x_item_key, '.ADMIN_KEY');
end if;
return access_key;
exception
when others then
raise;
end;
-- AccessKeyCheck
function AccessKeyCheck(
x_item_type varchar2,
x_item_key varchar2,
x_admin_mode varchar2,
x_access_key varchar2) return boolean is
access_key varchar2(2000);
begin
if (x_access_key is null) then
return(false);
end if;
-- Check for access key
begin
if (GetAccessKey(x_item_type,x_item_key,x_admin_mode) <> x_access_key) then
return(false);
end if;
return(true);
exception
when others then
wf_monitor.Error;
return(false);
end;
end;
-- Html
-- Sends back a very simple dynamic HTML page to tell the browser what
-- applet to run.
-- IN
-- x_item_type
-- x_item_key
-- x_admin_mode
procedure Html(
x_item_type in varchar2,
x_item_key in varchar2,
x_admin_mode in varchar2,
x_access_key in varchar2,
x_nls_lang in varchar2) is
username varchar2(320);
rt_activity varchar2(30) := '';
rt_activity_version pls_integer;
bg_date date;
access_key varchar2(30);
lang_codeset varchar2(50);
admin_role varchar2(320);
admin_privilege boolean := FALSE;
pseudo_login BOOLEAN := FALSE;
item_type_tl varchar2(80);
l_ie_plugin_ver varchar2(80); -- IE version is delimited by ','
l_archive varchar2(2000); -- first look for java classes at this archive
l_java_loc VARCHAR2(80) := '/OA_JAVA/';
l_code varchar2(80) := 'oracle.apps.fnd.wf.Monitor';
l_wf_plugin_download varchar2(80);
l_wf_plugin_version varchar2(80);
l_wf_classid varchar2(80);
l_admin varchar(4) := 'no';
l_installType varchar2(30);
begin
-- We will check the installation type to be passed to the monitor applet.
l_installType := WF_CORE.Translate('WF_INSTALL');
/*
** Hide any session creation issues for now and depend on the
** access key to prevent a user from running this function without
** logging in.
*/
begin
-- set the validate_only flag to true so you don't throw up the login
-- page and you have a chance to check the access key.
wfa_sec.validate_only := TRUE;
wfa_sec.GetSession(username);
-- Security checking
admin_role := wf_core.Translate('WF_ADMIN_ROLE');
if (admin_role <> '*') then
if (wf_directory.IsPerformer(username, admin_role)) then
admin_privilege := true;
if (upper(substr(x_admin_mode, 1, 1)) = 'Y') then
l_admin := 'yes';
end if;
else
admin_privilege := false;
end if;
else
-- no security. Eveybody is admin
admin_privilege := true;
if (upper(substr(x_admin_mode, 1, 1)) = 'Y') then
l_admin := 'yes';
end if;
end if;
exception
when others then
-- If AccessKeyCheck will return "ERROR" directly if failed
if (not(AccessKeyCheck(x_item_type, x_item_key, x_admin_mode,
x_access_key))) then
htp.p(wf_core.translate('WRONG_ACCESS_KEY'));
return;
else
dbms_session.set_nls('NLS_LANGUAGE', ''''||x_nls_lang||'''');
pseudo_login := TRUE;
if (upper(substr(x_admin_mode, 1, 1)) = 'Y') then
admin_privilege := TRUE;
l_admin := 'yes';
else
admin_privilege := FALSE;
end if;
end if;
end;
begin
select root_activity,
root_activity_version,
begin_date
into rt_activity,
rt_activity_version,
bg_date
from wf_items
where item_type = x_item_type
and item_key = x_item_key;
exception
when NO_DATA_FOUND then
wf_core.Context('Wf_Monitor', 'HTML', x_item_type, x_item_key);
wf_core.Token('TYPE', x_item_type);
wf_core.Token('KEY', x_item_key);
wf_core.Raise('WFENG_ITEM');
when OTHERS then
htp.p(sqlerrm);
return;
end;
lang_codeset := substr(userenv('LANGUAGE'),instr(userenv('LANGUAGE'),'.')+1,
length(userenv('LANGUAGE')));
begin
select display_name
into item_type_tl
from wf_item_types_vl
where name = x_item_type;
exception
when OTHERS then
htp.p(sqlerrm);
return;
end;
-- Otherwise, we can continue our work here
-- Generate the html page
htp.p('');
if (admin_privilege) then
htp.p('
' || item_type_tl || ', ' || x_item_type
|| ', ' || x_item_key || ' ');
else
htp.p(' ' || item_type_tl || ', ' || x_item_key || ' ');
end if;
wfa_html.create_help_function('wf/links/wfm.htm?WFMON');
htp.p('');
-- Open body and draw standard header
wfa_sec.header(FALSE, 'wf_monitor.find_instance" TARGET="_top',
wf_core.translate('WFMON_VIEW_DIAGRAM'), TRUE, pseudo_login);
if (l_installType = 'EMBEDDED') then
if (instr(UPPER(owa_util.get_cgi_env('HTTP_USER_AGENT')), 'WIN') > 0) then
l_archive := '/OA_JAVA/oracle/apps/fnd/jar/wfmon.jar, ' ||
'/OA_JAVA/oracle/apps/fnd/jar/fndewt.jar, ' ||
'/OA_JAVA/oracle/apps/fnd/jar/fndswing.jar, ' ||
'/OA_JAVA/oracle/apps/fnd/jar/fndbalishare.jar, ' ||
'/OA_JAVA/oracle/apps/fnd/jar/fndctx.jar';
l_wf_plugin_download := Wf_Core.translate('WF_PLUGIN_DOWNLOAD');
l_wf_plugin_version := Wf_Core.translate('WF_PLUGIN_VERSION');
l_wf_classid := Wf_Core.translate('WF_CLASSID');
l_ie_plugin_ver := replace(Wf_Core.translate('WF_PLUGIN_VERSION'), '.', ',');
htp.p('');
else
-- Client is not Windows, so we don't want to call Jinitiator.
htp.p('');
end if;
else
htp.p('');
end if;
htp.p('');
exception
when others then
wf_monitor.Error;
return;
end html;
-- GetRootInfo (Private Procedure)
-- Gets the root process information about the item key.
-- IN
-- x_item_type
-- x_item_key
-- x_proc_name varchar2,
-- x_proc_type varchar2,
-- x_version number,
-- x_begin_date varchar2);
procedure GetRootInfo(
x_item_type varchar2,
x_item_key varchar2,
x_proc_parent varchar2,
x_proc_name varchar2,
x_proc_type varchar2,
x_version number,
x_begin_date varchar2) is
-- To find info about the "root" process, we first figure out
-- what its parent process is, then perform the same select we
-- use in the 'GetProcessInfo' procedure.
cursor rootproc_info is
select a.item_type, /* activity definition */
ait.display_name item_type_disp,
a.name,
a1.display_name,
a1.description,
a.type,
l1.meaning type_disp,
a.function,
a.result_type,
art.display_name result_type_disp,
a.cost,
a.rerun,
a.icon_name,
a.message,
to_char(s.due_date)||' '||to_char(s.due_date, 'HH24:MI:SS') due_date,
a.error_item_type||'/'||a.error_process error_process,
a.expand_role,
p.instance_id, /* activity usage */
p.instance_label, /* activity usage */
'' timeout,
p.start_end,
p.default_result,
wf_core.activity_result(a.result_type, p.default_result)
activity_usage_result,
p.icon_geometry,
p.perform_role,
p.user_comment,
s.activity_status, /* activity status */
l2.meaning activity_status_disp,
s.activity_result_code,
wf_core.activity_result(a.result_type, s.activity_result_code)
activity_status_result,
s.assigned_user,
wf_directory.getroledisplayname(s.assigned_user) rolename,
s.notification_id,
/* date conversion is ok */
/* BINDVAR_SCAN_IGNORE */
to_char(s.begin_date) || ' ' || to_char(s.begin_date, 'HH24:MI:SS')
begin_date,
/* date conversion is ok */
/* BINDVAR_SCAN_IGNORE */
to_char(s.end_date) || ' ' || to_char(s.end_date, 'HH24:MI:SS')
end_date,
s.execution_time,
s.error_name,
s.error_message,
s.error_stack,
n.recipient_role,
n.status not_status,
n.due_date not_due_date,
n.begin_date not_begin_date,
n.end_date not_end_date
from wf_activities pd,
wf_process_activities p,
wf_activities a,
wf_activities_tl a1,
wf_item_types_vl ait,
wf_item_activity_statuses s,
wf_lookups l1,
wf_lookups l2,
wf_lookup_types art,
wf_notifications n
where pd.item_type = x_item_type
and pd.name = x_proc_parent
and pd.begin_date <= to_date(x_begin_date, 'DD/MM/YYYY HH24:MI:SS')
and (pd.end_date is null or
pd.end_date > to_date(x_begin_date, 'DD/MM/YYYY HH24:MI:SS'))
and p.process_version = pd.version
and p.process_name = pd.name
and p.process_item_type = pd.item_type
and p.activity_name = x_proc_name
and a.item_type = p.activity_item_type
and a.name = p.activity_name
and a.begin_date <= to_date(x_begin_date, 'DD/MM/YYYY HH24:MI:SS')
and (a.end_date is null or
a.end_date > to_date(x_begin_date, 'DD/MM/YYYY HH24:MI:SS'))
and a1.item_type = a.item_type
and a1.name = a.name
and a1.version = a.version
and a1.language = userenv('LANG')
and ait.name = a.item_type
and s.item_type (+) = x_item_type
and s.item_key (+) = x_item_key
and s.process_activity (+) = p.instance_id
and art.lookup_type(+) = a.result_type
and l1.lookup_code (+) = a.type
and l1.lookup_type (+) = 'WFENG_ACTIVITY_TYPE'
and l2.lookup_code (+) = s.activity_status
and l2.lookup_type (+) = 'WFENG_STATUS'
and s.notification_id = n.notification_id(+);
cursor act_result(act_result_type varchar2) is
select l.lookup_code,
l.meaning
from wf_lookups l
where l.lookup_type = act_result_type;
rc rootproc_info%rowtype;
tokenized_mesg VARCHAR2(10000);
tokenized_stack VARCHAR2(10000);
tokenized_description VARCHAR2(10000);
return_token VARCHAR2(9) := '@#@';
l_tab varchar2(30) := wf_core.tab;
begin
open rootproc_info;
fetch rootproc_info into rc;
if (rootproc_info%notfound) then
htp.p('ERROR:' || 'Internal Error in GetRootProcess');
return;
end if;
-- The htp.p proc does not handle returns well, replace them
-- with the value , will resubstitute later on.
-- tokenized_mesg := substr((replace (rc.error_message, wf_core.newline, return_token)), 1, 220);
tokenized_mesg := replace (rc.error_message, wf_core.newline,
return_token);
tokenized_stack := replace (rc.error_stack, wf_core.newline,
return_token);
tokenized_description := replace (rc.description, wf_core.newline,
return_token);
-- The format we use is to list all the fields,
-- delineated by tabs (wf_core.tab). We place a space after each
-- field, in case the value returned is null (then the space
-- acts as a 'placeholder'), making sure to strip those spaces
-- off when we read this into our javacode.
htp.p('ROOT:' || rc.item_type || ' ' || l_tab
|| rc.item_type_disp || ' ' || l_tab
|| rc.name || ' ' || l_tab
|| rc.display_name || ' ' || l_tab
|| tokenized_description || ' ' || l_tab
|| rc.type || ' ' || l_tab
|| rc.type_disp || ' ' || l_tab
|| rc.function || ' ' || l_tab
|| rc.result_type || ' ' || l_tab
|| rc.result_type_disp || ' ' || l_tab
|| rc.cost || ' ' || l_tab
|| rc.rerun || ' ' || l_tab
|| rc.icon_name || ' ' || l_tab
|| rc.message || ' ' || l_tab
|| rc.due_date|| ' ' || l_tab
|| rc.error_process || ' ' || l_tab
|| rc.expand_role || ' ' || l_tab
|| rc.instance_id || ' ' || l_tab
|| rc.instance_label || ' ' || l_tab
|| rc.timeout || ' ' || l_tab
|| rc.start_end || ' ' || l_tab
|| rc.default_result || ' ' || l_tab
|| rc.activity_usage_result || ' ' || l_tab
|| rc.icon_geometry || ' ' || l_tab
|| rc.perform_role || ' ' || l_tab
|| rc.user_comment || ' ' || l_tab
|| rc.activity_status || ' ' || l_tab
|| rc.activity_status_disp || ' ' || l_tab
|| rc.activity_result_code || ' ' || l_tab
|| rc.activity_status_result || ' ' || l_tab
|| rc.assigned_user || ' ' || l_tab
|| rc.rolename || ' ' || l_tab
|| rc.notification_id || ' ' || l_tab
|| rc.begin_date || ' ' || l_tab
|| rc.end_date || ' ' || l_tab
|| rc.execution_time || ' ' || l_tab
|| rc.error_name || ' ' || l_tab
|| rc.recipient_role || ' ' || l_tab
|| rc.not_status || ' ' || l_tab
|| rc.not_due_date || ' ' || l_tab
|| rc.not_begin_date || ' ' || l_tab
|| rc.not_end_date || ' ' || l_tab
|| tokenized_mesg || ' ' || l_tab
|| tokenized_stack || ' ');
if (rc.result_type <> '*') then
for code in act_result(rc.result_type) loop
htp.p('ROOT_ACTIVITY_RESULT:' || code.lookup_code || ' ' || l_tab
|| code.meaning || ' ');
end loop;
end if;
end GetRootInfo;
-- GetItemInfo (Private Procedure)
-- Gets the item information.
-- IN
-- x_item_type
-- x_item_key
procedure GetItemInfo(
x_item_type varchar2,
x_item_key varchar2,
x_admin_mode varchar2) is
cursor item_info is
select ia.name,
ia.display_name,
ia.type,
ia.format,
decode(ia.type,
'NUMBER', to_char(iav.number_value),
'DATE', to_char(iav.date_value, nvl(ia.format,
'DD-MON-YYYY HH24:MI:SS')),
'LOOKUP', wf_core.activity_result(ia.format, iav.text_value),
iav.text_value) value
from wf_item_attributes_vl ia,
wf_item_attribute_values iav
where iav.item_type = x_item_type
and iav.item_key = x_item_key
and ia.item_type = iav.item_type
and ia.name = iav.name
and substr(ia.name, 1, 1) <> '.'
order by ia.sequence;
item_rec item_info%rowtype;
/* 05/14/01 JWSMITH BUG1708024 - CHANGED tokenized_value from */
/* VARCHAR2(2100) to VARCHAR2(4000) */
tokenized_value VARCHAR2(4000);
return_token VARCHAR2(9) := '@#@';
l_tab varchar2(30) := wf_core.tab;
begin
open item_info;
loop
fetch item_info into item_rec;
exit when item_info%notfound;
if ( (upper(substr(x_admin_mode, 1, 1)) = 'Y') or
(substr(item_rec.name, 1, 1) <> '.') ) then
tokenized_value := replace (item_rec.value, wf_core.newline,
return_token);
htp.p('ITEM_ATTRIBUTE:' || item_rec.name || ' ' || l_tab
|| item_rec.display_name || ' ' || l_tab
|| item_rec.type || ' ' || l_tab
|| item_rec.format || ' ' || l_tab
|| tokenized_value || ' ');
end if;
end loop;
end GetItemInfo;
-- GetProcessInfo (Private Procedure)
-- Gets process activity information.
-- IN
-- x_item_type
-- x_item_key
-- x_proc_name
-- x_proc_type
-- x_begin_date
-- x_admin_mode
procedure GetProcessInfo(
x_item_type varchar2,
x_item_key varchar2,
x_proc_name varchar2,
x_proc_type varchar2,
x_begin_date varchar2,
x_admin_mode varchar2) is
cursor proc_info is
select a.item_type, /* activity definition */
ait.display_name item_type_disp,
a.name,
a1.display_name,
a.version,
a1.description,
a.type,
l1.meaning type_disp,
a.function,
a.result_type,
art.display_name result_type_disp,
a.cost,
a.rerun,
a.icon_name,
a.message,
to_char(s.due_date)||' '||to_char(s.due_date, 'HH24:MI:SS') due_date,
a.error_item_type||'/'||a.error_process error_process,
a.expand_role,
p.instance_id, /* activity usage */
p.instance_label, /* activity usage */
wf_engine_util.activity_timeout(p.instance_id) timeout,
p.start_end,
p.default_result,
wf_core.activity_result(pd.result_type, p.default_result)
activity_usage_result,
p.icon_geometry,
p.perform_role,
p.user_comment,
s.activity_status, /* activity status */
l2.meaning activity_status_disp,
s.activity_result_code,
wf_core.activity_result(a.result_type, s.activity_result_code)
activity_status_result,
s.assigned_user,
wf_directory.getroledisplayname(s.assigned_user) rolename,
s.notification_id,
to_char(s.begin_date) || ' ' || to_char(s.begin_date, 'HH24:MI:SS')
begin_date,
to_char(s.end_date) || ' ' || to_char(s.end_date, 'HH24:MI:SS')
end_date,
s.execution_time,
s.error_name,
s.error_message,
s.error_stack,
n.recipient_role,
n.status not_status,
to_char(n.due_date) || ' '|| to_char(n.due_date, 'HH24:MI:SS')
not_due_date,
to_char(n.begin_date) || ' '|| to_char(n.begin_date, 'HH24:MI:SS')
not_begin_date,
to_char(n.end_date) || ' '|| to_char(n.end_date, 'HH24:MI:SS')
not_end_date
from wf_activities pd,
wf_process_activities p,
wf_activities a,
wf_activities_tl a1,
wf_item_types_vl ait,
wf_item_activity_statuses s,
wf_notifications n,
wf_lookups l1,
wf_lookups l2,
wf_lookup_types art
where pd.item_type = x_proc_type
and pd.name = x_proc_name
and pd.begin_date <= to_date(x_begin_date, 'DD/MM/YYYY HH24:MI:SS')
and (pd.end_date is null or
pd.end_date > to_date(x_begin_date, 'DD/MM/YYYY HH24:MI:SS'))
and p.process_item_type = pd.item_type
and p.process_name = pd.name
and p.process_version = pd.version
and a.item_type = p.activity_item_type
and a.name = p.activity_name
and a.begin_date <= to_date(x_begin_date, 'DD/MM/YYYY HH24:MI:SS')
and (a.end_date is null or
a.end_date > to_date(x_begin_date, 'DD/MM/YYYY HH24:MI:SS'))
and a1.item_type = a.item_type
and a1.name = a.name
and a1.version = a.version
and a1.language = userenv('LANG')
and ait.name = a.item_type
and s.item_type (+) = x_item_type
and s.item_key (+) = x_item_key
and s.process_activity (+) = p.instance_id
and art.lookup_type(+) = a.result_type
and l1.lookup_code (+) = a.type
and l1.lookup_type (+) = 'WFENG_ACTIVITY_TYPE'
and l2.lookup_code (+) = s.activity_status
and l2.lookup_type (+) = 'WFENG_STATUS'
and s.notification_id = n.notification_id(+);
cursor act_result(act_result_type varchar2) is
select l.lookup_code,
l.meaning
from wf_lookups l
where l.lookup_type = act_result_type;
cursor act_attr(act_item_type varchar2, act_name varchar2,
act_version number, act_instance_id number) is
select aa.name,
aa.display_name,
aa.type,
aa.format,
decode(aa.type,
'NUMBER', to_char(aav.number_value),
'DATE', to_char(aav.date_value, nvl(aa.format,
'DD-MON-YYYY HH24:MI:SS')),
'LOOKUP', wf_core.activity_result(aa.format, aav.text_value),
aav.text_value) value
from wf_activity_attributes_vl aa,
wf_activity_attr_values aav
where aa.activity_item_type = act_item_type
and aa.activity_name = act_name
and aa.activity_version = act_version
and aav.process_activity_id = act_instance_id
and aa.name = aav.name
and aa.name not like '#%';
cursor not_attr(nid pls_integer) is
select n.notification_id,
n.recipient_role,
n.status,
to_char(n.due_date) || ' ' || to_char(n.due_date, 'HH24:MI:SS')
due_date,
to_char(n.begin_date) || ' ' || to_char(n.begin_date, 'HH24:MI:SS')
begin_date,
to_char(n.end_date) || ' ' || to_char(n.end_date, 'HH24:MI:SS')
end_date,
ma.name,
ma.display_name,
ma.type,
ma.format,
decode(ma.type,
'NUMBER', to_char(na.number_value),
'DATE', to_char(na.date_value, nvl(ma.format,
'DD-MON-YYYY HH24:MI:SS')),
'LOOKUP', wf_core.activity_result(ma.format, na.text_value),
na.text_value) value
from wf_notifications n,
wf_notification_attributes na,
wf_message_attributes_vl ma
where n.group_id = nid
and n.message_type = ma.message_type
and n.message_name = ma.message_name
and ma.name = na.name
and na.notification_id = n.notification_id;
prc proc_info%rowtype;
tokenized_mesg VARCHAR2(10000);
tokenized_stack VARCHAR2(10000);
/* JWSMITH, BUG1708024M CHANGED tokenized_value VARCHAR2(2100) */
/* to tokenized_value VARCHAR2(4000) */
tokenized_value VARCHAR2(4000);
tokenized_description VARCHAR2(1000);
return_token VARCHAR2(9) := '@#@';
l_tab varchar2(30) := wf_core.tab;
begin
open proc_info;
loop
fetch proc_info into prc;
exit when proc_info%notfound;
-- The htp.p proc does not handle returns well, replace them
-- with the value , will resubstitute later on.
-- tokenized_mesg := substr((replace (prc.error_message, wf_core.newline, return_token)), 1, 220);
tokenized_mesg := replace (prc.error_message, wf_core.newline,
return_token);
tokenized_stack := replace (prc.error_stack, wf_core.newline,
return_token);
tokenized_description := replace (prc.description, wf_core.newline,
return_token);
-- The format we use is to list all the fields,
-- delineated by tabs (wf_core.tab). We place a space after each
-- field, in case the value returned is null (then the space
-- acts as a 'placeholder'), making sure to strip those spaces
-- off when we read this into our javacode.
htp.p('ACTIVITY:' || prc.item_type || ' ' || l_tab
|| prc.item_type_disp || ' ' || l_tab
|| prc.name || ' ' || l_tab
|| prc.display_name || ' ' || l_tab
|| tokenized_description || ' ' || l_tab
|| prc.type || ' ' || l_tab
|| prc.type_disp || ' ' || l_tab
|| prc.function || ' ' || l_tab
|| prc.result_type || ' ' || l_tab
|| prc.result_type_disp || ' ' || l_tab
|| prc.cost || ' ' || l_tab
|| prc.rerun || ' ' || l_tab
|| prc.icon_name || ' ' || l_tab
|| prc.message || ' ' || l_tab
|| prc.due_date|| ' ' || l_tab
|| prc.error_process || ' ' || l_tab
|| prc.expand_role || ' ' || l_tab
|| prc.instance_id || ' ' || l_tab
|| prc.instance_label || ' ' || l_tab
|| prc.timeout || ' ' || l_tab
|| prc.start_end || ' ' || l_tab
|| prc.default_result || ' ' || l_tab
|| prc.activity_usage_result || ' ' || l_tab
|| prc.icon_geometry || ' ' || l_tab
|| prc.perform_role || ' ' || l_tab
|| prc.user_comment || ' ' || l_tab
|| prc.activity_status || ' ' || l_tab
|| prc.activity_status_disp || ' ' || l_tab
|| prc.activity_result_code || ' ' || l_tab
|| prc.activity_status_result || ' ' || l_tab
|| prc.assigned_user || ' ' || l_tab
|| prc.rolename || ' ' || l_tab
|| prc.notification_id || ' ' || l_tab
|| prc.begin_date || ' ' || l_tab
|| prc.end_date || ' ' || l_tab
|| prc.execution_time || ' ' || l_tab
|| prc.error_name || ' ' || l_tab
|| prc.recipient_role || ' ' || l_tab
|| prc.not_status || ' ' || l_tab
|| prc.not_due_date || ' ' || l_tab
|| prc.not_begin_date || ' ' || l_tab
|| prc.not_end_date || ' ' || l_tab
|| tokenized_mesg || ' ' || l_tab
|| tokenized_stack || ' ');
if (prc.result_type <> '*') then
for code in act_result(prc.result_type) loop
htp.p('ACTIVITY_RESULT:' || code.lookup_code || ' ' || l_tab
|| code.meaning || ' ');
end loop;
end if;
-- Fetch activity attributes
for attr_value in act_attr(prc.item_type, prc.name, prc.version, prc.instance_id) loop
if ( (upper(substr(x_admin_mode, 1, 1)) = 'Y') or
(substr(attr_value.name, 1, 1) <> '.') ) then
tokenized_value := replace (attr_value.value, wf_core.newline,
return_token);
htp.p('ACTIVITY_ATTRIBUTE:' || attr_value.name || ' ' || l_tab
|| attr_value.display_name || ' ' || l_tab
|| attr_value.type || ' ' || l_tab
|| attr_value.format || ' ' || l_tab
|| tokenized_value || ' ');
end if;
end loop;
if (prc.notification_id is not null) then
-- Fetch notification attributes
for not_attr_value in not_attr(prc.notification_id) loop
if ( (upper(substr(x_admin_mode, 1, 1)) = 'Y') or
(substr(not_attr_value.name, 1, 1) <> '.') ) then
tokenized_value := replace (not_attr_value.value,
wf_core.newline, return_token);
htp.p('NOTIFICATION_ATTRIBUTE:'
|| not_attr_value.notification_id || ' ' || l_tab
|| not_attr_value.recipient_role || ' ' || l_tab
|| not_attr_value.status || ' ' || l_tab
|| not_attr_value.due_date || ' ' || l_tab
|| not_attr_value.begin_date || ' ' || l_tab
|| not_attr_value.end_date || ' ' || l_tab
|| not_attr_value.name || ' ' || l_tab
|| not_attr_value.display_name || ' ' || l_tab
|| not_attr_value.type || ' ' || l_tab
|| not_attr_value.format || ' ' || l_tab
|| tokenized_value || ' ');
end if;
end loop;
end if;
end loop;
end GetProcessInfo;
-- GetTransitionInfo (Private Procedure)
-- Gets the transition information for each process activity.
-- IN
-- x_item_type
-- x_item_key
-- x_proc_name
-- x_proc_type
-- x_begin_date
procedure GetTransitionInfo(
x_item_type varchar2,
x_item_key varchar2,
x_proc_name varchar2,
x_proc_type varchar2,
x_begin_date varchar2) is
cursor trans is
select p1.icon_geometry from_icon_geometry, /* from activity */
p1.instance_id from_instance_id,
t.result_code, /* transition info */
decode((wf_core.activity_result(a.result_type, t.result_code)),
'*', wf_core.translate('DEFAULT'),
'#ANY', wf_core.translate('WFMON_ANYRESULT'),
wf_core.activity_result(a.result_type, t.result_code))
activity_result,
t.arrow_geometry,
s.activity_status, /* transition status */
s.activity_result_code,
l.lookup_code,
p2.icon_geometry to_icon_geometry, /* to activity */
p2.instance_id to_instance_id
from wf_activities pd,
wf_process_activities p1,
wf_activities a,
wf_activity_transitions t,
wf_item_activity_statuses s,
wf_lookups l,
wf_process_activities p2
where pd.item_type = x_proc_type
and pd.name = x_proc_name
and pd.begin_date <= to_date(x_begin_date, 'DD/MM/YYYY HH24:MI:SS')
and (pd.end_date is null or
pd.end_date > to_date(x_begin_date, 'DD/MM/YYYY HH24:MI:SS'))
and p1.process_item_type = pd.item_type
and p1.process_name = pd.name
and p1.process_version = pd.version
and a.item_type = p1.activity_item_type
and a.name = p1.activity_name
and a.begin_date <= to_date(x_begin_date, 'DD/MM/YYYY HH24:MI:SS')
and (a.end_date is null or
a.end_date > to_date(x_begin_date, 'DD/MM/YYYY HH24:MI:SS'))
and t.from_process_activity = p1.instance_id
and s.item_type (+) = x_item_type
and s.item_key (+) = x_item_key
and s.process_activity (+) = p1.instance_id
and l.lookup_type = 'WFSTD_BOOLEAN'
and ((s.activity_status = 'COMPLETE' and
(t.result_code in (nvl(s.activity_result_code, '#NULL'),
wf_engine.eng_trans_any) or
t.result_code = wf_engine.eng_trans_default and not exists
(select null from wf_activity_transitions tr
where tr.from_process_activity = p1.instance_id
and tr.result_code = nvl(s.activity_result_code, '#NULL'))) and
l.lookup_code = 'T') or
(not (s.activity_status = 'COMPLETE' and
(t.result_code in (nvl(s.activity_result_code, '#NULL'),
wf_engine.eng_trans_any) or
t.result_code = wf_engine.eng_trans_default and not exists
(select null from wf_activity_transitions tr
where tr.from_process_activity = p1.instance_id
and tr.result_code = nvl(s.activity_result_code, '#NULL')))) or
s.activity_status is null) and
l.lookup_code = 'F')
and p2.instance_id = t.to_process_activity;
tr trans%rowtype;
l_tab varchar2(30) := wf_core.tab;
begin
open trans;
loop
fetch trans into tr;
exit when trans%notfound;
htp.p('TRANSITION:'|| tr.from_icon_geometry || ' ' || l_tab
|| tr.from_instance_id || ' ' || l_tab
|| tr.result_code || ' ' || l_tab
|| tr.activity_result || ' ' || l_tab
|| tr.arrow_geometry || ' ' || l_tab
|| tr.activity_status || ' ' || l_tab
|| tr.activity_result_code || ' ' || l_tab
|| tr.lookup_code || ' ' || l_tab
|| tr.to_icon_geometry || ' ' || l_tab
|| tr.to_instance_id || ' ');
end loop;
end GetTransitionInfo;
-- GetResource
-- Called by Monitor.class.
-- Printf's all the role information back to the
-- Monitor applet, which reads them a line at a time, interpreting them.
-- IN
-- x_filter
procedure GetResource(x_restype varchar2,
x_resname varchar2) is
res_name varchar2(30);
res_text varchar2(2000);
res_id number;
username varchar2(320);
l_tab varchar2(30);
begin
wfa_sec.validate_only := TRUE;
wfa_sec.GetSession(username);
l_tab := wf_core.tab;
begin
select NAME, TEXT, ID
into res_name, res_text, res_id
from WF_RESOURCES
where TYPE = x_restype
and NAME = x_resname
and NAME <> 'WF_ADMIN_ROLE'
and LANGUAGE = userenv('LANG');
exception
when OTHERS then
res_name := x_resname;
res_text := x_resname;
res_id := 999;
end;
htp.p('RESOURCE:'|| res_name || ' ' || l_tab
|| res_text || ' ' || l_tab
|| to_char(res_id) || ' ');
end GetResource;
-- GetResources
-- Called by Monitor.class.
-- Printf's all the role information back to the
-- Monitor applet, which reads them a line at a time, interpreting them.
-- IN
-- x_filter
procedure GetResources(x_restype varchar2,
x_respattern varchar2) is
cursor matched_resource is
select NAME, TEXT, ID
from WF_RESOURCES
where TYPE = x_restype
and NAME like x_respattern||'%'
and NAME <> 'WF_ADMIN_ROLE'
and LANGUAGE = userenv('LANG')
order by NAME;
res_name varchar2(30);
res_text varchar2(2000);
res_id number;
pattern varchar2(30);
username varchar2(320);
l_tab varchar2(30);
begin
wfa_sec.validate_only := TRUE;
wfa_sec.GetSession(username);
l_tab := wf_core.tab;
if (x_respattern is null) then
pattern := '%';
end if;
for r in matched_resource loop
htp.p('RESOURCE:' || r.name || ' ' || l_tab
|| r.text || ' ' || l_tab
|| to_char(r.id) || ' ');
end loop;
end GetResources;
procedure GetRole(p_titles_only varchar2,
P_FIND_CRITERIA varchar2) is
username varchar2(320);
cursor role(tmpbuf1 varchar2, tmpbuf2 varchar2,
tmpbuf3 varchar2, tmpbuf4 varchar2) is
select r.name,
r.display_name
from wf_roles r
where display_name not like '~WF_ADHOC-%'
and (display_name like tmpbuf1 or
display_name like tmpbuf2 or
display_name like tmpbuf3 or
display_name like tmpbuf4) and
upper(display_name) like upper(P_FIND_CRITERIA)||'%'
order by r.display_name;
first_char varchar2(1) := null;
second_char varchar2(1) := null;
tmpbuf1 varchar2(10);
tmpbuf2 varchar2(10);
tmpbuf3 varchar2(10);
tmpbuf4 varchar2(10);
cnt number;
begin
-- Authenticate user
wfa_sec.GetSession(username);
if (P_FIND_CRITERIA is null) then
first_char := null;
second_char := null;
else
first_char := substr(P_FIND_CRITERIA, 1, 1);
second_char := substr(P_FIND_CRITERIA, 2, 1);
end if;
tmpbuf1 := upper(first_char)||upper(second_char)||'%';
tmpbuf2 := upper(first_char)||lower(second_char)||'%';
tmpbuf3 := lower(first_char)||upper(second_char)||'%';
tmpbuf4 := lower(first_char)||lower(second_char)||'%';
select count(*) into cnt
from wf_roles
where display_name not like '~WF_ADHOC-%'
and (display_name like tmpbuf1 or
display_name like tmpbuf2 or
display_name like tmpbuf3 or
display_name like tmpbuf4) and
upper(display_name) like upper(P_FIND_CRITERIA) ||'%';
htp.p(wf_core.translate('WFMON_REASSIGN_TO'));
htp.p('2');
htp.p(to_char(cnt));
htp.p(wf_core.translate('WFITD_ATTR_TYPE_ROLE'));
htp.p('50');
htp.p(wf_core.translate('WFITD_INTERNAL_NAME'));
htp.p('50');
if (upper(substr(p_titles_only, 1, 1)) <> 'Y') then
for r in role(tmpbuf1, tmpbuf2, tmpbuf3, tmpbuf4) loop
htp.p(r.display_name);
htp.p(r.name);
end loop;
end if;
end GetRole;
-- GetProcess
-- Called by Monitor.class.
-- Printf's all the information about the workflow objects back to the
-- Monitor applet, which reads them a line at a time, interpreting them.
procedure GetProcess(
x_item_type varchar2,
x_item_key varchar2,
x_admin_mode varchar2,
x_access_key varchar2,
x_proc_name varchar2,
x_proc_type varchar2) is
cursor role is
select r.name,
r.display_name
from wf_roles r
order by r.display_name;
username varchar2(320);
rt_activity varchar2(30);
rt_activity_version pls_integer;
bg_date date;
ed_date date;
ukey varchar2(240);
owner varchar2(320);
parent_activity varchar2(30);
l_tab varchar2(30);
begin
l_tab := wf_core.tab;
/*
** Hide any session creation issues for now and depend on the
** access key to prevent a user from running this function without
** logging in.
*/
begin
-- set the validate_only flag to true so you don't throw up the login
-- page and you have a chance to check the access key.
wfa_sec.validate_only := TRUE;
wfa_sec.GetSession(username);
exception
when others then
-- If AccessKeyCheck will return "ERROR" directly if failed
if (not(AccessKeyCheck(x_item_type, x_item_key, x_admin_mode,
x_access_key))) then
htp.p(wf_core.translate('WRONG_ACCESS_KEY'));
return;
end if;
end;
begin
select root_activity,
root_activity_version,
begin_date,
end_date,
user_key,
owner_role
into rt_activity,
rt_activity_version,
bg_date,
ed_date,
ukey,
owner
from wf_items
where item_type = x_item_type
and item_key = x_item_key;
exception
when NO_DATA_FOUND then
htp.p(wf_core.translate('WRONG_TYPE_OR_KEY'));
return;
when OTHERS then
htp.p(wf_core.translate('ERROR'));
return;
end;
-- Otherwise, we can continue our work here
htp.p('ITEM:' || owner|| ' ' || l_tab
|| ukey || ' ' || l_tab
|| bg_date || ' ' || l_tab
|| ed_date || ' ');
if (x_proc_name is null) then
GetRootInfo(x_item_type, x_item_key,
'ROOT', rt_activity, x_item_type,
rt_activity_version,
to_char(bg_date, 'DD/MM/YYYY HH24:MI:SS'));
GetItemInfo (x_item_type, x_item_key, x_admin_mode);
GetProcessInfo(x_item_type, x_item_key,
rt_activity, x_item_type,
to_char(bg_date, 'DD/MM/YYYY HH24:MI:SS'), x_admin_mode);
GetTransitionInfo(x_item_type, x_item_key,
rt_activity, x_item_type,
to_char(bg_date, 'DD/MM/YYYY HH24:MI:SS'));
else
GetProcessInfo(x_item_type, x_item_key,
x_proc_name, x_proc_type,
to_char(bg_date, 'DD/MM/YYYY HH24:MI:SS'), x_admin_mode);
GetTransitionInfo(x_item_type, x_item_key,
x_proc_name, x_proc_type,
to_char(bg_date, 'DD/MM/YYYY HH24:MI:SS'));
end if;
end GetProcess;
function GetUrl (x_agent in varchar2,
x_item_type in varchar2,
x_item_key in varchar2,
x_admin_mode in varchar2) return varchar2 is
begin
return (GetDiagramUrl(x_agent,x_item_type, x_item_key, x_admin_mode));
exception
when others then
raise;
end;
function GetDiagramURL (x_agent in varchar2,
x_item_type in varchar2,
x_item_key in varchar2,
x_admin_mode in varchar2) return varchar2 is
access_key varchar2(2000);
l_item_key varchar2(30);
xnls_lang varchar2(60);
begin
access_key := GetAccessKey(x_item_type, x_item_key, x_admin_mode);
select replace(nls_language,' ','%20')
into xnls_lang
from wf_languages
where code=userenv('LANG');
return(x_agent||'/wf_monitor.html'||
'?'||'x_item_type=' ||wfa_html.conv_special_url_chars(x_item_type)||
'&'||'x_item_key=' ||wfa_html.conv_special_url_chars(x_item_key)||
'&'||'x_admin_mode='||x_admin_mode||
'&'||'x_access_key='||access_key||
'&'||'x_nls_lang='||xnls_lang);
exception
when others then
raise;
end;
function GetAdvancedEnvelopeURL (
x_agent IN VARCHAR2,
x_item_type IN VARCHAR2,
x_item_key IN VARCHAR2,
x_admin_mode IN VARCHAR2,
x_options IN VARCHAR2
) return varchar2 is
access_key varchar2(2000);
xnls_lang varchar2(60);
begin
--
access_key := GetAccessKey(x_item_type, x_item_key, x_admin_mode);
select replace(nls_language,' ','%20')
into xnls_lang
from wf_languages
where code=userenv('LANG');
--
if x_options is not null then
return(x_agent||'/wf_monitor.envelope'||
'?'||'x_item_type=' ||wfa_html.conv_special_url_chars(x_item_type)||
'&'||'x_item_key=' ||wfa_html.conv_special_url_chars(x_item_key)||
'&'||'x_admin_mode='||x_admin_mode||
'&'||'x_access_key='||access_key||
'&'||'x_advanced=TRUE'||
'&'||'x_active=ACTIVE'||
'&'||'x_complete=COMPLETE&x_error=ERROR'||
'&'||'x_suspend=SUSPEND&x_proc_func=Y'||
'&'||'x_note_resp=Y&x_note_noresp=Y'||
'&'||'x_func_std=Y&x_event=Y&x_sort_column=STARTDATE'||
'&'||'x_sort_order=ASC'||
'&'||'x_nls_lang='||xnls_lang);
else
return(x_agent||'/wf_monitor.envelope'||
'?'||'x_item_type=' ||wfa_html.conv_special_url_chars(x_item_type)||
'&'||'x_item_key=' ||wfa_html.conv_special_url_chars(x_item_key)||
'&'||'x_admin_mode='||x_admin_mode||
'&'||'x_access_key='||access_key||
'&'||'x_advanced=TRUE'||
'&'||'x_nls_lang='||xnls_lang);
end if;
exception
when others then
raise;
end;
function GetEnvelopeURL (
x_agent IN VARCHAR2,
x_item_type IN VARCHAR2,
x_item_key IN VARCHAR2,
x_admin_mode IN VARCHAR2
) return varchar2 is
access_key varchar2(2000);
xnls_lang varchar2(60);
begin
access_key := GetAccessKey(x_item_type, x_item_key, x_admin_mode);
select replace(nls_language,' ','%20')
into xnls_lang
from wf_languages
where code=userenv('LANG');
return(x_agent||'/wf_monitor.envelope'||
'?'||'x_item_type=' ||wfa_html.conv_special_url_chars(x_item_type)||
'&'||'x_item_key=' ||wfa_html.conv_special_url_chars(x_item_key)||
'&'||'x_admin_mode='||x_admin_mode||
'&'||'x_access_key='||access_key||
'&'||'x_advanced=FALSE'||
'&'||'x_nls_lang='||xnls_lang);
exception
when others then
raise;
end;
procedure EngApi (api_name in varchar2,
x_item_type in varchar2,
x_item_key in varchar2,
x_access_key in varchar2,
third_arg in varchar2,
forth_arg in varchar2,
fifth_arg in varchar2) is
username varchar2(320);
begin
-- Security check
if (x_access_key <> GetAccessKey(x_item_type, x_item_key, 'Y')) then
htp.p('ENG_API_ACCESS_DENIED:');
end if;
begin
-- Validate the session that comes from monitor
wfa_sec.validate_only := TRUE;
wfa_sec.GetSession(username);
exception
when OTHERS then
null; -- ignore any error
end;
if (api_name = 'AbortProcess') then
Wf_Engine.AbortProcess(x_item_type, x_item_key, third_arg, forth_arg);
elsif (api_name = 'SuspendProcess') then
Wf_Engine.SuspendProcess(x_item_type, x_item_key, third_arg);
elsif (api_name = 'ResumeProcess') then
Wf_Engine.ResumeProcess(x_item_type, x_item_key, third_arg);
elsif (api_name = 'AssignActivity') then
Wf_Engine.AssignActivity(x_item_type, x_item_key, third_arg, forth_arg);
elsif (api_name = 'HandleError') then
Wf_Engine.HandleError(x_item_type, x_item_key, third_arg, forth_arg,
fifth_arg);
elsif (api_name = 'SetItemAttrText') then
Wf_Engine.SetItemAttrText(x_item_type, x_item_key, third_arg, forth_arg);
end if;
htp.p('ENG_API_SUCC:');
return;
exception
when others then
wf_monitor.Error;
return;
end;
/**********************************************************************
*
* Find window procedures
*
**********************************************************************/
-- Show
-- This is to be called by forms when people want to link to workflow.
-- If nothing to be passed, this will take you to Find_Instance().
-- Otherwise, this will take you to the envelope() page.
procedure Show (
item_type VARCHAR2,
item_key VARCHAR2,
admin_mode VARCHAR2,
access_key VARCHAR2) is
begin
if (item_type is null and item_key is null) then
wf_monitor.Find_Instance();
else
wf_monitor.Envelope(item_type, item_key, admin_mode, access_key);
end if;
end ;
--
-- Find_Instance
-- Query page to find processes
--
-- MODIFICATION LOG:
-- 06-JUN-2001 JWSMITH BUG 1819232 - added alt attrib for the following gifs
-- FNDIACTV,FNDIDONE,FNDIYLWL, FNDIREDL for ADA ENHANCEMENT
procedure Find_Instance
is
username varchar2(320);
admin_role varchar2(320);
admin_privilege boolean;
l_url varchar2(1000);
l_media varchar2(240) := wfa_html.image_loc;
l_icon varchar2(30) := 'FNDILOV.gif';
l_onmouseover varchar2(240) := wfa_html.replace_onMouseOver_quotes(wf_core.translate('WFA_FIND_USER'));
username_display_name varchar2(360);
s0 varchar2(2000);
cursor admin_itemtypes is
select display_name, name
from wf_item_types_vl
order by 1;
cursor user_itemtypes is
select distinct wit.display_name, wit.name
from wf_item_types_vl wit, wf_items wik
where wik.owner_role = username
and wik.item_type = wit.name
order by 1;
cursor all_users is
select distinct wik.owner_role owner_role
from wf_items wik
order by 1;
begin
wfa_sec.GetSession(username);
-- Security checking
admin_role := wf_core.Translate('WF_ADMIN_ROLE');
if (admin_role <> '*') then
if (wf_directory.IsPerformer(username, admin_role)) then
admin_privilege := true;
else
admin_privilege := false;
end if;
else
-- no security. Eveybody is admin
admin_privilege := true;
end if;
-- Window title
htp.htmlOpen;
htp.headOpen;
htp.title(wf_core.translate('WFMON_FINDTITLE'));
fnd_document_management.get_open_dm_display_window;
wfa_html.create_help_function('wf/links/wfi.htm?WFINDPR');
wf_lov.OpenLovWinHtml;
htp.headClose;
-- Open body and draw standard header
wfa_sec.header(FALSE, '', wf_core.translate('WFMON_FINDTITLE'), TRUE);
--
-- We use the simple GET method, when the form is submitted it
-- generates a URL of the form
--
-- http://...wf_monitor.instance_list?x_process=&x_ident= ...
--
-- which is what our instance_list procedure (defined later) is
-- expecting to get passed.
--
-- MODIFICATION LOG:
-- 06-JUN-2001 JWSMITH BUG 1819232 - added ID attrib for TD tag for ADA
-- - Added summary attribute for table tag for ADA
-- - Added alt attr for IMG tags
-- - Added LABEL to form input fields and select fields
--
htp.formOpen(curl=>'wf_monitor.instance_list',
cmethod=>'GET', cattributes=>'NAME="WF_FIND"');
htp.tableOpen(calign=>'CENTER', cattributes=>'border=0 cellpadding=2 cellspacing=0 summary=""');
-- Active/Complete Radio Group
htp.tableRowOpen;
htp.tableData(htf.br, cattributes=>'id=""');
htp.tableData(cvalue=>'' ||
'' ||
'',
calign=>'left',
ccolspan=>'3',
cattributes=>'id=""');
htp.tableRowClose;
-- Item Type
htp.tableRowOpen;
htp.tableData(cvalue=>'',
calign=>'right',
cattributes=>'valign=middle id=""');
htp.p('
');
htp.formSelectOpen(cname=>'x_itemtype',
cattributes=>'id="i_itemtype"');
htp.formSelectOption(cvalue=>wf_core.translate('ALL'),
cattributes=>'value=*');
if (admin_privilege) then
for it in admin_itemtypes loop
htp.formSelectOption(cvalue=>it.display_name,
cattributes=>'value='||'"'||it.name||'"');
end loop;
else
for it in user_itemtypes loop
htp.formSelectOption(cvalue=>it.display_name,
cattributes=>'value='||'"'||it.name||'"');
end loop;
end if;
htp.formSelectClose;
htp.p('
');
htp.tableRowClose;
-- Item Key
htp.tableRowOpen;
htp.tableData(cvalue=>'',
calign=>'right',
cattributes=>'valign=middle, id=""');
htp.tableData(cvalue=>htf.formText(cname=>'x_ident',
csize=>'30',
cmaxlength=>'240',
cattributes=>'id="i_ident"'),
calign=>'left',
cattributes=>'id=""');
htp.tableRowClose;
-- User Item Key
htp.tableRowOpen;
htp.tableData(cvalue=>'',
calign=>'right',
cattributes=>'valign=middle, id=""');
htp.tableData(cvalue=>htf.formText(cname=>'x_user_ident',
csize=>'30',
cmaxlength=>'240',
cattributes=>'id="i_user_ident"'),
calign=>'left',
cattributes=>'id=""');
htp.tableRowClose;
-- Process Name
htp.tableRowOpen;
htp.tableData(cvalue=>'',
calign=>'right',
cattributes=>'valign=middle id=""');
htp.tableData(cvalue=>htf.formText(cname=>'x_process',
csize=>'30',
cmaxlength=>'80',
cattributes=>'id="i_process"'),
calign=>'left',
ccolspan=>3,
cattributes=>'id=""');
htp.formHidden('x_process_owner', null);
-- add LOV here: Note:bottom is name of frame.
-- Note: The REPLACE function replaces all the space characters with
-- the proper escape sequence.
l_url := 'javascript:fnd_open_dm_display_window('||''''||
REPLACE('wf_lov.display_lov?p_lov_name='||'owner'||
'&p_display_name='||'WFA_FIND_USER'||
'&p_validation_callback=wfa_html.wf_user_val'||
'&p_dest_hidden_field=top.opener.parent.document.WF_FIND.x_process_owner.value'||
'&p_current_value=top.opener.parent.document.WF_FIND.x_display_process_owner.value'||
'&p_display_key='||'Y'||
'&p_dest_display_field=top.opener.parent.document.WF_FIND.x_display_process_owner.value',
' ', '%20')||''''||',500,500)';
htp.tableRowOpen;
htp.tableData(cvalue=>'',
calign=>'right',
cattributes=>'valign=middle id=""');
if (admin_privilege) then
htp.tableData(cvalue=>htf.formText(cname=>'x_display_process_owner',
csize=>'30',
cmaxlength=>'360',
cattributes=>'id="i_display_process_owner"')||
''||
'', cattributes=>'id=""');
htp.tableData(cvalue=>htf.formHidden(cname=>'x_admin_privilege',
cvalue=>'Y'),
cattributes=>'id=""');
else
wf_directory.getroleinfo(username, username_display_name,
s0, s0, s0, s0);
htp.tableData(cvalue=>''||username_display_name||'',
calign=>'left',
ccolspan=>3,
cattributes=>'valign=middle id=""');
htp.tableData(cvalue=>htf.formHidden(cname=>'x_display_process_owner',
cvalue=>username),
cattributes=>'id=""');
htp.tableData(cvalue=>htf.formHidden(cname=>'x_admin_privilege',
cvalue=>'N'),
cattributes=>'id=""');
end if;
htp.tableRowClose;
-- Blank line
htp.tableRowOpen;
htp.tableData(cvalue=>htf.br, ccolspan=>'4',cattributes=>'id=""');
htp.tableRowClose;
-- 'With Activities:' section header
htp.tableRowOpen;
htp.tableData(cvalue=>htf.bold(wf_core.translate('WFMON_WITHTITLE'))||':',
calign=>'right',
cattributes=>'id=""');
htp.tableRowClose;
-- Error/Suspend Radio Group
htp.tableRowOpen;
htp.tableData(htf.br, cattributes=>'id=""');
htp.tableData(cvalue=>'' ||
'' ||
'',
calign=>'left',
ccolspan=>'3',
cattributes=>'id=""');
htp.tableRowClose;
-- Waiting for notifications line
htp.tableRowOpen;
htp.tableData(cvalue=>'',
calign=>'right',
cattributes=>'valign=middle id=""');
htp.formHidden('x_person', null);
-- add LOV here: Note:bottom is name of frame.
-- Note: The REPLACE function replaces all the space characters with
-- the proper escape sequence.
l_url := 'javascript:fnd_open_dm_display_window('||''''||
REPLACE('wf_lov.display_lov?p_lov_name='||'owner'||
'&p_display_name='||'WFA_FIND_USER'||
'&p_validation_callback=wfa_html.wf_user_val'||
'&p_dest_hidden_field=top.opener.parent.document.WF_FIND.x_person.value'||
'&p_current_value=top.opener.parent.document.WF_FIND.x_display_person.value'||
'&p_display_key='||'Y'||
'&p_dest_display_field=top.opener.parent.document.WF_FIND.x_display_person.value',
' ', '%20')||''''||',500,500)';
htp.tableData(cvalue=>htf.formText(cname=>'x_display_person',
csize=>'30',
cmaxlength=>'360',
cattributes=>'id="i_display_person"')||
''||
'', cattributes=>'id=""');
htp.tableRowClose;
-- No progress in x days line
htp.tableRowOpen;
htp.tableData(cvalue=>'',
calign=>'right',
cattributes=>'valign=middle id=""');
htp.tableData(cvalue=>htf.formText(cname=>'x_numdays',
csize=>'3',
cmaxlength=>'15',
cattributes=>'id="i_numdays"')||
' '||wf_core.translate('DAYS'),
calign=>'left',
ccolspan=>3, cattributes=>'id=""');
htp.tableRowClose;
htp.tableClose;
htp.br;
-- Add submit button
htp.tableopen(calign=>'CENTER',cattributes=>'summary=""');
htp.tableRowOpen;
htp.p('
');
htp.tableRowClose;
htp.tableClose;
wfa_sec.footer;
htp.htmlClose;
exception
when others then
Wf_Core.Context('Wf_Monitor', 'Find_Instance');
wf_monitor.Error;
end Find_Instance;
--
-- createenvsortlink (PRIVATE)
-- Print a single column header in Envelope page
/*
** x_cur_sort_column = Current column that the activity list is sorted by
** x_cur_sort_order = Is the list currently sorted ASC or DESC
** x_sort_column = What is the current column header to display
** x_advanced = Are you in advanced mode
** x_column_title = What is the display text for the column header
** x_column_title_not_adv= What is the display text for the column header
** when youre not in advanced mode (Done vs Status)
** x_show_when_not_adv = Do you display this column if youre not in
** advanced mode (Parent_activity)
** x_standard_url = The fixed set of parameters for the envelope
** routine
*/
procedure createenvsortlink (
x_cur_sort_column VARCHAR2,
x_cur_sort_order VARCHAR2,
x_sort_column VARCHAR2,
x_advanced VARCHAR2,
x_column_title VARCHAR2,
x_column_title_not_adv VARCHAR2,
x_show_when_not_adv BOOLEAN,
x_standard_url VARCHAR2) IS
BEGIN
/*
** If youre supposed to show this column when youre in advanced mode
** or youre only supposed to show it in advanced mode and you're in
** advanced mode then determine how to draw the column title.
*/
IF (x_show_when_not_adv = TRUE OR
(x_show_when_not_adv = FALSE AND
x_advanced IN ('FIRST', 'TRUE'))) THEN
/*
** If the current column to display matches the current sort column
** and the current order is ascending and youre in advanced mode
** then show the column header as a soft link with 'Header*'to resort
** the list DESC
*/
IF (NVL(x_cur_sort_column, 'UNSET') = x_sort_column AND
NVL(x_cur_sort_order, 'ASC') = 'ASC' AND
x_advanced IN ('FIRST', 'TRUE')) THEN
htp.tableHeader(
cvalue=>''||
''||x_column_title||'*'||''||
'',
calign=>'Center');
/*
** If the current column to display matches the current sort column
** and the current order is descending and youre in advanced mode
** then show the column header as a soft link with '*Header'to resort
** the list DESC
*/
ELSIF (NVL(x_cur_sort_column, 'UNSET') = x_sort_column AND
NVL(x_cur_sort_order, 'ASC') = 'DESC' AND
x_advanced IN ('FIRST', 'TRUE')) THEN
htp.tableHeader(
cvalue=>''||
''||'*'|| x_column_title||''||
'',
calign=>'Center');
/*
** If the current column to display does not match the current sort column
** and youre in advanced mode then show the column header as a soft link
** with 'Header'to sort the list ASC by this column
*/
ELSIF (NVL(x_cur_sort_column, 'UNSET') <> x_sort_column AND
x_advanced IN ('FIRST', 'TRUE')) THEN
htp.tableHeader(
cvalue=>''||
''||x_column_title||''||
'',
calign=>'Center');
/*
** If this is not an applicable sort column or your not
** in advanced mode then just show the header normally.
*/
ELSE
htp.tableHeader(''||x_column_title_not_adv||'', 'Center');
END IF;
END IF;
exception
when others then
Wf_Core.Context(
'Wf_Monitor',
'createenvsortlink',
x_cur_sort_column ,
x_cur_sort_order ,
x_sort_column );
raise;
END createenvsortlink;
--
-- ShowEnvColumnHeaders (PRIVATE)
-- Print column header in Envelope page
--
procedure showEnvColumnHeaders (
x_item_type varchar2,
x_item_key varchar2,
x_admin_mode varchar2,
x_access_key varchar2,
x_advanced varchar2,
x_active varchar2,
x_complete varchar2,
x_error varchar2,
x_suspend varchar2,
x_proc_func varchar2,
x_note_resp varchar2,
x_note_noresp varchar2,
x_func_std varchar2,
x_event varchar2,
x_sort_column varchar2,
x_sort_order varchar2,
x_nls_lang varchar2)
is
x_standard_url VARCHAR2(2000);
begin
/*
** Create the fixed set of parameters for the envelope
** routine that gets passed anywhere you create an
** envelope url
*/
x_standard_url := owa_util.get_owa_service_path||
'wf_monitor.envelope'||
'?x_item_type='||wfa_html.conv_special_url_chars(x_item_type)||
'&x_item_key='||wfa_html.conv_special_url_chars(x_item_key)||
'&x_admin_mode='||x_admin_mode||
'&x_access_key='||x_access_key||
'&x_advanced='||x_advanced||
'&x_active='||x_active||
'&x_complete='||x_complete||
'&x_error='||x_error||
'&x_suspend='||x_suspend||
'&x_proc_func='||x_proc_func||
'&x_note_resp='||x_note_resp||
'&x_note_noresp='||x_note_noresp||
'&x_func_std='||x_func_std ||
'&x_event='||x_event ||
'&x_nls_lang='||x_nls_lang;
htp.tableRowOpen(cattributes=>'BGCOLOR=#006699');
/*
** Create the done or status column header depending on whether
** you're in advanced mode or not
*/
createenvsortlink(x_sort_column,
x_sort_order,
'STATUS',
x_advanced,
wf_core.translate('WFMON_STATUS'),
wf_core.translate('WFMON_DONE'),
TRUE,
x_standard_url);
/*
** Create the WHO column header
*/
createenvsortlink(x_sort_column,
x_sort_order,
'WHO',
x_advanced,
wf_core.translate('WFMON_WHO'),
wf_core.translate('WFMON_WHO'),
TRUE,
x_standard_url);
/*
** Create the PARENT activity column header depending on whether
** you're in advanced mode or not
*/
createenvsortlink(x_sort_column,
x_sort_order,
'PARENT',
x_advanced,
wf_core.translate('WFMON_PARENT_ACTIVITY'),
NULL,
FALSE,
x_standard_url);
/*
** Create the ACTIVITY column header
*/
createenvsortlink(x_sort_column,
x_sort_order,
'ACTIVITY',
x_advanced,
wf_core.translate('WFMON_ACTIVITY'),
wf_core.translate('WFMON_ACTIVITY'),
TRUE,
x_standard_url);
/*
** Create the STARTDATE column header
*/
createenvsortlink(x_sort_column,
x_sort_order,
'STARTDATE',
x_advanced,
wf_core.translate('WFMON_STARTED'),
wf_core.translate('WFMON_STARTED'),
TRUE,
x_standard_url);
/*
** Create the DURATION column header
*/
createenvsortlink(x_sort_column,
x_sort_order,
'DURATION',
x_advanced,
wf_core.translate('WFMON_DURATION'),
wf_core.translate('WFMON_DURATION'),
TRUE,
x_standard_url);
/*
** Create the RESULT column header
*/
createenvsortlink(x_sort_column,
x_sort_order,
'RESULT',
x_advanced,
wf_core.translate('WFMON_RESULT'),
wf_core.translate('WFMON_RESULT'),
TRUE,
x_standard_url);
htp.tableRowClose;
end showEnvColumnHeaders;
--
-- ShowColumnHeaders (PRIVATE)
-- Print column header in InstanceList page
--
procedure showColumnHeaders
is
begin
htp.tableRowOpen(cattributes=>'BGCOLOR=#006699');
htp.tableHeader(''||wf_core.translate('ITEMTYPE')||'', 'Center');
htp.tableHeader(''||wf_core.translate('ITEMKEY')||'', 'Center');
htp.tableHeader(''||wf_core.translate('USER_ITEMKEY')||'', 'Center');
htp.tableHeader(''||wf_core.translate('PROCESS_NAME')||'', 'Center');
htp.tableHeader(''||wf_core.translate('COMPLETE')||'', 'Center');
htp.tableHeader(''||wf_core.translate('IN_ERROR')||'', 'Center');
htp.tableHeader(''||wf_core.translate('SUSPENDED')||'', 'Center');
htp.tableHeader(''||wf_core.translate('WFENG_BEGINDATE')||'', 'Center');
htp.tableRowClose;
exception
when others then
Wf_Core.Context('Wf_Monitor', 'ShowColumnHeaders');
raise;
end showColumnHeaders;
--
-- TableRow (PRIVATE)
-- Show a row in the Instance_List table
-- IN
-- itemtype - item type
-- itemkey - item key
-- process - process name
-- url - url for monitor page
-- active - active or completed flag
-- error - errors exist flag
-- suspend - suspensions exist flag
-- startdate - date process started
--
-- MODIFICATION LOG:
-- 06-JUN-2001 JWSMITH 1819232 - added alt attribute to img tags for
-- following gifs: FNDIDONE, FNDIREDL, FNDIYLWL for ADA
--
procedure tableRow(itemtype varchar2,
itemkey varchar2,
userkey varchar2,
process varchar2,
url varchar2,
active boolean,
error boolean,
suspend boolean,
startdate varchar2)
is
begin
htp.tableRowOpen(calign=>'middle');
htp.tableData(itemtype, 'Left', cattributes=>'id=""');
htp.tableData(itemkey, 'Left', cattributes=>'id=""');
if (userkey is not null) then
htp.tableData(userkey, 'Left',cattributes=>'id=""');
else
htp.tableData(htf.br,cattributes=>'id=""');
end if;
if (url is not null) then
htp.tableData(htf.anchor2(curl=>url, ctext=>process, ctarget=>'_top'),
'Left',
cattributes=>'id=""');
else
htp.tableData(process, 'Left', cattributes=>'id=""');
end if;
-- Active/Complete icon
if (active) then
htp.tableData(htf.br,cattributes=>'id=""');
else
htp.tableData(cvalue=>htf.img(curl=>wfa_html.image_loc||'FNDIDONE.gif',
calt=>wf_core.translate('COMPLETE'),
cattributes=>'border=no height=26'),
calign=>'center',
cattributes=>'id=""');
end if;
-- Error icon if error
if (error) then
htp.tableData(cvalue=>htf.img(curl=>wfa_html.image_loc||'FNDIREDL.gif',
calt=>wf_core.translate('IN_ERROR'),
cattributes=>'border=no height=26'),
calign=>'center',
cattributes=>'id=""');
else
htp.tableData(htf.br,cattributes=>'id=""');
end if;
-- Suspend icon if suspended
if (suspend) then
htp.tableData(cvalue=>htf.img(curl=>wfa_html.image_loc||'FNDIYLWL.gif',
calt=>wf_core.translate('SUSPEND'),
cattributes=>'border=no height=26'),
calign=>'center', cattributes=>'id=""');
else
htp.tableData(htf.br,cattributes=>'id=""');
end if;
htp.tableData(startdate, 'Left', cattributes=>'id=""');
htp.tableRowClose;
exception
when others then
Wf_Core.Context('Wf_Monitor', 'TableRow', itemtype, itemkey, process,
url, startdate);
raise;
end TableRow;
--
-- Instance_List
-- Produce list of processes matching criteria
-- IN
-- x_active - Item active or complete (ACTIVE, COMPLETE, ALL)
-- x_itemtype - Itemtype (null for all)
-- x_ident - Itemkey (null for all)
-- x_user_ident - User Itemkey (null for all)
-- x_process - Root process name (null for all)
-- x_status - Only with activities of status (SUSPEND, ERROR, ALL)
-- x_person - Only waiting for reponse from
-- x_numdays - No progress in x days
--
-- MODIFICATION LOG:
-- 06-JUN-2001 JWSMITH BUG 1819232 -Added summary attr for table tag for ADA
--
procedure Instance_List (
x_active VARCHAR2,
x_itemtype VARCHAR2,
x_ident VARCHAR2,
x_user_ident VARCHAR2,
x_process VARCHAR2,
x_process_owner VARCHAR2,
x_display_process_owner VARCHAR2,
x_admin_privilege VARCHAR2,
x_status VARCHAR2,
x_person VARCHAR2,
x_display_person VARCHAR2,
x_numdays VARCHAR2)
is
-- Select items matching criteria
cursor proc_info (c_process_owner IN VARCHAR2,
c_person IN VARCHAR2)is
select wit.display_name,
wi.item_key,
wi.user_key,
wi.begin_date,
wi.item_type,
wi.end_date,
wa.display_name process_name
from wf_items wi,
wf_item_types_vl wit,
wf_activities_vl wa
where wi.item_type = wit.name
and wa.item_type = wi.item_type
and wa.name = wi.root_activity
and wa.version = wi.root_activity_version
and wi.item_type like decode(x_itemtype,
'', '%',
'ALL', '%',
'*', '%',
x_itemtype)
and wi.item_key like x_ident||'%'
and (wi.owner_role like upper(c_process_owner)||'%' or
c_process_owner is null)
and (wi.user_key like x_user_ident||'%' or
x_user_ident is null)
and (wa.display_name like x_process||'%')
and (((wi.end_date is null) and (x_active in ('ACTIVE', 'ALL'))) or
((wi.end_date is not null) and (x_active in ('COMPLETE', 'ALL'))))
and ((x_numdays is null) or
(wi.end_date is null and not exists
(select null
from wf_item_activity_statuses ias
where ias.item_type = wi.item_type
and ias.item_key = wi.item_key
and ias.end_date > sysdate - x_numdays)))
and ((c_person is null) or exists
(select null
from wf_item_activity_statuses ias,
wf_notifications ntf
where wi.end_date is null
and ias.item_type = wi.item_type
and ias.item_key = wi.item_key
and ias.activity_status||'' = 'NOTIFIED'
and ntf.group_id = ias.notification_id
and ntf.recipient_role||'' = upper(c_person)))
and ((x_status = 'ALL') or exists
(select null
from wf_item_activity_statuses ias
where ias.item_type = wi.item_type
and ias.item_key = wi.item_key
and ias.activity_status||'' = x_status))
order by 1,2;
proc proc_info%rowtype;
cursor status_info(itype varchar2, ikey varchar2, status varchar2) is
select count(1)
from wf_item_activity_statuses wias
where wias.item_type = itype
and wias.item_key = ikey
and wias.activity_status = status;
error_count pls_integer;
suspend_count pls_integer;
envurl varchar2(2000);
username varchar2(320);
admin_role varchar2(320);
l_process_owner VARCHAR2(320) := x_process_owner;
l_person VARCHAR2(320) := x_person;
begin
wfa_sec.GetSession(username);
-- Get all the username find criteria resolved
wfa_html.validate_display_name (x_display_process_owner, l_process_owner);
wfa_html.validate_display_name (x_display_person, l_person);
-- Window title
htp.htmlOpen;
htp.headOpen;
htp.title(wf_core.translate('WFMON_LISTTITLE'));
wfa_html.create_help_function('wf/links/pro.htm?PROLIST');
htp.headClose;
-- Open body and draw standard header
wfa_sec.header(FALSE, 'wf_monitor.find_instance" TARGET="_top',
wf_core.translate('WFMON_LISTTITLE'), TRUE);
htp.tableOpen(cattributes=>'border=1 cellpadding=3 bgcolor=WHITE
width=100% summary=""');
showColumnHeaders;
-- Security checking 1364970
admin_role := wf_core.Translate('WF_ADMIN_ROLE');
if (admin_role <> '*') then
if not (wf_directory.IsPerformer(username, admin_role)) then
l_process_owner := username;
end if;
end if;
for proc in proc_info (l_process_owner, l_person) loop
-- Check for errors
open status_info(proc.item_type, proc.item_key, 'ERROR');
fetch status_info into error_count;
close status_info;
-- Check for suspensions
open status_info(proc.item_type, proc.item_key, 'SUSPEND');
fetch status_info into suspend_count;
close status_info;
begin
envurl :=wf_monitor.GetEnvelopeURL(wfa_html.base_url,
proc.item_type,
proc.item_key,
x_admin_privilege);
exception
when others then
-- ### In case there are any exceptions raised. Happens
-- right now for older workflows which have not yet
-- had access keys assigned, although all new ones shouled.
envurl := null;
end;
tableRow(proc.display_name,
proc.item_key,
proc.user_key,
proc.process_name,
envurl,
(proc.end_date is null),
(error_count <> 0),
(suspend_count <> 0),
to_char(proc.begin_date) || ' '
|| to_char(proc.begin_date, 'HH24:MI:SS'));
end loop;
htp.tableClose;
wfa_sec.footer;
htp.htmlClose;
exception
when others then
Wf_Core.Context('Wf_Monitor', 'Instance_List', x_active, x_itemtype,
x_ident, x_process, x_status);
wf_monitor.Error;
end Instance_List;
/*===========================================================================
PROCEDURE NAME: draw_advanced_controls
DESCRIPTION:
-- MODIFICATION LOG:
-- 06-JUN-2001 JWSMITH BUG 1819232 - added ID attrib for HD tag for ADA
- Added summary attr for table tag for ADA
============================================================================*/
procedure draw_advanced_controls (
x_item_type VARCHAR2,
x_item_key VARCHAR2,
x_admin_mode VARCHAR2,
x_access_key VARCHAR2,
x_advanced VARCHAR2,
x_active VARCHAR2,
x_complete VARCHAR2,
x_error VARCHAR2,
x_suspend VARCHAR2,
x_proc_func VARCHAR2,
x_note_resp VARCHAR2,
x_note_noresp VARCHAR2,
x_func_std VARCHAR2,
x_event VARCHAR2,
x_sort_column VARCHAR2,
x_sort_order VARCHAR2,
x_nls_lang VARCHAR2)
IS
l_record_num PLS_INTEGER;
l_status_icons_table wf_status_icons_table;
BEGIN
htp.p('