844: function add_notification (user in varchar2) return boolean is
845: n_index number;
846: cursor c1( user_name varchar2) is
847: select name, orig_system, orig_system_id
848: from wf_roles
849: where name = user_name;
850: begin
851:
852: -- Same user may exists in different departments(tables).
851:
852: -- Same user may exists in different departments(tables).
853: -- use cursor because we dont know the given user name will return one row
854: -- multiple rows.
855: -- we are considering only the first row that matched in wf_roles.
856:
857: n_index := P_NOTIFICATION_COUNT + 1;
858: open c1( user );
859: fetch c1 into P_NOTIFICATIONS(n_index).name,