63: --
64:
65: l_entity_key2 pa_wf_processes.entity_key2%TYPE;
66: l_description pa_wf_processes.description%TYPE;
67: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
68:
69: BEGIN
70:
71: IF P_PA_DEBUG_MODE = 'Y' Then
67: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
68:
69: BEGIN
70:
71: IF P_PA_DEBUG_MODE = 'Y' Then
72: PA_DEBUG.g_err_stage := 'Procedure Insert_WF_Processes - Begin';
73: PA_DEBUG.write
74: (x_Module => g_module_name
75: ,x_Msg => pa_debug.g_err_stage
68:
69: BEGIN
70:
71: IF P_PA_DEBUG_MODE = 'Y' Then
72: PA_DEBUG.g_err_stage := 'Procedure Insert_WF_Processes - Begin';
73: PA_DEBUG.write
74: (x_Module => g_module_name
75: ,x_Msg => pa_debug.g_err_stage
76: ,x_Log_Level => 3);
69: BEGIN
70:
71: IF P_PA_DEBUG_MODE = 'Y' Then
72: PA_DEBUG.g_err_stage := 'Procedure Insert_WF_Processes - Begin';
73: PA_DEBUG.write
74: (x_Module => g_module_name
75: ,x_Msg => pa_debug.g_err_stage
76: ,x_Log_Level => 3);
77: END IF;
71: IF P_PA_DEBUG_MODE = 'Y' Then
72: PA_DEBUG.g_err_stage := 'Procedure Insert_WF_Processes - Begin';
73: PA_DEBUG.write
74: (x_Module => g_module_name
75: ,x_Msg => pa_debug.g_err_stage
76: ,x_Log_Level => 3);
77: END IF;
78:
79: IF P_PA_DEBUG_MODE = 'Y' Then
75: ,x_Msg => pa_debug.g_err_stage
76: ,x_Log_Level => 3);
77: END IF;
78:
79: IF P_PA_DEBUG_MODE = 'Y' Then
80: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_wf_type_code ' || p_wf_type_code;
81: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_type ' || p_item_type;
82: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1;
83: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2;
76: ,x_Log_Level => 3);
77: END IF;
78:
79: IF P_PA_DEBUG_MODE = 'Y' Then
80: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_wf_type_code ' || p_wf_type_code;
81: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_type ' || p_item_type;
82: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1;
83: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2;
84: PA_DEBUG.write
77: END IF;
78:
79: IF P_PA_DEBUG_MODE = 'Y' Then
80: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_wf_type_code ' || p_wf_type_code;
81: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_type ' || p_item_type;
82: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1;
83: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2;
84: PA_DEBUG.write
85: (x_Module => g_module_name
78:
79: IF P_PA_DEBUG_MODE = 'Y' Then
80: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_wf_type_code ' || p_wf_type_code;
81: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_type ' || p_item_type;
82: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1;
83: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2;
84: PA_DEBUG.write
85: (x_Module => g_module_name
86: ,x_Msg => pa_debug.g_err_stage
79: IF P_PA_DEBUG_MODE = 'Y' Then
80: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_wf_type_code ' || p_wf_type_code;
81: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_type ' || p_item_type;
82: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1;
83: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2;
84: PA_DEBUG.write
85: (x_Module => g_module_name
86: ,x_Msg => pa_debug.g_err_stage
87: ,x_Log_Level => 3);
80: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_wf_type_code ' || p_wf_type_code;
81: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_type ' || p_item_type;
82: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1;
83: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2;
84: PA_DEBUG.write
85: (x_Module => g_module_name
86: ,x_Msg => pa_debug.g_err_stage
87: ,x_Log_Level => 3);
88: END IF;
82: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1;
83: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2;
84: PA_DEBUG.write
85: (x_Module => g_module_name
86: ,x_Msg => pa_debug.g_err_stage
87: ,x_Log_Level => 3);
88: END IF;
89:
90: -- Standard Begin of API Savepoint
113: ELSE
114: l_entity_key2 := p_entity_key2;
115: END IF;
116:
117: IF P_PA_DEBUG_MODE = 'Y' Then
118: PA_DEBUG.g_err_stage := ' l_entity_key2 ' || l_entity_key2;
119: PA_DEBUG.write
120: (x_Module => g_module_name
121: ,x_Msg => pa_debug.g_err_stage
114: l_entity_key2 := p_entity_key2;
115: END IF;
116:
117: IF P_PA_DEBUG_MODE = 'Y' Then
118: PA_DEBUG.g_err_stage := ' l_entity_key2 ' || l_entity_key2;
119: PA_DEBUG.write
120: (x_Module => g_module_name
121: ,x_Msg => pa_debug.g_err_stage
122: ,x_Log_Level => 3);
115: END IF;
116:
117: IF P_PA_DEBUG_MODE = 'Y' Then
118: PA_DEBUG.g_err_stage := ' l_entity_key2 ' || l_entity_key2;
119: PA_DEBUG.write
120: (x_Module => g_module_name
121: ,x_Msg => pa_debug.g_err_stage
122: ,x_Log_Level => 3);
123: END IF;
117: IF P_PA_DEBUG_MODE = 'Y' Then
118: PA_DEBUG.g_err_stage := ' l_entity_key2 ' || l_entity_key2;
119: PA_DEBUG.write
120: (x_Module => g_module_name
121: ,x_Msg => pa_debug.g_err_stage
122: ,x_Log_Level => 3);
123: END IF;
124:
125: IF (p_description = PA_INTERFACE_UTILS_PUB.G_PA_MISS_CHAR)
129: l_description := p_description;
130: END IF;
131:
132: -- ----------------------------------------------------------------------------------
133: IF P_PA_DEBUG_MODE = 'Y' Then
134: pa_debug.g_err_stage := 'LOG:'||'Inserting into pa_wf_processes: wf_type_code['||p_wf_type_code||']';
135: pa_debug.g_err_stage := pa_debug.g_err_stage||'ItemType['||p_item_type||']ItemKey['||p_item_key||']';
136: pa_debug.g_err_stage := pa_debug.g_err_stage||'Key1['||p_entity_key1||']Key2['||l_entity_key2||']';
137: PA_DEBUG.write
130: END IF;
131:
132: -- ----------------------------------------------------------------------------------
133: IF P_PA_DEBUG_MODE = 'Y' Then
134: pa_debug.g_err_stage := 'LOG:'||'Inserting into pa_wf_processes: wf_type_code['||p_wf_type_code||']';
135: pa_debug.g_err_stage := pa_debug.g_err_stage||'ItemType['||p_item_type||']ItemKey['||p_item_key||']';
136: pa_debug.g_err_stage := pa_debug.g_err_stage||'Key1['||p_entity_key1||']Key2['||l_entity_key2||']';
137: PA_DEBUG.write
138: (x_Module => 'pa_workflow_utils.Insert_WF_Processes'
131:
132: -- ----------------------------------------------------------------------------------
133: IF P_PA_DEBUG_MODE = 'Y' Then
134: pa_debug.g_err_stage := 'LOG:'||'Inserting into pa_wf_processes: wf_type_code['||p_wf_type_code||']';
135: pa_debug.g_err_stage := pa_debug.g_err_stage||'ItemType['||p_item_type||']ItemKey['||p_item_key||']';
136: pa_debug.g_err_stage := pa_debug.g_err_stage||'Key1['||p_entity_key1||']Key2['||l_entity_key2||']';
137: PA_DEBUG.write
138: (x_Module => 'pa_workflow_utils.Insert_WF_Processes'
139: ,x_Msg => pa_debug.g_err_stage
132: -- ----------------------------------------------------------------------------------
133: IF P_PA_DEBUG_MODE = 'Y' Then
134: pa_debug.g_err_stage := 'LOG:'||'Inserting into pa_wf_processes: wf_type_code['||p_wf_type_code||']';
135: pa_debug.g_err_stage := pa_debug.g_err_stage||'ItemType['||p_item_type||']ItemKey['||p_item_key||']';
136: pa_debug.g_err_stage := pa_debug.g_err_stage||'Key1['||p_entity_key1||']Key2['||l_entity_key2||']';
137: PA_DEBUG.write
138: (x_Module => 'pa_workflow_utils.Insert_WF_Processes'
139: ,x_Msg => pa_debug.g_err_stage
140: ,x_Log_Level => 3);
133: IF P_PA_DEBUG_MODE = 'Y' Then
134: pa_debug.g_err_stage := 'LOG:'||'Inserting into pa_wf_processes: wf_type_code['||p_wf_type_code||']';
135: pa_debug.g_err_stage := pa_debug.g_err_stage||'ItemType['||p_item_type||']ItemKey['||p_item_key||']';
136: pa_debug.g_err_stage := pa_debug.g_err_stage||'Key1['||p_entity_key1||']Key2['||l_entity_key2||']';
137: PA_DEBUG.write
138: (x_Module => 'pa_workflow_utils.Insert_WF_Processes'
139: ,x_Msg => pa_debug.g_err_stage
140: ,x_Log_Level => 3);
141: END IF;
135: pa_debug.g_err_stage := pa_debug.g_err_stage||'ItemType['||p_item_type||']ItemKey['||p_item_key||']';
136: pa_debug.g_err_stage := pa_debug.g_err_stage||'Key1['||p_entity_key1||']Key2['||l_entity_key2||']';
137: PA_DEBUG.write
138: (x_Module => 'pa_workflow_utils.Insert_WF_Processes'
139: ,x_Msg => pa_debug.g_err_stage
140: ,x_Log_Level => 3);
141: END IF;
142:
143: INSERT INTO pa_wf_processes
166: , fnd_global.user_id
167: , fnd_global.login_id
168: );
169:
170: IF P_PA_DEBUG_MODE = 'Y' Then
171: PA_DEBUG.g_err_stage := 'Procedure Insert_WF_Processes - End';
172: PA_DEBUG.write
173: (x_Module => g_module_name
174: ,x_Msg => pa_debug.g_err_stage
167: , fnd_global.login_id
168: );
169:
170: IF P_PA_DEBUG_MODE = 'Y' Then
171: PA_DEBUG.g_err_stage := 'Procedure Insert_WF_Processes - End';
172: PA_DEBUG.write
173: (x_Module => g_module_name
174: ,x_Msg => pa_debug.g_err_stage
175: ,x_Log_Level => 3);
168: );
169:
170: IF P_PA_DEBUG_MODE = 'Y' Then
171: PA_DEBUG.g_err_stage := 'Procedure Insert_WF_Processes - End';
172: PA_DEBUG.write
173: (x_Module => g_module_name
174: ,x_Msg => pa_debug.g_err_stage
175: ,x_Log_Level => 3);
176: END IF;
170: IF P_PA_DEBUG_MODE = 'Y' Then
171: PA_DEBUG.g_err_stage := 'Procedure Insert_WF_Processes - End';
172: PA_DEBUG.write
173: (x_Module => g_module_name
174: ,x_Msg => pa_debug.g_err_stage
175: ,x_Log_Level => 3);
176: END IF;
177:
178: EXCEPTION
198: l_msg_data VARCHAR2(500) := 0;
199: l_data VARCHAR2(500) := 0;
200: l_return_status VARCHAR2(1) ;
201: l_msg_index_out NUMBER;
202: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
203:
204: BEGIN
205: IF P_PA_DEBUG_MODE = 'Y' Then
206: PA_DEBUG.g_err_stage := 'Procedure Set_Global_Attr - Begin';
201: l_msg_index_out NUMBER;
202: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
203:
204: BEGIN
205: IF P_PA_DEBUG_MODE = 'Y' Then
206: PA_DEBUG.g_err_stage := 'Procedure Set_Global_Attr - Begin';
207: PA_DEBUG.write
208: (x_Module => g_module_name
209: ,x_Msg => pa_debug.g_err_stage
202: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
203:
204: BEGIN
205: IF P_PA_DEBUG_MODE = 'Y' Then
206: PA_DEBUG.g_err_stage := 'Procedure Set_Global_Attr - Begin';
207: PA_DEBUG.write
208: (x_Module => g_module_name
209: ,x_Msg => pa_debug.g_err_stage
210: ,x_Log_Level => 3);
203:
204: BEGIN
205: IF P_PA_DEBUG_MODE = 'Y' Then
206: PA_DEBUG.g_err_stage := 'Procedure Set_Global_Attr - Begin';
207: PA_DEBUG.write
208: (x_Module => g_module_name
209: ,x_Msg => pa_debug.g_err_stage
210: ,x_Log_Level => 3);
211: END IF;
205: IF P_PA_DEBUG_MODE = 'Y' Then
206: PA_DEBUG.g_err_stage := 'Procedure Set_Global_Attr - Begin';
207: PA_DEBUG.write
208: (x_Module => g_module_name
209: ,x_Msg => pa_debug.g_err_stage
210: ,x_Log_Level => 3);
211: END IF;
212:
213: IF P_PA_DEBUG_MODE = 'Y' Then
209: ,x_Msg => pa_debug.g_err_stage
210: ,x_Log_Level => 3);
211: END IF;
212:
213: IF P_PA_DEBUG_MODE = 'Y' Then
214: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_item_type ' || p_item_type;
215: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_key ' || p_item_key;
216: PA_DEBUG.write
217: (x_Module => g_module_name
210: ,x_Log_Level => 3);
211: END IF;
212:
213: IF P_PA_DEBUG_MODE = 'Y' Then
214: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_item_type ' || p_item_type;
215: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_key ' || p_item_key;
216: PA_DEBUG.write
217: (x_Module => g_module_name
218: ,x_Msg => pa_debug.g_err_stage
211: END IF;
212:
213: IF P_PA_DEBUG_MODE = 'Y' Then
214: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_item_type ' || p_item_type;
215: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_key ' || p_item_key;
216: PA_DEBUG.write
217: (x_Module => g_module_name
218: ,x_Msg => pa_debug.g_err_stage
219: ,x_Log_Level => 3);
212:
213: IF P_PA_DEBUG_MODE = 'Y' Then
214: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_item_type ' || p_item_type;
215: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_key ' || p_item_key;
216: PA_DEBUG.write
217: (x_Module => g_module_name
218: ,x_Msg => pa_debug.g_err_stage
219: ,x_Log_Level => 3);
220: END IF;
214: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_item_type ' || p_item_type;
215: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_key ' || p_item_key;
216: PA_DEBUG.write
217: (x_Module => g_module_name
218: ,x_Msg => pa_debug.g_err_stage
219: ,x_Log_Level => 3);
220: END IF;
221:
222: p_err_code := 0;
224: (itemtype => p_item_type,
225: itemkey => p_item_key,
226: aname => 'RESPONSIBILITY_ID' );
227:
228: IF P_PA_DEBUG_MODE = 'Y' Then
229: PA_DEBUG.g_err_stage := ' l_resp_id ' || l_resp_id;
230: PA_DEBUG.write
231: (x_Module => g_module_name
232: ,x_Msg => pa_debug.g_err_stage
225: itemkey => p_item_key,
226: aname => 'RESPONSIBILITY_ID' );
227:
228: IF P_PA_DEBUG_MODE = 'Y' Then
229: PA_DEBUG.g_err_stage := ' l_resp_id ' || l_resp_id;
230: PA_DEBUG.write
231: (x_Module => g_module_name
232: ,x_Msg => pa_debug.g_err_stage
233: ,x_Log_Level => 3);
226: aname => 'RESPONSIBILITY_ID' );
227:
228: IF P_PA_DEBUG_MODE = 'Y' Then
229: PA_DEBUG.g_err_stage := ' l_resp_id ' || l_resp_id;
230: PA_DEBUG.write
231: (x_Module => g_module_name
232: ,x_Msg => pa_debug.g_err_stage
233: ,x_Log_Level => 3);
234: END IF;
228: IF P_PA_DEBUG_MODE = 'Y' Then
229: PA_DEBUG.g_err_stage := ' l_resp_id ' || l_resp_id;
230: PA_DEBUG.write
231: (x_Module => g_module_name
232: ,x_Msg => pa_debug.g_err_stage
233: ,x_Log_Level => 3);
234: END IF;
235:
236: l_workflow_started_by_id := wf_engine.GetItemAttrNumber
237: (itemtype => p_item_type,
238: itemkey => p_item_key,
239: aname => 'WORKFLOW_STARTED_BY_ID' );
240:
241: IF P_PA_DEBUG_MODE = 'Y' Then
242: PA_DEBUG.g_err_stage := ' l_workflow_started_by_id ' || l_workflow_started_by_id;
243: PA_DEBUG.write
244: (x_Module => g_module_name
245: ,x_Msg => pa_debug.g_err_stage
238: itemkey => p_item_key,
239: aname => 'WORKFLOW_STARTED_BY_ID' );
240:
241: IF P_PA_DEBUG_MODE = 'Y' Then
242: PA_DEBUG.g_err_stage := ' l_workflow_started_by_id ' || l_workflow_started_by_id;
243: PA_DEBUG.write
244: (x_Module => g_module_name
245: ,x_Msg => pa_debug.g_err_stage
246: ,x_Log_Level => 3);
239: aname => 'WORKFLOW_STARTED_BY_ID' );
240:
241: IF P_PA_DEBUG_MODE = 'Y' Then
242: PA_DEBUG.g_err_stage := ' l_workflow_started_by_id ' || l_workflow_started_by_id;
243: PA_DEBUG.write
244: (x_Module => g_module_name
245: ,x_Msg => pa_debug.g_err_stage
246: ,x_Log_Level => 3);
247: END IF;
241: IF P_PA_DEBUG_MODE = 'Y' Then
242: PA_DEBUG.g_err_stage := ' l_workflow_started_by_id ' || l_workflow_started_by_id;
243: PA_DEBUG.write
244: (x_Module => g_module_name
245: ,x_Msg => pa_debug.g_err_stage
246: ,x_Log_Level => 3);
247: END IF;
248:
249: -- Based on the Responsibility, Intialize the Application
252: , resp_id => l_resp_id
253: , resp_appl_id => pa_workflow_utils.get_application_id(l_resp_id)
254: );
255:
256: IF P_PA_DEBUG_MODE = 'Y' Then
257: PA_DEBUG.g_err_stage := 'Procedure Set_Global_Attr - End';
258: PA_DEBUG.write
259: (x_Module => g_module_name
260: ,x_Msg => pa_debug.g_err_stage
253: , resp_appl_id => pa_workflow_utils.get_application_id(l_resp_id)
254: );
255:
256: IF P_PA_DEBUG_MODE = 'Y' Then
257: PA_DEBUG.g_err_stage := 'Procedure Set_Global_Attr - End';
258: PA_DEBUG.write
259: (x_Module => g_module_name
260: ,x_Msg => pa_debug.g_err_stage
261: ,x_Log_Level => 3);
254: );
255:
256: IF P_PA_DEBUG_MODE = 'Y' Then
257: PA_DEBUG.g_err_stage := 'Procedure Set_Global_Attr - End';
258: PA_DEBUG.write
259: (x_Module => g_module_name
260: ,x_Msg => pa_debug.g_err_stage
261: ,x_Log_Level => 3);
262: END IF;
256: IF P_PA_DEBUG_MODE = 'Y' Then
257: PA_DEBUG.g_err_stage := 'Procedure Set_Global_Attr - End';
258: PA_DEBUG.write
259: (x_Module => g_module_name
260: ,x_Msg => pa_debug.g_err_stage
261: ,x_Log_Level => 3);
262: END IF;
263:
264:
306: l_msg_count NUMBER := 0;
307: l_msg_text VARCHAR2(2000) := NULL;
308: l_encoded_mesg VARCHAR2(2000);
309:
310: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
311: BEGIN
312: IF P_PA_DEBUG_MODE = 'Y' Then
313: PA_DEBUG.g_err_stage := 'Procedure Set_Notification_Messages - Begin';
314: PA_DEBUG.write
308: l_encoded_mesg VARCHAR2(2000);
309:
310: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
311: BEGIN
312: IF P_PA_DEBUG_MODE = 'Y' Then
313: PA_DEBUG.g_err_stage := 'Procedure Set_Notification_Messages - Begin';
314: PA_DEBUG.write
315: (x_Module => g_module_name
316: ,x_Msg => pa_debug.g_err_stage
309:
310: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
311: BEGIN
312: IF P_PA_DEBUG_MODE = 'Y' Then
313: PA_DEBUG.g_err_stage := 'Procedure Set_Notification_Messages - Begin';
314: PA_DEBUG.write
315: (x_Module => g_module_name
316: ,x_Msg => pa_debug.g_err_stage
317: ,x_Log_Level => 3);
310: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
311: BEGIN
312: IF P_PA_DEBUG_MODE = 'Y' Then
313: PA_DEBUG.g_err_stage := 'Procedure Set_Notification_Messages - Begin';
314: PA_DEBUG.write
315: (x_Module => g_module_name
316: ,x_Msg => pa_debug.g_err_stage
317: ,x_Log_Level => 3);
318: END IF;
312: IF P_PA_DEBUG_MODE = 'Y' Then
313: PA_DEBUG.g_err_stage := 'Procedure Set_Notification_Messages - Begin';
314: PA_DEBUG.write
315: (x_Module => g_module_name
316: ,x_Msg => pa_debug.g_err_stage
317: ,x_Log_Level => 3);
318: END IF;
319:
320: IF P_PA_DEBUG_MODE = 'Y' Then
316: ,x_Msg => pa_debug.g_err_stage
317: ,x_Log_Level => 3);
318: END IF;
319:
320: IF P_PA_DEBUG_MODE = 'Y' Then
321: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_item_type ' || p_item_type;
322: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_key ' || p_item_key;
323: PA_DEBUG.write
324: (x_Module => g_module_name
317: ,x_Log_Level => 3);
318: END IF;
319:
320: IF P_PA_DEBUG_MODE = 'Y' Then
321: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_item_type ' || p_item_type;
322: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_key ' || p_item_key;
323: PA_DEBUG.write
324: (x_Module => g_module_name
325: ,x_Msg => pa_debug.g_err_stage
318: END IF;
319:
320: IF P_PA_DEBUG_MODE = 'Y' Then
321: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_item_type ' || p_item_type;
322: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_key ' || p_item_key;
323: PA_DEBUG.write
324: (x_Module => g_module_name
325: ,x_Msg => pa_debug.g_err_stage
326: ,x_Log_Level => 3);
319:
320: IF P_PA_DEBUG_MODE = 'Y' Then
321: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_item_type ' || p_item_type;
322: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_key ' || p_item_key;
323: PA_DEBUG.write
324: (x_Module => g_module_name
325: ,x_Msg => pa_debug.g_err_stage
326: ,x_Log_Level => 3);
327: END IF;
321: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_item_type ' || p_item_type;
322: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_item_key ' || p_item_key;
323: PA_DEBUG.write
324: (x_Module => g_module_name
325: ,x_Msg => pa_debug.g_err_stage
326: ,x_Log_Level => 3);
327: END IF;
328:
329: -- Get l_msg_count for Subsequent Processing
330: l_msg_count := FND_MSG_PUB.COUNT_MSG;
331:
332: -- Intialize First Ten WF Error Message Attributes
333:
334: IF P_PA_DEBUG_MODE = 'Y' Then
335: PA_DEBUG.g_err_stage := ' Calling wf_engine.SetItemAttrText in loop - Start ';
336: PA_DEBUG.write
337: (x_Module => g_module_name
338: ,x_Msg => pa_debug.g_err_stage
331:
332: -- Intialize First Ten WF Error Message Attributes
333:
334: IF P_PA_DEBUG_MODE = 'Y' Then
335: PA_DEBUG.g_err_stage := ' Calling wf_engine.SetItemAttrText in loop - Start ';
336: PA_DEBUG.write
337: (x_Module => g_module_name
338: ,x_Msg => pa_debug.g_err_stage
339: ,x_Log_Level => 3);
332: -- Intialize First Ten WF Error Message Attributes
333:
334: IF P_PA_DEBUG_MODE = 'Y' Then
335: PA_DEBUG.g_err_stage := ' Calling wf_engine.SetItemAttrText in loop - Start ';
336: PA_DEBUG.write
337: (x_Module => g_module_name
338: ,x_Msg => pa_debug.g_err_stage
339: ,x_Log_Level => 3);
340: END IF;
334: IF P_PA_DEBUG_MODE = 'Y' Then
335: PA_DEBUG.g_err_stage := ' Calling wf_engine.SetItemAttrText in loop - Start ';
336: PA_DEBUG.write
337: (x_Module => g_module_name
338: ,x_Msg => pa_debug.g_err_stage
339: ,x_Log_Level => 3);
340: END IF;
341: FOR i IN 1..10 LOOP
342: l_attr_name := 'RULE_NOTE_'||i;
346: , aname => l_attr_name
347: , avalue => l_msg_text
348: );
349: END LOOP;
350: IF P_PA_DEBUG_MODE = 'Y' Then
351: PA_DEBUG.g_err_stage := ' Calling wf_engine.SetItemAttrText in loop - END ';
352: PA_DEBUG.write
353: (x_Module => g_module_name
354: ,x_Msg => pa_debug.g_err_stage
347: , avalue => l_msg_text
348: );
349: END LOOP;
350: IF P_PA_DEBUG_MODE = 'Y' Then
351: PA_DEBUG.g_err_stage := ' Calling wf_engine.SetItemAttrText in loop - END ';
352: PA_DEBUG.write
353: (x_Module => g_module_name
354: ,x_Msg => pa_debug.g_err_stage
355: ,x_Log_Level => 3);
348: );
349: END LOOP;
350: IF P_PA_DEBUG_MODE = 'Y' Then
351: PA_DEBUG.g_err_stage := ' Calling wf_engine.SetItemAttrText in loop - END ';
352: PA_DEBUG.write
353: (x_Module => g_module_name
354: ,x_Msg => pa_debug.g_err_stage
355: ,x_Log_Level => 3);
356: END IF;
350: IF P_PA_DEBUG_MODE = 'Y' Then
351: PA_DEBUG.g_err_stage := ' Calling wf_engine.SetItemAttrText in loop - END ';
352: PA_DEBUG.write
353: (x_Module => g_module_name
354: ,x_Msg => pa_debug.g_err_stage
355: ,x_Log_Level => 3);
356: END IF;
357:
358: -- Populate WF Error Message Attributes with Messages, if any.
356: END IF;
357:
358: -- Populate WF Error Message Attributes with Messages, if any.
359:
360: IF P_PA_DEBUG_MODE = 'Y' Then
361: PA_DEBUG.g_err_stage := ' Populate WF Error Message Attributes with Messages in loop - Start ';
362: PA_DEBUG.write
363: (x_Module => g_module_name
364: ,x_Msg => pa_debug.g_err_stage
357:
358: -- Populate WF Error Message Attributes with Messages, if any.
359:
360: IF P_PA_DEBUG_MODE = 'Y' Then
361: PA_DEBUG.g_err_stage := ' Populate WF Error Message Attributes with Messages in loop - Start ';
362: PA_DEBUG.write
363: (x_Module => g_module_name
364: ,x_Msg => pa_debug.g_err_stage
365: ,x_Log_Level => 3);
358: -- Populate WF Error Message Attributes with Messages, if any.
359:
360: IF P_PA_DEBUG_MODE = 'Y' Then
361: PA_DEBUG.g_err_stage := ' Populate WF Error Message Attributes with Messages in loop - Start ';
362: PA_DEBUG.write
363: (x_Module => g_module_name
364: ,x_Msg => pa_debug.g_err_stage
365: ,x_Log_Level => 3);
366: END IF;
360: IF P_PA_DEBUG_MODE = 'Y' Then
361: PA_DEBUG.g_err_stage := ' Populate WF Error Message Attributes with Messages in loop - Start ';
362: PA_DEBUG.write
363: (x_Module => g_module_name
364: ,x_Msg => pa_debug.g_err_stage
365: ,x_Log_Level => 3);
366: END IF;
367: IF l_msg_count > 0 THEN
368: FOR i IN 1..l_msg_count LOOP
380: aname => l_attr_name,
381: avalue => l_msg_text );
382: END LOOP;
383: END IF;
384: IF P_PA_DEBUG_MODE = 'Y' Then
385: PA_DEBUG.g_err_stage := ' Populate WF Error Message Attributes with Messages in loop - End ';
386: PA_DEBUG.write
387: (x_Module => g_module_name
388: ,x_Msg => pa_debug.g_err_stage
381: avalue => l_msg_text );
382: END LOOP;
383: END IF;
384: IF P_PA_DEBUG_MODE = 'Y' Then
385: PA_DEBUG.g_err_stage := ' Populate WF Error Message Attributes with Messages in loop - End ';
386: PA_DEBUG.write
387: (x_Module => g_module_name
388: ,x_Msg => pa_debug.g_err_stage
389: ,x_Log_Level => 3);
382: END LOOP;
383: END IF;
384: IF P_PA_DEBUG_MODE = 'Y' Then
385: PA_DEBUG.g_err_stage := ' Populate WF Error Message Attributes with Messages in loop - End ';
386: PA_DEBUG.write
387: (x_Module => g_module_name
388: ,x_Msg => pa_debug.g_err_stage
389: ,x_Log_Level => 3);
390: END IF;
384: IF P_PA_DEBUG_MODE = 'Y' Then
385: PA_DEBUG.g_err_stage := ' Populate WF Error Message Attributes with Messages in loop - End ';
386: PA_DEBUG.write
387: (x_Module => g_module_name
388: ,x_Msg => pa_debug.g_err_stage
389: ,x_Log_Level => 3);
390: END IF;
391:
392: IF P_PA_DEBUG_MODE = 'Y' Then
388: ,x_Msg => pa_debug.g_err_stage
389: ,x_Log_Level => 3);
390: END IF;
391:
392: IF P_PA_DEBUG_MODE = 'Y' Then
393: PA_DEBUG.g_err_stage := 'Procedure Set_Notification_Messages - End';
394: PA_DEBUG.write
395: (x_Module => g_module_name
396: ,x_Msg => pa_debug.g_err_stage
389: ,x_Log_Level => 3);
390: END IF;
391:
392: IF P_PA_DEBUG_MODE = 'Y' Then
393: PA_DEBUG.g_err_stage := 'Procedure Set_Notification_Messages - End';
394: PA_DEBUG.write
395: (x_Module => g_module_name
396: ,x_Msg => pa_debug.g_err_stage
397: ,x_Log_Level => 3);
390: END IF;
391:
392: IF P_PA_DEBUG_MODE = 'Y' Then
393: PA_DEBUG.g_err_stage := 'Procedure Set_Notification_Messages - End';
394: PA_DEBUG.write
395: (x_Module => g_module_name
396: ,x_Msg => pa_debug.g_err_stage
397: ,x_Log_Level => 3);
398: END IF;
392: IF P_PA_DEBUG_MODE = 'Y' Then
393: PA_DEBUG.g_err_stage := 'Procedure Set_Notification_Messages - End';
394: PA_DEBUG.write
395: (x_Module => g_module_name
396: ,x_Msg => pa_debug.g_err_stage
397: ,x_Log_Level => 3);
398: END IF;
399:
400: EXCEPTION
469: WHERE
470: status_type = p_project_status_type
471: AND
472: project_status_code = p_project_status_code;
473: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
474: BEGIN
475: IF P_PA_DEBUG_MODE = 'Y' Then
476: PA_DEBUG.g_err_stage := 'Procedure get_workflow_info - Begin';
477: PA_DEBUG.write
471: AND
472: project_status_code = p_project_status_code;
473: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
474: BEGIN
475: IF P_PA_DEBUG_MODE = 'Y' Then
476: PA_DEBUG.g_err_stage := 'Procedure get_workflow_info - Begin';
477: PA_DEBUG.write
478: (x_Module => g_module_name
479: ,x_Msg => pa_debug.g_err_stage
472: project_status_code = p_project_status_code;
473: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
474: BEGIN
475: IF P_PA_DEBUG_MODE = 'Y' Then
476: PA_DEBUG.g_err_stage := 'Procedure get_workflow_info - Begin';
477: PA_DEBUG.write
478: (x_Module => g_module_name
479: ,x_Msg => pa_debug.g_err_stage
480: ,x_Log_Level => 3);
473: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
474: BEGIN
475: IF P_PA_DEBUG_MODE = 'Y' Then
476: PA_DEBUG.g_err_stage := 'Procedure get_workflow_info - Begin';
477: PA_DEBUG.write
478: (x_Module => g_module_name
479: ,x_Msg => pa_debug.g_err_stage
480: ,x_Log_Level => 3);
481: END IF;
475: IF P_PA_DEBUG_MODE = 'Y' Then
476: PA_DEBUG.g_err_stage := 'Procedure get_workflow_info - Begin';
477: PA_DEBUG.write
478: (x_Module => g_module_name
479: ,x_Msg => pa_debug.g_err_stage
480: ,x_Log_Level => 3);
481: END IF;
482:
483: IF P_PA_DEBUG_MODE = 'Y' Then
479: ,x_Msg => pa_debug.g_err_stage
480: ,x_Log_Level => 3);
481: END IF;
482:
483: IF P_PA_DEBUG_MODE = 'Y' Then
484: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_project_status_code ' || p_project_status_code;
485: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_project_status_type ' || p_project_status_type;
486: PA_DEBUG.write
487: (x_Module => g_module_name
480: ,x_Log_Level => 3);
481: END IF;
482:
483: IF P_PA_DEBUG_MODE = 'Y' Then
484: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_project_status_code ' || p_project_status_code;
485: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_project_status_type ' || p_project_status_type;
486: PA_DEBUG.write
487: (x_Module => g_module_name
488: ,x_Msg => pa_debug.g_err_stage
481: END IF;
482:
483: IF P_PA_DEBUG_MODE = 'Y' Then
484: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_project_status_code ' || p_project_status_code;
485: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_project_status_type ' || p_project_status_type;
486: PA_DEBUG.write
487: (x_Module => g_module_name
488: ,x_Msg => pa_debug.g_err_stage
489: ,x_Log_Level => 3);
482:
483: IF P_PA_DEBUG_MODE = 'Y' Then
484: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_project_status_code ' || p_project_status_code;
485: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_project_status_type ' || p_project_status_type;
486: PA_DEBUG.write
487: (x_Module => g_module_name
488: ,x_Msg => pa_debug.g_err_stage
489: ,x_Log_Level => 3);
490: END IF;
484: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_project_status_code ' || p_project_status_code;
485: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_project_status_type ' || p_project_status_type;
486: PA_DEBUG.write
487: (x_Module => g_module_name
488: ,x_Msg => pa_debug.g_err_stage
489: ,x_Log_Level => 3);
490: END IF;
491:
492: x_return_status := FND_API.G_RET_STS_SUCCESS;
499: ,x_wf_success_status_code
500: ,x_wf_failure_status_code ;
501: CLOSE get_info;
502:
503: IF P_PA_DEBUG_MODE = 'Y' Then
504: PA_DEBUG.g_err_stage := 'Procedure get_workflow_info - End';
505: PA_DEBUG.write
506: (x_Module => g_module_name
507: ,x_Msg => pa_debug.g_err_stage
500: ,x_wf_failure_status_code ;
501: CLOSE get_info;
502:
503: IF P_PA_DEBUG_MODE = 'Y' Then
504: PA_DEBUG.g_err_stage := 'Procedure get_workflow_info - End';
505: PA_DEBUG.write
506: (x_Module => g_module_name
507: ,x_Msg => pa_debug.g_err_stage
508: ,x_Log_Level => 3);
501: CLOSE get_info;
502:
503: IF P_PA_DEBUG_MODE = 'Y' Then
504: PA_DEBUG.g_err_stage := 'Procedure get_workflow_info - End';
505: PA_DEBUG.write
506: (x_Module => g_module_name
507: ,x_Msg => pa_debug.g_err_stage
508: ,x_Log_Level => 3);
509: END IF;
503: IF P_PA_DEBUG_MODE = 'Y' Then
504: PA_DEBUG.g_err_stage := 'Procedure get_workflow_info - End';
505: PA_DEBUG.write
506: (x_Module => g_module_name
507: ,x_Msg => pa_debug.g_err_stage
508: ,x_Log_Level => 3);
509: END IF;
510:
511: EXCEPTION
528: )
529:
530: IS
531:
532: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
533:
534: BEGIN
535:
536: IF P_PA_DEBUG_MODE = 'Y' Then
532: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
533:
534: BEGIN
535:
536: IF P_PA_DEBUG_MODE = 'Y' Then
537: PA_DEBUG.g_err_stage := 'Procedure Cancel_Workflow - Begin';
538: PA_DEBUG.write
539: (x_Module => g_module_name
540: ,x_Msg => pa_debug.g_err_stage
533:
534: BEGIN
535:
536: IF P_PA_DEBUG_MODE = 'Y' Then
537: PA_DEBUG.g_err_stage := 'Procedure Cancel_Workflow - Begin';
538: PA_DEBUG.write
539: (x_Module => g_module_name
540: ,x_Msg => pa_debug.g_err_stage
541: ,x_Log_Level => 3);
534: BEGIN
535:
536: IF P_PA_DEBUG_MODE = 'Y' Then
537: PA_DEBUG.g_err_stage := 'Procedure Cancel_Workflow - Begin';
538: PA_DEBUG.write
539: (x_Module => g_module_name
540: ,x_Msg => pa_debug.g_err_stage
541: ,x_Log_Level => 3);
542: END IF;
536: IF P_PA_DEBUG_MODE = 'Y' Then
537: PA_DEBUG.g_err_stage := 'Procedure Cancel_Workflow - Begin';
538: PA_DEBUG.write
539: (x_Module => g_module_name
540: ,x_Msg => pa_debug.g_err_stage
541: ,x_Log_Level => 3);
542: END IF;
543:
544: IF P_PA_DEBUG_MODE = 'Y' Then
540: ,x_Msg => pa_debug.g_err_stage
541: ,x_Log_Level => 3);
542: END IF;
543:
544: IF P_PA_DEBUG_MODE = 'Y' Then
545: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
546: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
547: PA_DEBUG.write
548: (x_Module => g_module_name
541: ,x_Log_Level => 3);
542: END IF;
543:
544: IF P_PA_DEBUG_MODE = 'Y' Then
545: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
546: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
547: PA_DEBUG.write
548: (x_Module => g_module_name
549: ,x_Msg => pa_debug.g_err_stage
542: END IF;
543:
544: IF P_PA_DEBUG_MODE = 'Y' Then
545: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
546: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
547: PA_DEBUG.write
548: (x_Module => g_module_name
549: ,x_Msg => pa_debug.g_err_stage
550: ,x_Log_Level => 3);
543:
544: IF P_PA_DEBUG_MODE = 'Y' Then
545: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
546: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
547: PA_DEBUG.write
548: (x_Module => g_module_name
549: ,x_Msg => pa_debug.g_err_stage
550: ,x_Log_Level => 3);
551: END IF;
545: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
546: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
547: PA_DEBUG.write
548: (x_Module => g_module_name
549: ,x_Msg => pa_debug.g_err_stage
550: ,x_Log_Level => 3);
551: END IF;
552:
553:
565: --debug_msg ('before get task_id');
566:
567: END IF;
568:
569: IF P_PA_DEBUG_MODE = 'Y' Then
570: PA_DEBUG.g_err_stage := 'Procedure Cancel_Workflow - End';
571: PA_DEBUG.write
572: (x_Module => g_module_name
573: ,x_Msg => pa_debug.g_err_stage
566:
567: END IF;
568:
569: IF P_PA_DEBUG_MODE = 'Y' Then
570: PA_DEBUG.g_err_stage := 'Procedure Cancel_Workflow - End';
571: PA_DEBUG.write
572: (x_Module => g_module_name
573: ,x_Msg => pa_debug.g_err_stage
574: ,x_Log_Level => 3);
567: END IF;
568:
569: IF P_PA_DEBUG_MODE = 'Y' Then
570: PA_DEBUG.g_err_stage := 'Procedure Cancel_Workflow - End';
571: PA_DEBUG.write
572: (x_Module => g_module_name
573: ,x_Msg => pa_debug.g_err_stage
574: ,x_Log_Level => 3);
575: END IF;
569: IF P_PA_DEBUG_MODE = 'Y' Then
570: PA_DEBUG.g_err_stage := 'Procedure Cancel_Workflow - End';
571: PA_DEBUG.write
572: (x_Module => g_module_name
573: ,x_Msg => pa_debug.g_err_stage
574: ,x_Log_Level => 3);
575: END IF;
576:
577:
597: )
598: IS
599:
600: l_item_key NUMBER;
601: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
602:
603: BEGIN
604: IF P_PA_DEBUG_MODE = 'Y' Then
605: PA_DEBUG.g_err_stage := 'Procedure create_workflow_process - Begin';
600: l_item_key NUMBER;
601: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
602:
603: BEGIN
604: IF P_PA_DEBUG_MODE = 'Y' Then
605: PA_DEBUG.g_err_stage := 'Procedure create_workflow_process - Begin';
606: PA_DEBUG.write
607: (x_Module => g_module_name
608: ,x_Msg => pa_debug.g_err_stage
601: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
602:
603: BEGIN
604: IF P_PA_DEBUG_MODE = 'Y' Then
605: PA_DEBUG.g_err_stage := 'Procedure create_workflow_process - Begin';
606: PA_DEBUG.write
607: (x_Module => g_module_name
608: ,x_Msg => pa_debug.g_err_stage
609: ,x_Log_Level => 3);
602:
603: BEGIN
604: IF P_PA_DEBUG_MODE = 'Y' Then
605: PA_DEBUG.g_err_stage := 'Procedure create_workflow_process - Begin';
606: PA_DEBUG.write
607: (x_Module => g_module_name
608: ,x_Msg => pa_debug.g_err_stage
609: ,x_Log_Level => 3);
610: END IF;
604: IF P_PA_DEBUG_MODE = 'Y' Then
605: PA_DEBUG.g_err_stage := 'Procedure create_workflow_process - Begin';
606: PA_DEBUG.write
607: (x_Module => g_module_name
608: ,x_Msg => pa_debug.g_err_stage
609: ,x_Log_Level => 3);
610: END IF;
611:
612: IF P_PA_DEBUG_MODE = 'Y' Then
608: ,x_Msg => pa_debug.g_err_stage
609: ,x_Log_Level => 3);
610: END IF;
611:
612: IF P_PA_DEBUG_MODE = 'Y' Then
613: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
614: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_process_name ' || p_process_name;
615: PA_DEBUG.write
616: (x_Module => g_module_name
609: ,x_Log_Level => 3);
610: END IF;
611:
612: IF P_PA_DEBUG_MODE = 'Y' Then
613: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
614: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_process_name ' || p_process_name;
615: PA_DEBUG.write
616: (x_Module => g_module_name
617: ,x_Msg => pa_debug.g_err_stage
610: END IF;
611:
612: IF P_PA_DEBUG_MODE = 'Y' Then
613: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
614: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_process_name ' || p_process_name;
615: PA_DEBUG.write
616: (x_Module => g_module_name
617: ,x_Msg => pa_debug.g_err_stage
618: ,x_Log_Level => 3);
611:
612: IF P_PA_DEBUG_MODE = 'Y' Then
613: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
614: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_process_name ' || p_process_name;
615: PA_DEBUG.write
616: (x_Module => g_module_name
617: ,x_Msg => pa_debug.g_err_stage
618: ,x_Log_Level => 3);
619: END IF;
613: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
614: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_process_name ' || p_process_name;
615: PA_DEBUG.write
616: (x_Module => g_module_name
617: ,x_Msg => pa_debug.g_err_stage
618: ,x_Log_Level => 3);
619: END IF;
620: SELECT pa_workflow_itemkey_s.nextval
621: INTO l_item_key
625:
626: x_return_status := FND_API.G_RET_STS_SUCCESS;
627:
628: -- create the workflow process
629: IF P_PA_DEBUG_MODE = 'Y' Then
630: PA_DEBUG.g_err_stage := 'Calling WF_ENGINE.CreateProcess - Start';
631: PA_DEBUG.write
632: (x_Module => g_module_name
633: ,x_Msg => pa_debug.g_err_stage
626: x_return_status := FND_API.G_RET_STS_SUCCESS;
627:
628: -- create the workflow process
629: IF P_PA_DEBUG_MODE = 'Y' Then
630: PA_DEBUG.g_err_stage := 'Calling WF_ENGINE.CreateProcess - Start';
631: PA_DEBUG.write
632: (x_Module => g_module_name
633: ,x_Msg => pa_debug.g_err_stage
634: ,x_Log_Level => 3);
627:
628: -- create the workflow process
629: IF P_PA_DEBUG_MODE = 'Y' Then
630: PA_DEBUG.g_err_stage := 'Calling WF_ENGINE.CreateProcess - Start';
631: PA_DEBUG.write
632: (x_Module => g_module_name
633: ,x_Msg => pa_debug.g_err_stage
634: ,x_Log_Level => 3);
635: END IF;
629: IF P_PA_DEBUG_MODE = 'Y' Then
630: PA_DEBUG.g_err_stage := 'Calling WF_ENGINE.CreateProcess - Start';
631: PA_DEBUG.write
632: (x_Module => g_module_name
633: ,x_Msg => pa_debug.g_err_stage
634: ,x_Log_Level => 3);
635: END IF;
636: WF_ENGINE.CreateProcess( p_item_type
637: , x_item_key
635: END IF;
636: WF_ENGINE.CreateProcess( p_item_type
637: , x_item_key
638: , p_Process_Name);
639: IF P_PA_DEBUG_MODE = 'Y' Then
640: PA_DEBUG.g_err_stage := 'Calling WF_ENGINE.CreateProcess - End';
641: PA_DEBUG.write
642: (x_Module => g_module_name
643: ,x_Msg => pa_debug.g_err_stage
636: WF_ENGINE.CreateProcess( p_item_type
637: , x_item_key
638: , p_Process_Name);
639: IF P_PA_DEBUG_MODE = 'Y' Then
640: PA_DEBUG.g_err_stage := 'Calling WF_ENGINE.CreateProcess - End';
641: PA_DEBUG.write
642: (x_Module => g_module_name
643: ,x_Msg => pa_debug.g_err_stage
644: ,x_Log_Level => 3);
637: , x_item_key
638: , p_Process_Name);
639: IF P_PA_DEBUG_MODE = 'Y' Then
640: PA_DEBUG.g_err_stage := 'Calling WF_ENGINE.CreateProcess - End';
641: PA_DEBUG.write
642: (x_Module => g_module_name
643: ,x_Msg => pa_debug.g_err_stage
644: ,x_Log_Level => 3);
645: END IF;
639: IF P_PA_DEBUG_MODE = 'Y' Then
640: PA_DEBUG.g_err_stage := 'Calling WF_ENGINE.CreateProcess - End';
641: PA_DEBUG.write
642: (x_Module => g_module_name
643: ,x_Msg => pa_debug.g_err_stage
644: ,x_Log_Level => 3);
645: END IF;
646:
647: IF P_PA_DEBUG_MODE = 'Y' Then
643: ,x_Msg => pa_debug.g_err_stage
644: ,x_Log_Level => 3);
645: END IF;
646:
647: IF P_PA_DEBUG_MODE = 'Y' Then
648: PA_DEBUG.g_err_stage := 'Procedure create_workflow_process - End';
649: PA_DEBUG.write
650: (x_Module => g_module_name
651: ,x_Msg => pa_debug.g_err_stage
644: ,x_Log_Level => 3);
645: END IF;
646:
647: IF P_PA_DEBUG_MODE = 'Y' Then
648: PA_DEBUG.g_err_stage := 'Procedure create_workflow_process - End';
649: PA_DEBUG.write
650: (x_Module => g_module_name
651: ,x_Msg => pa_debug.g_err_stage
652: ,x_Log_Level => 3);
645: END IF;
646:
647: IF P_PA_DEBUG_MODE = 'Y' Then
648: PA_DEBUG.g_err_stage := 'Procedure create_workflow_process - End';
649: PA_DEBUG.write
650: (x_Module => g_module_name
651: ,x_Msg => pa_debug.g_err_stage
652: ,x_Log_Level => 3);
653: END IF;
647: IF P_PA_DEBUG_MODE = 'Y' Then
648: PA_DEBUG.g_err_stage := 'Procedure create_workflow_process - End';
649: PA_DEBUG.write
650: (x_Module => g_module_name
651: ,x_Msg => pa_debug.g_err_stage
652: ,x_Log_Level => 3);
653: END IF;
654: --debug_msg ( 'after WF_ENGINE createProcess: key = ' || x_item_key)
655:
683: IS
684: l_err_code NUMBER;
685: l_err_stage VARCHAR2(30);
686: l_err_stack VARCHAR2(240);
687: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
688:
689: BEGIN
690: IF P_PA_DEBUG_MODE = 'Y' Then
691: PA_DEBUG.g_err_stage := 'Procedure start_workflow_process - Begin';
686: l_err_stack VARCHAR2(240);
687: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
688:
689: BEGIN
690: IF P_PA_DEBUG_MODE = 'Y' Then
691: PA_DEBUG.g_err_stage := 'Procedure start_workflow_process - Begin';
692: PA_DEBUG.write
693: (x_Module => g_module_name
694: ,x_Msg => pa_debug.g_err_stage
687: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
688:
689: BEGIN
690: IF P_PA_DEBUG_MODE = 'Y' Then
691: PA_DEBUG.g_err_stage := 'Procedure start_workflow_process - Begin';
692: PA_DEBUG.write
693: (x_Module => g_module_name
694: ,x_Msg => pa_debug.g_err_stage
695: ,x_Log_Level => 3);
688:
689: BEGIN
690: IF P_PA_DEBUG_MODE = 'Y' Then
691: PA_DEBUG.g_err_stage := 'Procedure start_workflow_process - Begin';
692: PA_DEBUG.write
693: (x_Module => g_module_name
694: ,x_Msg => pa_debug.g_err_stage
695: ,x_Log_Level => 3);
696: END IF;
690: IF P_PA_DEBUG_MODE = 'Y' Then
691: PA_DEBUG.g_err_stage := 'Procedure start_workflow_process - Begin';
692: PA_DEBUG.write
693: (x_Module => g_module_name
694: ,x_Msg => pa_debug.g_err_stage
695: ,x_Log_Level => 3);
696: END IF;
697:
698: IF P_PA_DEBUG_MODE = 'Y' Then
694: ,x_Msg => pa_debug.g_err_stage
695: ,x_Log_Level => 3);
696: END IF;
697:
698: IF P_PA_DEBUG_MODE = 'Y' Then
699: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
700: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_process_name ' || p_process_name;
701: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
702: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_wf_type_code ' || p_wf_type_code;
695: ,x_Log_Level => 3);
696: END IF;
697:
698: IF P_PA_DEBUG_MODE = 'Y' Then
699: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
700: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_process_name ' || p_process_name;
701: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
702: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_wf_type_code ' || p_wf_type_code;
703: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1 ;
696: END IF;
697:
698: IF P_PA_DEBUG_MODE = 'Y' Then
699: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
700: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_process_name ' || p_process_name;
701: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
702: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_wf_type_code ' || p_wf_type_code;
703: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1 ;
704: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2 ;
697:
698: IF P_PA_DEBUG_MODE = 'Y' Then
699: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
700: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_process_name ' || p_process_name;
701: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
702: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_wf_type_code ' || p_wf_type_code;
703: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1 ;
704: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2 ;
705: PA_DEBUG.write
698: IF P_PA_DEBUG_MODE = 'Y' Then
699: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
700: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_process_name ' || p_process_name;
701: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
702: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_wf_type_code ' || p_wf_type_code;
703: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1 ;
704: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2 ;
705: PA_DEBUG.write
706: (x_Module => g_module_name
699: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_Item_type ' || p_Item_type;
700: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_process_name ' || p_process_name;
701: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
702: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_wf_type_code ' || p_wf_type_code;
703: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1 ;
704: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2 ;
705: PA_DEBUG.write
706: (x_Module => g_module_name
707: ,x_Msg => pa_debug.g_err_stage
700: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_process_name ' || p_process_name;
701: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
702: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_wf_type_code ' || p_wf_type_code;
703: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1 ;
704: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2 ;
705: PA_DEBUG.write
706: (x_Module => g_module_name
707: ,x_Msg => pa_debug.g_err_stage
708: ,x_Log_Level => 3);
701: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_Item_key ' || p_Item_key;
702: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_wf_type_code ' || p_wf_type_code;
703: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1 ;
704: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2 ;
705: PA_DEBUG.write
706: (x_Module => g_module_name
707: ,x_Msg => pa_debug.g_err_stage
708: ,x_Log_Level => 3);
709: END IF;
703: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key1 ' || p_entity_key1 ;
704: PA_DEBUG.g_err_stage := PA_DEBUG.g_err_stage || ' p_entity_key2 ' || p_entity_key2 ;
705: PA_DEBUG.write
706: (x_Module => g_module_name
707: ,x_Msg => pa_debug.g_err_stage
708: ,x_Log_Level => 3);
709: END IF;
710:
711: IF P_PA_DEBUG_MODE = 'Y' Then
707: ,x_Msg => pa_debug.g_err_stage
708: ,x_Log_Level => 3);
709: END IF;
710:
711: IF P_PA_DEBUG_MODE = 'Y' Then
712: PA_DEBUG.g_err_stage := 'WF_ENGINE.StartProcess - Begin';
713: PA_DEBUG.write
714: (x_Module => g_module_name
715: ,x_Msg => pa_debug.g_err_stage
708: ,x_Log_Level => 3);
709: END IF;
710:
711: IF P_PA_DEBUG_MODE = 'Y' Then
712: PA_DEBUG.g_err_stage := 'WF_ENGINE.StartProcess - Begin';
713: PA_DEBUG.write
714: (x_Module => g_module_name
715: ,x_Msg => pa_debug.g_err_stage
716: ,x_Log_Level => 3);
709: END IF;
710:
711: IF P_PA_DEBUG_MODE = 'Y' Then
712: PA_DEBUG.g_err_stage := 'WF_ENGINE.StartProcess - Begin';
713: PA_DEBUG.write
714: (x_Module => g_module_name
715: ,x_Msg => pa_debug.g_err_stage
716: ,x_Log_Level => 3);
717: END IF;
711: IF P_PA_DEBUG_MODE = 'Y' Then
712: PA_DEBUG.g_err_stage := 'WF_ENGINE.StartProcess - Begin';
713: PA_DEBUG.write
714: (x_Module => g_module_name
715: ,x_Msg => pa_debug.g_err_stage
716: ,x_Log_Level => 3);
717: END IF;
718: WF_ENGINE.StartProcess(
719: p_Item_Type
718: WF_ENGINE.StartProcess(
719: p_Item_Type
720: , p_Item_Key
721: );
722: IF P_PA_DEBUG_MODE = 'Y' Then
723: PA_DEBUG.g_err_stage := 'WF_ENGINE.StartProcess - End';
724: PA_DEBUG.write
725: (x_Module => g_module_name
726: ,x_Msg => pa_debug.g_err_stage
719: p_Item_Type
720: , p_Item_Key
721: );
722: IF P_PA_DEBUG_MODE = 'Y' Then
723: PA_DEBUG.g_err_stage := 'WF_ENGINE.StartProcess - End';
724: PA_DEBUG.write
725: (x_Module => g_module_name
726: ,x_Msg => pa_debug.g_err_stage
727: ,x_Log_Level => 3);
720: , p_Item_Key
721: );
722: IF P_PA_DEBUG_MODE = 'Y' Then
723: PA_DEBUG.g_err_stage := 'WF_ENGINE.StartProcess - End';
724: PA_DEBUG.write
725: (x_Module => g_module_name
726: ,x_Msg => pa_debug.g_err_stage
727: ,x_Log_Level => 3);
728: END IF;
722: IF P_PA_DEBUG_MODE = 'Y' Then
723: PA_DEBUG.g_err_stage := 'WF_ENGINE.StartProcess - End';
724: PA_DEBUG.write
725: (x_Module => g_module_name
726: ,x_Msg => pa_debug.g_err_stage
727: ,x_Log_Level => 3);
728: END IF;
729:
730: IF P_PA_DEBUG_MODE = 'Y' Then
726: ,x_Msg => pa_debug.g_err_stage
727: ,x_Log_Level => 3);
728: END IF;
729:
730: IF P_PA_DEBUG_MODE = 'Y' Then
731: PA_DEBUG.g_err_stage := 'PA_WORKFLOW_UTILS.Insert_WF_Processes - Begin';
732: PA_DEBUG.write
733: (x_Module => g_module_name
734: ,x_Msg => pa_debug.g_err_stage
727: ,x_Log_Level => 3);
728: END IF;
729:
730: IF P_PA_DEBUG_MODE = 'Y' Then
731: PA_DEBUG.g_err_stage := 'PA_WORKFLOW_UTILS.Insert_WF_Processes - Begin';
732: PA_DEBUG.write
733: (x_Module => g_module_name
734: ,x_Msg => pa_debug.g_err_stage
735: ,x_Log_Level => 3);
728: END IF;
729:
730: IF P_PA_DEBUG_MODE = 'Y' Then
731: PA_DEBUG.g_err_stage := 'PA_WORKFLOW_UTILS.Insert_WF_Processes - Begin';
732: PA_DEBUG.write
733: (x_Module => g_module_name
734: ,x_Msg => pa_debug.g_err_stage
735: ,x_Log_Level => 3);
736: END IF;
730: IF P_PA_DEBUG_MODE = 'Y' Then
731: PA_DEBUG.g_err_stage := 'PA_WORKFLOW_UTILS.Insert_WF_Processes - Begin';
732: PA_DEBUG.write
733: (x_Module => g_module_name
734: ,x_Msg => pa_debug.g_err_stage
735: ,x_Log_Level => 3);
736: END IF;
737:
738: PA_WORKFLOW_UTILS.Insert_WF_Processes
745: ,p_err_code => l_err_code
746: ,p_err_stage => l_err_stage
747: ,p_err_stack => l_err_stack
748: );
749: IF P_PA_DEBUG_MODE = 'Y' Then
750: PA_DEBUG.g_err_stage := 'PA_WORKFLOW_UTILS.Insert_WF_Processes - End';
751: PA_DEBUG.write
752: (x_Module => g_module_name
753: ,x_Msg => pa_debug.g_err_stage
746: ,p_err_stage => l_err_stage
747: ,p_err_stack => l_err_stack
748: );
749: IF P_PA_DEBUG_MODE = 'Y' Then
750: PA_DEBUG.g_err_stage := 'PA_WORKFLOW_UTILS.Insert_WF_Processes - End';
751: PA_DEBUG.write
752: (x_Module => g_module_name
753: ,x_Msg => pa_debug.g_err_stage
754: ,x_Log_Level => 3);
747: ,p_err_stack => l_err_stack
748: );
749: IF P_PA_DEBUG_MODE = 'Y' Then
750: PA_DEBUG.g_err_stage := 'PA_WORKFLOW_UTILS.Insert_WF_Processes - End';
751: PA_DEBUG.write
752: (x_Module => g_module_name
753: ,x_Msg => pa_debug.g_err_stage
754: ,x_Log_Level => 3);
755: END IF;
749: IF P_PA_DEBUG_MODE = 'Y' Then
750: PA_DEBUG.g_err_stage := 'PA_WORKFLOW_UTILS.Insert_WF_Processes - End';
751: PA_DEBUG.write
752: (x_Module => g_module_name
753: ,x_Msg => pa_debug.g_err_stage
754: ,x_Log_Level => 3);
755: END IF;
756:
757: IF l_err_code <> 0 THEN
760: ,p_msg_name => 'PA_PR_CREATE_WF_FAILED');
761: x_return_status := FND_API.G_RET_STS_ERROR;
762:
763:
764: IF P_PA_DEBUG_MODE = 'Y' Then
765: PA_DEBUG.g_err_stage := ' WF_ENGINE.AbortProcess - Begin';
766: PA_DEBUG.write
767: (x_Module => g_module_name
768: ,x_Msg => pa_debug.g_err_stage
761: x_return_status := FND_API.G_RET_STS_ERROR;
762:
763:
764: IF P_PA_DEBUG_MODE = 'Y' Then
765: PA_DEBUG.g_err_stage := ' WF_ENGINE.AbortProcess - Begin';
766: PA_DEBUG.write
767: (x_Module => g_module_name
768: ,x_Msg => pa_debug.g_err_stage
769: ,x_Log_Level => 3);
762:
763:
764: IF P_PA_DEBUG_MODE = 'Y' Then
765: PA_DEBUG.g_err_stage := ' WF_ENGINE.AbortProcess - Begin';
766: PA_DEBUG.write
767: (x_Module => g_module_name
768: ,x_Msg => pa_debug.g_err_stage
769: ,x_Log_Level => 3);
770: END IF;
764: IF P_PA_DEBUG_MODE = 'Y' Then
765: PA_DEBUG.g_err_stage := ' WF_ENGINE.AbortProcess - Begin';
766: PA_DEBUG.write
767: (x_Module => g_module_name
768: ,x_Msg => pa_debug.g_err_stage
769: ,x_Log_Level => 3);
770: END IF;
771: -- abort the workflow process just launched, there is a problem
772: WF_ENGINE.AbortProcess( p_Item_Type
772: WF_ENGINE.AbortProcess( p_Item_Type
773: , p_Item_Key
774: );
775:
776: IF P_PA_DEBUG_MODE = 'Y' Then
777: PA_DEBUG.g_err_stage := ' WF_ENGINE.AbortProcess - End';
778: PA_DEBUG.write
779: (x_Module => g_module_name
780: ,x_Msg => pa_debug.g_err_stage
773: , p_Item_Key
774: );
775:
776: IF P_PA_DEBUG_MODE = 'Y' Then
777: PA_DEBUG.g_err_stage := ' WF_ENGINE.AbortProcess - End';
778: PA_DEBUG.write
779: (x_Module => g_module_name
780: ,x_Msg => pa_debug.g_err_stage
781: ,x_Log_Level => 3);
774: );
775:
776: IF P_PA_DEBUG_MODE = 'Y' Then
777: PA_DEBUG.g_err_stage := ' WF_ENGINE.AbortProcess - End';
778: PA_DEBUG.write
779: (x_Module => g_module_name
780: ,x_Msg => pa_debug.g_err_stage
781: ,x_Log_Level => 3);
782: END IF;
776: IF P_PA_DEBUG_MODE = 'Y' Then
777: PA_DEBUG.g_err_stage := ' WF_ENGINE.AbortProcess - End';
778: PA_DEBUG.write
779: (x_Module => g_module_name
780: ,x_Msg => pa_debug.g_err_stage
781: ,x_Log_Level => 3);
782: END IF;
783:
784: END IF;
782: END IF;
783:
784: END IF;
785:
786: IF P_PA_DEBUG_MODE = 'Y' Then
787: PA_DEBUG.g_err_stage := 'Procedure start_workflow_process - End';
788: PA_DEBUG.write
789: (x_Module => g_module_name
790: ,x_Msg => pa_debug.g_err_stage
783:
784: END IF;
785:
786: IF P_PA_DEBUG_MODE = 'Y' Then
787: PA_DEBUG.g_err_stage := 'Procedure start_workflow_process - End';
788: PA_DEBUG.write
789: (x_Module => g_module_name
790: ,x_Msg => pa_debug.g_err_stage
791: ,x_Log_Level => 3);
784: END IF;
785:
786: IF P_PA_DEBUG_MODE = 'Y' Then
787: PA_DEBUG.g_err_stage := 'Procedure start_workflow_process - End';
788: PA_DEBUG.write
789: (x_Module => g_module_name
790: ,x_Msg => pa_debug.g_err_stage
791: ,x_Log_Level => 3);
792: END IF;
786: IF P_PA_DEBUG_MODE = 'Y' Then
787: PA_DEBUG.g_err_stage := 'Procedure start_workflow_process - End';
788: PA_DEBUG.write
789: (x_Module => g_module_name
790: ,x_Msg => pa_debug.g_err_stage
791: ,x_Log_Level => 3);
792: END IF;
793:
794: EXCEPTION
835:
836: STYLE_TAG varchar2(22) := '
837:
838: INPUT_TAG constant varchar2(6) := '
839: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
840:
841: BEGIN
842: IF P_PA_DEBUG_MODE = 'Y' Then
843: PA_DEBUG.g_err_stage := 'Procedure modify_wf_clob_content - Begin';
838: INPUT_TAG constant varchar2(6) := '
839: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
840:
841: BEGIN
842: IF P_PA_DEBUG_MODE = 'Y' Then
843: PA_DEBUG.g_err_stage := 'Procedure modify_wf_clob_content - Begin';
844: PA_DEBUG.write
845: (x_Module => g_module_name
846: ,x_Msg => pa_debug.g_err_stage
839: P_PA_DEBUG_MODE varchar2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N');
840:
841: BEGIN
842: IF P_PA_DEBUG_MODE = 'Y' Then
843: PA_DEBUG.g_err_stage := 'Procedure modify_wf_clob_content - Begin';
844: PA_DEBUG.write
845: (x_Module => g_module_name
846: ,x_Msg => pa_debug.g_err_stage
847: ,x_Log_Level => 3);
840:
841: BEGIN
842: IF P_PA_DEBUG_MODE = 'Y' Then
843: PA_DEBUG.g_err_stage := 'Procedure modify_wf_clob_content - Begin';
844: PA_DEBUG.write
845: (x_Module => g_module_name
846: ,x_Msg => pa_debug.g_err_stage
847: ,x_Log_Level => 3);
848: END IF;
842: IF P_PA_DEBUG_MODE = 'Y' Then
843: PA_DEBUG.g_err_stage := 'Procedure modify_wf_clob_content - Begin';
844: PA_DEBUG.write
845: (x_Module => g_module_name
846: ,x_Msg => pa_debug.g_err_stage
847: ,x_Log_Level => 3);
848: END IF;
849: IF P_PA_DEBUG_MODE = 'Y' Then
850: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_document ' || p_document;
845: (x_Module => g_module_name
846: ,x_Msg => pa_debug.g_err_stage
847: ,x_Log_Level => 3);
848: END IF;
849: IF P_PA_DEBUG_MODE = 'Y' Then
850: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_document ' || p_document;
851: PA_DEBUG.write
852: (x_Module => g_module_name
853: ,x_Msg => pa_debug.g_err_stage
846: ,x_Msg => pa_debug.g_err_stage
847: ,x_Log_Level => 3);
848: END IF;
849: IF P_PA_DEBUG_MODE = 'Y' Then
850: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_document ' || p_document;
851: PA_DEBUG.write
852: (x_Module => g_module_name
853: ,x_Msg => pa_debug.g_err_stage
854: ,x_Log_Level => 3);
847: ,x_Log_Level => 3);
848: END IF;
849: IF P_PA_DEBUG_MODE = 'Y' Then
850: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_document ' || p_document;
851: PA_DEBUG.write
852: (x_Module => g_module_name
853: ,x_Msg => pa_debug.g_err_stage
854: ,x_Log_Level => 3);
855: END IF;
849: IF P_PA_DEBUG_MODE = 'Y' Then
850: PA_DEBUG.g_err_stage := 'Input Parameters : ' || ' p_document ' || p_document;
851: PA_DEBUG.write
852: (x_Module => g_module_name
853: ,x_Msg => pa_debug.g_err_stage
854: ,x_Log_Level => 3);
855: END IF;
856: x_msg_count := 0;
857: x_return_status := FND_API.G_RET_STS_SUCCESS;
854: ,x_Log_Level => 3);
855: END IF;
856: x_msg_count := 0;
857: x_return_status := FND_API.G_RET_STS_SUCCESS;
858: pa_debug.set_err_stack('PA_WORKFLOW_UTILS.modify_wf_clob_content');
859: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
860: l_debug_mode := NVL(l_debug_mode, 'Y');
861: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
862: l_start_index := dbms_lob.instr(p_document,l_class_attr,1,1);
855: END IF;
856: x_msg_count := 0;
857: x_return_status := FND_API.G_RET_STS_SUCCESS;
858: pa_debug.set_err_stack('PA_WORKFLOW_UTILS.modify_wf_clob_content');
859: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
860: l_debug_mode := NVL(l_debug_mode, 'Y');
861: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
862: l_start_index := dbms_lob.instr(p_document,l_class_attr,1,1);
863: while l_start_index <> 0 loop
857: x_return_status := FND_API.G_RET_STS_SUCCESS;
858: pa_debug.set_err_stack('PA_WORKFLOW_UTILS.modify_wf_clob_content');
859: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
860: l_debug_mode := NVL(l_debug_mode, 'Y');
861: pa_debug.set_process('PLSQL','LOG',l_debug_mode);
862: l_start_index := dbms_lob.instr(p_document,l_class_attr,1,1);
863: while l_start_index <> 0 loop
864: l_end_index := dbms_lob.instr(p_document,l_end_quote,l_start_index+length(l_class_attr),1);
865: l_amount := l_end_index-l_start_index+1;
895: l_amount := l_end_index-l_start_index+1;
896: dbms_lob.erase(p_document,l_amount,l_start_index);
897: l_start_index := dbms_lob.instr(p_document,INPUT_TAG,l_end_index,1);
898: end loop;
899: pa_debug.reset_err_stack;
900:
901: IF P_PA_DEBUG_MODE = 'Y' Then
902: PA_DEBUG.g_err_stage := 'Procedure modify_wf_clob_content - End';
903: PA_DEBUG.write
897: l_start_index := dbms_lob.instr(p_document,INPUT_TAG,l_end_index,1);
898: end loop;
899: pa_debug.reset_err_stack;
900:
901: IF P_PA_DEBUG_MODE = 'Y' Then
902: PA_DEBUG.g_err_stage := 'Procedure modify_wf_clob_content - End';
903: PA_DEBUG.write
904: (x_Module => g_module_name
905: ,x_Msg => pa_debug.g_err_stage
898: end loop;
899: pa_debug.reset_err_stack;
900:
901: IF P_PA_DEBUG_MODE = 'Y' Then
902: PA_DEBUG.g_err_stage := 'Procedure modify_wf_clob_content - End';
903: PA_DEBUG.write
904: (x_Module => g_module_name
905: ,x_Msg => pa_debug.g_err_stage
906: ,x_Log_Level => 3);
899: pa_debug.reset_err_stack;
900:
901: IF P_PA_DEBUG_MODE = 'Y' Then
902: PA_DEBUG.g_err_stage := 'Procedure modify_wf_clob_content - End';
903: PA_DEBUG.write
904: (x_Module => g_module_name
905: ,x_Msg => pa_debug.g_err_stage
906: ,x_Log_Level => 3);
907: END IF;
901: IF P_PA_DEBUG_MODE = 'Y' Then
902: PA_DEBUG.g_err_stage := 'Procedure modify_wf_clob_content - End';
903: PA_DEBUG.write
904: (x_Module => g_module_name
905: ,x_Msg => pa_debug.g_err_stage
906: ,x_Log_Level => 3);
907: END IF;
908:
909: EXCEPTION
914: FND_MSG_PUB.add_exc_msg( p_pkg_name => 'pa_workflow_utils'
915: ,p_procedure_name => 'modify_wf_clob_content');
916:
917:
918: pa_debug.reset_err_stack;
919: RAISE;
920:
921: END modify_wf_clob_content;
922: