[Home] [Help]
PACKAGE BODY: APPS.UMX_PROXY_NTF_WF
Source
1 PACKAGE BODY UMX_PROXY_NTF_WF as
2 /*$Header: UMXVPNTB.pls 120.0.12020000.2 2012/07/18 12:38:27 avelu ship $*/
3
4 /**
5 * Please look at the Specifications for the details
6 */
7 PROCEDURE LAUNCH_WORKFLOW (p_proxy_username in varchar2,
8 p_start_date in date,
9 p_end_date in date default null) is
10
11
12 cursor get_delegator_name is
13 select nvl(hz_format_pub.format_name(person_party_id),user_name), UMX_PROXY_NOTIFICATIONS_S.NEXTVAL from fnd_user where user_id = FND_GLOBAL.USER_ID;
14
15 l_itemtype VARCHAR2 (8) := 'UMXPXYNF';
16 l_itemkey NUMBER;
17 l_delegator_name varchar2(500);
18
19 BEGIN
20
21 OPEN get_delegator_name;
22 FETCH get_delegator_name INTO l_delegator_name, l_itemkey;
23 CLOSE get_delegator_name;
24
25 -- Call the Workflow API to send the notification.
26 WF_ENGINE.CREATEPROCESS (itemtype => l_itemtype,
27 itemkey => l_itemkey,
28 process => 'PROXYNOTIFY',
29 owner_role => FND_GLOBAL.USER_NAME);
30
31 -- Set Workflow Item Attributes.
32 WF_ENGINE.SETITEMATTRTEXT (l_itemtype, l_itemkey, 'DELEGATOR_NAME', l_delegator_name);
33 WF_ENGINE.SETITEMATTRTEXT (l_itemtype, l_itemkey, 'PROXY_USERNAME', p_proxy_username);
34 WF_ENGINE.SETITEMATTRDATE (l_itemtype, l_itemkey, 'START_DATE', p_start_date);
35 WF_ENGINE.SETITEMATTRDATE (l_itemtype, l_itemkey, 'END_DATE', p_end_date);
36
37
38
39 WF_ENGINE.STARTPROCESS (l_itemtype, l_itemkey);
40 END LAUNCH_WORKFLOW;
41
42
43 end UMX_PROXY_NTF_WF;