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 649: wf_engine.SetItemAttrTextArray(itemtype=>itemtype,

645: l_aname(3) := 'EXPIRATION_DATE';
646: --Bug 12884612: Use date mask while converting to text
647: l_avaluetext(3) := to_char(l_expiration_date,'DD-MON-RRRR');
648:
649: wf_engine.SetItemAttrTextArray(itemtype=>itemtype,
650: itemkey=>itemkey,
651: aname=>l_aname,
652: avalue=>l_avaluetext);
653:

Line 720: l_item_key := TO_NUMBER (wf_engine.setctx_itemkey);

716: EXCEPTION
717: WHEN NO_DATA_FOUND
718: THEN
719: -- if viewing method is email
720: l_item_key := TO_NUMBER (wf_engine.setctx_itemkey);
721: -- AME ER
722: END;
723: /* 9047023: End */
724: END;

Line 736: wf_engine.getitemattrnumber ('OEAME', l_item_key, 'HEADER_ID');

732: END IF ;
733: IF l_item_type='OEAME'
734: THEN --AME ER
735: l_header_id :=
736: wf_engine.getitemattrnumber ('OEAME', l_item_key, 'HEADER_ID');
737:
738: ELSE
739: l_header_id := TO_NUMBER (l_item_key);
740: --AME ER

Line 757: wf_engine.getitemattrtext (oe_globals.g_wfi_ngo,

753: END;
754:
755: -- AME ER END
756: l_sales_document_type_code :=
757: wf_engine.getitemattrtext (oe_globals.g_wfi_ngo,
758: l_header_id,
759: 'SALES_DOCUMENT_TYPE_CODE'
760: );
761:

Line 842: and activity_status = wf_engine.eng_notified

838: into l_activity_name
839: from wf_item_activity_statuses wias, wf_process_activities wpa
840: where item_type = OE_GLOBALS.G_WFI_NGO
841: and item_key = to_char(p_header_id)
842: and activity_status = wf_engine.eng_notified
843: and wpa.activity_name in ('SUBMIT_DRAFT_ELIGIBLE', 'NEGOTIATION_COMPLETE_ELIGIBLE')
844: and wias.process_activity = wpa.instance_id;
845:
846: EXCEPTION

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

873: p_reason_comments => p_reason_comments,
874: x_reason_id => l_reason_id,
875: x_return_status => l_return_status);
876:
877: WF_ENGINE.CompleteActivityInternalName(OE_GLOBALS.G_WFI_NGO, to_char(p_header_id), l_activity_name, 'LOST');
878:
879: IF l_debug_level > 0 THEN
880: oe_debug_pub.add('EXITING OE_Negotiate_WF.Lost normally', 1);
881: END IF;

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

955: END IF;
956: END IF;
957: -- END Bug3435165
958:
959: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, p_header_id, 'SALES_DOCUMENT_TYPE_CODE');
960: select wpa.activity_name
961: into l_activity_name
962: from wf_item_activity_statuses wias, wf_process_activities wpa
963: where item_type = OE_GLOBALS.G_WFI_NGO

Line 965: and activity_status = wf_engine.eng_notified

961: into l_activity_name
962: from wf_item_activity_statuses wias, wf_process_activities wpa
963: where item_type = OE_GLOBALS.G_WFI_NGO
964: and item_key = to_char(p_header_id)
965: and activity_status = wf_engine.eng_notified
966: and wpa.activity_name = l_customer_acceptance
967: and wias.process_activity = wpa.instance_id;
968:
969: EXCEPTION

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

1004: ,p_order_source_id => null
1005: ,p_source_document_type_id => null);
1006:
1007:
1008: WF_ENGINE.CompleteActivityInternalName(itemtype => OE_GLOBALS.G_WFI_NGO,
1009: itemkey => to_char(p_header_id),
1010: activity => l_activity_name,
1011: result => 'ACCEPT');
1012: IF l_debug_level > 0 THEN

Line 1070: and activity_status = wf_engine.eng_notified

1066: into l_activity_name
1067: from wf_item_activity_statuses wias, wf_process_activities wpa
1068: where item_type = OE_GLOBALS.G_WFI_NGO
1069: and item_key = to_char(p_header_id)
1070: and activity_status = wf_engine.eng_notified
1071: and wpa.activity_name = l_customer_acceptance
1072: and wias.process_activity = wpa.instance_id;
1073:
1074: EXCEPTION

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

1101: x_reason_id => l_reason_id,
1102: x_return_status => l_return_status);
1103:
1104:
1105: WF_ENGINE.CompleteActivityInternalName(OE_GLOBALS.G_WFI_NGO, to_char(p_header_id), l_activity_name, 'REJECT');
1106: IF l_debug_level > 0 THEN
1107: oe_debug_pub.add('EXITING OE_Negotiate_WF.Customer_Rejected normally', 1);
1108: END IF;
1109: EXCEPTION

Line 1153: and activity_status = wf_engine.eng_notified

1149: into l_activity_name
1150: from wf_item_activity_statuses wias, wf_process_activities wpa
1151: where item_type = OE_GLOBALS.G_WFI_NGO
1152: and item_key = to_char(p_header_id)
1153: and activity_status = wf_engine.eng_notified
1154: and wpa.activity_name in ('WAIT_FOR_EXPIRATION', 'WAIT_FOR_FINAL_EXPIRATION')
1155: and wias.process_activity = wpa.instance_id;
1156:
1157: EXCEPTION

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

1155: and wias.process_activity = wpa.instance_id;
1156:
1157: EXCEPTION
1158: WHEN OTHERS THEN
1159: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, p_header_id, 'SALES_DOCUMENT_TYPE_CODE');
1160: IF l_sales_document_type_code = 'O' THEN
1161: fnd_message.set_name('ONT', 'OE_NTF_QUOTE');
1162: ELSE -- assume blanket
1163: fnd_message.set_name('ONT', 'OE_NTF_BSA');

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

1173: return;
1174: END;
1175: -- ok to go date changed
1176: IF l_debug_level > 0 THEN
1177: oe_debug_pub.add('Calling WF_ENGINE to completeactivity' ,3);
1178: END IF;
1179: WF_ENGINE.CompleteActivityInternalName(OE_GLOBALS.G_WFI_NGO, to_char(p_header_id), l_activity_name, 'DATE_CHANGED');
1180: IF l_debug_level > 0 THEN
1181: oe_debug_pub.add('EXITING OE_Negotiate_WF.Offer_Date_Changed normally', 1);

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

1175: -- ok to go date changed
1176: IF l_debug_level > 0 THEN
1177: oe_debug_pub.add('Calling WF_ENGINE to completeactivity' ,3);
1178: END IF;
1179: WF_ENGINE.CompleteActivityInternalName(OE_GLOBALS.G_WFI_NGO, to_char(p_header_id), l_activity_name, 'DATE_CHANGED');
1180: IF l_debug_level > 0 THEN
1181: oe_debug_pub.add('EXITING OE_Negotiate_WF.Offer_Date_Changed normally', 1);
1182: END IF;
1183: EXCEPTION

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

1252: END IF;
1253: END IF;
1254: -- END Bug3435165
1255:
1256: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, p_header_id, 'SALES_DOCUMENT_TYPE_CODE');
1257: IF l_sales_document_type_code = 'O' THEN
1258: l_entity_code := 'HEADER';
1259: ELSE
1260: l_entity_code := 'BLANKET_HEADER';

Line 1281: and activity_status = wf_engine.eng_notified

1277: into l_activity_name
1278: from wf_item_activity_statuses wias, wf_process_activities wpa
1279: where item_type = OE_GLOBALS.G_WFI_NGO
1280: and item_key = to_char(p_header_id)
1281: and activity_status = wf_engine.eng_notified
1282: and wpa.activity_name = l_submit_draft_eligible
1283: and wias.process_activity = wpa.instance_id;
1284:
1285: EXCEPTION

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

1300: END IF;
1301: return;
1302: END;
1303: -- ok to go Submit Draft
1304: WF_ENGINE.CompleteActivityInternalName(itemtype => OE_GLOBALS.G_WFI_NGO,
1305: itemkey => to_char(p_header_id),
1306: activity => l_activity_name,
1307: result => 'COMPLETE');
1308: IF l_debug_level > 0 THEN

Line 1340: l_aname wf_engine.nametabtyp;

1336: l_salesrep VARCHAR2(240);
1337: l_sold_to VARCHAR2(240);
1338: l_customer_number VARCHAR2(30);
1339: l_expiration_date DATE;
1340: l_aname wf_engine.nametabtyp;
1341: l_avaluetext wf_engine.texttabtyp;
1342: --
1343: BEGIN
1344: IF l_debug_level > 0 THEN

Line 1341: l_avaluetext wf_engine.texttabtyp;

1337: l_sold_to VARCHAR2(240);
1338: l_customer_number VARCHAR2(30);
1339: l_expiration_date DATE;
1340: l_aname wf_engine.nametabtyp;
1341: l_avaluetext wf_engine.texttabtyp;
1342: --
1343: BEGIN
1344: IF l_debug_level > 0 THEN
1345: oe_debug_pub.add( 'ENTERING OE_Negotiate_WF.Set_Header_Attributes_Internal:'||To_char(p_header_id) ,1 ) ;

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

1344: IF l_debug_level > 0 THEN
1345: oe_debug_pub.add( 'ENTERING OE_Negotiate_WF.Set_Header_Attributes_Internal:'||To_char(p_header_id) ,1 ) ;
1346: END IF;
1347:
1348: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(OE_GLOBALS.G_WFI_NGO, To_char(p_header_id), 'SALES_DOCUMENT_TYPE_CODE');
1349: IF l_sales_document_type_code = 'O' THEN
1350:
1351: select sold_to_org_id, expiration_date, salesrep_id
1352: into l_sold_to_org_id, l_expiration_date, l_salesrep_id

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

1368: l_aname(3) := 'EXPIRATION_DATE';
1369: --Bug 12884612: Use date mask while converting to text
1370: l_avaluetext(3) := to_char(l_expiration_date,'DD-MON-RRRR');
1371:
1372: wf_engine.SetItemAttrTextArray(itemtype=>OE_GLOBALS.G_WFI_NGO,
1373: itemkey=>To_char(p_header_id),
1374: aname=>l_aname,
1375: avalue=>l_avaluetext);
1376:

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

1450: IF l_debug_level > 0 THEN
1451: oe_debug_pub.add( 'Done setting header attributes',1);
1452: END IF;
1453:
1454: l_sales_document_type_code := WF_ENGINE.GetItemAttrText(itemtype, itemkey, 'SALES_DOCUMENT_TYPE_CODE');
1455: IF l_sales_document_type_code = 'O' THEN
1456: select expiration_date
1457: into l_expiration_date
1458: from oe_order_headers_all

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

1472: END IF;
1473:
1474: l_final_timer := (l_expiration_date - Sysdate) * 1440;
1475: IF l_final_timer > 0 THEN
1476: wf_engine.setitemattrnumber(itemtype=>itemtype,
1477: itemkey=>itemkey,
1478: aname=>'OFFER_FINAL_EXPIRE_TIMER',
1479: avalue=>l_final_timer);
1480: /*starting the fix for bug 9069528 */

Line 1481: l_from_role:=wf_engine.GetItemAttrText(itemtype,itemkey,'NOTIFICATION_FROM_ROLE');

1477: itemkey=>itemkey,
1478: aname=>'OFFER_FINAL_EXPIRE_TIMER',
1479: avalue=>l_final_timer);
1480: /*starting the fix for bug 9069528 */
1481: l_from_role:=wf_engine.GetItemAttrText(itemtype,itemkey,'NOTIFICATION_FROM_ROLE');
1482: IF NOT WF_DIRECTORY.UserActive(l_from_role) THEN
1483: l_from_role := fnd_profile.Value('OE_NOTIFICATION_APPROVER');
1484: IF l_from_role IS null or NOT WF_DIRECTORY.UserActive(l_from_role) then
1485: l_from_role := 'SYSADMIN';

Line 1488: wf_engine.setItemAttrText(itemtype,itemkey,'NOTIFICATION_FROM_ROLE',l_from_role);

1484: IF l_from_role IS null or NOT WF_DIRECTORY.UserActive(l_from_role) then
1485: l_from_role := 'SYSADMIN';
1486: END IF;
1487: END IF;
1488: wf_engine.setItemAttrText(itemtype,itemkey,'NOTIFICATION_FROM_ROLE',l_from_role);
1489: /*ending the fix for bug 9069528 */
1490: resultout := 'COMPLETE';
1491: ELSE
1492: resultout := 'COMPLETE:EXPIRED';

Line 1535: and activity_status = wf_engine.eng_notified

1531: into l_activity_name
1532: from wf_item_activity_statuses wias, wf_process_activities wpa
1533: where item_type = OE_GLOBALS.G_WFI_NGO
1534: and item_key = to_char(p_header_id)
1535: and activity_status = wf_engine.eng_notified
1536: and wpa.activity_name = l_customer_acceptance
1537: and wias.process_activity = wpa.instance_id;
1538:
1539: RETURN TRUE;