DBA Data[Home] [Help]

APPS.OE_NEGOTIATE_WF dependencies on WF_ENGINE

Line 86: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'SALES_DOCUMENT_TYPE_CODE');

82: p_entity_code => 'HEADER'
83: ,p_entity_id => to_number(itemkey)
84: ,p_header_id => to_number(itemkey));
85:
86: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'SALES_DOCUMENT_TYPE_CODE');
87: IF l_sales_document_type_code = 'O' THEN
88: -- Quote Complete_Negotiation
89: OE_QUOTE_UTIL.Complete_Negotiation(p_header_id => to_number(itemkey), x_return_status => l_return_status,
90: x_msg_count => l_msg_Count, x_msg_data => l_msg_data);

Line 160: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'SALES_DOCUMENT_TYPE_CODE');

156: p_entity_code => 'HEADER'
157: ,p_entity_id => to_number(itemkey)
158: ,p_header_id => to_number(itemkey));
159:
160: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'SALES_DOCUMENT_TYPE_CODE');
161: --OE_BLANKET_WF_UTIL.Blanket_QA_Articles(p_header_id => to_number(itemkey),
162: -- x_return_status => l_return_status);
163:
164: OE_CONTRACTS_UTIL.qa_articles ( p_api_version => 1.0,

Line 453: l_aname wf_engine.nametabtyp;

449: --
450: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
451: l_expiration_date DATE;
452: l_pre_notification_percent NUMBER;
453: l_aname wf_engine.nametabtyp;
454: l_avalue wf_engine.numtabtyp;
455: l_final_timer NUMBER;
456: l_sales_document_type_code VARCHAR2(1);
457: --

Line 454: l_avalue wf_engine.numtabtyp;

450: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
451: l_expiration_date DATE;
452: l_pre_notification_percent NUMBER;
453: l_aname wf_engine.nametabtyp;
454: l_avalue wf_engine.numtabtyp;
455: l_final_timer NUMBER;
456: l_sales_document_type_code VARCHAR2(1);
457: --
458:

Line 471: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'SALES_DOCUMENT_TYPE_CODE');

467: p_entity_code => 'HEADER'
468: ,p_entity_id => to_number(itemkey)
469: ,p_header_id => to_number(itemkey));
470:
471: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'SALES_DOCUMENT_TYPE_CODE');
472: IF l_sales_document_type_code = 'O' THEN
473: select expiration_date
474: into l_expiration_date
475: from oe_order_headers_all

Line 494: wf_engine.SetItemAttrNumberArray(itemtype=>itemtype

490: l_avalue(1) := null;
491: l_aname(2) := 'OFFER_FINAL_EXPIRE_TIMER';
492: l_avalue(2) := null;
493:
494: wf_engine.SetItemAttrNumberArray(itemtype=>itemtype
495: , itemkey=>itemkey
496: , aname=>l_aname
497: , avalue=>l_avalue
498: );

Line 517: l_pre_notification_percent := wf_engine.GetItemAttrNumber(itemtype, itemkey, 'PRE_EXPIRE_TIME_PERCENT');

513: END IF;
514:
515: --if you are here, that means expiration date exists and is in the future
516:
517: l_pre_notification_percent := wf_engine.GetItemAttrNumber(itemtype, itemkey, 'PRE_EXPIRE_TIME_PERCENT');
518:
519: IF l_pre_notification_percent = 0 THEN
520: -- set the FINAL timer only is enough
521: -- this assumes expiration_date is already set to 23:59:59

Line 523: wf_engine.setitemattrnumber(itemtype=>itemtype,

519: IF l_pre_notification_percent = 0 THEN
520: -- set the FINAL timer only is enough
521: -- this assumes expiration_date is already set to 23:59:59
522: l_final_timer := (l_expiration_date - sysdate) * 1440;
523: wf_engine.setitemattrnumber(itemtype=>itemtype,
524: itemkey=>itemkey,
525: aname=>'OFFER_FINAL_EXPIRE_TIMER',
526: avalue=>l_final_timer);
527: resultout := 'COMPLETE:NO_REMINDER';

Line 535: wf_engine.SetItemAttrNumber(itemtype=>itemtype

531: ELSIF to_char(sysdate, 'DD-MON-RRRR') = to_char(l_expiration_date, 'DD-MON-RRRR') THEN
532: -- pre notification percentage is non-zero
533: -- expiration_date is today midnight, we should send the reminder
534:
535: wf_engine.SetItemAttrNumber(itemtype=>itemtype
536: , itemkey=>itemkey
537: , aname=>'OFFER_FINAL_EXPIRE_TIMER'
538: , avalue=>(l_expiration_date - sysdate) * 1440
539: );

Line 551: wf_engine.SetItemAttrNumberArray(itemtype=>itemtype

547: l_avalue(1) := Ceil((l_expiration_date - sysdate) * l_pre_notification_percent/100) * 1440;
548: l_aname(2) := 'OFFER_PRE_EXPIRE_TIMER';
549: l_avalue(2) := ((l_expiration_date - sysdate) * 1440) - l_avalue(1);
550:
551: wf_engine.SetItemAttrNumberArray(itemtype=>itemtype
552: , itemkey=>itemkey
553: , aname=>l_aname
554: , avalue=>l_avalue
555: );

Line 595: l_aname wf_engine.nametabtyp;

591: l_salesrep VARCHAR2(240);
592: l_sold_to VARCHAR2(240);
593: l_customer_number VARCHAR2(30);
594: l_expiration_date DATE;
595: l_aname wf_engine.nametabtyp;
596: l_avaluetext wf_engine.texttabtyp;
597:
598: --
599:

Line 596: l_avaluetext wf_engine.texttabtyp;

592: l_sold_to VARCHAR2(240);
593: l_customer_number VARCHAR2(30);
594: l_expiration_date DATE;
595: l_aname wf_engine.nametabtyp;
596: l_avaluetext wf_engine.texttabtyp;
597:
598: --
599:
600: BEGIN

Line 623: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'SALES_DOCUMENT_TYPE_CODE');

619: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
620: RAISE FND_API.G_EXC_ERROR;
621: END IF;
622:
623: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'SALES_DOCUMENT_TYPE_CODE');
624: IF l_sales_document_type_code = 'O' THEN
625: -- ***DATE_CALCULATION***
626: select sold_to_org_id, expiration_date, salesrep_id
627: into l_sold_to_org_id, l_expiration_date, l_salesrep_id

Line 648: wf_engine.SetItemAttrTextArray(itemtype=>itemtype,

644: l_avaluetext(2) := l_sold_to;
645: l_aname(3) := 'EXPIRATION_DATE';
646: l_avaluetext(3) := l_expiration_date;
647:
648: wf_engine.SetItemAttrTextArray(itemtype=>itemtype,
649: itemkey=>itemkey,
650: aname=>l_aname,
651: avalue=>l_avaluetext);
652:

Line 703: l_header_id := to_number(wf_engine.setctx_itemkey);

699: where notification_id = to_number(document_id);
700: EXCEPTION
701: WHEN NO_DATA_FOUND THEN
702: -- if viewing method is email
703: l_header_id := to_number(wf_engine.setctx_itemkey);
704: END;
705:
706: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, l_header_id, 'SALES_DOCUMENT_TYPE_CODE');
707: IF l_sales_document_type_code = 'B' THEN

Line 706: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, l_header_id, 'SALES_DOCUMENT_TYPE_CODE');

702: -- if viewing method is email
703: l_header_id := to_number(wf_engine.setctx_itemkey);
704: END;
705:
706: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, l_header_id, 'SALES_DOCUMENT_TYPE_CODE');
707: IF l_sales_document_type_code = 'B' THEN
708: SELECT order_number
709: INTO l_blanket_number
710: FROM oe_blanket_headers_all

Line 787: and activity_status = wf_engine.eng_notified

783: into l_activity_name
784: from wf_item_activity_statuses wias, wf_process_activities wpa
785: where item_type = OE_GLOBALS.G_WFI_NGO
786: and item_key = to_char(p_header_id)
787: and activity_status = wf_engine.eng_notified
788: and wpa.activity_name in ('SUBMIT_DRAFT_ELIGIBLE', 'NEGOTIATION_COMPLETE_ELIGIBLE')
789: and wias.process_activity = wpa.instance_id;
790:
791: EXCEPTION

Line 822: WF_ENGINE.CompleteActivityInternalName(OE_GLOBALS.G_WFI_NGO, to_char(p_header_id), l_activity_name, 'LOST');

818: p_reason_comments => p_reason_comments,
819: x_reason_id => l_reason_id,
820: x_return_status => l_return_status);
821:
822: WF_ENGINE.CompleteActivityInternalName(OE_GLOBALS.G_WFI_NGO, to_char(p_header_id), l_activity_name, 'LOST');
823:
824: IF l_debug_level > 0 THEN
825: oe_debug_pub.add('EXITING OE_Negotiate_WF.Lost normally', 1);
826: END IF;

Line 904: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, p_header_id, 'SALES_DOCUMENT_TYPE_CODE');

900: END IF;
901: END IF;
902: -- END Bug3435165
903:
904: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, p_header_id, 'SALES_DOCUMENT_TYPE_CODE');
905: select wpa.activity_name
906: into l_activity_name
907: from wf_item_activity_statuses wias, wf_process_activities wpa
908: where item_type = OE_GLOBALS.G_WFI_NGO

Line 910: and activity_status = wf_engine.eng_notified

906: into l_activity_name
907: from wf_item_activity_statuses wias, wf_process_activities wpa
908: where item_type = OE_GLOBALS.G_WFI_NGO
909: and item_key = to_char(p_header_id)
910: and activity_status = wf_engine.eng_notified
911: and wpa.activity_name = l_customer_acceptance
912: and wias.process_activity = wpa.instance_id;
913:
914: EXCEPTION

Line 953: WF_ENGINE.CompleteActivityInternalName(itemtype => OE_GLOBALS.G_WFI_NGO,

949: ,p_order_source_id => null
950: ,p_source_document_type_id => null);
951:
952:
953: WF_ENGINE.CompleteActivityInternalName(itemtype => OE_GLOBALS.G_WFI_NGO,
954: itemkey => to_char(p_header_id),
955: activity => l_activity_name,
956: result => 'ACCEPT');
957: IF l_debug_level > 0 THEN

Line 1015: and activity_status = wf_engine.eng_notified

1011: into l_activity_name
1012: from wf_item_activity_statuses wias, wf_process_activities wpa
1013: where item_type = OE_GLOBALS.G_WFI_NGO
1014: and item_key = to_char(p_header_id)
1015: and activity_status = wf_engine.eng_notified
1016: and wpa.activity_name = l_customer_acceptance
1017: and wias.process_activity = wpa.instance_id;
1018:
1019: EXCEPTION

Line 1050: WF_ENGINE.CompleteActivityInternalName(OE_GLOBALS.G_WFI_NGO, to_char(p_header_id), l_activity_name, 'REJECT');

1046: x_reason_id => l_reason_id,
1047: x_return_status => l_return_status);
1048:
1049:
1050: WF_ENGINE.CompleteActivityInternalName(OE_GLOBALS.G_WFI_NGO, to_char(p_header_id), l_activity_name, 'REJECT');
1051: IF l_debug_level > 0 THEN
1052: oe_debug_pub.add('EXITING OE_Negotiate_WF.Customer_Rejected normally', 1);
1053: END IF;
1054: EXCEPTION

Line 1098: and activity_status = wf_engine.eng_notified

1094: into l_activity_name
1095: from wf_item_activity_statuses wias, wf_process_activities wpa
1096: where item_type = OE_GLOBALS.G_WFI_NGO
1097: and item_key = to_char(p_header_id)
1098: and activity_status = wf_engine.eng_notified
1099: and wpa.activity_name in ('WAIT_FOR_EXPIRATION', 'WAIT_FOR_FINAL_EXPIRATION')
1100: and wias.process_activity = wpa.instance_id;
1101:
1102: EXCEPTION

Line 1104: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, p_header_id, 'SALES_DOCUMENT_TYPE_CODE');

1100: and wias.process_activity = wpa.instance_id;
1101:
1102: EXCEPTION
1103: WHEN OTHERS THEN
1104: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, p_header_id, 'SALES_DOCUMENT_TYPE_CODE');
1105: IF l_sales_document_type_code = 'O' THEN
1106: fnd_message.set_name('ONT', 'OE_NTF_QUOTE');
1107: ELSE -- assume blanket
1108: fnd_message.set_name('ONT', 'OE_NTF_BSA');

Line 1122: oe_debug_pub.add('Calling WF_ENGINE to completeactivity' ,3);

1118: return;
1119: END;
1120: -- ok to go date changed
1121: IF l_debug_level > 0 THEN
1122: oe_debug_pub.add('Calling WF_ENGINE to completeactivity' ,3);
1123: END IF;
1124: WF_ENGINE.CompleteActivityInternalName(OE_GLOBALS.G_WFI_NGO, to_char(p_header_id), l_activity_name, 'DATE_CHANGED');
1125: IF l_debug_level > 0 THEN
1126: oe_debug_pub.add('EXITING OE_Negotiate_WF.Offer_Date_Changed normally', 1);

Line 1124: WF_ENGINE.CompleteActivityInternalName(OE_GLOBALS.G_WFI_NGO, to_char(p_header_id), l_activity_name, 'DATE_CHANGED');

1120: -- ok to go date changed
1121: IF l_debug_level > 0 THEN
1122: oe_debug_pub.add('Calling WF_ENGINE to completeactivity' ,3);
1123: END IF;
1124: WF_ENGINE.CompleteActivityInternalName(OE_GLOBALS.G_WFI_NGO, to_char(p_header_id), l_activity_name, 'DATE_CHANGED');
1125: IF l_debug_level > 0 THEN
1126: oe_debug_pub.add('EXITING OE_Negotiate_WF.Offer_Date_Changed normally', 1);
1127: END IF;
1128: EXCEPTION

Line 1201: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, p_header_id, 'SALES_DOCUMENT_TYPE_CODE');

1197: END IF;
1198: END IF;
1199: -- END Bug3435165
1200:
1201: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, p_header_id, 'SALES_DOCUMENT_TYPE_CODE');
1202: IF l_sales_document_type_code = 'O' THEN
1203: l_entity_code := 'HEADER';
1204: ELSE
1205: l_entity_code := 'BLANKET_HEADER';

Line 1226: and activity_status = wf_engine.eng_notified

1222: into l_activity_name
1223: from wf_item_activity_statuses wias, wf_process_activities wpa
1224: where item_type = OE_GLOBALS.G_WFI_NGO
1225: and item_key = to_char(p_header_id)
1226: and activity_status = wf_engine.eng_notified
1227: and wpa.activity_name = l_submit_draft_eligible
1228: and wias.process_activity = wpa.instance_id;
1229:
1230: EXCEPTION

Line 1249: WF_ENGINE.CompleteActivityInternalName(itemtype => OE_GLOBALS.G_WFI_NGO,

1245: END IF;
1246: return;
1247: END;
1248: -- ok to go Submit Draft
1249: WF_ENGINE.CompleteActivityInternalName(itemtype => OE_GLOBALS.G_WFI_NGO,
1250: itemkey => to_char(p_header_id),
1251: activity => l_activity_name,
1252: result => 'COMPLETE');
1253: IF l_debug_level > 0 THEN

Line 1285: l_aname wf_engine.nametabtyp;

1281: l_salesrep VARCHAR2(240);
1282: l_sold_to VARCHAR2(240);
1283: l_customer_number VARCHAR2(30);
1284: l_expiration_date DATE;
1285: l_aname wf_engine.nametabtyp;
1286: l_avaluetext wf_engine.texttabtyp;
1287: --
1288: BEGIN
1289: IF l_debug_level > 0 THEN

Line 1286: l_avaluetext wf_engine.texttabtyp;

1282: l_sold_to VARCHAR2(240);
1283: l_customer_number VARCHAR2(30);
1284: l_expiration_date DATE;
1285: l_aname wf_engine.nametabtyp;
1286: l_avaluetext wf_engine.texttabtyp;
1287: --
1288: BEGIN
1289: IF l_debug_level > 0 THEN
1290: oe_debug_pub.add( 'ENTERING OE_Negotiate_WF.Set_Header_Attributes_Internal:'||To_char(p_header_id) ,1 ) ;

Line 1293: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, To_char(p_header_id), 'SALES_DOCUMENT_TYPE_CODE');

1289: IF l_debug_level > 0 THEN
1290: oe_debug_pub.add( 'ENTERING OE_Negotiate_WF.Set_Header_Attributes_Internal:'||To_char(p_header_id) ,1 ) ;
1291: END IF;
1292:
1293: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, To_char(p_header_id), 'SALES_DOCUMENT_TYPE_CODE');
1294: IF l_sales_document_type_code = 'O' THEN
1295:
1296: select sold_to_org_id, expiration_date, salesrep_id
1297: into l_sold_to_org_id, l_expiration_date, l_salesrep_id

Line 1316: wf_engine.SetItemAttrTextArray(itemtype=>OE_GLOBALS.G_WFI_NGO,

1312: l_avaluetext(2) := l_sold_to;
1313: l_aname(3) := 'EXPIRATION_DATE';
1314: l_avaluetext(3) := l_expiration_date;
1315:
1316: wf_engine.SetItemAttrTextArray(itemtype=>OE_GLOBALS.G_WFI_NGO,
1317: itemkey=>To_char(p_header_id),
1318: aname=>l_aname,
1319: avalue=>l_avaluetext);
1320:

Line 1397: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'SALES_DOCUMENT_TYPE_CODE');

1393: IF l_debug_level > 0 THEN
1394: oe_debug_pub.add( 'Done setting header attributes',1);
1395: END IF;
1396:
1397: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'SALES_DOCUMENT_TYPE_CODE');
1398: IF l_sales_document_type_code = 'O' THEN
1399: select expiration_date
1400: into l_expiration_date
1401: from oe_order_headers_all

Line 1419: wf_engine.setitemattrnumber(itemtype=>itemtype,

1415: END IF;
1416:
1417: l_final_timer := (l_expiration_date - Sysdate) * 1440;
1418: IF l_final_timer > 0 THEN
1419: wf_engine.setitemattrnumber(itemtype=>itemtype,
1420: itemkey=>itemkey,
1421: aname=>'OFFER_FINAL_EXPIRE_TIMER',
1422: avalue=>l_final_timer);
1423: resultout := 'COMPLETE';

Line 1468: and activity_status = wf_engine.eng_notified

1464: into l_activity_name
1465: from wf_item_activity_statuses wias, wf_process_activities wpa
1466: where item_type = OE_GLOBALS.G_WFI_NGO
1467: and item_key = to_char(p_header_id)
1468: and activity_status = wf_engine.eng_notified
1469: and wpa.activity_name = l_customer_acceptance
1470: and wias.process_activity = wpa.instance_id;
1471:
1472: RETURN TRUE;