35: /**
36: Move the Values from Source to the Target
37: **/
38:
39: for i in ecx_utils.g_target_levels(i_target_level).file_start_pos..ecx_utils.g_target_levels(i_target_level).file_end_pos
40: loop
41: /** Do a Clean up for the Target **/
42: ecx_utils.g_target(i).value := null;
43:
38:
39: for i in ecx_utils.g_target_levels(i_target_level).file_start_pos..ecx_utils.g_target_levels(i_target_level).file_end_pos
40: loop
41: /** Do a Clean up for the Target **/
42: ecx_utils.g_target(i).value := null;
43:
44: /** Change required for Clob Support -- 2263729 ***/
45: ecx_utils.g_target(i).clob_value := null;
46: ecx_utils.g_target(i).clob_length := null;
41: /** Do a Clean up for the Target **/
42: ecx_utils.g_target(i).value := null;
43:
44: /** Change required for Clob Support -- 2263729 ***/
45: ecx_utils.g_target(i).clob_value := null;
46: ecx_utils.g_target(i).clob_length := null;
47: ecx_utils.g_target(i).is_clob := null;
48:
49: if ecx_utils.g_target(i).map_attribute_id is not null
42: ecx_utils.g_target(i).value := null;
43:
44: /** Change required for Clob Support -- 2263729 ***/
45: ecx_utils.g_target(i).clob_value := null;
46: ecx_utils.g_target(i).clob_length := null;
47: ecx_utils.g_target(i).is_clob := null;
48:
49: if ecx_utils.g_target(i).map_attribute_id is not null
50: then
43:
44: /** Change required for Clob Support -- 2263729 ***/
45: ecx_utils.g_target(i).clob_value := null;
46: ecx_utils.g_target(i).clob_length := null;
47: ecx_utils.g_target(i).is_clob := null;
48:
49: if ecx_utils.g_target(i).map_attribute_id is not null
50: then
51: /** Change required for Clob Support -- 2263729 **/
45: ecx_utils.g_target(i).clob_value := null;
46: ecx_utils.g_target(i).clob_length := null;
47: ecx_utils.g_target(i).is_clob := null;
48:
49: if ecx_utils.g_target(i).map_attribute_id is not null
50: then
51: /** Change required for Clob Support -- 2263729 **/
52: if (ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).data_type = 112) Then
53: ecx_utils.g_target(i).clob_length := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).clob_length;
48:
49: if ecx_utils.g_target(i).map_attribute_id is not null
50: then
51: /** Change required for Clob Support -- 2263729 **/
52: if (ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).data_type = 112) Then
53: ecx_utils.g_target(i).clob_length := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).clob_length;
54: ecx_utils.g_target(i).is_clob := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).is_clob;
55:
56: if (ecx_utils.g_target(i).is_clob = 'Y')
49: if ecx_utils.g_target(i).map_attribute_id is not null
50: then
51: /** Change required for Clob Support -- 2263729 **/
52: if (ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).data_type = 112) Then
53: ecx_utils.g_target(i).clob_length := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).clob_length;
54: ecx_utils.g_target(i).is_clob := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).is_clob;
55:
56: if (ecx_utils.g_target(i).is_clob = 'Y')
57: Then
50: then
51: /** Change required for Clob Support -- 2263729 **/
52: if (ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).data_type = 112) Then
53: ecx_utils.g_target(i).clob_length := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).clob_length;
54: ecx_utils.g_target(i).is_clob := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).is_clob;
55:
56: if (ecx_utils.g_target(i).is_clob = 'Y')
57: Then
58:
52: if (ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).data_type = 112) Then
53: ecx_utils.g_target(i).clob_length := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).clob_length;
54: ecx_utils.g_target(i).is_clob := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).is_clob;
55:
56: if (ecx_utils.g_target(i).is_clob = 'Y')
57: Then
58:
59: ecx_utils.g_target(i).clob_value := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).clob_value;
60: else
55:
56: if (ecx_utils.g_target(i).is_clob = 'Y')
57: Then
58:
59: ecx_utils.g_target(i).clob_value := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).clob_value;
60: else
61: ecx_utils.g_target(i).value :=
62: ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).value;
63: end if;
57: Then
58:
59: ecx_utils.g_target(i).clob_value := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).clob_value;
60: else
61: ecx_utils.g_target(i).value :=
62: ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).value;
63: end if;
64: else
65: ecx_utils.g_target(i).value :=
58:
59: ecx_utils.g_target(i).clob_value := ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).clob_value;
60: else
61: ecx_utils.g_target(i).value :=
62: ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).value;
63: end if;
64: else
65: ecx_utils.g_target(i).value :=
66: ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).value;
61: ecx_utils.g_target(i).value :=
62: ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).value;
63: end if;
64: else
65: ecx_utils.g_target(i).value :=
66: ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).value;
67: end if;
68: end if;
69:
62: ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).value;
63: end if;
64: else
65: ecx_utils.g_target(i).value :=
66: ecx_utils.g_source(ecx_utils.g_target(i).map_attribute_id).value;
67: end if;
68: end if;
69:
70: /** If the value is null then assign the target default value
67: end if;
68: end if;
69:
70: /** If the value is null then assign the target default value
71: If ecx_utils.g_target(i).value is null
72: then
73: ecx_utils.g_target(i).value := ecx_utils.g_target(i).default_value;
74: End if;
75: if(l_statementEnabled) then
69:
70: /** If the value is null then assign the target default value
71: If ecx_utils.g_target(i).value is null
72: then
73: ecx_utils.g_target(i).value := ecx_utils.g_target(i).default_value;
74: End if;
75: if(l_statementEnabled) then
76: ecx_debug.log(l_statement, ecx_utils.g_target(i).attribute_name,ecx_utils.g_target(i).value,
77: i_method_name);
72: then
73: ecx_utils.g_target(i).value := ecx_utils.g_target(i).default_value;
74: End if;
75: if(l_statementEnabled) then
76: ecx_debug.log(l_statement, ecx_utils.g_target(i).attribute_name,ecx_utils.g_target(i).value,
77: i_method_name);
78: end if;
79: End if;
80: **/
78: end if;
79: End if;
80: **/
81:
82: If ecx_utils.g_target(i).clob_value is not null Then
83: if(l_statementEnabled) then
84: ecx_debug.log(l_statement,i||'=>'||ecx_utils.g_target(i).parent_attribute_id||'=>'||
85: ecx_utils.g_target(i).attribute_type||'=>'||
86: ecx_utils.g_target(i).attribute_name,ecx_utils.g_target(i).clob_value,
80: **/
81:
82: If ecx_utils.g_target(i).clob_value is not null Then
83: if(l_statementEnabled) then
84: ecx_debug.log(l_statement,i||'=>'||ecx_utils.g_target(i).parent_attribute_id||'=>'||
85: ecx_utils.g_target(i).attribute_type||'=>'||
86: ecx_utils.g_target(i).attribute_name,ecx_utils.g_target(i).clob_value,
87: i_method_name);
88: end if;
81:
82: If ecx_utils.g_target(i).clob_value is not null Then
83: if(l_statementEnabled) then
84: ecx_debug.log(l_statement,i||'=>'||ecx_utils.g_target(i).parent_attribute_id||'=>'||
85: ecx_utils.g_target(i).attribute_type||'=>'||
86: ecx_utils.g_target(i).attribute_name,ecx_utils.g_target(i).clob_value,
87: i_method_name);
88: end if;
89: else
82: If ecx_utils.g_target(i).clob_value is not null Then
83: if(l_statementEnabled) then
84: ecx_debug.log(l_statement,i||'=>'||ecx_utils.g_target(i).parent_attribute_id||'=>'||
85: ecx_utils.g_target(i).attribute_type||'=>'||
86: ecx_utils.g_target(i).attribute_name,ecx_utils.g_target(i).clob_value,
87: i_method_name);
88: end if;
89: else
90: -- if clob_value is null this means that it is varchar2
88: end if;
89: else
90: -- if clob_value is null this means that it is varchar2
91: /** If the value is null then assign the target default value **/
92: If ecx_utils.g_target(i).value is null
93: then
94: ecx_utils.g_target(i).value := ecx_utils.g_target(i).default_value;
95: End if;
96: if(l_statementEnabled) then
90: -- if clob_value is null this means that it is varchar2
91: /** If the value is null then assign the target default value **/
92: If ecx_utils.g_target(i).value is null
93: then
94: ecx_utils.g_target(i).value := ecx_utils.g_target(i).default_value;
95: End if;
96: if(l_statementEnabled) then
97: ecx_debug.log(l_statement,i||'=>'||ecx_utils.g_target(i).parent_attribute_id||'=>'||
98: ecx_utils.g_target(i).attribute_type||'=>'||
93: then
94: ecx_utils.g_target(i).value := ecx_utils.g_target(i).default_value;
95: End if;
96: if(l_statementEnabled) then
97: ecx_debug.log(l_statement,i||'=>'||ecx_utils.g_target(i).parent_attribute_id||'=>'||
98: ecx_utils.g_target(i).attribute_type||'=>'||
99: ecx_utils.g_target(i).attribute_name,ecx_utils.g_target(i).value,
100: i_method_name);
101: end if;
94: ecx_utils.g_target(i).value := ecx_utils.g_target(i).default_value;
95: End if;
96: if(l_statementEnabled) then
97: ecx_debug.log(l_statement,i||'=>'||ecx_utils.g_target(i).parent_attribute_id||'=>'||
98: ecx_utils.g_target(i).attribute_type||'=>'||
99: ecx_utils.g_target(i).attribute_name,ecx_utils.g_target(i).value,
100: i_method_name);
101: end if;
102: End If;
95: End if;
96: if(l_statementEnabled) then
97: ecx_debug.log(l_statement,i||'=>'||ecx_utils.g_target(i).parent_attribute_id||'=>'||
98: ecx_utils.g_target(i).attribute_type||'=>'||
99: ecx_utils.g_target(i).attribute_name,ecx_utils.g_target(i).value,
100: i_method_name);
101: end if;
102: End If;
103: end loop;
118: end if;
119: if (l_procedureEnabled) then
120: ecx_debug.pop(i_method_name);
121: end if;
122: raise ecx_utils.PROGRAM_EXIT;
123: end move_from_source_to_target;
124:
125: procedure processTarget
126: (
161:
162: ecx_print_local.print_new_level
163: (
164: i_target,
165: ecx_utils.g_target_levels(i_target).dtd_node_index
166: );
167:
168: if (i_target <> 0)
169: then
174: ecx_debug.pop(i_method_name);
175: end if;
176:
177: exception
178: when ecx_utils.program_exit then
179: ecx_debug.pop('ECX_OUTBOUND.processTarget');
180: raise ecx_utils.program_exit;
181: when others then
182: if(l_unexpectedEnabled) then
176:
177: exception
178: when ecx_utils.program_exit then
179: ecx_debug.pop('ECX_OUTBOUND.processTarget');
180: raise ecx_utils.program_exit;
181: when others then
182: if(l_unexpectedEnabled) then
183: ecx_debug.log(l_unexpected,'ECX','ECX_PROGRAM_ERROR',i_method_name,'PROGRESS_LEVEL',
184: 'ECX_OUTBOUND.PROCESSTARGET');
191: end if;
192: if (l_procedureEnabled) then
193: ecx_debug.pop(i_method_name);
194: end if;
195: raise ecx_utils.PROGRAM_EXIT;
196: end processTarget;
197:
198: procedure process_data
199: (
233: if i_stage = 10
234: then
235:
236: /** Should clean up the Current Source and the down levels first**/
237: for k in i..ecx_utils.g_source_levels.last
238: loop
239: for j in ecx_utils.g_source_levels(k).file_start_pos..ecx_utils.g_source_levels(k).file_end_pos
240: loop
241: if ecx_utils.g_source(j).default_value is null
235:
236: /** Should clean up the Current Source and the down levels first**/
237: for k in i..ecx_utils.g_source_levels.last
238: loop
239: for j in ecx_utils.g_source_levels(k).file_start_pos..ecx_utils.g_source_levels(k).file_end_pos
240: loop
241: if ecx_utils.g_source(j).default_value is null
242: then
243: ecx_utils.g_source(j).value := null;
237: for k in i..ecx_utils.g_source_levels.last
238: loop
239: for j in ecx_utils.g_source_levels(k).file_start_pos..ecx_utils.g_source_levels(k).file_end_pos
240: loop
241: if ecx_utils.g_source(j).default_value is null
242: then
243: ecx_utils.g_source(j).value := null;
244: ecx_utils.g_source(j).clob_value := null;
245: ecx_utils.g_source(j).is_clob := null;
239: for j in ecx_utils.g_source_levels(k).file_start_pos..ecx_utils.g_source_levels(k).file_end_pos
240: loop
241: if ecx_utils.g_source(j).default_value is null
242: then
243: ecx_utils.g_source(j).value := null;
244: ecx_utils.g_source(j).clob_value := null;
245: ecx_utils.g_source(j).is_clob := null;
246: ecx_utils.g_source(j).clob_length := null;
247: else
240: loop
241: if ecx_utils.g_source(j).default_value is null
242: then
243: ecx_utils.g_source(j).value := null;
244: ecx_utils.g_source(j).clob_value := null;
245: ecx_utils.g_source(j).is_clob := null;
246: ecx_utils.g_source(j).clob_length := null;
247: else
248: ecx_utils.g_source(j).value := ecx_utils.g_source(j).default_value;
241: if ecx_utils.g_source(j).default_value is null
242: then
243: ecx_utils.g_source(j).value := null;
244: ecx_utils.g_source(j).clob_value := null;
245: ecx_utils.g_source(j).is_clob := null;
246: ecx_utils.g_source(j).clob_length := null;
247: else
248: ecx_utils.g_source(j).value := ecx_utils.g_source(j).default_value;
249: end if;
242: then
243: ecx_utils.g_source(j).value := null;
244: ecx_utils.g_source(j).clob_value := null;
245: ecx_utils.g_source(j).is_clob := null;
246: ecx_utils.g_source(j).clob_length := null;
247: else
248: ecx_utils.g_source(j).value := ecx_utils.g_source(j).default_value;
249: end if;
250: if(l_statementEnabled) then
244: ecx_utils.g_source(j).clob_value := null;
245: ecx_utils.g_source(j).is_clob := null;
246: ecx_utils.g_source(j).clob_length := null;
247: else
248: ecx_utils.g_source(j).value := ecx_utils.g_source(j).default_value;
249: end if;
250: if(l_statementEnabled) then
251: ecx_debug.log(l_statement,'Source '||ecx_utils.g_source(j).attribute_name,
252: ecx_utils.g_source(j).value,i_method_name);
247: else
248: ecx_utils.g_source(j).value := ecx_utils.g_source(j).default_value;
249: end if;
250: if(l_statementEnabled) then
251: ecx_debug.log(l_statement,'Source '||ecx_utils.g_source(j).attribute_name,
252: ecx_utils.g_source(j).value,i_method_name);
253: end if;
254: end loop;
255: end loop;
248: ecx_utils.g_source(j).value := ecx_utils.g_source(j).default_value;
249: end if;
250: if(l_statementEnabled) then
251: ecx_debug.log(l_statement,'Source '||ecx_utils.g_source(j).attribute_name,
252: ecx_utils.g_source(j).value,i_method_name);
253: end if;
254: end loop;
255: end loop;
256:
275: p_return_status => i_return_status,
276: p_msg_count => i_msg_count,
277: p_msg_data => i_msg_data,
278: p_level => i,
279: p_tbl => ecx_utils.g_source,
280: p_tp_id => ecx_utils.g_rec_tp_id,
281: p_standard_id => ecx_utils.g_standard_id
282: );
283:
276: p_msg_count => i_msg_count,
277: p_msg_data => i_msg_data,
278: p_level => i,
279: p_tbl => ecx_utils.g_source,
280: p_tp_id => ecx_utils.g_rec_tp_id,
281: p_standard_id => ecx_utils.g_standard_id
282: );
283:
284: --Check the Status of the Code Conversion API and take appropriate action.
277: p_msg_data => i_msg_data,
278: p_level => i,
279: p_tbl => ecx_utils.g_source,
280: p_tp_id => ecx_utils.g_rec_tp_id,
281: p_standard_id => ecx_utils.g_standard_id
282: );
283:
284: --Check the Status of the Code Conversion API and take appropriate action.
285: IF (
292: ecx_debug.log(l_statement,'ECX','ECX_PROGRAM_ERROR',i_method_name,'PROGRESS_LEVEL',
293: 'ECX_OUTBOUND.PROCESS_DATA');
294: ecx_debug.log(l_statement,'ECX','EC_CODE_CONVERSION_FAILED',i_method_name,'LEVEL',i);
295: end if;
296: ecx_utils.i_ret_code := 2;
297: RAISE ecx_utils.PROGRAM_EXIT;
298: END IF;
299:
300: /** Execute the In-processing for the Source **/
293: 'ECX_OUTBOUND.PROCESS_DATA');
294: ecx_debug.log(l_statement,'ECX','EC_CODE_CONVERSION_FAILED',i_method_name,'LEVEL',i);
295: end if;
296: ecx_utils.i_ret_code := 2;
297: RAISE ecx_utils.PROGRAM_EXIT;
298: END IF;
299:
300: /** Execute the In-processing for the Source **/
301: ecx_actions.execute_stage_data (i_stage, i, 'S');
299:
300: /** Execute the In-processing for the Source **/
301: ecx_actions.execute_stage_data (i_stage, i, 'S');
302:
303: for j in ecx_utils.g_source_levels(i).first_target_level .. ecx_utils.g_source_levels(i).last_target_level
304: loop
305: /** Initialize the Target **/
306: for k in ecx_utils.g_target_levels(j).file_start_pos..ecx_utils.g_target_levels(j).file_end_pos
307: loop
302:
303: for j in ecx_utils.g_source_levels(i).first_target_level .. ecx_utils.g_source_levels(i).last_target_level
304: loop
305: /** Initialize the Target **/
306: for k in ecx_utils.g_target_levels(j).file_start_pos..ecx_utils.g_target_levels(j).file_end_pos
307: loop
308: if ecx_utils.g_target(k).default_value is null
309: then
310: ecx_utils.g_target(k).value := null;
304: loop
305: /** Initialize the Target **/
306: for k in ecx_utils.g_target_levels(j).file_start_pos..ecx_utils.g_target_levels(j).file_end_pos
307: loop
308: if ecx_utils.g_target(k).default_value is null
309: then
310: ecx_utils.g_target(k).value := null;
311: /** Change required for Clob Support -- 2263729 ***/
312: ecx_utils.g_target(k).clob_value := null;
306: for k in ecx_utils.g_target_levels(j).file_start_pos..ecx_utils.g_target_levels(j).file_end_pos
307: loop
308: if ecx_utils.g_target(k).default_value is null
309: then
310: ecx_utils.g_target(k).value := null;
311: /** Change required for Clob Support -- 2263729 ***/
312: ecx_utils.g_target(k).clob_value := null;
313: ecx_utils.g_target(k).clob_length := null;
314: ecx_utils.g_target(k).is_clob := null;
308: if ecx_utils.g_target(k).default_value is null
309: then
310: ecx_utils.g_target(k).value := null;
311: /** Change required for Clob Support -- 2263729 ***/
312: ecx_utils.g_target(k).clob_value := null;
313: ecx_utils.g_target(k).clob_length := null;
314: ecx_utils.g_target(k).is_clob := null;
315: else
316: ecx_utils.g_target(k).value := ecx_utils.g_target(k).default_value;
309: then
310: ecx_utils.g_target(k).value := null;
311: /** Change required for Clob Support -- 2263729 ***/
312: ecx_utils.g_target(k).clob_value := null;
313: ecx_utils.g_target(k).clob_length := null;
314: ecx_utils.g_target(k).is_clob := null;
315: else
316: ecx_utils.g_target(k).value := ecx_utils.g_target(k).default_value;
317: end if;
310: ecx_utils.g_target(k).value := null;
311: /** Change required for Clob Support -- 2263729 ***/
312: ecx_utils.g_target(k).clob_value := null;
313: ecx_utils.g_target(k).clob_length := null;
314: ecx_utils.g_target(k).is_clob := null;
315: else
316: ecx_utils.g_target(k).value := ecx_utils.g_target(k).default_value;
317: end if;
318: if(l_statementEnabled) then
312: ecx_utils.g_target(k).clob_value := null;
313: ecx_utils.g_target(k).clob_length := null;
314: ecx_utils.g_target(k).is_clob := null;
315: else
316: ecx_utils.g_target(k).value := ecx_utils.g_target(k).default_value;
317: end if;
318: if(l_statementEnabled) then
319: ecx_debug.log(l_statement,'target '||ecx_utils.g_target(k).attribute_name,
320: ecx_utils.g_target(k).value,i_method_name);
315: else
316: ecx_utils.g_target(k).value := ecx_utils.g_target(k).default_value;
317: end if;
318: if(l_statementEnabled) then
319: ecx_debug.log(l_statement,'target '||ecx_utils.g_target(k).attribute_name,
320: ecx_utils.g_target(k).value,i_method_name);
321: end if;
322: end loop;
323: end loop;
316: ecx_utils.g_target(k).value := ecx_utils.g_target(k).default_value;
317: end if;
318: if(l_statementEnabled) then
319: ecx_debug.log(l_statement,'target '||ecx_utils.g_target(k).attribute_name,
320: ecx_utils.g_target(k).value,i_method_name);
321: end if;
322: end loop;
323: end loop;
324:
327: ecx_debug.log(l_statement,'Previous Level',i,i_method_name);
328: ecx_debug.log(l_statement,'Current Level',i_next,i_method_name);
329: end if;
330:
331: if ( ecx_utils.g_source_levels(i).last_source_level -
332: ecx_utils.g_source_levels(i).first_source_level > 0 )
333: then
334: if i_next > i
335: then
328: ecx_debug.log(l_statement,'Current Level',i_next,i_method_name);
329: end if;
330:
331: if ( ecx_utils.g_source_levels(i).last_source_level -
332: ecx_utils.g_source_levels(i).first_source_level > 0 )
333: then
334: if i_next > i
335: then
336: if ( i_next >= ecx_utils.g_source_levels(i).first_source_level )
332: ecx_utils.g_source_levels(i).first_source_level > 0 )
333: then
334: if i_next > i
335: then
336: if ( i_next >= ecx_utils.g_source_levels(i).first_source_level )
337: and
338: ( i_next <= ecx_utils.g_source_levels(i).last_source_level )
339: then
340: if(l_statementEnabled) then
334: if i_next > i
335: then
336: if ( i_next >= ecx_utils.g_source_levels(i).first_source_level )
337: and
338: ( i_next <= ecx_utils.g_source_levels(i).last_source_level )
339: then
340: if(l_statementEnabled) then
341: ecx_debug.log(l_statement,'Skipping Source',i,i_method_name);
342: end if;
340: if(l_statementEnabled) then
341: ecx_debug.log(l_statement,'Skipping Source',i,i_method_name);
342: end if;
343: else
344: processTarget(ecx_utils.g_source_levels(i).first_target_level);
345: end if;
346: end if;
347:
348: if i_next <= i
346: end if;
347:
348: if i_next <= i
349: then
350: processTarget(ecx_utils.g_source_levels(i).first_target_level);
351: end if;
352: else
353: /** Else Expansion or 1-1 mapping **/
354: for j in ecx_utils.g_source_levels(i).first_target_level .. ecx_utils.g_source_levels(i).last_target_level
350: processTarget(ecx_utils.g_source_levels(i).first_target_level);
351: end if;
352: else
353: /** Else Expansion or 1-1 mapping **/
354: for j in ecx_utils.g_source_levels(i).first_target_level .. ecx_utils.g_source_levels(i).last_target_level
355: loop
356: processTarget(j);
357: end loop;
358: end if;
373: discontinuous elements will be printed before it gets overwritten.
374: */
375:
376: -- for all the target levels mapped to this source level print the discont elements
377: j := ecx_utils.g_source_levels(i).last_target_level;
378: if (l_statementEnabled) then
379: ecx_debug.log(l_statement,'last target level', ecx_utils.g_source_levels(i).last_target_level,i_method_name);
380: ecx_debug.log(l_statement, 'first target level', ecx_utils.g_source_levels(i).first_target_level,
381: i_method_name);
375:
376: -- for all the target levels mapped to this source level print the discont elements
377: j := ecx_utils.g_source_levels(i).last_target_level;
378: if (l_statementEnabled) then
379: ecx_debug.log(l_statement,'last target level', ecx_utils.g_source_levels(i).last_target_level,i_method_name);
380: ecx_debug.log(l_statement, 'first target level', ecx_utils.g_source_levels(i).first_target_level,
381: i_method_name);
382: end if;
383: while (j >= ecx_utils.g_source_levels(i).first_target_level)
376: -- for all the target levels mapped to this source level print the discont elements
377: j := ecx_utils.g_source_levels(i).last_target_level;
378: if (l_statementEnabled) then
379: ecx_debug.log(l_statement,'last target level', ecx_utils.g_source_levels(i).last_target_level,i_method_name);
380: ecx_debug.log(l_statement, 'first target level', ecx_utils.g_source_levels(i).first_target_level,
381: i_method_name);
382: end if;
383: while (j >= ecx_utils.g_source_levels(i).first_target_level)
384: loop
379: ecx_debug.log(l_statement,'last target level', ecx_utils.g_source_levels(i).last_target_level,i_method_name);
380: ecx_debug.log(l_statement, 'first target level', ecx_utils.g_source_levels(i).first_target_level,
381: i_method_name);
382: end if;
383: while (j >= ecx_utils.g_source_levels(i).first_target_level)
384: loop
385: ecx_print_local.print_discont_elements(ecx_print_local.last_printed + 1,
386: ecx_utils.g_target_levels(j).file_end_pos,
387: ecx_utils.g_target(ecx_utils.g_target_levels(j).file_start_pos).attribute_id,
382: end if;
383: while (j >= ecx_utils.g_source_levels(i).first_target_level)
384: loop
385: ecx_print_local.print_discont_elements(ecx_print_local.last_printed + 1,
386: ecx_utils.g_target_levels(j).file_end_pos,
387: ecx_utils.g_target(ecx_utils.g_target_levels(j).file_start_pos).attribute_id,
388: j);
389: j := j - 1;
390: end loop;
383: while (j >= ecx_utils.g_source_levels(i).first_target_level)
384: loop
385: ecx_print_local.print_discont_elements(ecx_print_local.last_printed + 1,
386: ecx_utils.g_target_levels(j).file_end_pos,
387: ecx_utils.g_target(ecx_utils.g_target_levels(j).file_start_pos).attribute_id,
388: j);
389: j := j - 1;
390: end loop;
391: end if;
393: if (l_procedureEnabled) then
394: ecx_debug.pop(i_method_name);
395: end if;
396: exception
397: when ecx_utils.program_exit then
398: if (l_procedureEnabled) then
399: ecx_debug.pop(i_method_name);
400: end if;
401: raise ecx_utils.program_exit;
397: when ecx_utils.program_exit then
398: if (l_procedureEnabled) then
399: ecx_debug.pop(i_method_name);
400: end if;
401: raise ecx_utils.program_exit;
402: when others then
403: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_OUTBOUND.PROCESS_DATA');
404: if(l_unexpectedEnabled) then
405: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_OUTBOUND.PROCESS_DATA',i_method_name);
406: end if;
407: if (l_procedureEnabled) then
408: ecx_debug.pop(i_method_name);
409: end if;
410: raise ecx_utils.program_exit;
411: end process_data;
412:
413:
414: procedure print_stack
430: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_OUTBOUND.PRINT_STACK');
431: if(l_unexpectedEnabled) then
432: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_OUTBOUND.PRINT_STACK',i_method_name);
433: end if;
434: raise ecx_utils.program_exit;
435: end print_stack;
436:
437: procedure pop
438: (
472: if (l_procedureEnabled) then
473: ecx_debug.pop(i_method_name );
474: end if;
475: exception
476: when ecx_utils.program_exit then
477: if (l_procedureEnabled) then
478: ecx_debug.pop(i_method_name);
479: end if;
480: raise ecx_utils.program_exit;
476: when ecx_utils.program_exit then
477: if (l_procedureEnabled) then
478: ecx_debug.pop(i_method_name);
479: end if;
480: raise ecx_utils.program_exit;
481: when others then
482: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_OUTBOUND.POP');
483: if(l_unexpectedEnabled) then
484: ecx_debug.log(l_unexpected, 'ECX', SQLERRM || ' - ECX_OUTBOUND.POP',i_method_name);
485: end if;
486: if (l_procedureEnabled) then
487: ecx_debug.pop(i_method_name);
488: end if;
489: raise ecx_utils.program_exit;
490: end pop;
491:
492: procedure push
493: (
584: if (l_procedureEnabled) then
585: ecx_debug.pop(i_method_name);
586: end if;
587: exception
588: when ecx_utils.program_exit then
589: if (l_procedureEnabled) then
590: ecx_debug.pop(i_method_name);
591: end if;
592: raise ecx_utils.program_exit;
588: when ecx_utils.program_exit then
589: if (l_procedureEnabled) then
590: ecx_debug.pop(i_method_name);
591: end if;
592: raise ecx_utils.program_exit;
593: when others then
594: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_OUTBOUND.PUSH');
595: if(l_unexpectedEnabled) then
596: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_OUTBOUND.PUSH',i_method_name);
597: end if;
598: if (l_procedureEnabled) then
599: ecx_debug.pop(i_method_name);
600: end if;
601: raise ecx_utils.program_exit;
602: end push;
603:
604:
605: procedure popall
632: ecx_debug.pop(i_method_name );
633: end if;
634:
635: exception
636: when ecx_utils.program_exit then
637: if (l_procedureEnabled) then
638: ecx_debug.pop(i_method_name );
639: end if;
640: raise ecx_utils.program_exit;
636: when ecx_utils.program_exit then
637: if (l_procedureEnabled) then
638: ecx_debug.pop(i_method_name );
639: end if;
640: raise ecx_utils.program_exit;
641: when others then
642: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_OUTBOUND.POPALL');
643: if(l_unexpectedEnabled) then
644: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_OUTBOUND.POPALL',i_method_name);
645: end if;
646: if (l_procedureEnabled) then
647: ecx_debug.pop(i_method_name );
648: end if;
649: raise ecx_utils.program_exit;
650: end popall;
651:
652: /**
653: Fetches data from the ec_views recurrsively for a given document.
669: ecx_debug.push(i_method_name );
670: END IF;
671: IF(l_statementEnabled) THEN
672: ecx_debug.log(l_statement,'i_level',i_level,i_method_name);
673: ecx_debug.log(l_statement,'Source level',ecx_utils.g_source_levels.COUNT,i_method_name);
674: ecx_debug.log(l_statement,'target_source_levels',ecx_utils.g_target_source_levels.COUNT,i_method_name);
675: END IF;
676: -- push root element on stack
677: IF (i_level = 0) THEN
670: END IF;
671: IF(l_statementEnabled) THEN
672: ecx_debug.log(l_statement,'i_level',i_level,i_method_name);
673: ecx_debug.log(l_statement,'Source level',ecx_utils.g_source_levels.COUNT,i_method_name);
674: ecx_debug.log(l_statement,'target_source_levels',ecx_utils.g_target_source_levels.COUNT,i_method_name);
675: END IF;
676: -- push root element on stack
677: IF (i_level = 0) THEN
678: push(i_level);
676: -- push root element on stack
677: IF (i_level = 0) THEN
678: push(i_level);
679: END IF;
680: FOR i IN 1..ecx_utils.g_source_levels.last
681: LOOP
682: IF ecx_utils.g_source_levels(i).parent_level = i_level THEN
683: IF(l_statementEnabled) THEN
684: ecx_debug.log(l_statement,'SQL Statement',ecx_utils.g_source_levels(i).sql_stmt,i_method_name);
678: push(i_level);
679: END IF;
680: FOR i IN 1..ecx_utils.g_source_levels.last
681: LOOP
682: IF ecx_utils.g_source_levels(i).parent_level = i_level THEN
683: IF(l_statementEnabled) THEN
684: ecx_debug.log(l_statement,'SQL Statement',ecx_utils.g_source_levels(i).sql_stmt,i_method_name);
685: END IF;
686: -- Set the Global Variable for Current Level
680: FOR i IN 1..ecx_utils.g_source_levels.last
681: LOOP
682: IF ecx_utils.g_source_levels(i).parent_level = i_level THEN
683: IF(l_statementEnabled) THEN
684: ecx_debug.log(l_statement,'SQL Statement',ecx_utils.g_source_levels(i).sql_stmt,i_method_name);
685: END IF;
686: -- Set the Global Variable for Current Level
687: ecx_utils.g_current_level := i;
688: /* Bind the Variables for the Where Clause */
683: IF(l_statementEnabled) THEN
684: ecx_debug.log(l_statement,'SQL Statement',ecx_utils.g_source_levels(i).sql_stmt,i_method_name);
685: END IF;
686: -- Set the Global Variable for Current Level
687: ecx_utils.g_current_level := i;
688: /* Bind the Variables for the Where Clause */
689: ecx_actions.bind_variables_for_view(10,i);
690: i_rows_processed := dbms_sql.execute (ecx_utils.g_source_levels(i).Cursor_Handle);
691: IF(l_statementEnabled) THEN
686: -- Set the Global Variable for Current Level
687: ecx_utils.g_current_level := i;
688: /* Bind the Variables for the Where Clause */
689: ecx_actions.bind_variables_for_view(10,i);
690: i_rows_processed := dbms_sql.execute (ecx_utils.g_source_levels(i).Cursor_Handle);
691: IF(l_statementEnabled) THEN
692: ecx_debug.log(l_statement,'Cursor Handle',ecx_utils.g_source_levels(i).Cursor_handle, i_method_name);
693: END IF;
694: WHILE (dbms_sql.fetch_rows( ecx_utils.g_source_levels(i).Cursor_handle) > 0)
688: /* Bind the Variables for the Where Clause */
689: ecx_actions.bind_variables_for_view(10,i);
690: i_rows_processed := dbms_sql.execute (ecx_utils.g_source_levels(i).Cursor_Handle);
691: IF(l_statementEnabled) THEN
692: ecx_debug.log(l_statement,'Cursor Handle',ecx_utils.g_source_levels(i).Cursor_handle, i_method_name);
693: END IF;
694: WHILE (dbms_sql.fetch_rows( ecx_utils.g_source_levels(i).Cursor_handle) > 0)
695: LOOP
696: push(i);
690: i_rows_processed := dbms_sql.execute (ecx_utils.g_source_levels(i).Cursor_Handle);
691: IF(l_statementEnabled) THEN
692: ecx_debug.log(l_statement,'Cursor Handle',ecx_utils.g_source_levels(i).Cursor_handle, i_method_name);
693: END IF;
694: WHILE (dbms_sql.fetch_rows( ecx_utils.g_source_levels(i).Cursor_handle) > 0)
695: LOOP
696: push(i);
697: IF(l_statementEnabled) THEN
698: ecx_debug.log(l_statement,'Executing Fetch Rows',i_method_Name);
699: END IF;
700: -- Get Values from the View
701: -- Initialize the Column Counter
702: i_column_counter :=0;
703: j := ecx_utils.g_source_levels(i).file_start_pos;
704: LOOP
705: IF (ecx_utils.g_source(j).external_level = i) THEN
706: i_column_counter := i_column_counter + 1;
707: IF ecx_utils.g_source(j).data_type <> 112 THEN
701: -- Initialize the Column Counter
702: i_column_counter :=0;
703: j := ecx_utils.g_source_levels(i).file_start_pos;
704: LOOP
705: IF (ecx_utils.g_source(j).external_level = i) THEN
706: i_column_counter := i_column_counter + 1;
707: IF ecx_utils.g_source(j).data_type <> 112 THEN
708: dbms_sql.column_value ( ecx_utils.g_source_levels(i).Cursor_handle, i_column_counter, ecx_utils.g_source(j).value );
709: ELSE
703: j := ecx_utils.g_source_levels(i).file_start_pos;
704: LOOP
705: IF (ecx_utils.g_source(j).external_level = i) THEN
706: i_column_counter := i_column_counter + 1;
707: IF ecx_utils.g_source(j).data_type <> 112 THEN
708: dbms_sql.column_value ( ecx_utils.g_source_levels(i).Cursor_handle, i_column_counter, ecx_utils.g_source(j).value );
709: ELSE
710: dbms_sql.column_value ( ecx_utils.g_source_levels(i).Cursor_handle, i_column_counter, ecx_utils.g_source(j).clob_value );
711: /** Change required for Clob Support -- 2263729 ***/
704: LOOP
705: IF (ecx_utils.g_source(j).external_level = i) THEN
706: i_column_counter := i_column_counter + 1;
707: IF ecx_utils.g_source(j).data_type <> 112 THEN
708: dbms_sql.column_value ( ecx_utils.g_source_levels(i).Cursor_handle, i_column_counter, ecx_utils.g_source(j).value );
709: ELSE
710: dbms_sql.column_value ( ecx_utils.g_source_levels(i).Cursor_handle, i_column_counter, ecx_utils.g_source(j).clob_value );
711: /** Change required for Clob Support -- 2263729 ***/
712: ecx_utils.g_source(j).clob_length := dbms_lob.getlength( ecx_utils.g_source(j).clob_value);
706: i_column_counter := i_column_counter + 1;
707: IF ecx_utils.g_source(j).data_type <> 112 THEN
708: dbms_sql.column_value ( ecx_utils.g_source_levels(i).Cursor_handle, i_column_counter, ecx_utils.g_source(j).value );
709: ELSE
710: dbms_sql.column_value ( ecx_utils.g_source_levels(i).Cursor_handle, i_column_counter, ecx_utils.g_source(j).clob_value );
711: /** Change required for Clob Support -- 2263729 ***/
712: ecx_utils.g_source(j).clob_length := dbms_lob.getlength( ecx_utils.g_source(j).clob_value);
713: i_len := ecx_utils.g_source(j).clob_length;
714: ecx_utils.g_source(j).is_clob := 'N';
708: dbms_sql.column_value ( ecx_utils.g_source_levels(i).Cursor_handle, i_column_counter, ecx_utils.g_source(j).value );
709: ELSE
710: dbms_sql.column_value ( ecx_utils.g_source_levels(i).Cursor_handle, i_column_counter, ecx_utils.g_source(j).clob_value );
711: /** Change required for Clob Support -- 2263729 ***/
712: ecx_utils.g_source(j).clob_length := dbms_lob.getlength( ecx_utils.g_source(j).clob_value);
713: i_len := ecx_utils.g_source(j).clob_length;
714: ecx_utils.g_source(j).is_clob := 'N';
715: /** Fix for bug 8845448*/
716: IF i_len <= ecx_utils.G_CLOB_VARCHAR_LEN THEN
709: ELSE
710: dbms_sql.column_value ( ecx_utils.g_source_levels(i).Cursor_handle, i_column_counter, ecx_utils.g_source(j).clob_value );
711: /** Change required for Clob Support -- 2263729 ***/
712: ecx_utils.g_source(j).clob_length := dbms_lob.getlength( ecx_utils.g_source(j).clob_value);
713: i_len := ecx_utils.g_source(j).clob_length;
714: ecx_utils.g_source(j).is_clob := 'N';
715: /** Fix for bug 8845448*/
716: IF i_len <= ecx_utils.G_CLOB_VARCHAR_LEN THEN
717: BEGIN
710: dbms_sql.column_value ( ecx_utils.g_source_levels(i).Cursor_handle, i_column_counter, ecx_utils.g_source(j).clob_value );
711: /** Change required for Clob Support -- 2263729 ***/
712: ecx_utils.g_source(j).clob_length := dbms_lob.getlength( ecx_utils.g_source(j).clob_value);
713: i_len := ecx_utils.g_source(j).clob_length;
714: ecx_utils.g_source(j).is_clob := 'N';
715: /** Fix for bug 8845448*/
716: IF i_len <= ecx_utils.G_CLOB_VARCHAR_LEN THEN
717: BEGIN
718: dbms_lob.read(ecx_utils.g_source(j).clob_value,i_len,1,l_temp);
712: ecx_utils.g_source(j).clob_length := dbms_lob.getlength( ecx_utils.g_source(j).clob_value);
713: i_len := ecx_utils.g_source(j).clob_length;
714: ecx_utils.g_source(j).is_clob := 'N';
715: /** Fix for bug 8845448*/
716: IF i_len <= ecx_utils.G_CLOB_VARCHAR_LEN THEN
717: BEGIN
718: dbms_lob.read(ecx_utils.g_source(j).clob_value,i_len,1,l_temp);
719: ecx_utils.g_source(j).value := l_temp;
720: ecx_utils.g_source(j).clob_value := NULL;
714: ecx_utils.g_source(j).is_clob := 'N';
715: /** Fix for bug 8845448*/
716: IF i_len <= ecx_utils.G_CLOB_VARCHAR_LEN THEN
717: BEGIN
718: dbms_lob.read(ecx_utils.g_source(j).clob_value,i_len,1,l_temp);
719: ecx_utils.g_source(j).value := l_temp;
720: ecx_utils.g_source(j).clob_value := NULL;
721: ecx_utils.g_source(j).clob_length := NULL;
722: EXCEPTION
715: /** Fix for bug 8845448*/
716: IF i_len <= ecx_utils.G_CLOB_VARCHAR_LEN THEN
717: BEGIN
718: dbms_lob.read(ecx_utils.g_source(j).clob_value,i_len,1,l_temp);
719: ecx_utils.g_source(j).value := l_temp;
720: ecx_utils.g_source(j).clob_value := NULL;
721: ecx_utils.g_source(j).clob_length := NULL;
722: EXCEPTION
723: WHEN OTHERS THEN
716: IF i_len <= ecx_utils.G_CLOB_VARCHAR_LEN THEN
717: BEGIN
718: dbms_lob.read(ecx_utils.g_source(j).clob_value,i_len,1,l_temp);
719: ecx_utils.g_source(j).value := l_temp;
720: ecx_utils.g_source(j).clob_value := NULL;
721: ecx_utils.g_source(j).clob_length := NULL;
722: EXCEPTION
723: WHEN OTHERS THEN
724: ecx_utils.g_source(j).is_clob := 'Y';
717: BEGIN
718: dbms_lob.read(ecx_utils.g_source(j).clob_value,i_len,1,l_temp);
719: ecx_utils.g_source(j).value := l_temp;
720: ecx_utils.g_source(j).clob_value := NULL;
721: ecx_utils.g_source(j).clob_length := NULL;
722: EXCEPTION
723: WHEN OTHERS THEN
724: ecx_utils.g_source(j).is_clob := 'Y';
725: ecx_debug.log(l_statement,'Unable to convert clob to varchar, using clob itself',i_method_name);
720: ecx_utils.g_source(j).clob_value := NULL;
721: ecx_utils.g_source(j).clob_length := NULL;
722: EXCEPTION
723: WHEN OTHERS THEN
724: ecx_utils.g_source(j).is_clob := 'Y';
725: ecx_debug.log(l_statement,'Unable to convert clob to varchar, using clob itself',i_method_name);
726: END;
727: ELSE
728: ecx_utils.g_source(j).is_clob := 'Y';
724: ecx_utils.g_source(j).is_clob := 'Y';
725: ecx_debug.log(l_statement,'Unable to convert clob to varchar, using clob itself',i_method_name);
726: END;
727: ELSE
728: ecx_utils.g_source(j).is_clob := 'Y';
729: END IF;
730: END IF;
731: /** If the value is null set the default value **/
732: IF ecx_utils.g_source(j).value IS NULL THEN
728: ecx_utils.g_source(j).is_clob := 'Y';
729: END IF;
730: END IF;
731: /** If the value is null set the default value **/
732: IF ecx_utils.g_source(j).value IS NULL THEN
733: ecx_utils.g_source(j).value := ecx_utils.g_source(j).default_value;
734: END IF;
735: IF(l_statementEnabled) THEN
736: IF ecx_utils.g_source(j).base_column_name IS NOT NULL THEN
729: END IF;
730: END IF;
731: /** If the value is null set the default value **/
732: IF ecx_utils.g_source(j).value IS NULL THEN
733: ecx_utils.g_source(j).value := ecx_utils.g_source(j).default_value;
734: END IF;
735: IF(l_statementEnabled) THEN
736: IF ecx_utils.g_source(j).base_column_name IS NOT NULL THEN
737: /** Change required for Clob Support -- 2263729 ***/
732: IF ecx_utils.g_source(j).value IS NULL THEN
733: ecx_utils.g_source(j).value := ecx_utils.g_source(j).default_value;
734: END IF;
735: IF(l_statementEnabled) THEN
736: IF ecx_utils.g_source(j).base_column_name IS NOT NULL THEN
737: /** Change required for Clob Support -- 2263729 ***/
738: IF ecx_utils.g_source(j).data_type = 112 THEN
739: IF ecx_utils.g_source(j).clob_value IS NULL THEN
740: ecx_debug.log(l_statement, ecx_utils.g_source(j).base_column_name, ecx_utils.g_source(j).value, i_method_name );
734: END IF;
735: IF(l_statementEnabled) THEN
736: IF ecx_utils.g_source(j).base_column_name IS NOT NULL THEN
737: /** Change required for Clob Support -- 2263729 ***/
738: IF ecx_utils.g_source(j).data_type = 112 THEN
739: IF ecx_utils.g_source(j).clob_value IS NULL THEN
740: ecx_debug.log(l_statement, ecx_utils.g_source(j).base_column_name, ecx_utils.g_source(j).value, i_method_name );
741: ELSE
742: ecx_debug.log(l_statement, ecx_utils.g_source(j).base_column_name, ecx_utils.g_source(j).clob_value, i_method_name );
735: IF(l_statementEnabled) THEN
736: IF ecx_utils.g_source(j).base_column_name IS NOT NULL THEN
737: /** Change required for Clob Support -- 2263729 ***/
738: IF ecx_utils.g_source(j).data_type = 112 THEN
739: IF ecx_utils.g_source(j).clob_value IS NULL THEN
740: ecx_debug.log(l_statement, ecx_utils.g_source(j).base_column_name, ecx_utils.g_source(j).value, i_method_name );
741: ELSE
742: ecx_debug.log(l_statement, ecx_utils.g_source(j).base_column_name, ecx_utils.g_source(j).clob_value, i_method_name );
743: END IF;
736: IF ecx_utils.g_source(j).base_column_name IS NOT NULL THEN
737: /** Change required for Clob Support -- 2263729 ***/
738: IF ecx_utils.g_source(j).data_type = 112 THEN
739: IF ecx_utils.g_source(j).clob_value IS NULL THEN
740: ecx_debug.log(l_statement, ecx_utils.g_source(j).base_column_name, ecx_utils.g_source(j).value, i_method_name );
741: ELSE
742: ecx_debug.log(l_statement, ecx_utils.g_source(j).base_column_name, ecx_utils.g_source(j).clob_value, i_method_name );
743: END IF;
744: ELSE
738: IF ecx_utils.g_source(j).data_type = 112 THEN
739: IF ecx_utils.g_source(j).clob_value IS NULL THEN
740: ecx_debug.log(l_statement, ecx_utils.g_source(j).base_column_name, ecx_utils.g_source(j).value, i_method_name );
741: ELSE
742: ecx_debug.log(l_statement, ecx_utils.g_source(j).base_column_name, ecx_utils.g_source(j).clob_value, i_method_name );
743: END IF;
744: ELSE
745: ecx_debug.log(l_statement, ecx_utils.g_source(j).base_column_name, ecx_utils.g_source(j).value, i_method_name );
746: END IF;
741: ELSE
742: ecx_debug.log(l_statement, ecx_utils.g_source(j).base_column_name, ecx_utils.g_source(j).clob_value, i_method_name );
743: END IF;
744: ELSE
745: ecx_debug.log(l_statement, ecx_utils.g_source(j).base_column_name, ecx_utils.g_source(j).value, i_method_name );
746: END IF;
747: END IF;
748: END IF;
749: END IF;
747: END IF;
748: END IF;
749: END IF;
750: EXIT
751: WHEN j = ecx_utils.g_source_levels(i).file_end_pos;
752: j := ecx_utils.g_source.next(j);
753: END LOOP;
754: IF(l_statementEnabled) THEN
755: ecx_debug.log(l_statement,'All Rows fetched',i_method_name);
748: END IF;
749: END IF;
750: EXIT
751: WHEN j = ecx_utils.g_source_levels(i).file_end_pos;
752: j := ecx_utils.g_source.next(j);
753: END LOOP;
754: IF(l_statementEnabled) THEN
755: ecx_debug.log(l_statement,'All Rows fetched',i_method_name);
756: END IF;
754: IF(l_statementEnabled) THEN
755: ecx_debug.log(l_statement,'All Rows fetched',i_method_name);
756: END IF;
757: i_count :=0;
758: IF (ecx_utils.g_source_levels.count <> 0) THEN
759: FOR m IN ecx_utils.g_source_levels.first..ecx_utils.g_source_levels.last
760: LOOP
761: IF(l_statementEnabled) THEN
762: ecx_debug.log(l_statement,'Source level '||m,'Parent level'||ecx_utils.g_source_levels(m).parent_level, i_method_name);
755: ecx_debug.log(l_statement,'All Rows fetched',i_method_name);
756: END IF;
757: i_count :=0;
758: IF (ecx_utils.g_source_levels.count <> 0) THEN
759: FOR m IN ecx_utils.g_source_levels.first..ecx_utils.g_source_levels.last
760: LOOP
761: IF(l_statementEnabled) THEN
762: ecx_debug.log(l_statement,'Source level '||m,'Parent level'||ecx_utils.g_source_levels(m).parent_level, i_method_name);
763: END IF;
758: IF (ecx_utils.g_source_levels.count <> 0) THEN
759: FOR m IN ecx_utils.g_source_levels.first..ecx_utils.g_source_levels.last
760: LOOP
761: IF(l_statementEnabled) THEN
762: ecx_debug.log(l_statement,'Source level '||m,'Parent level'||ecx_utils.g_source_levels(m).parent_level, i_method_name);
763: END IF;
764: IF ecx_utils.g_source_levels(m).parent_level=i THEN
765: i_count := i_count+1;
766: END IF;
760: LOOP
761: IF(l_statementEnabled) THEN
762: ecx_debug.log(l_statement,'Source level '||m,'Parent level'||ecx_utils.g_source_levels(m).parent_level, i_method_name);
763: END IF;
764: IF ecx_utils.g_source_levels(m).parent_level=i THEN
765: i_count := i_count+1;
766: END IF;
767: END LOOP;
768: END IF;
773: fetch_data_from_view(i);
774: END IF;
775: END LOOP;
776: IF i = 1 THEN
777: ecx_utils.g_source_levels(i).rows_processed := dbms_sql.last_row_count;
778: ELSE
779: ecx_utils.g_source_levels(i).rows_processed := ecx_utils.g_source_levels(i).rows_processed + dbms_sql.last_row_count;
780: END IF;
781: END IF;
775: END LOOP;
776: IF i = 1 THEN
777: ecx_utils.g_source_levels(i).rows_processed := dbms_sql.last_row_count;
778: ELSE
779: ecx_utils.g_source_levels(i).rows_processed := ecx_utils.g_source_levels(i).rows_processed + dbms_sql.last_row_count;
780: END IF;
781: END IF;
782: END LOOP;
783: IF (l_procedureEnabled) THEN
793: ecx_debug.setErrorInfo(2,30,'ECX_INVALID_NUMBER - ECX_OUTBOUND.FETCH_DATA_FROM_VIEW' );
794: if (l_procedureEnabled) then
795: ecx_debug.pop(i_method_name);
796: end if;
797: raise ecx_utils.program_exit;
798: WHEN ecx_utils.PROGRAM_EXIT then
799: raise;
800: WHEN OTHERS THEN
801: if(l_unexpectedEnabled) then
794: if (l_procedureEnabled) then
795: ecx_debug.pop(i_method_name);
796: end if;
797: raise ecx_utils.program_exit;
798: WHEN ecx_utils.PROGRAM_EXIT then
799: raise;
800: WHEN OTHERS THEN
801: if(l_unexpectedEnabled) then
802: ecx_debug.log(l_unexpected,'ECX','ECX_PROGRAM_ERROR',i_method_name,'PROGRESS_LEVEL',
810: end if;
811: if (l_procedureEnabled) then
812: ecx_debug.pop(i_method_name );
813: end if;
814: raise ecx_utils.PROGRAM_EXIT;
815: END fetch_data_from_view;
816:
817: procedure log_summary(level pls_integer)
818: is
823: ecx_debug.push(i_method_name);
824: end if;
825:
826: ecx_debug.log(level,'Processing Summary','====',i_method_name);
827: if (ecx_utils.g_source_levels.count <> 0)
828: then
829: for i in ecx_utils.g_source_levels.first..ecx_utils.g_source_levels.last
830: loop
831: ecx_debug.log(level,ecx_utils.g_source_levels(i).rows_processed||
825:
826: ecx_debug.log(level,'Processing Summary','====',i_method_name);
827: if (ecx_utils.g_source_levels.count <> 0)
828: then
829: for i in ecx_utils.g_source_levels.first..ecx_utils.g_source_levels.last
830: loop
831: ecx_debug.log(level,ecx_utils.g_source_levels(i).rows_processed||
832: ' row(s) processed for Level : '|| ecx_utils.g_source_levels(i).start_element
833: || '('|| i || ') ',i_method_name);
827: if (ecx_utils.g_source_levels.count <> 0)
828: then
829: for i in ecx_utils.g_source_levels.first..ecx_utils.g_source_levels.last
830: loop
831: ecx_debug.log(level,ecx_utils.g_source_levels(i).rows_processed||
832: ' row(s) processed for Level : '|| ecx_utils.g_source_levels(i).start_element
833: || '('|| i || ') ',i_method_name);
834: end loop;
835: end if;
828: then
829: for i in ecx_utils.g_source_levels.first..ecx_utils.g_source_levels.last
830: loop
831: ecx_debug.log(level,ecx_utils.g_source_levels(i).rows_processed||
832: ' row(s) processed for Level : '|| ecx_utils.g_source_levels(i).start_element
833: || '('|| i || ') ',i_method_name);
834: end loop;
835: end if;
836: if (l_procedureEnabled) then
845: if (l_procedureEnabled) then
846: ecx_debug.pop(i_method_name);
847: end if;
848:
849: raise ecx_utils.program_exit;
850: end log_summary;
851:
852: /**
853: Main Call for Processing Outbound Documents
922: ecx_debug.log(l_statement,'i_map_code',i_map_code,i_method_name);
923: end if;
924:
925: /** check for the Event Object. If null , initialize it **/
926: if ecx_utils.g_event is null
927: then
928: wf_event_t.initialize(ecx_utils.g_event);
929: end if;
930: i_parameterlist := wf_event_t.getParameterList(ecx_utils.g_event);
924:
925: /** check for the Event Object. If null , initialize it **/
926: if ecx_utils.g_event is null
927: then
928: wf_event_t.initialize(ecx_utils.g_event);
929: end if;
930: i_parameterlist := wf_event_t.getParameterList(ecx_utils.g_event);
931: if(l_statementEnabled) then
932: if i_parameterList is not null
926: if ecx_utils.g_event is null
927: then
928: wf_event_t.initialize(ecx_utils.g_event);
929: end if;
930: i_parameterlist := wf_event_t.getParameterList(ecx_utils.g_event);
931: if(l_statementEnabled) then
932: if i_parameterList is not null
933: then
934: for i in i_parameterList.FIRST..i_parameterList.LAST
940: end if;
941:
942:
943: /** Set the GLobal variables **/
944: ecx_utils.g_transaction_type := i_transaction_type;
945: ecx_utils.g_transaction_subtype := i_transaction_subtype;
946: ecx_utils.g_document_id := i_document_id;
947:
948: /** Check for Message Standard Code **/
941:
942:
943: /** Set the GLobal variables **/
944: ecx_utils.g_transaction_type := i_transaction_type;
945: ecx_utils.g_transaction_subtype := i_transaction_subtype;
946: ecx_utils.g_document_id := i_document_id;
947:
948: /** Check for Message Standard Code **/
949: begin
942:
943: /** Set the GLobal variables **/
944: ecx_utils.g_transaction_type := i_transaction_type;
945: ecx_utils.g_transaction_subtype := i_transaction_subtype;
946: ecx_utils.g_document_id := i_document_id;
947:
948: /** Check for Message Standard Code **/
949: begin
950: select standard_id
952: from ecx_standards
953: where standard_code = i_message_standard
954: and standard_type = nvl(i_message_type, 'XML');
955:
956: ecx_utils.g_standard_id := i_standard_id;
957: exception
958: when others then
959: ecx_debug.setErrorInfo(1, 30, 'ECX_CODE_CONVERSION_DISABLED',
960: 'MESSAGE_STANDARD', i_message_standard);
975: ecx_debug.setErrorInfo(1, 30, 'ECX_MAP_NOT_FOUND', 'MAP_CODE', i_map_code);
976: if(l_unexpectedEnabled) then
977: ecx_debug.log(l_unexpected,'ECX', 'ECX_MAP_NOT_FOUND', i_method_name,'MAP_CODE', i_map_code);
978: end if;
979: raise ecx_utils.program_exit;
980: end;
981:
982: /** Check for tp_header_id **/
983: begin
988: and party_site_id = i_tp_site_id
989: and party_type = i_tp_type;
990:
991: /** Set the GLobal g_rcv_tp_id **/
992: ecx_utils.g_rec_tp_id:= i_tp_header_id;
993: exception
994: when others then
995: ecx_debug.setErrorInfo(1, 30, 'ECX_TP_NOT_FOUND', 'PARTY_ID', i_tp_id);
996: if(l_statementEnabled) then
1012: ecx_debug.setErrorInfo(1, 30, 'ECX_ROOT_ELEMENT_NOT_FOUND', 'MAP_ID', i_map_id);
1013: if(l_unexpectedEnabled) then
1014: ecx_debug.log(l_unexpected,'ECX', 'ECX_ROOT_ELEMENT_NOT_FOUND',i_method_name, 'MAP_ID', i_map_id);
1015: end if;
1016: raise ecx_utils.program_exit;
1017: end;
1018:
1019: /**
1020: Initialize Memory Structures Set the direction for the Transaction **/
1017: end;
1018:
1019: /**
1020: Initialize Memory Structures Set the direction for the Transaction **/
1021: ecx_utils.g_direction :='OUT';
1022: ecx_utils.initialize(i_map_id,x_same_map);
1023:
1024:
1025: /**
1018:
1019: /**
1020: Initialize Memory Structures Set the direction for the Transaction **/
1021: ecx_utils.g_direction :='OUT';
1022: ecx_utils.initialize(i_map_id,x_same_map);
1023:
1024:
1025: /**
1026: Find the Stack Variable.If Found set the value.
1032: );
1033:
1034: if (i_variable_found AND i_transaction_type is not null)
1035: then
1036: ecx_utils.g_stack(i_stack_pos).variable_value := i_transaction_type;
1037: end if;
1038:
1039: i_variable_found := ecx_actions.find_stack_variable
1040: (
1043: );
1044:
1045: if (i_variable_found AND i_transaction_subtype is not null)
1046: then
1047: ecx_utils.g_stack(i_stack_pos).variable_value := i_transaction_subtype;
1048: end if;
1049:
1050:
1051: i_variable_found := ecx_actions.find_stack_variable
1055: );
1056:
1057: if (i_variable_found AND i_document_id is not null)
1058: then
1059: ecx_utils.g_stack(i_stack_pos).variable_value := i_document_id;
1060: end if;
1061:
1062: i_variable_found := ecx_actions.find_stack_variable
1063: (
1066: );
1067:
1068: if (i_variable_found AND i_tp_id is not null)
1069: then
1070: ecx_utils.g_stack(i_stack_pos).variable_value := i_tp_id;
1071: end if;
1072:
1073: i_variable_found := ecx_actions.find_stack_variable
1074: (
1077: );
1078:
1079: if (i_variable_found AND i_tp_site_id is not null)
1080: then
1081: ecx_utils.g_stack(i_stack_pos).variable_value := i_tp_site_id;
1082: end if;
1083:
1084: i_variable_found := ecx_actions.find_stack_variable
1085: (
1088: );
1089:
1090: if (i_variable_found AND i_tp_type is not null)
1091: then
1092: ecx_utils.g_stack(i_stack_pos).variable_value := i_tp_type;
1093: end if;
1094:
1095: /* If the input wf_event_t object passed is null , the following loop raises an exception.
1096: so initialize the i_event_obj
1144: i_stack_param_value := i_parameter.getValue();
1145: /** Only overwrite the Global variable value if not null **/
1146: if i_stack_param_value is not null
1147: then
1148: ecx_utils.g_stack(i_stack_pos).variable_value
1149: := i_stack_param_value;
1150: end if;
1151: end if;
1152: end if;
1159: Should Avoid Parsing and Loading the Next Map if it is same as the previous one.
1160: **/
1161: if NOT (x_same_map)
1162: then
1163: ecx_utils.load_objects(i_map_id);
1164: end if;
1165:
1166: if (ecx_utils.g_source_levels.count <> 0)
1167: then
1162: then
1163: ecx_utils.load_objects(i_map_id);
1164: end if;
1165:
1166: if (ecx_utils.g_source_levels.count <> 0)
1167: then
1168: for i in ecx_utils.g_source_levels.first..ecx_utils.g_source_levels.last
1169: loop
1170: ecx_utils.g_source_levels(i).rows_processed := 0;
1164: end if;
1165:
1166: if (ecx_utils.g_source_levels.count <> 0)
1167: then
1168: for i in ecx_utils.g_source_levels.first..ecx_utils.g_source_levels.last
1169: loop
1170: ecx_utils.g_source_levels(i).rows_processed := 0;
1171: end loop;
1172: end if;
1166: if (ecx_utils.g_source_levels.count <> 0)
1167: then
1168: for i in ecx_utils.g_source_levels.first..ecx_utils.g_source_levels.last
1169: loop
1170: ecx_utils.g_source_levels(i).rows_processed := 0;
1171: end loop;
1172: end if;
1173: /**
1174: Initialize the temporary XML Buffer
1187: ecx_print_local.comment_node('Oracle eXtensible Markup Language Gateway Server ');
1188:
1189:
1190: /** DOCUMENT NODE **/
1191: if (not ecx_utils.g_delete_doctype) then
1192: ecx_print_local.document_node(i_root_element,i_filename,null);
1193: if(l_statementEnabled) then
1194: ecx_debug.log(l_statement, 'Printed DOCTYPE', i_method_name);
1195: end if;
1198: fetch_data_from_view (0);
1199: popall;
1200: ecx_print_local.xmlPOPALL(i_xmldoc);
1201:
1202: ecx_util_api.parseXML(ecx_utils.g_parser, i_xmldoc, l_parseXML, ecx_utils.g_xmldoc);
1203: if(l_statementEnabled) then
1204: ecx_debug.log(l_statement, 'Parsed XML', l_parseXML,i_method_name);
1205: end if;
1206:
1225: /*bug 10254870 5000-XST Tranform
1226: if xslt transformation is defined for a map then get output which is transformed
1227: else get clob output from dom node
1228: */
1229: if(ecx_utils.g_cnt_xslt_defined > 0) then
1230: if(l_statementEnabled) then
1231: ecx_debug.log(l_statement, 'xslt transformation is defined and getting transformed output',i_method_name);
1232: end if;
1233: i_xmldoc := ecx_utils.g_out_transformed;
1229: if(ecx_utils.g_cnt_xslt_defined > 0) then
1230: if(l_statementEnabled) then
1231: ecx_debug.log(l_statement, 'xslt transformation is defined and getting transformed output',i_method_name);
1232: end if;
1233: i_xmldoc := ecx_utils.g_out_transformed;
1234: else
1235: dbms_lob.trim(i_xmldoc, 0);
1236: xmlDOM.writetoCLOB(ecx_utils.g_xmldoc,i_xmldoc);
1237: end if;
1232: end if;
1233: i_xmldoc := ecx_utils.g_out_transformed;
1234: else
1235: dbms_lob.trim(i_xmldoc, 0);
1236: xmlDOM.writetoCLOB(ecx_utils.g_xmldoc,i_xmldoc);
1237: end if;
1238:
1239: g_instlmode := wf_core.translate('WF_INSTALL');
1240:
1252: End Loop;
1253: fnd_log_attachment.close(attachment_id);
1254: end if;
1255: ELSE
1256: xmlDOM.writetofile(ecx_utils.g_xmldoc,ecx_utils.g_logdir||'/'||
1257: substr(ecx_utils.g_logfile,1,length(ecx_utils.g_logfile)-4)
1258: ||'.xml');
1259: END IF;
1260: end if;
1253: fnd_log_attachment.close(attachment_id);
1254: end if;
1255: ELSE
1256: xmlDOM.writetofile(ecx_utils.g_xmldoc,ecx_utils.g_logdir||'/'||
1257: substr(ecx_utils.g_logfile,1,length(ecx_utils.g_logfile)-4)
1258: ||'.xml');
1259: END IF;
1260: end if;
1261: end if;
1263: if(l_statementEnabled) then
1264: ecx_outbound.log_summary(l_statement);
1265:
1266: ecx_debug.log(l_statement,'ECX','ECX_DOCUMENTS_PROCESSED',i_method_name,'NO_OF_DOCS',
1267: ecx_utils.g_source_levels(0).rows_processed);
1268: ecx_debug.log(l_statement,'ECX','ECX_FINISH_OUTBOUND',i_method_name,'MAP_ID',i_map_id);
1269: end if;
1270:
1271: if not XMLDom.isNull(ecx_utils.g_xmldoc) then
1267: ecx_utils.g_source_levels(0).rows_processed);
1268: ecx_debug.log(l_statement,'ECX','ECX_FINISH_OUTBOUND',i_method_name,'MAP_ID',i_map_id);
1269: end if;
1270:
1271: if not XMLDom.isNull(ecx_utils.g_xmldoc) then
1272: i_node_type := xmlDOM.getNodeType(ecx_utils.g_xmldoc);
1273: if (i_node_type = xmlDOM.DOCUMENT_NODE) then
1274: xmlDOM.freeDocument(xmlDOM.makeDocument(ecx_utils.g_xmldoc));
1275: else
1268: ecx_debug.log(l_statement,'ECX','ECX_FINISH_OUTBOUND',i_method_name,'MAP_ID',i_map_id);
1269: end if;
1270:
1271: if not XMLDom.isNull(ecx_utils.g_xmldoc) then
1272: i_node_type := xmlDOM.getNodeType(ecx_utils.g_xmldoc);
1273: if (i_node_type = xmlDOM.DOCUMENT_NODE) then
1274: xmlDOM.freeDocument(xmlDOM.makeDocument(ecx_utils.g_xmldoc));
1275: else
1276: xmlDOM.freeDocFrag(xmlDOM.makeDocumentFragment(ecx_utils.g_xmldoc));
1270:
1271: if not XMLDom.isNull(ecx_utils.g_xmldoc) then
1272: i_node_type := xmlDOM.getNodeType(ecx_utils.g_xmldoc);
1273: if (i_node_type = xmlDOM.DOCUMENT_NODE) then
1274: xmlDOM.freeDocument(xmlDOM.makeDocument(ecx_utils.g_xmldoc));
1275: else
1276: xmlDOM.freeDocFrag(xmlDOM.makeDocumentFragment(ecx_utils.g_xmldoc));
1277: end if;
1278: xmlparser.freeparser(ecx_utils.g_parser);
1272: i_node_type := xmlDOM.getNodeType(ecx_utils.g_xmldoc);
1273: if (i_node_type = xmlDOM.DOCUMENT_NODE) then
1274: xmlDOM.freeDocument(xmlDOM.makeDocument(ecx_utils.g_xmldoc));
1275: else
1276: xmlDOM.freeDocFrag(xmlDOM.makeDocumentFragment(ecx_utils.g_xmldoc));
1277: end if;
1278: xmlparser.freeparser(ecx_utils.g_parser);
1279: end if;
1280: if (l_procedureEnabled) then
1274: xmlDOM.freeDocument(xmlDOM.makeDocument(ecx_utils.g_xmldoc));
1275: else
1276: xmlDOM.freeDocFrag(xmlDOM.makeDocumentFragment(ecx_utils.g_xmldoc));
1277: end if;
1278: xmlparser.freeparser(ecx_utils.g_parser);
1279: end if;
1280: if (l_procedureEnabled) then
1281: ecx_debug.pop(i_method_name );
1282: end if;
1281: ecx_debug.pop(i_method_name );
1282: end if;
1283:
1284: EXCEPTION
1285: WHEN ecx_utils.PROGRAM_EXIT then
1286: if(l_unexpectedEnabled) then
1287: ecx_debug.log(l_unexpected, 'Clean-up i_stack, l_node_stack, i_tmpxml and last_printed',
1288: i_method_name);
1289: ecx_outbound.log_summary(l_unexpected);
1294: ecx_print_local.last_printed := -1;
1295: if (l_procedureEnabled) then
1296: ecx_debug.pop(i_method_name );
1297: end if;
1298: raise ecx_utils.program_exit;
1299: WHEN OTHERS THEN
1300: if(l_unexpectedEnabled) then
1301: ecx_debug.log(l_unexpected,'ECX','ECX_PROGRAM_ERROR',i_method_name,'PROGRESS_LEVEL',
1302: 'ECX_OUTBOUND.PROCESS_OUTBOUND_DOCUMENTS');
1314: ecx_print_local.last_printed := -1;
1315: if (l_procedureEnabled) then
1316: ecx_debug.pop(i_method_name );
1317: end if;
1318: raise ecx_utils.PROGRAM_EXIT;
1319: end process_outbound_documents;
1320:
1321:
1322: procedure putmsg
1370: p_aflog_module_name VARCHAR2(2000) ;
1371:
1372: begin
1373: --- Sets the Log Directory in both Standalone and the Embedded mode
1374: ecx_utils.getLogDirectory;
1375:
1376: if ecx_utils.g_logfile is null
1377: then
1378: i_direct := false;
1372: begin
1373: --- Sets the Log Directory in both Standalone and the Embedded mode
1374: ecx_utils.getLogDirectory;
1375:
1376: if ecx_utils.g_logfile is null
1377: then
1378: i_direct := false;
1379: -- Fetch the Run Id for the Transaction
1380: open get_run_s;
1378: i_direct := false;
1379: -- Fetch the Run Id for the Transaction
1380: open get_run_s;
1381: fetch get_run_s
1382: into ecx_utils.g_run_id;
1383: close get_run_s;
1384:
1385: ecx_utils.g_logfile :=i_message_standard||'OUT'||
1386: i_transaction_type||i_transaction_subtype||i_document_id||ecx_utils.g_run_id||'.log';
1381: fetch get_run_s
1382: into ecx_utils.g_run_id;
1383: close get_run_s;
1384:
1385: ecx_utils.g_logfile :=i_message_standard||'OUT'||
1386: i_transaction_type||i_transaction_subtype||i_document_id||ecx_utils.g_run_id||'.log';
1387:
1388: p_aflog_module_name := '';
1389: IF (i_message_standard is not null) THEN
1382: into ecx_utils.g_run_id;
1383: close get_run_s;
1384:
1385: ecx_utils.g_logfile :=i_message_standard||'OUT'||
1386: i_transaction_type||i_transaction_subtype||i_document_id||ecx_utils.g_run_id||'.log';
1387:
1388: p_aflog_module_name := '';
1389: IF (i_message_standard is not null) THEN
1390: p_aflog_module_name := p_aflog_module_name||i_message_standard||'.';
1398: END IF;
1399: IF (i_document_id is not null) THEN
1400: p_aflog_module_name := p_aflog_module_name||i_document_id||'.';
1401: END IF;
1402: IF (ecx_utils.g_run_id is not null) THEN
1403: p_aflog_module_name := p_aflog_module_name||ecx_utils.g_run_id;
1404: END IF;
1405: p_aflog_module_name := p_aflog_module_name||'.log';
1406:
1399: IF (i_document_id is not null) THEN
1400: p_aflog_module_name := p_aflog_module_name||i_document_id||'.';
1401: END IF;
1402: IF (ecx_utils.g_run_id is not null) THEN
1403: p_aflog_module_name := p_aflog_module_name||ecx_utils.g_run_id;
1404: END IF;
1405: p_aflog_module_name := p_aflog_module_name||'.log';
1406:
1407: ecx_debug.enable_debug_new(i_debug_level,ecx_utils.g_logdir,ecx_utils.g_logfile, p_aflog_module_name);
1403: p_aflog_module_name := p_aflog_module_name||ecx_utils.g_run_id;
1404: END IF;
1405: p_aflog_module_name := p_aflog_module_name||'.log';
1406:
1407: ecx_debug.enable_debug_new(i_debug_level,ecx_utils.g_logdir,ecx_utils.g_logfile, p_aflog_module_name);
1408: end if;
1409:
1410: -- Assign local variables with the ecx_debug global variables
1411: l_procedure := ecx_debug.g_procedure;
1467: i_message_type
1468: );
1469:
1470: -- call ecx_out_wf_qh.enqueue with the correct parameters
1471: ecx_utils.g_event.addParameterToList('PARTY_TYPE', i_party_type);
1472: ecx_utils.g_event.addParameterToList('PARTYID', i_destination_code);
1473: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', i_destination_code);
1474: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1475: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', i_message_type);
1468: );
1469:
1470: -- call ecx_out_wf_qh.enqueue with the correct parameters
1471: ecx_utils.g_event.addParameterToList('PARTY_TYPE', i_party_type);
1472: ecx_utils.g_event.addParameterToList('PARTYID', i_destination_code);
1473: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', i_destination_code);
1474: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1475: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', i_message_type);
1476: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', i_message_standard);
1469:
1470: -- call ecx_out_wf_qh.enqueue with the correct parameters
1471: ecx_utils.g_event.addParameterToList('PARTY_TYPE', i_party_type);
1472: ecx_utils.g_event.addParameterToList('PARTYID', i_destination_code);
1473: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', i_destination_code);
1474: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1475: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', i_message_type);
1476: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', i_message_standard);
1477: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', i_ext_type);
1470: -- call ecx_out_wf_qh.enqueue with the correct parameters
1471: ecx_utils.g_event.addParameterToList('PARTY_TYPE', i_party_type);
1472: ecx_utils.g_event.addParameterToList('PARTYID', i_destination_code);
1473: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', i_destination_code);
1474: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1475: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', i_message_type);
1476: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', i_message_standard);
1477: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', i_ext_type);
1478: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', i_ext_subtype);
1471: ecx_utils.g_event.addParameterToList('PARTY_TYPE', i_party_type);
1472: ecx_utils.g_event.addParameterToList('PARTYID', i_destination_code);
1473: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', i_destination_code);
1474: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1475: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', i_message_type);
1476: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', i_message_standard);
1477: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', i_ext_type);
1478: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', i_ext_subtype);
1479: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', i_destination_type);
1472: ecx_utils.g_event.addParameterToList('PARTYID', i_destination_code);
1473: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', i_destination_code);
1474: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1475: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', i_message_type);
1476: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', i_message_standard);
1477: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', i_ext_type);
1478: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', i_ext_subtype);
1479: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', i_destination_type);
1480: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', i_destination_address);
1473: ecx_utils.g_event.addParameterToList('PARTY_SITE_ID', i_destination_code);
1474: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1475: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', i_message_type);
1476: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', i_message_standard);
1477: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', i_ext_type);
1478: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', i_ext_subtype);
1479: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', i_destination_type);
1480: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', i_destination_address);
1481: ecx_utils.g_event.addParameterToList('USERNAME', i_username);
1474: ecx_utils.g_event.addParameterToList('DOCUMENT_NUMBER', ecx_utils.g_document_id);
1475: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', i_message_type);
1476: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', i_message_standard);
1477: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', i_ext_type);
1478: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', i_ext_subtype);
1479: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', i_destination_type);
1480: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', i_destination_address);
1481: ecx_utils.g_event.addParameterToList('USERNAME', i_username);
1482: ecx_utils.g_event.addParameterToList('PASSWORD', i_password);
1475: ecx_utils.g_event.addParameterToList('MESSAGE_TYPE', i_message_type);
1476: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', i_message_standard);
1477: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', i_ext_type);
1478: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', i_ext_subtype);
1479: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', i_destination_type);
1480: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', i_destination_address);
1481: ecx_utils.g_event.addParameterToList('USERNAME', i_username);
1482: ecx_utils.g_event.addParameterToList('PASSWORD', i_password);
1483: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', i_attribute1);
1476: ecx_utils.g_event.addParameterToList('MESSAGE_STANDARD', i_message_standard);
1477: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', i_ext_type);
1478: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', i_ext_subtype);
1479: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', i_destination_type);
1480: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', i_destination_address);
1481: ecx_utils.g_event.addParameterToList('USERNAME', i_username);
1482: ecx_utils.g_event.addParameterToList('PASSWORD', i_password);
1483: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', i_attribute1);
1484: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', i_attribute2);
1477: ecx_utils.g_event.addParameterToList('TRANSACTION_TYPE', i_ext_type);
1478: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', i_ext_subtype);
1479: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', i_destination_type);
1480: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', i_destination_address);
1481: ecx_utils.g_event.addParameterToList('USERNAME', i_username);
1482: ecx_utils.g_event.addParameterToList('PASSWORD', i_password);
1483: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', i_attribute1);
1484: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', i_attribute2);
1485: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', i_attribute3);
1478: ecx_utils.g_event.addParameterToList('TRANSACTION_SUBTYPE', i_ext_subtype);
1479: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', i_destination_type);
1480: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', i_destination_address);
1481: ecx_utils.g_event.addParameterToList('USERNAME', i_username);
1482: ecx_utils.g_event.addParameterToList('PASSWORD', i_password);
1483: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', i_attribute1);
1484: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', i_attribute2);
1485: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', i_attribute3);
1486: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', i_attribute4);
1479: ecx_utils.g_event.addParameterToList('PROTOCOL_TYPE', i_destination_type);
1480: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', i_destination_address);
1481: ecx_utils.g_event.addParameterToList('USERNAME', i_username);
1482: ecx_utils.g_event.addParameterToList('PASSWORD', i_password);
1483: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', i_attribute1);
1484: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', i_attribute2);
1485: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', i_attribute3);
1486: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', i_attribute4);
1487: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', i_attribute5);
1480: ecx_utils.g_event.addParameterToList('PROTOCOL_ADDRESS', i_destination_address);
1481: ecx_utils.g_event.addParameterToList('USERNAME', i_username);
1482: ecx_utils.g_event.addParameterToList('PASSWORD', i_password);
1483: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', i_attribute1);
1484: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', i_attribute2);
1485: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', i_attribute3);
1486: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', i_attribute4);
1487: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', i_attribute5);
1488: ecx_utils.g_event.addParameterToList('TRIGGER_ID', i_trigger_id);
1481: ecx_utils.g_event.addParameterToList('USERNAME', i_username);
1482: ecx_utils.g_event.addParameterToList('PASSWORD', i_password);
1483: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', i_attribute1);
1484: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', i_attribute2);
1485: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', i_attribute3);
1486: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', i_attribute4);
1487: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', i_attribute5);
1488: ecx_utils.g_event.addParameterToList('TRIGGER_ID', i_trigger_id);
1489: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1482: ecx_utils.g_event.addParameterToList('PASSWORD', i_password);
1483: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', i_attribute1);
1484: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', i_attribute2);
1485: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', i_attribute3);
1486: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', i_attribute4);
1487: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', i_attribute5);
1488: ecx_utils.g_event.addParameterToList('TRIGGER_ID', i_trigger_id);
1489: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1490: ecx_utils.g_event.addParameterToList('ITEM_TYPE', ecx_utils.g_item_type);
1483: ecx_utils.g_event.addParameterToList('ATTRIBUTE1', i_attribute1);
1484: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', i_attribute2);
1485: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', i_attribute3);
1486: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', i_attribute4);
1487: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', i_attribute5);
1488: ecx_utils.g_event.addParameterToList('TRIGGER_ID', i_trigger_id);
1489: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1490: ecx_utils.g_event.addParameterToList('ITEM_TYPE', ecx_utils.g_item_type);
1491: ecx_utils.g_event.addParameterToList('ITEM_KEY', ecx_utils.g_item_key);
1484: ecx_utils.g_event.addParameterToList('ATTRIBUTE2', i_attribute2);
1485: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', i_attribute3);
1486: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', i_attribute4);
1487: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', i_attribute5);
1488: ecx_utils.g_event.addParameterToList('TRIGGER_ID', i_trigger_id);
1489: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1490: ecx_utils.g_event.addParameterToList('ITEM_TYPE', ecx_utils.g_item_type);
1491: ecx_utils.g_event.addParameterToList('ITEM_KEY', ecx_utils.g_item_key);
1492: ecx_utils.g_event.addParameterToList('ACTIVITY_ID', ecx_utils.g_activity_id);
1485: ecx_utils.g_event.addParameterToList('ATTRIBUTE3', i_attribute3);
1486: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', i_attribute4);
1487: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', i_attribute5);
1488: ecx_utils.g_event.addParameterToList('TRIGGER_ID', i_trigger_id);
1489: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1490: ecx_utils.g_event.addParameterToList('ITEM_TYPE', ecx_utils.g_item_type);
1491: ecx_utils.g_event.addParameterToList('ITEM_KEY', ecx_utils.g_item_key);
1492: ecx_utils.g_event.addParameterToList('ACTIVITY_ID', ecx_utils.g_activity_id);
1493: ecx_utils.g_event.addParameterToList('EVENT_NAME', ecx_utils.g_event.event_name);
1486: ecx_utils.g_event.addParameterToList('ATTRIBUTE4', i_attribute4);
1487: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', i_attribute5);
1488: ecx_utils.g_event.addParameterToList('TRIGGER_ID', i_trigger_id);
1489: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1490: ecx_utils.g_event.addParameterToList('ITEM_TYPE', ecx_utils.g_item_type);
1491: ecx_utils.g_event.addParameterToList('ITEM_KEY', ecx_utils.g_item_key);
1492: ecx_utils.g_event.addParameterToList('ACTIVITY_ID', ecx_utils.g_activity_id);
1493: ecx_utils.g_event.addParameterToList('EVENT_NAME', ecx_utils.g_event.event_name);
1494: ecx_utils.g_event.addParameterToList('EVENT_KEY', ecx_utils.g_event.event_key);
1487: ecx_utils.g_event.addParameterToList('ATTRIBUTE5', i_attribute5);
1488: ecx_utils.g_event.addParameterToList('TRIGGER_ID', i_trigger_id);
1489: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1490: ecx_utils.g_event.addParameterToList('ITEM_TYPE', ecx_utils.g_item_type);
1491: ecx_utils.g_event.addParameterToList('ITEM_KEY', ecx_utils.g_item_key);
1492: ecx_utils.g_event.addParameterToList('ACTIVITY_ID', ecx_utils.g_activity_id);
1493: ecx_utils.g_event.addParameterToList('EVENT_NAME', ecx_utils.g_event.event_name);
1494: ecx_utils.g_event.addParameterToList('EVENT_KEY', ecx_utils.g_event.event_key);
1495: ecx_utils.g_event.event_data := i_xmldoc;
1488: ecx_utils.g_event.addParameterToList('TRIGGER_ID', i_trigger_id);
1489: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1490: ecx_utils.g_event.addParameterToList('ITEM_TYPE', ecx_utils.g_item_type);
1491: ecx_utils.g_event.addParameterToList('ITEM_KEY', ecx_utils.g_item_key);
1492: ecx_utils.g_event.addParameterToList('ACTIVITY_ID', ecx_utils.g_activity_id);
1493: ecx_utils.g_event.addParameterToList('EVENT_NAME', ecx_utils.g_event.event_name);
1494: ecx_utils.g_event.addParameterToList('EVENT_KEY', ecx_utils.g_event.event_key);
1495: ecx_utils.g_event.event_data := i_xmldoc;
1496:
1489: ecx_utils.g_event.addParameterToList('LOGFILE', ecx_utils.g_logfile);
1490: ecx_utils.g_event.addParameterToList('ITEM_TYPE', ecx_utils.g_item_type);
1491: ecx_utils.g_event.addParameterToList('ITEM_KEY', ecx_utils.g_item_key);
1492: ecx_utils.g_event.addParameterToList('ACTIVITY_ID', ecx_utils.g_activity_id);
1493: ecx_utils.g_event.addParameterToList('EVENT_NAME', ecx_utils.g_event.event_name);
1494: ecx_utils.g_event.addParameterToList('EVENT_KEY', ecx_utils.g_event.event_key);
1495: ecx_utils.g_event.event_data := i_xmldoc;
1496:
1497: -- set the from agent
1490: ecx_utils.g_event.addParameterToList('ITEM_TYPE', ecx_utils.g_item_type);
1491: ecx_utils.g_event.addParameterToList('ITEM_KEY', ecx_utils.g_item_key);
1492: ecx_utils.g_event.addParameterToList('ACTIVITY_ID', ecx_utils.g_activity_id);
1493: ecx_utils.g_event.addParameterToList('EVENT_NAME', ecx_utils.g_event.event_name);
1494: ecx_utils.g_event.addParameterToList('EVENT_KEY', ecx_utils.g_event.event_key);
1495: ecx_utils.g_event.event_data := i_xmldoc;
1496:
1497: -- set the from agent
1498: select name
1491: ecx_utils.g_event.addParameterToList('ITEM_KEY', ecx_utils.g_item_key);
1492: ecx_utils.g_event.addParameterToList('ACTIVITY_ID', ecx_utils.g_activity_id);
1493: ecx_utils.g_event.addParameterToList('EVENT_NAME', ecx_utils.g_event.event_name);
1494: ecx_utils.g_event.addParameterToList('EVENT_KEY', ecx_utils.g_event.event_key);
1495: ecx_utils.g_event.event_data := i_xmldoc;
1496:
1497: -- set the from agent
1498: select name
1499: into i_system
1504: if (upper(i_destination_type) = 'SOAP') then
1505: i_from_agt.setname('WF_WS_JMS_OUT');
1506:
1507: -- set default Web Services related attributes
1508: ecx_utils.g_event.addParameterToList('WS_SERVICE_NAMESPACE',
1509: 'urn:defaultSoapMessaging');
1510: ecx_utils.g_event.addParameterToList('WS_PORT_OPERATION',
1511: 'ReceiveDocument');
1512: ecx_utils.g_event.addParameterToList('WS_HEADER_IMPL_CLASS',
1506:
1507: -- set default Web Services related attributes
1508: ecx_utils.g_event.addParameterToList('WS_SERVICE_NAMESPACE',
1509: 'urn:defaultSoapMessaging');
1510: ecx_utils.g_event.addParameterToList('WS_PORT_OPERATION',
1511: 'ReceiveDocument');
1512: ecx_utils.g_event.addParameterToList('WS_HEADER_IMPL_CLASS',
1513: 'oracle.apps.fnd.wf.ws.client.DefaultHeaderGenerator');
1514: ecx_utils.g_event.addParameterToList('WS_RESPONSE_IMPL_CLASS',
1508: ecx_utils.g_event.addParameterToList('WS_SERVICE_NAMESPACE',
1509: 'urn:defaultSoapMessaging');
1510: ecx_utils.g_event.addParameterToList('WS_PORT_OPERATION',
1511: 'ReceiveDocument');
1512: ecx_utils.g_event.addParameterToList('WS_HEADER_IMPL_CLASS',
1513: 'oracle.apps.fnd.wf.ws.client.DefaultHeaderGenerator');
1514: ecx_utils.g_event.addParameterToList('WS_RESPONSE_IMPL_CLASS',
1515: 'oracle.apps.fnd.wf.ws.client.WfWsResponse');
1516: ecx_utils.g_event.addParameterToList('WS_CONSUMER', 'ecx');
1510: ecx_utils.g_event.addParameterToList('WS_PORT_OPERATION',
1511: 'ReceiveDocument');
1512: ecx_utils.g_event.addParameterToList('WS_HEADER_IMPL_CLASS',
1513: 'oracle.apps.fnd.wf.ws.client.DefaultHeaderGenerator');
1514: ecx_utils.g_event.addParameterToList('WS_RESPONSE_IMPL_CLASS',
1515: 'oracle.apps.fnd.wf.ws.client.WfWsResponse');
1516: ecx_utils.g_event.addParameterToList('WS_CONSUMER', 'ecx');
1517:
1518: else
1512: ecx_utils.g_event.addParameterToList('WS_HEADER_IMPL_CLASS',
1513: 'oracle.apps.fnd.wf.ws.client.DefaultHeaderGenerator');
1514: ecx_utils.g_event.addParameterToList('WS_RESPONSE_IMPL_CLASS',
1515: 'oracle.apps.fnd.wf.ws.client.WfWsResponse');
1516: ecx_utils.g_event.addParameterToList('WS_CONSUMER', 'ecx');
1517:
1518: else
1519:
1520: if (upper(i_destination_type) = 'JMS') then
1528: end if;
1529:
1530: end if;
1531: i_from_agt.setsystem(i_system);
1532: ecx_utils.g_event.setFromAgent(i_from_agt);
1533:
1534: if(l_statementEnabled) then
1535: ecx_debug.log(l_statement, 'Calling WF_EVENT.Send for Enqueue', i_method_name);
1536: end if;
1533:
1534: if(l_statementEnabled) then
1535: ecx_debug.log(l_statement, 'Calling WF_EVENT.Send for Enqueue', i_method_name);
1536: end if;
1537: wf_event.send(ecx_utils.g_event);
1538: ecx_errorlog.outbound_log(ecx_utils.g_event);
1539:
1540: if (upper(i_destination_type) = 'SOAP') or
1541: (upper(i_destination_type) = 'JMS') then
1534: if(l_statementEnabled) then
1535: ecx_debug.log(l_statement, 'Calling WF_EVENT.Send for Enqueue', i_method_name);
1536: end if;
1537: wf_event.send(ecx_utils.g_event);
1538: ecx_errorlog.outbound_log(ecx_utils.g_event);
1539:
1540: if (upper(i_destination_type) = 'SOAP') or
1541: (upper(i_destination_type) = 'JMS') then
1542: i_msgid := wf_event.g_msgid; -- JMS QH store enqueue msgid in wf_event.g_msgid
1549: -- exception is raised in this case)
1550: if (ecx_out_wf_qh.retmsg is not null) then
1551: ecx_debug.setErrorInfo(ecx_out_wf_qh.retcode, 30, ecx_out_wf_qh.retmsg);
1552: if(l_unexpectedEnabled) then
1553: ecx_debug.log(l_unexpected, ecx_utils.i_errbuf,i_method_name);
1554: end if;
1555: end if;
1556:
1557: if dbms_lob.istemporary(i_xmldoc) = 1 then
1568: if NOT ( i_direct )
1569: then
1570: ecx_debug.print_log;
1571: ecx_debug.disable_debug;
1572: ecx_utils.g_logfile:=null;
1573: end if;
1574:
1575: EXCEPTION
1576: WHEN ecx_utils.PROGRAM_EXIT then
1572: ecx_utils.g_logfile:=null;
1573: end if;
1574:
1575: EXCEPTION
1576: WHEN ecx_utils.PROGRAM_EXIT then
1577: if dbms_lob.istemporary(i_xmldoc) = 1 then
1578: dbms_lob.freetemporary(i_xmldoc);
1579: end if;
1580: if (l_procedureEnabled) then
1583: if NOT ( i_direct )
1584: then
1585: ecx_debug.print_log;
1586: ecx_debug.disable_debug;
1587: ecx_utils.g_logfile:=null;
1588:
1589: ecx_errorlog.outbound_engine
1590: (
1591: i_trigger_id,
1588:
1589: ecx_errorlog.outbound_engine
1590: (
1591: i_trigger_id,
1592: ecx_utils.i_ret_code,
1593: ecx_utils.i_errbuf,
1594: i_msgid,
1595: null,
1596: i_party_type
1589: ecx_errorlog.outbound_engine
1590: (
1591: i_trigger_id,
1592: ecx_utils.i_ret_code,
1593: ecx_utils.i_errbuf,
1594: i_msgid,
1595: null,
1596: i_party_type
1597: );
1596: i_party_type
1597: );
1598:
1599: else
1600: raise ecx_utils.program_exit;
1601: end if;
1602:
1603: WHEN OTHERS THEN
1604: if (ecx_out_wf_qh.retmsg is null AND ecx_out_wf_qh.retcode = 0)
1610: else
1611: ecx_debug.setErrorInfo(ecx_out_wf_qh.retcode, 30, ecx_out_wf_qh.retmsg);
1612: if(l_unexpectedEnabled) then
1613: ecx_debug.log(l_unexpected, 'msg and code set in queue handler',i_method_name);
1614: ecx_debug.log(l_unexpected,ecx_utils.i_errbuf,i_method_name);
1615: end if;
1616: end if;
1617:
1618: if dbms_lob.istemporary(i_xmldoc) = 1 then
1626: then
1627: IF (ecx_logging_enabled ) THEN
1628: ecx_debug.print_log;
1629: ecx_debug.disable_debug;
1630: ecx_utils.g_logfile:=null;
1631: END IF;
1632: ecx_errorlog.outbound_engine
1633: (
1634: i_trigger_id,
1631: END IF;
1632: ecx_errorlog.outbound_engine
1633: (
1634: i_trigger_id,
1635: ecx_utils.i_ret_code,
1636: ecx_utils.i_errbuf,
1637: i_msgid,
1638: null,
1639: i_party_type
1632: ecx_errorlog.outbound_engine
1633: (
1634: i_trigger_id,
1635: ecx_utils.i_ret_code,
1636: ecx_utils.i_errbuf,
1637: i_msgid,
1638: null,
1639: i_party_type
1640: );
1638: null,
1639: i_party_type
1640: );
1641: else
1642: raise ecx_utils.program_exit;
1643: end if;
1644:
1645: end putmsg;
1646:
1704: Populate the Parameters in the global event Object .if it is null ,
1705: initialize and create a new Instance and populate the variables
1706: **/
1707:
1708: if ecx_utils.g_event is null
1709: then
1710: wf_event_t.initialize(ecx_utils.g_event);
1711:
1712: end if;
1706: **/
1707:
1708: if ecx_utils.g_event is null
1709: then
1710: wf_event_t.initialize(ecx_utils.g_event);
1711:
1712: end if;
1713:
1714: /* Add the above Parameters to the Global Event Message Object
1713:
1714: /* Add the above Parameters to the Global Event Message Object
1715: For backward compatability */
1716:
1717: ecx_utils.g_event.addparametertolist('PARAMETER1',i_parameter1);
1718: ecx_utils.g_event.addparametertolist('PARAMETER2',i_parameter2);
1719: ecx_utils.g_event.addparametertolist('PARAMETER3',i_parameter3);
1720: ecx_utils.g_event.addparametertolist('PARAMETER4',i_parameter4);
1721: ecx_utils.g_event.addparametertolist('PARAMETER5',i_parameter5);
1714: /* Add the above Parameters to the Global Event Message Object
1715: For backward compatability */
1716:
1717: ecx_utils.g_event.addparametertolist('PARAMETER1',i_parameter1);
1718: ecx_utils.g_event.addparametertolist('PARAMETER2',i_parameter2);
1719: ecx_utils.g_event.addparametertolist('PARAMETER3',i_parameter3);
1720: ecx_utils.g_event.addparametertolist('PARAMETER4',i_parameter4);
1721: ecx_utils.g_event.addparametertolist('PARAMETER5',i_parameter5);
1722:
1715: For backward compatability */
1716:
1717: ecx_utils.g_event.addparametertolist('PARAMETER1',i_parameter1);
1718: ecx_utils.g_event.addparametertolist('PARAMETER2',i_parameter2);
1719: ecx_utils.g_event.addparametertolist('PARAMETER3',i_parameter3);
1720: ecx_utils.g_event.addparametertolist('PARAMETER4',i_parameter4);
1721: ecx_utils.g_event.addparametertolist('PARAMETER5',i_parameter5);
1722:
1723: putmsg( i_transaction_type ,
1716:
1717: ecx_utils.g_event.addparametertolist('PARAMETER1',i_parameter1);
1718: ecx_utils.g_event.addparametertolist('PARAMETER2',i_parameter2);
1719: ecx_utils.g_event.addparametertolist('PARAMETER3',i_parameter3);
1720: ecx_utils.g_event.addparametertolist('PARAMETER4',i_parameter4);
1721: ecx_utils.g_event.addparametertolist('PARAMETER5',i_parameter5);
1722:
1723: putmsg( i_transaction_type ,
1724: i_transaction_subtype ,
1717: ecx_utils.g_event.addparametertolist('PARAMETER1',i_parameter1);
1718: ecx_utils.g_event.addparametertolist('PARAMETER2',i_parameter2);
1719: ecx_utils.g_event.addparametertolist('PARAMETER3',i_parameter3);
1720: ecx_utils.g_event.addparametertolist('PARAMETER4',i_parameter4);
1721: ecx_utils.g_event.addparametertolist('PARAMETER5',i_parameter5);
1722:
1723: putmsg( i_transaction_type ,
1724: i_transaction_subtype ,
1725: i_party_id ,
1750: if(l_unexpectedEnabled) then
1751: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_OUTBOUND.putmsg ',
1752: i_method_name);
1753: end if;
1754: raise ecx_utils.PROGRAM_EXIT;
1755: end putmsg;
1756:
1757: procedure GETXML
1758: (
1815: end if;
1816:
1817: IF (ecx_logging_enabled ) THEN
1818: --- Sets the Log Directory in both Standalone and the Embedded mode
1819: ecx_utils.getLogDirectory;
1820:
1821: /** Fetch the Run Id for the Transaction **/
1822: open get_run_s;
1823: fetch get_run_s
1820:
1821: /** Fetch the Run Id for the Transaction **/
1822: open get_run_s;
1823: fetch get_run_s
1824: into ecx_utils.g_run_id;
1825: close get_run_s;
1826:
1827: ecx_utils.g_logfile :=i_message_standard||'OUT'||
1828: i_transaction_type||i_transaction_subtype||i_document_id||ecx_utils.g_run_id||'.log';
1823: fetch get_run_s
1824: into ecx_utils.g_run_id;
1825: close get_run_s;
1826:
1827: ecx_utils.g_logfile :=i_message_standard||'OUT'||
1828: i_transaction_type||i_transaction_subtype||i_document_id||ecx_utils.g_run_id||'.log';
1829:
1830: p_aflog_module_name := '';
1831: IF (i_message_standard is not null) THEN
1824: into ecx_utils.g_run_id;
1825: close get_run_s;
1826:
1827: ecx_utils.g_logfile :=i_message_standard||'OUT'||
1828: i_transaction_type||i_transaction_subtype||i_document_id||ecx_utils.g_run_id||'.log';
1829:
1830: p_aflog_module_name := '';
1831: IF (i_message_standard is not null) THEN
1832: p_aflog_module_name := p_aflog_module_name||i_message_standard||'.';
1840: END IF;
1841: IF (i_document_id is not null) THEN
1842: p_aflog_module_name := p_aflog_module_name||i_document_id||'.';
1843: END IF;
1844: IF (ecx_utils.g_run_id is not null) THEN
1845: p_aflog_module_name := p_aflog_module_name||ecx_utils.g_run_id;
1846: END IF;
1847: p_aflog_module_name := p_aflog_module_name||'.log';
1848: ecx_debug.enable_debug_new(i_debug_level,ecx_utils.g_logdir,ecx_utils.g_logfile, p_aflog_module_name);
1841: IF (i_document_id is not null) THEN
1842: p_aflog_module_name := p_aflog_module_name||i_document_id||'.';
1843: END IF;
1844: IF (ecx_utils.g_run_id is not null) THEN
1845: p_aflog_module_name := p_aflog_module_name||ecx_utils.g_run_id;
1846: END IF;
1847: p_aflog_module_name := p_aflog_module_name||'.log';
1848: ecx_debug.enable_debug_new(i_debug_level,ecx_utils.g_logdir,ecx_utils.g_logfile, p_aflog_module_name);
1849: END IF;
1844: IF (ecx_utils.g_run_id is not null) THEN
1845: p_aflog_module_name := p_aflog_module_name||ecx_utils.g_run_id;
1846: END IF;
1847: p_aflog_module_name := p_aflog_module_name||'.log';
1848: ecx_debug.enable_debug_new(i_debug_level,ecx_utils.g_logdir,ecx_utils.g_logfile, p_aflog_module_name);
1849: END IF;
1850:
1851: IF g_instlmode = 'EMBEDDED' THEN
1852: IF (ecx_logging_enabled ) THEN
1855: i_log_file := 'Please ensure that FND-Logging is enabled for module '||ecx_debug.g_sqlprefix||'%';
1856: END IF;
1857: ELSE
1858: if (ecx_logging_enabled) then
1859: i_log_file := ecx_utils.g_logdir||ecx_utils.getFileSeparator()||ecx_utils.g_logfile;
1860: else
1861: i_log_file := 'Please ensure that logging is enabled';
1862: end if;
1863: END IF;
1906: then
1907: dbms_lob.freetemporary (i_tmpxmldoc);
1908: end if;
1909: ecx_debug.setErrorInfo(0, 10, 'ECX_SUCCESSFUL_EXECUTION');
1910: i_ret_code := ecx_utils.i_ret_code;
1911: i_errbuf := ecx_utils.i_errbuf;
1912:
1913: if(ecx_utils.i_ret_code = 0 ) then
1914: if(l_statementEnabled) then
1907: dbms_lob.freetemporary (i_tmpxmldoc);
1908: end if;
1909: ecx_debug.setErrorInfo(0, 10, 'ECX_SUCCESSFUL_EXECUTION');
1910: i_ret_code := ecx_utils.i_ret_code;
1911: i_errbuf := ecx_utils.i_errbuf;
1912:
1913: if(ecx_utils.i_ret_code = 0 ) then
1914: if(l_statementEnabled) then
1915: ecx_debug.log(l_statement, 'Ret Code',ecx_utils.i_ret_code,i_method_name);
1909: ecx_debug.setErrorInfo(0, 10, 'ECX_SUCCESSFUL_EXECUTION');
1910: i_ret_code := ecx_utils.i_ret_code;
1911: i_errbuf := ecx_utils.i_errbuf;
1912:
1913: if(ecx_utils.i_ret_code = 0 ) then
1914: if(l_statementEnabled) then
1915: ecx_debug.log(l_statement, 'Ret Code',ecx_utils.i_ret_code,i_method_name);
1916: ecx_debug.log(l_statement, 'Ret Msg ',ecx_utils.i_errbuf,i_method_name);
1917: end if;
1911: i_errbuf := ecx_utils.i_errbuf;
1912:
1913: if(ecx_utils.i_ret_code = 0 ) then
1914: if(l_statementEnabled) then
1915: ecx_debug.log(l_statement, 'Ret Code',ecx_utils.i_ret_code,i_method_name);
1916: ecx_debug.log(l_statement, 'Ret Msg ',ecx_utils.i_errbuf,i_method_name);
1917: end if;
1918: else
1919: if(l_unexpectedEnabled) then
1912:
1913: if(ecx_utils.i_ret_code = 0 ) then
1914: if(l_statementEnabled) then
1915: ecx_debug.log(l_statement, 'Ret Code',ecx_utils.i_ret_code,i_method_name);
1916: ecx_debug.log(l_statement, 'Ret Msg ',ecx_utils.i_errbuf,i_method_name);
1917: end if;
1918: else
1919: if(l_unexpectedEnabled) then
1920: ecx_debug.log(l_unexpected, 'Ret Code',ecx_utils.i_ret_code,i_method_name);
1916: ecx_debug.log(l_statement, 'Ret Msg ',ecx_utils.i_errbuf,i_method_name);
1917: end if;
1918: else
1919: if(l_unexpectedEnabled) then
1920: ecx_debug.log(l_unexpected, 'Ret Code',ecx_utils.i_ret_code,i_method_name);
1921: ecx_debug.log(l_unexpected, 'Ret Msg ',ecx_utils.i_errbuf,i_method_name);
1922: end if;
1923: end if;
1924:
1917: end if;
1918: else
1919: if(l_unexpectedEnabled) then
1920: ecx_debug.log(l_unexpected, 'Ret Code',ecx_utils.i_ret_code,i_method_name);
1921: ecx_debug.log(l_unexpected, 'Ret Msg ',ecx_utils.i_errbuf,i_method_name);
1922: end if;
1923: end if;
1924:
1925: if(l_procedureEnabled) then
1929: ecx_debug.print_log;
1930: ecx_debug.disable_debug;
1931: END IF;
1932: EXCEPTION
1933: WHEN ecx_utils.program_exit THEN
1934: i_ret_code := ecx_utils.i_ret_code;
1935: i_errbuf := ecx_utils.i_errbuf;
1936: if(l_unexpectedEnabled) then
1937: ecx_debug.log(l_unexpected,ecx_utils.i_errbuf,i_method_name);
1930: ecx_debug.disable_debug;
1931: END IF;
1932: EXCEPTION
1933: WHEN ecx_utils.program_exit THEN
1934: i_ret_code := ecx_utils.i_ret_code;
1935: i_errbuf := ecx_utils.i_errbuf;
1936: if(l_unexpectedEnabled) then
1937: ecx_debug.log(l_unexpected,ecx_utils.i_errbuf,i_method_name);
1938: end if;
1931: END IF;
1932: EXCEPTION
1933: WHEN ecx_utils.program_exit THEN
1934: i_ret_code := ecx_utils.i_ret_code;
1935: i_errbuf := ecx_utils.i_errbuf;
1936: if(l_unexpectedEnabled) then
1937: ecx_debug.log(l_unexpected,ecx_utils.i_errbuf,i_method_name);
1938: end if;
1939: if(l_procedureEnabled) then
1933: WHEN ecx_utils.program_exit THEN
1934: i_ret_code := ecx_utils.i_ret_code;
1935: i_errbuf := ecx_utils.i_errbuf;
1936: if(l_unexpectedEnabled) then
1937: ecx_debug.log(l_unexpected,ecx_utils.i_errbuf,i_method_name);
1938: end if;
1939: if(l_procedureEnabled) then
1940: ecx_debug.pop(i_method_name);
1941: end if;
1952: ecx_debug.setErrorInfo(2, 30, SQLERRM || ' - ECX_OUTBOUND.PUTMSG');
1953: if(l_unexpectedEnabled) then
1954: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_OUTBOUND.PUTMSG',i_method_name);
1955: end if;
1956: i_ret_code := ecx_utils.i_ret_code;
1957: i_errbuf := ecx_utils.i_errbuf;
1958: if(l_procedureEnabled) then
1959: ecx_debug.pop(i_method_name);
1960: end if;
1953: if(l_unexpectedEnabled) then
1954: ecx_debug.log(l_unexpected,'ECX', SQLERRM || ' - ECX_OUTBOUND.PUTMSG',i_method_name);
1955: end if;
1956: i_ret_code := ecx_utils.i_ret_code;
1957: i_errbuf := ecx_utils.i_errbuf;
1958: if(l_procedureEnabled) then
1959: ecx_debug.pop(i_method_name);
1960: end if;
1961: -- free i_tmpxmldoc