DBA Data[Home] [Help]

PACKAGE BODY: APPS.PO_ERECORDS_PVT

Source


1 PACKAGE BODY PO_ERECORDS_PVT AS
2 /* $Header: POXVEVRB.pls 115.5 2003/10/15 17:57:40 rbairraj noship $  */
3 
4 
5 
6 -------------------------------------------------------------------------------
7 --Start of Comments
8 --Name: Capture_Signature
9 --Pre-reqs:
10 --  None.
11 --Modifies:
12 --  None.
13 --Locks:
14 --  None.
15 --Function:
16 --  Calls the APIs given by eRecords product team to store the signature details
17 --Parameters:
18 --IN:
19 --p_api_version
20 --  Standard parameter according to apps API standards
21 --p_init_msg_list
22 --  Indicates if the message logging should be initialised
23 --p_commit
24 --  Indicates if the eRecord details should be committed in between processing
25 --p_psig_xml
26 --  Source XML
27 --p_psig_document
28 --  Source Document
29 --p_psig_docFormat
30 --  Source Document Format
31 --p_psig_requester
32 --  eSignature requester user name
33 --p_psig_source
34 --  eSignature source platform (DB, Form, sswa)
35 --p_event_name
36 --  eSignature event name
37 --p_event_key
38 --  eSignature event key
39 --p_wf_notif_id
40 --  workflow notification id
41 --p_doc_parameters_tbl
42 --  Parameter list to be passed as post document parameters
43 --p_user_name
44 --  User name of the person signing the notifiation
45 --p_original_recipient
46 --  Original recipient of the notification
47 --p_overriding_comment
48 --  Comments of the user if it is not signed by the original recipient
49 --p_evidenceStore_id
50 --  Evidence store Id of the eRecord
51 --p_user_response
52 --  Response of the user signing the notification
53 --p_sig_parameters_tbl
54 --  Parameter list to be passed as post signature parameters
55 --OUT:
56 --x_return_status
57 --  Standard parameter according to apps API standards
58 --x_msg_count
59 --  Standard parameter according to apps API standards
60 --x_msg_data
61 --  Standard parameter according to apps API standards
62 --x_document_id
63 --  Generated document id
64 --x_signature_id
65 --  Captured signature id
66 --Testing:
67 --  Testing to be done based on the test cases in Document Binding DLD
68 --End of Comments
69 -------------------------------------------------------------------------------
70 
71 PROCEDURE CAPTURE_SIGNATURE  (
72 	p_api_version		 IN 	NUMBER,
73 	p_init_msg_list		 IN 	VARCHAR2,
74 	p_commit		     IN 	VARCHAR2,
75 	p_psig_xml		     IN 	CLOB,
76 	p_psig_document		 IN 	CLOB,
77 	p_psig_docFormat	 IN 	VARCHAR2,
78 	p_psig_requester	 IN 	VARCHAR2,
79 	p_psig_source		 IN 	VARCHAR2,
80 	p_event_name		 IN 	VARCHAR2,
81 	p_event_key		     IN 	VARCHAR2,
82 	p_wf_notif_id		 IN 	NUMBER,
83 	p_doc_parameters_tbl IN	    Params_tbl_type,
84 	p_user_name		     IN	    VARCHAR2,
85 	p_original_recipient IN	    VARCHAR2,
86 	p_overriding_comment IN	    VARCHAR2,
87 	p_evidenceStore_id	 IN	    NUMBER,
88 	p_user_response		 IN	    VARCHAR2,
89 	p_sig_parameters_tbl IN	    Params_tbl_type,
90 	x_document_id		 OUT	NOCOPY NUMBER,
91 	x_signature_id		 OUT	NOCOPY NUMBER,
92 	x_return_status		 OUT    NOCOPY VARCHAR2,
93 	x_msg_count		     OUT	NOCOPY NUMBER,
94 	x_msg_data		     OUT	NOCOPY VARCHAR2)
95 IS
96     l_edr_doc_params_tab        EDR_EVIDENCESTORE_PUB.params_tbl_type;
97     l_edr_sig_params_tab        EDR_EVIDENCESTORE_PUB.params_tbl_type;
98     l_return_status             VARCHAR2(1);
99     l_msg_count                 NUMBER;
100     l_msg_data                  VARCHAR2(2000);
101     l_document_id               NUMBER;
102     l_signature_id              NUMBER;
103 BEGIN
104 
105     FOR i IN p_doc_parameters_tbl.FIRST..p_doc_parameters_tbl.LAST LOOP
106     	l_edr_doc_params_tab(i).param_name := p_doc_parameters_tbl(i).param_name;
107     	l_edr_doc_params_tab(i).param_value := p_doc_parameters_tbl(i).param_value;
108     	l_edr_doc_params_tab(i).param_displayname := p_doc_parameters_tbl(i).param_displayname;
109     END LOOP;
110 
111     FOR i IN p_sig_parameters_tbl.FIRST..p_sig_parameters_tbl.LAST LOOP
112     	l_edr_sig_params_tab(i).param_name := p_sig_parameters_tbl(i).param_name;
113     	l_edr_sig_params_tab(i).param_value := p_sig_parameters_tbl(i).param_value;
114     	l_edr_sig_params_tab(i).param_displayname := p_sig_parameters_tbl(i).param_displayname;
115     END LOOP;
116 
117     EDR_EVIDENCESTORE_PUB.Capture_Signature (
118  	        p_api_version		 => p_api_version,
119 	        p_init_msg_list		 => p_init_msg_list,
120 	        p_commit		     => p_commit,
121 	        x_return_status		 => l_return_status,
122 	        x_msg_count		     => l_msg_count,
123 	        x_msg_data		     => l_msg_data,
124 	        p_psig_xml		     => p_psig_xml,
125 	        p_psig_document		 => p_psig_document,
126 	        p_psig_docFormat	 => p_psig_docFormat,
127 	        p_psig_requester	 => p_psig_requester,
128 	        p_psig_source		 => p_psig_source,
129 	        p_event_name		 => p_event_name,
130 	        p_event_key		     => p_event_key,
131 	        p_wf_notif_id		 => p_wf_notif_id,
132 	        x_document_id		 => l_document_id,
133 	        p_doc_parameters_tbl => l_edr_doc_params_tab,
134 	        p_user_name		     => p_user_name,
135 	        p_original_recipient => p_original_recipient,
136 	        p_overriding_comment => p_overriding_comment,
137 	        x_signature_id		 => l_signature_id,
138 	        p_evidenceStore_id	 => p_evidenceStore_id,
139 	        p_user_response		 => p_user_response,
140 	        p_sig_parameters_tbl => l_edr_sig_params_tab);
141 
142     x_return_status := l_return_status;
143     x_msg_count     := l_msg_count;
144     x_msg_data      := l_msg_data;
145     x_document_id   := l_document_id;
146     x_signature_id  := l_signature_id;
147 
148 END CAPTURE_SIGNATURE;
149 
150 -------------------------------------------------------------------------------
151 --Start of Comments
152 --Name: Send_Ackn
153 --Pre-reqs:
154 --  None.
155 --Modifies:
156 --  None.
157 --Locks:
158 --  None.
159 --Function:
160 --  Calls the APIs given by eRecords product team to Record
161 --  Transaction Acknowledgement
162 --Parameters:
163 --IN:
164 --p_api_version
165 --  Standard parameter according to apps API standards
166 --p_init_msg_list
167 --  Indicates if the message logging should be initialised
168 --p_event_name
169 --  The event name for which acknowledgement is sent
170 --p_event_key
171 --  The event key for which acknowledgement is sent
172 --p_erecord_id
173 --  he erecord id for which ackn is being sent
174 --p_trans_status
175 --  The status of the transaction for which ack is being created.
176 --  There is a limited set of possible values: SUCCESS, ERROR
177 --p_ackn_by
178 --  The source of the acknowledgement
179 --p_ackn_note
180 --  Additional information/comments about the ackn
181 --p_autonomous_commit
182 --  This tells the API to commit its changes autonomously or not
183 --OUT:
184 --x_return_status
185 --  Standard parameter according to apps API standards
186 --x_msg_count
187 --  Standard parameter according to apps API standards
188 --x_msg_data
189 --  Standard parameter according to apps API standards
190 --Testing:
191 --  Testing to be done based on the test cases in Document Binding DLD
192 --End of Comments
193 -------------------------------------------------------------------------------
194 PROCEDURE SEND_ACKN
195 ( p_api_version          IN     NUMBER,
196   p_init_msg_list	     IN		VARCHAR2 DEFAULT FND_API.G_FALSE,
197   p_event_name           IN    	VARCHAR2,
198   p_event_key            IN    	VARCHAR2,
199   p_erecord_id	         IN	    NUMBER,
200   p_trans_status	     IN	    VARCHAR2,
201   p_ackn_by              IN     VARCHAR2 DEFAULT NULL,
202   p_ackn_note	         IN		VARCHAR2 DEFAULT NULL,
203   p_autonomous_commit	 IN     VARCHAR2 DEFAULT FND_API.G_FALSE,
204   x_return_status	     OUT    NOCOPY	VARCHAR2,
205   x_msg_count		     OUT    NOCOPY NUMBER,
206   x_msg_data		     OUT    NOCOPY	VARCHAR2)
207 IS
208     l_return_status             VARCHAR2(1);
209     l_msg_count                 NUMBER;
210     l_msg_data                  VARCHAR2(2000);
211 BEGIN
212     EDR_TRANS_ACKN_PUB.send_ackn
213           ( p_api_version        => p_api_version,
214             p_init_msg_list	     => p_init_msg_list,
215             x_return_status	     => l_return_status,
216             x_msg_count		     => l_msg_count,
217             x_msg_data		     => l_msg_data,
218             p_event_name         => p_event_name,
219             p_event_key          => p_event_key,
220             p_erecord_id	     => p_erecord_id,
221             p_trans_status	     => p_trans_status,
222             p_ackn_by            => p_ackn_by,
223             p_ackn_note	         => p_ackn_note,
224             p_autonomous_commit	 => p_autonomous_commit);
225 
226     x_return_status := l_return_status;
227     x_msg_count     := l_msg_count;
228     x_msg_data      := l_msg_data;
229 
230 END SEND_ACKN;
231 
232 -------------------------------------------------------------------------------
233 --Start of Comments
234 --Name: ERECORDS_ENABLED
235 --Pre-reqs:
236 --  None.
237 --Modifies:
238 --  None.
239 --Locks:
240 --  None.
241 --Function:
242 --  If eRecords patch is applied and eRecords is enabled returns 'Y'
243 --  else returns 'N'
244 --Parameters:
245 --OUT:
246 --x_erecords_enabled
247 --  Returns 'Y' if eRecords patch is applied and eRecords is enabled.
248 --  Otherwise returns 'N'.
249 --Testing:
250 --  Testing to be done based on the test cases in Document Binding DLD
251 --End of Comments
252 -------------------------------------------------------------------------------
253 
254 PROCEDURE ERECORDS_ENABLED
255 ( x_erecords_enabled   OUT  NOCOPY VARCHAR2)
256 IS
257   l_eres_enabled VARCHAR2(1) := 'N';
258 BEGIN
259 
260     l_eres_enabled := NVL(FND_PROFILE.VALUE('EDR_ERES_ENABLED'),'N');
261     IF l_eres_enabled = 'Y' THEN
262         x_erecords_enabled := 'Y';
263     ELSE
264         x_erecords_enabled := 'N';
265     END IF;
266 
267 END ERECORDS_ENABLED;
268 
269 END PO_ERECORDS_PVT;
270