[Home] [Help]
PACKAGE BODY: APPS.POS_APPR_REJ_SUPP_EVENT_RAISE
Source
1 PACKAGE BODY pos_appr_rej_supp_event_raise AS
2 /* $Header: POSSPAREB.pls 120.1 2010/11/25 12:02:29 puppulur noship $ */
3 FUNCTION raise_appr_rej_supp_event(p_event_name VARCHAR2,param1 VARCHAR2,
4 param2 VARCHAR2) RETURN NUMBER IS
5 --
6 /* lc_event_key VARCHAR2(50);
7 lc_errcode VARCHAR2(1) := '0';
8 lc_errbuf VARCHAR2(4000);
9 lc_event_name VARCHAR2(50) := 'xxocs.apps.hr.position.change';
10 lc_itemtype VARCHAR2(30) := 'POSPUBSUPP';
11 lp_parameter_list_t wf_parameter_list_t;
12 */
13
14 l_itemkey NUMBER;
15 l_parameter_list wf_parameter_list_t := wf_parameter_list_t();
16 --l_event_name VARCHAR2(50) := 'oracle.apps.pos.supplier.approvesupplier';
17 l_message VARCHAR2(50) := NULL;
18
19 BEGIN
20
21 SELECT pos_approv_reject_supp_seq.nextval
22 INTO l_itemkey
23 FROM dual;
24
25 wf_event.addparametertolist(p_name => 'PARAM1',
26 p_value => param1,
27 p_parameterlist => l_parameter_list);
28
29 wf_event.addparametertolist(p_name => 'PARAM2',
30 p_value => param2,
31 p_parameterlist => l_parameter_list);
32
33
34 /*
35 wf_event.raise(p_event_name => p_event_name,
36 p_event_key => l_itemkey);
37 */
38
39 wf_event.raise(
40 p_event_name => p_event_name,
41 p_event_key => l_itemkey,
42 p_parameters => l_parameter_list);
43
44 l_parameter_list.DELETE;
45
46 --COMMIT;
47
48 RETURN l_itemkey;
49 EXCEPTION
50 WHEN fnd_api.g_exc_error THEN
51 ROLLBACK;
52 WHEN fnd_api.g_exc_unexpected_error THEN
53 ROLLBACK;
54 WHEN OTHERS THEN
55 ROLLBACK;
56 END raise_appr_rej_supp_event;
57 ------------------------------------
58 FUNCTION app_supp_subscription(p_subscription_guid IN RAW,
59 p_event IN OUT NOCOPY wf_event_t)
60 RETURN VARCHAR2 IS
61
62 l_abc VARCHAR2(50) := 'Test';
63 BEGIN
64
65 --bu_debug_proc(01, '++ calling the approve_supplier_subscription ++ ');
66 --bu_debug_proc(02, 'Event Name' || p_event.geteventname());
67 --bu_debug_proc(03, 'Vendor ID' || p_event.GetValueForParameter('PARAM1'));
68 --bu_debug_proc(04, 'Party ID' || p_event.GetValueForParameter('PARAM2'));
69
70
71 RETURN 'SUCCESS';
72 EXCEPTION
73 WHEN OTHERS THEN
74 --bu_debug_proc(999, '++ EXCEPTION ++ ' || SQLCODE || SQLERRM);
75 RETURN 'FAILURE';
76 END app_supp_subscription;
77 ----------------------------------------
78 FUNCTION app_supp_user_subscription(p_subscription_guid IN RAW,
79 p_event IN OUT NOCOPY wf_event_t)
80 RETURN VARCHAR2 IS
81
82 l_abc VARCHAR2(50) := 'Test';
83 BEGIN
84
85 -- bu_debug_proc(05, '++ calling the approve_supplier_user_subscription ++ ');
86 -- bu_debug_proc(06, 'Event Name' || p_event.geteventname());
87 -- bu_debug_proc(07, 'Person Party ID ' || p_event.GetValueForParameter('PARAM1'));
88 -- bu_debug_proc(08, 'User ID' || p_event.GetValueForParameter('PARAM2'));
89
90
91 RETURN 'SUCCESS';
92 EXCEPTION
93 WHEN OTHERS THEN
94 -- bu_debug_proc(999, '++ EXCEPTION ++ ' || SQLCODE || SQLERRM);
95 RETURN 'FAILURE';
96 END app_supp_user_subscription;
97 ----------------------------------------------
98 FUNCTION rej_supp_subscription(p_subscription_guid IN RAW,
99 p_event IN OUT NOCOPY wf_event_t)
100 RETURN VARCHAR2 IS
101
102 l_abc VARCHAR2(50) := 'Test';
103 BEGIN
104
105 -- bu_debug_proc(09, '++ calling the reject_supplier_subscription ++ ');
106 -- bu_debug_proc(10, 'Event Name' || p_event.geteventname());
107 -- bu_debug_proc(11, 'Reg. ID' || p_event.GetValueForParameter('PARAM1'));
108
109 RETURN 'SUCCESS';
110 EXCEPTION
111 WHEN OTHERS THEN
112 -- bu_debug_proc(999, '++ EXCEPTION ++ ' || SQLCODE || SQLERRM);
113 RETURN 'FAILURE';
114 END rej_supp_subscription;
115 --------------------------------------
116 FUNCTION rej_supp_user_subscription(p_subscription_guid IN RAW,
117 p_event IN OUT NOCOPY wf_event_t)
118 RETURN VARCHAR2 IS
119
120 l_abc VARCHAR2(50) := 'Test';
121 BEGIN
122
123 -- bu_debug_proc(12, '++ calling the reject_supplier_user_subscription ++ ');
124 -- bu_debug_proc(13, 'Event Name' || p_event.geteventname());
125 -- bu_debug_proc(14, 'Reg. ID' || p_event.GetValueForParameter('PARAM1'));
126
127 RETURN 'SUCCESS';
128
129 EXCEPTION
130 WHEN OTHERS THEN
131 -- bu_debug_proc(999, '++ EXCEPTION ++ ' || SQLCODE || SQLERRM);
132 RETURN 'FAILURE';
133 END rej_supp_user_subscription;
134 END pos_appr_rej_supp_event_raise;