173: iex_debug_pub.logmessage('IEX-4 Start Invoking ItemType ..'||itemtype);
174: iex_debug_pub.logmessage('IEX-4 Start Invoking Itemkey ..'||itemkey);
175: end if;
176:
177: wf_engine.createprocess ( itemtype => itemtype,
178: itemkey => itemkey,
179: process => 'BANKRUPT_STATUS');
180:
181: wf_engine.setitemattrnumber( itemtype => itemtype,
177: wf_engine.createprocess ( itemtype => itemtype,
178: itemkey => itemkey,
179: process => 'BANKRUPT_STATUS');
180:
181: wf_engine.setitemattrnumber( itemtype => itemtype,
182: itemkey => itemkey,
183: aname => 'DELINQUENCY_ID',
184: avalue => p_delinquency_id);
185:
182: itemkey => itemkey,
183: aname => 'DELINQUENCY_ID',
184: avalue => p_delinquency_id);
185:
186: wf_engine.setitemattrnumber( itemtype => itemtype,
187: itemkey => itemkey,
188: aname => 'MANAGER_ID',
189: avalue => l_manager_id);
190:
187: itemkey => itemkey,
188: aname => 'MANAGER_ID',
189: avalue => l_manager_id);
190:
191: wf_engine.setitemattrtext( itemtype => itemtype,
192: itemkey => itemkey,
193: aname => 'MANAGER_NAME',
194: avalue => l_manager_name);
195:
192: itemkey => itemkey,
193: aname => 'MANAGER_NAME',
194: avalue => l_manager_name);
195:
196: wf_engine.setitemattrnumber( itemtype => itemtype,
197: itemkey => itemkey,
198: aname => 'APPROVER_ID',
199: avalue => l_manager_id);
200:
197: itemkey => itemkey,
198: aname => 'APPROVER_ID',
199: avalue => l_manager_id);
200:
201: wf_engine.setitemattrtext( itemtype => itemtype,
202: itemkey => itemkey,
203: aname => 'APPROVER_NAME',
204: avalue => l_manager_name);
205:
202: itemkey => itemkey,
203: aname => 'APPROVER_NAME',
204: avalue => l_manager_name);
205:
206: wf_engine.setitemattrtext( itemtype => itemtype,
207: itemkey => itemkey,
208: aname => 'REQUESTER_NAME',
209: avalue => l_user_name);
210:
207: itemkey => itemkey,
208: aname => 'REQUESTER_NAME',
209: avalue => l_user_name);
210:
211: wf_engine.setitemattrnumber( itemtype => itemtype,
212: itemkey => itemkey,
213: aname => 'REQUESTER_ID',
214: avalue => p_user_id);
215:
212: itemkey => itemkey,
213: aname => 'REQUESTER_ID',
214: avalue => p_user_id);
215:
216: wf_engine.setitemattrnumber( itemtype => itemtype,
217: itemkey => itemkey,
218: aname => 'PARTY_ID',
219: avalue => p_party_id);
220:
217: itemkey => itemkey,
218: aname => 'PARTY_ID',
219: avalue => p_party_id);
220:
221: wf_engine.setitemattrtext( itemtype => itemtype,
222: itemkey => itemkey,
223: aname => 'PARTY_NAME',
224: avalue => l_party_name);
225:
222: itemkey => itemkey,
223: aname => 'PARTY_NAME',
224: avalue => l_party_name);
225:
226: wf_engine.setitemattrnumber( itemtype => itemtype,
227: itemkey => itemkey,
228: aname => 'BANKRUPTCY_ID',
229: -- avalue => l_bankruptcy_id);
230: avalue => p_bankruptcy_id);
230: avalue => p_bankruptcy_id);
231:
232: -- DBMS_OUTPUT.PUT_LINE('Before START PROCESS');
233:
234: wf_engine.startprocess( itemtype => itemtype,
235: itemkey => itemkey);
236: -- DBMS_OUTPUT.PUT_LINE('After START PROCESS');
237:
238: wf_engine.ItemStatus( itemtype => ItemType,
234: wf_engine.startprocess( itemtype => itemtype,
235: itemkey => itemkey);
236: -- DBMS_OUTPUT.PUT_LINE('After START PROCESS');
237:
238: wf_engine.ItemStatus( itemtype => ItemType,
239: itemkey => ItemKey,
240: status => l_return_status,
241: result => l_result);
242:
318: l_api_version_number := 1.0;
319: l_api_name := 'update_approval_status';
320:
321: if funcmode <> 'RUN' then
322: result := wf_engine.eng_null;
323: return;
324: end if;
325:
326: l_profile := NVL(fnd_profile.value('IEX_STRY_CREATE_BANKRUPTCY'), 'Y');
333: if l_profile = 'Y' then
334:
335: --DBMS_OUTPUT.PUT_LINE('update_approval_status');
336:
337: l_manager_name := wf_engine.GetItemAttrText(
338: itemtype => itemtype,
339: itemkey => itemkey,
340: aname => 'MANAGER_NAME');
341:
338: itemtype => itemtype,
339: itemkey => itemkey,
340: aname => 'MANAGER_NAME');
341:
342: l_delinquency_id := wf_engine.GetItemAttrNumber(
343: itemtype => itemtype,
344: itemkey => itemkey,
345: aname => 'DELINQUENCY_ID');
346:
343: itemtype => itemtype,
344: itemkey => itemkey,
345: aname => 'DELINQUENCY_ID');
346:
347: l_party_id := wf_engine.GetItemAttrNumber(
348: itemtype => itemtype,
349: itemkey => itemkey,
350: aname => 'PARTY_ID');
351:
348: itemtype => itemtype,
349: itemkey => itemkey,
350: aname => 'PARTY_ID');
351:
352: l_party_name := wf_engine.GetItemAttrNumber(
353: itemtype => itemtype,
354: itemkey => itemkey,
355: aname => 'PARTY_NAME');
356: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
357: iex_debug_pub.logmessage ('update_approval_status start, before getting the bankruptcy id');
358: END IF;
359:
360: --Start bug 6359342 gnramasa 23-Aug-07
361: l_bankruptcy_id := wf_engine.GetItemAttrNumber(
362: itemtype => itemtype,
363: itemkey => itemkey,
364: aname => 'BANKRUPTCY_ID');
365:
446: BEGIN
447:
448: iex_debug_pub.logmessage('IEX-Reject Bankruptcy Start ..');
449: l_api_name := 'update_rejection_status';
450: l_manager_name := wf_engine.GetItemAttrText(
451: itemtype => itemtype,
452: itemkey => itemkey,
453: aname => 'MANAGER_NAME');
454:
451: itemtype => itemtype,
452: itemkey => itemkey,
453: aname => 'MANAGER_NAME');
454:
455: l_delinquency_id := wf_engine.GetItemAttrNumber(
456: itemtype => itemtype,
457: itemkey => itemkey,
458: aname => 'DELINQUENCY_ID');
459:
456: itemtype => itemtype,
457: itemkey => itemkey,
458: aname => 'DELINQUENCY_ID');
459:
460: l_party_id := wf_engine.GetItemAttrNumber(
461: itemtype => itemtype,
462: itemkey => itemkey,
463: aname => 'PARTY_ID');
464:
461: itemtype => itemtype,
462: itemkey => itemkey,
463: aname => 'PARTY_ID');
464:
465: l_party_name := wf_engine.GetItemAttrNumber(
466: itemtype => itemtype,
467: itemkey => itemkey,
468: aname => 'PARTY_NAME');
469:
579: l_api_name := 'set_no_contact';
580: l_api_version_number := 1.0;
581:
582: if funcmode <> 'RUN' then
583: result := wf_engine.eng_null;
584: return;
585: end if;
586:
587: l_party_id := wf_engine.GetItemAttrNumber(
583: result := wf_engine.eng_null;
584: return;
585: end if;
586:
587: l_party_id := wf_engine.GetItemAttrNumber(
588: itemtype => itemtype,
589: itemkey => itemkey,
590: aname => 'PARTY_ID');
591:
749: BEGIN
750:
751: l_api_name := 'create delinquency';
752: if funcmode <> 'RUN' then
753: result := wf_engine.eng_null;
754: return;
755: end if;
756:
757: l_profile := NVL(fnd_profile.value('IEX_TURNOFF_COLLECT_BANKRUPTCY'), 'Y');
756:
757: l_profile := NVL(fnd_profile.value('IEX_TURNOFF_COLLECT_BANKRUPTCY'), 'Y');
758:
759:
760: wf_engine.setitemattrtext( itemtype => itemtype,
761: itemkey => itemkey,
762: aname => 'TURNOFF_COLLECTION_PROFILE',
763: avalue => l_profile);
764:
762: aname => 'TURNOFF_COLLECTION_PROFILE',
763: avalue => l_profile);
764:
765: IF l_profile = 'Y' THEN
766: result := wf_engine.eng_completed ||':Y';
767: -- result := 'COMPLETE:Y';
768: ELSE
769: result := wf_engine.eng_completed ||':N';
770: -- result := 'COMPLETE:N';
765: IF l_profile = 'Y' THEN
766: result := wf_engine.eng_completed ||':Y';
767: -- result := 'COMPLETE:Y';
768: ELSE
769: result := wf_engine.eng_completed ||':N';
770: -- result := 'COMPLETE:N';
771: END IF;
772: -- IF PG_DEBUG < 10 THEN
773: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
850: p_ObjectID := p_bankruptcy_id;
851: l_init_msg_list := FND_API.G_FALSE;
852:
853: if funcmode <> 'RUN' then
854: result := wf_engine.eng_null;
855: return;
856: end if;
857:
858: --get profile
856: end if;
857:
858: --get profile
859: /*
860: l_turnoff_collection_profile := wf_engine.GetItemAttrNumber(
861: itemtype => itemtype,
862: itemkey => itemkey,
863: aname => 'TURNOFF_COLLECTION_PROFILE');
864:
861: itemtype => itemtype,
862: itemkey => itemkey,
863: aname => 'TURNOFF_COLLECTION_PROFILE');
864:
865: l_party_id := wf_engine.GetItemAttrNumber(
866: itemtype => itemtype,
867: itemkey => itemkey,
868: aname => 'PARTY_ID');
869:
1041: P_ObjectType := 'BANKRUPTCY';
1042: p_ObjectID := p_bankruptcy_id;
1043:
1044: if funcmode <> 'RUN' then
1045: result := wf_engine.eng_null;
1046: return;
1047: end if;
1048:
1049: /*
1047: end if;
1048:
1049: /*
1050: --get profile
1051: l_turnoff_collection_profile := wf_engine.GetItemAttrNumber(
1052: itemtype => itemtype,
1053: itemkey => itemkey,
1054: aname => 'TURNOFF_COLLECTION_PROFILE');
1055:
1052: itemtype => itemtype,
1053: itemkey => itemkey,
1054: aname => 'TURNOFF_COLLECTION_PROFILE');
1055:
1056: l_party_id := wf_engine.GetItemAttrNumber(
1057: itemtype => itemtype,
1058: itemkey => itemkey,
1059: aname => 'PARTY_ID');
1060:
1372: end if;
1373:
1374: if (p_disposition_code = 'WITHDRAWN') or (p_disposition_code = 'DISMISSED') then
1375: begin
1376: wf_engine.itemstatus(itemtype => l_item_type, itemkey => p_bankruptcy_id, status => l_status, result => l_result);
1377: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1378: IEX_DEBUG_PUB.logMessage('cancel_strategy_and_workflow: Workflow status =>' || l_status);
1379: END IF;
1380:
1377: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1378: IEX_DEBUG_PUB.logMessage('cancel_strategy_and_workflow: Workflow status =>' || l_status);
1379: END IF;
1380:
1381: IF l_status <> wf_engine.eng_completed THEN
1382: wf_engine.abortprocess(itemtype => l_item_type, itemkey => p_bankruptcy_id);
1383: wf_engine.itemstatus(itemtype => l_item_type, itemkey => p_bankruptcy_id, status => l_status, result => l_result);
1384: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1385: IEX_DEBUG_PUB.logMessage('cancel_strategy_and_workflow: Abort process has completed and status =>' || l_status);
1378: IEX_DEBUG_PUB.logMessage('cancel_strategy_and_workflow: Workflow status =>' || l_status);
1379: END IF;
1380:
1381: IF l_status <> wf_engine.eng_completed THEN
1382: wf_engine.abortprocess(itemtype => l_item_type, itemkey => p_bankruptcy_id);
1383: wf_engine.itemstatus(itemtype => l_item_type, itemkey => p_bankruptcy_id, status => l_status, result => l_result);
1384: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1385: IEX_DEBUG_PUB.logMessage('cancel_strategy_and_workflow: Abort process has completed and status =>' || l_status);
1386: END IF;
1379: END IF;
1380:
1381: IF l_status <> wf_engine.eng_completed THEN
1382: wf_engine.abortprocess(itemtype => l_item_type, itemkey => p_bankruptcy_id);
1383: wf_engine.itemstatus(itemtype => l_item_type, itemkey => p_bankruptcy_id, status => l_status, result => l_result);
1384: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1385: IEX_DEBUG_PUB.logMessage('cancel_strategy_and_workflow: Abort process has completed and status =>' || l_status);
1386: END IF;
1387:
1401: if (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1402: IEX_DEBUG_PUB.logMessage('IEXDELCS Workflow Status = :: =>' || l_status||'and itemkey is...'||l_itemkey);
1403: end if;
1404:
1405: wf_engine.itemstatus(itemtype => 'IEXDELCS', itemkey => l_itemkey, status => l_status, result => l_result);
1406: if (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1407: IEX_DEBUG_PUB.logMessage('IEXDELCS Workflow Status = :: =>' || l_status||'and itemkey is...'||l_itemkey);
1408: end if;
1409:
1406: if (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1407: IEX_DEBUG_PUB.logMessage('IEXDELCS Workflow Status = :: =>' || l_status||'and itemkey is...'||l_itemkey);
1408: end if;
1409:
1410: if l_status <> wf_engine.eng_completed THEN
1411: wf_engine.abortprocess(itemtype => 'IEXDELCS', itemkey => l_itemkey);
1412: wf_engine.itemstatus(itemtype => 'IEXDELCS', itemkey => l_itemkey, status => l_status, result => l_result);
1413: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1414: IEX_DEBUG_PUB.logMessage('cancel serviceHold_workflow: Abort process has completed and status =>' || l_status);
1407: IEX_DEBUG_PUB.logMessage('IEXDELCS Workflow Status = :: =>' || l_status||'and itemkey is...'||l_itemkey);
1408: end if;
1409:
1410: if l_status <> wf_engine.eng_completed THEN
1411: wf_engine.abortprocess(itemtype => 'IEXDELCS', itemkey => l_itemkey);
1412: wf_engine.itemstatus(itemtype => 'IEXDELCS', itemkey => l_itemkey, status => l_status, result => l_result);
1413: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1414: IEX_DEBUG_PUB.logMessage('cancel serviceHold_workflow: Abort process has completed and status =>' || l_status);
1415: END IF;
1408: end if;
1409:
1410: if l_status <> wf_engine.eng_completed THEN
1411: wf_engine.abortprocess(itemtype => 'IEXDELCS', itemkey => l_itemkey);
1412: wf_engine.itemstatus(itemtype => 'IEXDELCS', itemkey => l_itemkey, status => l_status, result => l_result);
1413: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1414: IEX_DEBUG_PUB.logMessage('cancel serviceHold_workflow: Abort process has completed and status =>' || l_status);
1415: END IF;
1416: end if;
1432: if (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1433: IEX_DEBUG_PUB.logMessage('IEXDELCR Workflow Status = :: =>' || l_status||'and itemkwy is ...'||l_itemkey);
1434: end if;
1435:
1436: wf_engine.itemstatus(itemtype => 'IEXDELCR', itemkey => l_itemkey, status => l_status, result => l_result);
1437: if (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1438: IEX_DEBUG_PUB.logMessage('IEXDELCR Workflow Status = :: =>' || l_status||'and itemkwy is ...'||l_itemkey);
1439: end if;
1440:
1437: if (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1438: IEX_DEBUG_PUB.logMessage('IEXDELCR Workflow Status = :: =>' || l_status||'and itemkwy is ...'||l_itemkey);
1439: end if;
1440:
1441: if l_status <> wf_engine.eng_completed THEN
1442: wf_engine.abortprocess(itemtype => 'IEXDELCR', itemkey => l_itemkey);
1443: wf_engine.itemstatus(itemtype => 'IEXDELCR', itemkey => l_itemkey, status => l_status, result => l_result);
1444: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1445: IEX_DEBUG_PUB.logMessage('cancel_creditHold_request_workflow: Abort process has completed and status =>' || l_status);
1438: IEX_DEBUG_PUB.logMessage('IEXDELCR Workflow Status = :: =>' || l_status||'and itemkwy is ...'||l_itemkey);
1439: end if;
1440:
1441: if l_status <> wf_engine.eng_completed THEN
1442: wf_engine.abortprocess(itemtype => 'IEXDELCR', itemkey => l_itemkey);
1443: wf_engine.itemstatus(itemtype => 'IEXDELCR', itemkey => l_itemkey, status => l_status, result => l_result);
1444: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1445: IEX_DEBUG_PUB.logMessage('cancel_creditHold_request_workflow: Abort process has completed and status =>' || l_status);
1446: END IF;
1439: end if;
1440:
1441: if l_status <> wf_engine.eng_completed THEN
1442: wf_engine.abortprocess(itemtype => 'IEXDELCR', itemkey => l_itemkey);
1443: wf_engine.itemstatus(itemtype => 'IEXDELCR', itemkey => l_itemkey, status => l_status, result => l_result);
1444: IF (FND_LOG.LEVEL_EVENT >= PG_DEBUG) THEN
1445: IEX_DEBUG_PUB.logMessage('cancel_creditHold_request_workflow: Abort process has completed and status =>' || l_status);
1446: END IF;
1447: end if;