1 PACKAGE ecx_standard AS
2 -- $Header: ECXWACTS.pls 120.4.12010000.2 2008/11/18 18:13:21 cpeixoto ship $
3 /*#
4 * The interface contains generic routines to be used by activity functions.
5 * @rep:scope public
6 * @rep:product ECX
7 * @rep:lifecycle active
8 * @rep:displayname XML Gateway Transformation
9 * @rep:compatibility S
10 */
11
12 -- setEventDetails (PUBLIC)
13 -- Standard XML Gateway Raise Event
14 -- IN:
15 -- eventname - Event to be processes
16 -- eventkey - Event key
17 -- parameter1..10 - Event Parameters
18 -- NOTE:
19 -- Called from the XML gateway engine as a post processing action
20
21 procedure setEventDetails
22 (
23 eventname in varchar2,
24 eventkey in varchar2,
25 parameter1 in varchar2,
26 parameter2 in varchar2,
27 parameter3 in varchar2,
28 parameter4 in varchar2,
29 parameter5 in varchar2,
30 parameter6 in varchar2,
31 parameter7 in varchar2,
32 parameter8 in varchar2,
33 parameter9 in varchar2,
34 parameter10 in varchar2,
35 retcode OUT NOCOPY pls_integer,
36 retmsg OUT NOCOPY varchar2
37 );
38
39 -- getEventDetails (PUBLIC)
40 -- Standard XML Gateway Event API
41 -- OUT:
42 -- eventname - Event to the processes
43 -- eventkey - Event key
44 -- NOTE:
45 -- Called from the MD maintained as a GLobal parameter by the XML gateway engine
46 procedure getEventDetails
47 (
48 eventname out NOCOPY varchar2,
49 eventkey out NOCOPY varchar2,
50 itemtype out NOCOPY varchar2,
51 itemkey out NOCOPY varchar2,
52 parentitemtype out NOCOPY varchar2,
53 parentitemkey out NOCOPY varchar2,
54 retcode OUT NOCOPY pls_integer,
55 retmsg OUT NOCOPY varchar2
56 );
57
58 -- getEventSystem (PUBLIC)
59 -- Standard XML Gateway Event API
60 -- OUT:
61 -- eventname - Event to the processes
62 -- eventkey - Event key
63 -- NOTE:
64 -- Called from the MD maintained as a GLobal parameter by the XML gateway engine
65 procedure getEventSystem
66 (
67 from_agent out NOCOPY varchar2,
68 to_agent out NOCOPY varchar2,
69 from_system out NOCOPY varchar2,
70 to_system out NOCOPY varchar2,
71 retcode OUT NOCOPY pls_integer,
72 retmsg OUT NOCOPY varchar2
73 );
74
75 -- EventDate (PUBLIC)
76 -- Standard XML Gateway to generate event data
77 -- IN:
78 -- p_event_name - Event to be processes
79 -- p_event_key - Event key
80 -- p_event - Event Data list
81 -- OUT
82 -- CLOB - Event data
83 -- NOTE:
84 -- Called from the XML gateway engine as a post processing action
85 --
86 --
87 -- VS - Added paramter list??? Lets discuss.
88 -- - where and when will this be called from
89
90 function generate
91 (
92 p_event_name in varchar2,
93 p_event_key in varchar2,
94 p_parameter_list in wf_parameter_list_t
95 ) return CLOB;
96
97 -- ProcessXML
98 -- Standard Workflow Activity processXML
99 -- Load XML Document into Application
100 -- OUT
101 -- result - null
102 -- ACTIVITY ATTRIBUTES REFERENCED
103 -- MAP_CODE - text value
104 -- DEBUG_LEVEL - number value
105 -- EVENT_MESSAGE - event value
106 -- NOTE:
107
108 procedure processXML
109 (
110 itemtype in varchar2,
111 itemkey in varchar2,
112 actid in number,
113 funcmode in varchar2,
114 resultout in out NOCOPY varchar2
115 );
116
117 -- XMLtoXML
118 -- Standard Workflow Activity XMLtoXML
119 -- Transforms an Inbound XML to an Outbound XML
120 -- OUT
121 -- result - null
122 -- ACTIVITY ATTRIBUTES REFERENCED
123 -- MAP_CODE - text value
124 -- DEBUG_LEVEL - number value
125 -- EVENT_MESSAGE_IN - event value
126 -- EVENT_MESSAGE_OUT - event value
127 -- NOTE:
128
129 procedure XMLtoXML
130 (
131 itemtype in varchar2,
132 itemkey in varchar2,
133 actid in number,
134 funcmode in varchar2,
135 resultout in out NOCOPY varchar2
136 );
137
138 -- IsDeliveryRequired
139 -- Standard ECX Workflow Activity
140 -- Deterin if trading partner is enabled to recieve document
141 -- OUT
142 -- result - T - Trading Partner is enabled
143 -- F - Trading Partner is NOT enabled
144 -- ACTIVITY ATTRIBUTES REFERENCED
145 -- TRANSACTION_TYPE - text value
146 -- TRANSACTION_SUBTYPE - text value
147 -- PARTY_ID - number value
148 -- PARTY_SITE_ID - number value
149 -- NOTE:
150
151 procedure isDeliveryRequired
152 (
153 itemtype in varchar2,
154 itemkey in varchar2,
155 actid in number,
156 funcmode in varchar2,
157 resultout in out NOCOPY varchar2
158 );
159
160 -- Send
161 -- Standard ECX Workflow Activity
162 -- Send Event to AQ fro delivery
163 -- OUT
164 -- result - null
165 --
166 -- ACTIVITY ATTRIBUTES REFERENCED
167 -- TRANSACTION_TYPE - text value
168 -- TRANSACTION_SUBTYPE - text value
169 -- PARTY_ID - number value
170 -- PARTY_SITE_ID - number value
171 -- DOCUMENT_D - text value
172 -- PARAMETER1..5 - text value
173 -- SEND_MODE - Text (lookup (SYNCH ASYNCH )
174 -- NOTE:
175
176 procedure send
177 (
178 itemtype in varchar2,
179 itemkey in varchar2,
180 actid in number,
181 funcmode in varchar2,
182 resultout in out NOCOPY varchar2
183 );
184
185
186 -- GetXMLTP
187 -- Standard ECX Workflow Activity
188 -- Retrieve XML document
189 -- OUT
190 -- result - null
191 --
192 -- ACTIVITY ATTRIBUTES REFERENCED
193 -- TRANSACTION_TYPE - text value (Required)
194 -- TRANSACTION_SUBTYPE - text value (Required)
195 -- PARTY_SITE_ID - text value (Required)
196 -- PARTY_ID - text value (optional)
197 -- DOCUMENT_D - text value (Required)
198 -- EVENT_NAME - text value (optional)
199 -- EVENT_KEY - text value (optional)
200 -- PARAMETER1..5 - text value (optional)
201 --
202 -- EVENT_MESSAGE - Item ATTR (required)
203 -- NOTE:
204
205 procedure GetXMLTP(itemtype in varchar2,
206 itemkey in varchar2,
207 actid in number,
208 funcmode in varchar2,
209 resultout in out NOCOPY varchar2);
210
211
212
213
214 -- GetXML
215 -- Standard ECX Workflow Activity
216 -- Retrieve XML document
217 -- OUT
218 -- result - null
219 --
220 -- ACTIVITY ATTRIBUTES REFERENCED
221 -- MAP_CODE - text value (required)
222 -- EVENT_NAME - text value (optional)
223 -- EVENT_KEY - text value (optional)
224 -- PARAMETER1..5 - text value (optional)
225 --
226 -- EVENT_MESSAGE - Item ATTR (required)
227 -- NOTE:
228
229 procedure GetXML
230 (
231 itemtype in varchar2,
232 itemkey in varchar2,
233 actid in number,
234 funcmode in varchar2,
235 resultout in out NOCOPY varchar2
236 );
237
238 /**
239 Reprocesses a Given Inbound Activity. The inputs are the
240 Message Id,Trigger Id and the Debug Level.
241 **/
242 procedure Reprocess_Inbound(
243 itemtype in varchar2,
244 itemkey in varchar2,
245 actid in number,
246 funcmode in varchar2,
247 result in out NOCOPY varchar2
248 );
249
250 /**
251 Resends a Given Outbound Message . The input is the
252 Message Id.
253 **/
254 procedure resend
255 (
256 itemtype in varchar2,
257 itemkey in varchar2,
258 actid in number,
259 funcmode in varchar2,
260 result in out NOCOPY varchar2
261 );
262
263 /**
264 Exposed for use by ecx_rule.inbound_rule2
265 **/
266
267 procedure processXMLCover
268 (
269 i_map_code IN varchar2,
270 i_inpayload IN CLOB,
271 i_debug_level IN pls_integer
272 );
273 function getReferenceId
274 return varchar2;
275
276 /*#
277 * This interface is used to apply a style sheet to an XML message
278 * and return the transformed XML message for further processing
279 * by the calling environment.
280 * The DTD file name, version, and root element are required input
281 * parameters for this API, therefore the associated DTDs must be loaded
282 * into the XML Gateway repository.
283 * This API is independent of the Message Designer: XSLT Transformation
284 * action. This API is not intended for use in a message map.
285 * Note: The profile option ECX_XML_VALIDATE_FLAG must
286 * be set to 'Y' for this action to be performed.
287 * @param i_xml_file The XML message to be transformed.This is an 'in out' parameter transformed XML will also be assigned to it.
288 * @param i_xslt_file_name The XSLT style sheet file to be used for the transformation
289 * @param i_xslt_file_ver The version of the XSLT style sheet file.
290 * @param i_xslt_application_code The name of the subdirectory where the XSLT style sheet is source controlled
291 * @param i_dtd_file_name The name of the DTD used in the XML message
292 * @param i_dtd_root_element The root element of the DTD used in the XML message
293 * @param i_dtd_version Version of the DTD used in the XML message.
294 * @param i_retcode Return code for the procedure
295 * @param i_retmsg Return message for the procedure
296 * @rep:scope public
297 * @rep:lifecycle active
298 * @rep:displayname XML Gateway Transformation
299 * @rep:compatibility S
300 * @rep:category BUSINESS_ENTITY ECX_TRANSFORMATION
301 */
302 procedure perform_xslt_transformation
303 (
304 i_xml_file in out NOCOPY clob,
305 i_xslt_file_name in varchar2,
306 i_xslt_file_ver in varchar2 default null,
307 i_xslt_application_code in varchar2,
308 i_retcode out NOCOPY pls_integer,
309 i_retmsg out NOCOPY varchar2,
310 i_dtd_file_name in varchar2 default null,
311 i_dtd_root_element in varchar2 default null,
312 i_dtd_version in varchar2 default null
313 );
314
315
316
317 -- -------------------------------------------------------------------------------------------
318 -- API name : GET_VALUE_FOR_XPATH
319 --
320 -- Type : Public
321 --
322 -- Pre-reqs : None
323 --
324 -- Function : Returns Value of the Node from the XML Document for the specified XPATH.
325 -- Incase of multiple occurrences, a list of comma-separated values is returned
326 --
327 -- Parameters
328 -- IN : p_api_version IN NUMBER
329 -- : p_XML_DOCUMENT IN CLOB
330 -- : p_XPATH_EXPRESSION IN VARCHAR2
331 --
332 -- OUT : x_return_status OUT VARCHAR2
333 -- : x_msg_data OUT VARCHAR2
334 -- : x_XPATH_VALUE OUT NOCOPY VARCHAR2
335 --
336 -- Version : Current version 1.0
337 -- Initial version 1.0
338 --
339 -- Notes :
340 --
341 -- -------------------------------------------------------------------------------------------
342
343 PROCEDURE GET_VALUE_FOR_XPATH (
344 p_api_version IN NUMBER,
345 x_return_status OUT NOCOPY VARCHAR2,
346 x_msg_data OUT NOCOPY VARCHAR2,
347 p_XML_DOCUMENT IN CLOB,
348 p_XPATH_EXPRESSION IN VARCHAR2,
349 x_XPATH_VALUE OUT NOCOPY VARCHAR2
350 );
351
352
353 end ecx_standard;