[Home] [Help]
PACKAGE BODY: APPS.CN_SCA_WF_CUST_PKG
Source
1 PACKAGE BODY CN_SCA_WF_CUST_PKG AS
2 /* $Header: cnpscacb.pls 115.2 2003/10/09 21:39:16 mnativ noship $ */
3
4 -- Start of comments
5 -- API name : CUST_REV_DIST
6 -- Type : Public.
7 -- Function :
8 -- Pre-reqs : None.
9 -- Parameters :
10 -- IN : itemType IN VARCHAR2 Required
11 -- itemKey IN VARCHAR2 Required
12 -- actId IN NUMBER Required
13 -- funcMode IN VARCHAR2 Required
14 -- OUT : resultOut OUT VARCHAR2
15 -- Version : Current version 1.0
16 -- Previous version
17 -- Initial version 1.0
18 -- Notes : Executes CUSTOM Revenue Distribution Function. Called
19 -- by the WF Engine.
20 -- itemType - A valid item type from WF_ITEM_TYPES table.
21 -- itemKey - A string generated from application object's
22 -- PRIMARY key.
23 -- actId - The function activity (instance ID).
24 -- funcMode - Run/Cancel.
25 -- resultOut - 'COMPLETE:'.
26 -- End of comments
27 PROCEDURE CUST_REV_DIST (
28 itemType IN varchar2,
29 itemKey IN varchar2,
30 actId IN number,
31 funcMode IN varchar2,
32 resultOut OUT NOCOPY varchar2)
33 IS
34 BEGIN
35
36 -- RUN mode
37 IF (funcMode = 'RUN') THEN
38
39 -- =======================
40 -- INSERT CUSTOM CODE HERE
41 -- =======================
42
43 -- return resultOut, and return control to WF
44 resultOut := wf_engine.eng_completed || ':' || wf_engine.eng_null;
45 RETURN;
46
47 END IF; -- funcMode = 'RUN'
48
49 -- CANCEL mode
50 IF (funcMode = 'CANCEL') THEN
51
52 -- return resultOut, and return control to WF
53 resultOut := wf_engine.eng_completed || ':' || wf_engine.eng_null;
54 RETURN;
55
56 END IF;
57
58 -- ANY OTHER mode (NOT implemented)
59 resultOut := wf_engine.eng_null;
60 RETURN;
61
62 EXCEPTION
63 WHEN OTHERS THEN
64 wf_core.context('CN_SCA_WF_CUST_PKG',
65 'CN_SCA_REV_DIST_PR',
66 'CUST_REV_DIST',
67 itemType,
68 itemKey,
69 TO_CHAR(actId),
70 funcMode);
71 RAISE;
72
73 END CUST_REV_DIST;
74
75 -- Start of comments
76 -- API name : CUST_TRX_LOAD
77 -- Type : Public.
78 -- Function :
79 -- Pre-reqs : None.
80 -- Parameters :
81 -- IN : itemType IN VARCHAR2 Required
82 -- itemKey IN VARCHAR2 Required
83 -- actId IN NUMBER Required
84 -- funcMode IN VARCHAR2 Required
85 -- OUT : resultOut OUT VARCHAR2
86 -- Version : Current version 1.0
87 -- Previous version
88 -- Initial version 1.0
89 -- Notes : Executes CUSTOM Transaction Loading Function. Called
90 -- by the WF Engine.
91 -- itemType - A valid item type from WF_ITEM_TYPES table.
92 -- itemKey - A string generated from application object's
93 -- PRIMARY key.
94 -- actId - The function activity (instance ID).
95 -- funcMode - Run/Cancel.
96 -- resultOut - 'COMPLETE:'.
97 -- End of comments
98 PROCEDURE CUST_TRX_LOAD (
99 itemType IN varchar2,
100 itemKey IN varchar2,
101 actId IN number,
102 funcMode IN varchar2,
103 resultOut OUT NOCOPY varchar2)
104 IS
105 BEGIN
106
107 -- RUN mode
108 IF (funcMode = 'RUN') THEN
109
110 -- =======================
111 -- INSERT CUSTOM CODE HERE
112 -- =======================
113
114 -- return resultOut, and return control to WF
115 resultOut := wf_engine.eng_completed || ':' || wf_engine.eng_null;
116 RETURN;
117
118 END IF; -- funcMode = 'RUN'
119
120 -- CANCEL mode
121 IF (funcMode = 'CANCEL') THEN
122
123 -- return resultOut, and return control to WF
124 resultOut := wf_engine.eng_completed || ':' || wf_engine.eng_null;
125 RETURN;
126
127 END IF;
128
129 -- ANY OTHER mode (NOT implemented)
130 resultOut := wf_engine.eng_null;
131 RETURN;
132
133 EXCEPTION
134 WHEN OTHERS THEN
135 wf_core.context('CN_SCA_WF_CUST_PKG',
136 'CN_SCA_TRX_LOAD_PR',
137 'CUST_TRX_LOAD',
138 itemType,
139 itemKey,
140 TO_CHAR(actId),
141 funcMode);
142 RAISE;
143
144 END CUST_TRX_LOAD;
145
146 END CN_SCA_WF_CUST_PKG;