DBA Data[Home] [Help]

APPS.OE_ORDER_WF_UTIL dependencies on OE_GLOBALS

Line 52: AND NVL (wf_assign.wf_item_type, oe_globals.g_wfi_hdr) =

48: AND header.order_type_id = wf_assign.order_type_id
49: AND SYSDATE >= wf_assign.start_date_active
50: AND TRUNC (SYSDATE) <= NVL (wf_assign.end_date_active, SYSDATE)
51: AND wf_assign.line_type_id IS NULL
52: AND NVL (wf_assign.wf_item_type, oe_globals.g_wfi_hdr) =
53: oe_globals.g_wfi_hdr;
54:
55: /* NEED UPGRADE ON NEW COLUMN? */
56: CURSOR find_lineprocessname

Line 53: oe_globals.g_wfi_hdr;

49: AND SYSDATE >= wf_assign.start_date_active
50: AND TRUNC (SYSDATE) <= NVL (wf_assign.end_date_active, SYSDATE)
51: AND wf_assign.line_type_id IS NULL
52: AND NVL (wf_assign.wf_item_type, oe_globals.g_wfi_hdr) =
53: oe_globals.g_wfi_hdr;
54:
55: /* NEED UPGRADE ON NEW COLUMN? */
56: CURSOR find_lineprocessname
57: IS

Line 82: AND wf_assign.wf_item_type = oe_globals.g_wfi_ngo

78: WHERE header.header_id = TO_NUMBER (itemkey)
79: AND header.order_type_id = wf_assign.order_type_id
80: AND SYSDATE >= wf_assign.start_date_active
81: AND TRUNC (SYSDATE) <= NVL (wf_assign.end_date_active, SYSDATE)
82: AND wf_assign.wf_item_type = oe_globals.g_wfi_ngo
83: AND wf_assign.line_type_id IS NULL;
84:
85: CURSOR find_bktngohdrprocessname (itemkey VARCHAR2)
86: IS

Line 94: AND wf_assign.wf_item_type = oe_globals.g_wfi_ngo

90: WHERE header.header_id = TO_NUMBER (itemkey)
91: AND header.order_type_id = wf_assign.order_type_id
92: AND SYSDATE >= wf_assign.start_date_active
93: AND TRUNC (SYSDATE) <= NVL (wf_assign.end_date_active, SYSDATE)
94: AND wf_assign.wf_item_type = oe_globals.g_wfi_ngo
95: AND wf_assign.line_type_id IS NULL;
96:
97: CURSOR find_blankethdrprocessname (itemkey VARCHAR2)
98: IS

Line 106: AND wf_assign.wf_item_type = oe_globals.g_wfi_bkt

102: WHERE blanket.header_id = TO_NUMBER (itemkey)
103: AND blanket.order_type_id = wf_assign.order_type_id
104: AND SYSDATE >= wf_assign.start_date_active
105: AND TRUNC (SYSDATE) <= NVL (wf_assign.end_date_active, SYSDATE)
106: AND wf_assign.wf_item_type = oe_globals.g_wfi_bkt
107: AND wf_assign.line_type_id IS NULL;
108:
109: --
110: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

Line 124: IF (p_itemtype = oe_globals.g_wfi_hdr)

120: || p_wfasgn_item_type
121: );
122: END IF;
123:
124: IF (p_itemtype = oe_globals.g_wfi_hdr)
125: THEN
126: OPEN find_hdrprocessname (p_itemkey);
127:
128: FETCH find_hdrprocessname

Line 132: ELSIF (p_itemtype = oe_globals.g_wfi_lin)

128: FETCH find_hdrprocessname
129: INTO l_process_name;
130:
131: CLOSE find_hdrprocessname;
132: ELSIF (p_itemtype = oe_globals.g_wfi_lin)
133: THEN
134: IF l_debug_level > 0
135: THEN
136: oe_debug_pub.ADD ( 'header_id: '

Line 151: ELSIF (p_itemtype = oe_globals.g_wfi_ngo)

147: FETCH find_lineprocessname
148: INTO l_process_name;
149:
150: CLOSE find_lineprocessname;
151: ELSIF (p_itemtype = oe_globals.g_wfi_ngo)
152: THEN
153: IF NVL (p_salesdocumenttypecode, 'O') = 'O'
154: THEN
155: OPEN find_negotiatehdrprocessname (p_itemkey);

Line 173: ELSIF (p_itemtype = oe_globals.g_wfi_bkt)

169: ELSE
170: -- error
171: RAISE fnd_api.g_exc_error;
172: END IF;
173: ELSIF (p_itemtype = oe_globals.g_wfi_bkt)
174: THEN
175: OPEN find_blankethdrprocessname (p_itemkey);
176:
177: FETCH find_blankethdrprocessname

Line 607: oe_globals.g_start_header_flow := p_header_rec.header_id;

603: create_hdrworkitem (p_header_rec);
604: -- We do not start the flow when the record is written, rather
605: -- when the transaction is committed. Here we will set the
606: -- Global.
607: oe_globals.g_start_header_flow := p_header_rec.header_id;
608:
609: -- For OENH
610: -- Check if a OENH flow exists, if so set the parent
611: SELECT COUNT (1)

Line 614: WHERE item_type = oe_globals.g_wfi_ngo

610: -- Check if a OENH flow exists, if so set the parent
611: SELECT COUNT (1)
612: INTO l_count
613: FROM wf_items
614: WHERE item_type = oe_globals.g_wfi_ngo
615: AND item_key = TO_CHAR (p_header_rec.header_id);
616:
617: IF l_count > 0
618: THEN

Line 619: wf_item.set_item_parent (oe_globals.g_wfi_hdr,

615: AND item_key = TO_CHAR (p_header_rec.header_id);
616:
617: IF l_count > 0
618: THEN
619: wf_item.set_item_parent (oe_globals.g_wfi_hdr,
620: TO_CHAR (p_header_rec.header_id),
621: oe_globals.g_wfi_ngo,
622: TO_CHAR (p_header_rec.header_id),
623: ''

Line 621: oe_globals.g_wfi_ngo,

617: IF l_count > 0
618: THEN
619: wf_item.set_item_parent (oe_globals.g_wfi_hdr,
620: TO_CHAR (p_header_rec.header_id),
621: oe_globals.g_wfi_ngo,
622: TO_CHAR (p_header_rec.header_id),
623: ''
624: );
625: END IF;

Line 627: /* Start_Flow(OE_GLOBALS.G_WFI_HDR, p_header_rec.header_id); */

623: ''
624: );
625: END IF;
626:
627: /* Start_Flow(OE_GLOBALS.G_WFI_HDR, p_header_rec.header_id); */
628: IF l_debug_level > 0
629: THEN
630: oe_debug_pub.ADD ('EXITING CREATESTART_HDRPROCESS');
631: END IF;

Line 674: get_processname (p_itemtype => oe_globals.g_wfi_hdr,

670: oe_debug_pub.ADD ('GET HEADER PROCESS NAME');
671: END IF;
672:
673: l_hdr_process_name :=
674: get_processname (p_itemtype => oe_globals.g_wfi_hdr,
675: p_itemkey => p_header_rec.header_id
676: );
677: set_header_user_key (p_header_rec);
678: sales_order := SUBSTRB (fnd_message.get, 1, 240);

Line 686: wf_engine.createprocess (oe_globals.g_wfi_hdr,

682: FROM fnd_user
683: WHERE user_id = fnd_global.user_id;
684:
685: -- Create Header Work item
686: wf_engine.createprocess (oe_globals.g_wfi_hdr,
687: TO_CHAR (p_header_rec.header_id),
688: l_hdr_process_name,
689: sales_order,
690: l_owner_role

Line 692: wf_engine.additemattr (oe_globals.g_wfi_hdr,

688: l_hdr_process_name,
689: sales_order,
690: l_owner_role
691: );
692: wf_engine.additemattr (oe_globals.g_wfi_hdr,
693: TO_CHAR (p_header_rec.header_id),
694: '#WAITFORDETAIL',
695: NULL,
696: 0

Line 712: l_avalue (4) := TO_NUMBER (oe_globals.g_org_id);

708: l_avalue (2) := fnd_global.resp_appl_id;
709: l_aname (3) := 'RESPONSIBILITY_ID';
710: l_avalue (3) := fnd_global.resp_id;
711: l_aname (4) := 'ORG_ID';
712: l_avalue (4) := TO_NUMBER (oe_globals.g_org_id);
713: l_aname (5) := 'ORDER_NUMBER';
714: l_avalue (5) := p_header_rec.order_number;
715: wf_engine.setitemattrnumberarray (oe_globals.g_wfi_hdr,
716: p_header_rec.header_id,

Line 715: wf_engine.setitemattrnumberarray (oe_globals.g_wfi_hdr,

711: l_aname (4) := 'ORG_ID';
712: l_avalue (4) := TO_NUMBER (oe_globals.g_org_id);
713: l_aname (5) := 'ORDER_NUMBER';
714: l_avalue (5) := p_header_rec.order_number;
715: wf_engine.setitemattrnumberarray (oe_globals.g_wfi_hdr,
716: p_header_rec.header_id,
717: l_aname,
718: l_avalue
719: );

Line 748: wf_engine.setitemattrtextarray (oe_globals.g_wfi_hdr,

744: || 'akRegionApplicationId=660'
745: || '&'
746: || 'HeaderId='
747: || TO_CHAR (p_header_rec.header_id);
748: wf_engine.setitemattrtextarray (oe_globals.g_wfi_hdr,
749: p_header_rec.header_id,
750: l_aname2,
751: l_avaluetext
752: );

Line 803: -- Start_Flow(OE_GLOBALS.G_WFI_LIN, p_Line_rec.Line_id);

799: create_lineworkitem (p_line_rec, l_item_type);
800:
801: -- We do not start the flow when the record is written, rather
802: -- when the transaction is committed.
803: -- Start_Flow(OE_GLOBALS.G_WFI_LIN, p_Line_rec.Line_id);
804: -- Add line Id to global table for later processing.
805:
806: -- Bug 3000619, references to G_START_LINE_FLOWS_TBL are changed.
807: IF (oe_globals.g_start_line_flows_tbl.COUNT = 0)

Line 807: IF (oe_globals.g_start_line_flows_tbl.COUNT = 0)

803: -- Start_Flow(OE_GLOBALS.G_WFI_LIN, p_Line_rec.Line_id);
804: -- Add line Id to global table for later processing.
805:
806: -- Bug 3000619, references to G_START_LINE_FLOWS_TBL are changed.
807: IF (oe_globals.g_start_line_flows_tbl.COUNT = 0)
808: THEN
809: IF l_debug_level > 0
810: THEN
811: oe_debug_pub.ADD ( 'G_START_LINE_FLOWS_TBL.COUNT = 0'

Line 819: oe_globals.g_start_line_flows_tbl (1).line_id :=

815: 2
816: );
817: END IF;
818:
819: oe_globals.g_start_line_flows_tbl (1).line_id :=
820: p_line_rec.line_id;
821: oe_globals.g_start_line_flows_tbl (1).post_write_ato_line_id :=
822: p_line_rec.ato_line_id;
823: ELSE -- the table has entries

Line 821: oe_globals.g_start_line_flows_tbl (1).post_write_ato_line_id :=

817: END IF;
818:
819: oe_globals.g_start_line_flows_tbl (1).line_id :=
820: p_line_rec.line_id;
821: oe_globals.g_start_line_flows_tbl (1).post_write_ato_line_id :=
822: p_line_rec.ato_line_id;
823: ELSE -- the table has entries
824: l_index := oe_globals.g_start_line_flows_tbl.LAST;
825:

Line 824: l_index := oe_globals.g_start_line_flows_tbl.LAST;

820: p_line_rec.line_id;
821: oe_globals.g_start_line_flows_tbl (1).post_write_ato_line_id :=
822: p_line_rec.ato_line_id;
823: ELSE -- the table has entries
824: l_index := oe_globals.g_start_line_flows_tbl.LAST;
825:
826: IF l_debug_level > 0
827: THEN
828: oe_debug_pub.ADD ( 'G_START_LINE_FLOWS_TBL.COUNT = '

Line 837: oe_globals.g_start_line_flows_tbl (l_index + 1).line_id :=

833: 3
834: );
835: END IF;
836:
837: oe_globals.g_start_line_flows_tbl (l_index + 1).line_id :=
838: p_line_rec.line_id;
839: oe_globals.g_start_line_flows_tbl (l_index + 1).post_write_ato_line_id :=
840: p_line_rec.ato_line_id;
841: END IF;

Line 839: oe_globals.g_start_line_flows_tbl (l_index + 1).post_write_ato_line_id :=

835: END IF;
836:
837: oe_globals.g_start_line_flows_tbl (l_index + 1).line_id :=
838: p_line_rec.line_id;
839: oe_globals.g_start_line_flows_tbl (l_index + 1).post_write_ato_line_id :=
840: p_line_rec.ato_line_id;
841: END IF;
842:
843: IF l_debug_level > 0

Line 923: get_processname (p_itemtype => oe_globals.g_wfi_lin,

919: oe_debug_pub.ADD ('GET LINE PROCESSNAME');
920: END IF;
921:
922: l_line_process_name :=
923: get_processname (p_itemtype => oe_globals.g_wfi_lin,
924: p_itemkey => p_line_rec.line_id,
925: p_wfasgn_item_type => l_item_type,
926: p_line_rec => p_line_rec
927: );

Line 937: wf_engine.createprocess (oe_globals.g_wfi_lin,

933: FROM fnd_user
934: WHERE user_id = fnd_global.user_id;
935:
936: -- Create Line Work item
937: wf_engine.createprocess (oe_globals.g_wfi_lin,
938: TO_CHAR (p_line_rec.line_id),
939: l_line_process_name,
940: line,
941: l_owner_role

Line 957: l_avalue (4) := TO_NUMBER (oe_globals.g_org_id);

953: l_avalue (2) := fnd_global.resp_appl_id;
954: l_aname (3) := 'RESPONSIBILITY_ID';
955: l_avalue (3) := fnd_global.resp_id;
956: l_aname (4) := 'ORG_ID';
957: l_avalue (4) := TO_NUMBER (oe_globals.g_org_id);
958: wf_engine.setitemattrnumberarray (oe_globals.g_wfi_lin,
959: p_line_rec.line_id,
960: l_aname,
961: l_avalue

Line 958: wf_engine.setitemattrnumberarray (oe_globals.g_wfi_lin,

954: l_aname (3) := 'RESPONSIBILITY_ID';
955: l_avalue (3) := fnd_global.resp_id;
956: l_aname (4) := 'ORG_ID';
957: l_avalue (4) := TO_NUMBER (oe_globals.g_org_id);
958: wf_engine.setitemattrnumberarray (oe_globals.g_wfi_lin,
959: p_line_rec.line_id,
960: l_aname,
961: l_avalue
962: );

Line 967: wf_engine.setitemattrtextarray (oe_globals.g_wfi_lin,

963: l_aname2 (1) := 'LINE_CATEGORY';
964: l_avaluetext (1) := p_line_rec.line_category_code;
965: l_aname2 (2) := 'NOTIFICATION_APPROVER';
966: l_avaluetext (2) := fnd_profile.VALUE ('OE_NOTIFICATION_APPROVER');
967: wf_engine.setitemattrtextarray (oe_globals.g_wfi_lin,
968: p_line_rec.line_id,
969: l_aname2,
970: l_avaluetext
971: );

Line 972: wf_item.set_item_parent (oe_globals.g_wfi_lin,

968: p_line_rec.line_id,
969: l_aname2,
970: l_avaluetext
971: );
972: wf_item.set_item_parent (oe_globals.g_wfi_lin,
973: TO_CHAR (p_line_rec.line_id),
974: oe_globals.g_wfi_hdr,
975: TO_CHAR (p_line_rec.header_id),
976: '',

Line 974: oe_globals.g_wfi_hdr,

970: l_avaluetext
971: );
972: wf_item.set_item_parent (oe_globals.g_wfi_lin,
973: TO_CHAR (p_line_rec.line_id),
974: oe_globals.g_wfi_hdr,
975: TO_CHAR (p_line_rec.header_id),
976: '',
977: TRUE
978: );

Line 1019: wf_engine.setitemuserkey (oe_globals.g_wfi_lin, p_line_rec.line_id,

1015: p_line_rec.line_id,
1016: TRUE,
1017: TRUE
1018: );
1019: wf_engine.setitemuserkey (oe_globals.g_wfi_lin, p_line_rec.line_id,
1020: line);
1021:
1022: IF l_debug_level > 0
1023: THEN

Line 1069: --ELSIF ( p_line_rec.item_type_code = OE_GLOBALS.G_ITEM_STANDARD AND

1065:
1066: IF oe_ota_util.is_ota_line (p_line_rec.order_quantity_uom)
1067: THEN
1068: RETURN 'EDUCATION_ITEM';
1069: --ELSIF ( p_line_rec.item_type_code = OE_GLOBALS.G_ITEM_STANDARD AND
1070: -- l_item_rec.replenish_to_order_flag = 'Y') OR
1071:
1072: -- ## 1820608 ato item under a top pto model should start ato_item flow.
1073: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_standard

Line 1073: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_standard

1069: --ELSIF ( p_line_rec.item_type_code = OE_GLOBALS.G_ITEM_STANDARD AND
1070: -- l_item_rec.replenish_to_order_flag = 'Y') OR
1071:
1072: -- ## 1820608 ato item under a top pto model should start ato_item flow.
1073: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_standard
1074: OR p_line_rec.item_type_code = oe_globals.g_item_option
1075: OR p_line_rec.item_type_code = oe_globals.g_item_included
1076: ) --9775352
1077: AND p_line_rec.ato_line_id = p_line_rec.line_id

Line 1074: OR p_line_rec.item_type_code = oe_globals.g_item_option

1070: -- l_item_rec.replenish_to_order_flag = 'Y') OR
1071:
1072: -- ## 1820608 ato item under a top pto model should start ato_item flow.
1073: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_standard
1074: OR p_line_rec.item_type_code = oe_globals.g_item_option
1075: OR p_line_rec.item_type_code = oe_globals.g_item_included
1076: ) --9775352
1077: AND p_line_rec.ato_line_id = p_line_rec.line_id
1078: THEN

Line 1075: OR p_line_rec.item_type_code = oe_globals.g_item_included

1071:
1072: -- ## 1820608 ato item under a top pto model should start ato_item flow.
1073: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_standard
1074: OR p_line_rec.item_type_code = oe_globals.g_item_option
1075: OR p_line_rec.item_type_code = oe_globals.g_item_included
1076: ) --9775352
1077: AND p_line_rec.ato_line_id = p_line_rec.line_id
1078: THEN
1079: RETURN 'ATO_ITEM';

Line 1080: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_model

1076: ) --9775352
1077: AND p_line_rec.ato_line_id = p_line_rec.line_id
1078: THEN
1079: RETURN 'ATO_ITEM';
1080: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_model
1081: AND p_line_rec.line_id = p_line_rec.ato_line_id
1082: )
1083: THEN
1084: RETURN 'ATO_MODEL';

Line 1085: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_config)

1081: AND p_line_rec.line_id = p_line_rec.ato_line_id
1082: )
1083: THEN
1084: RETURN 'ATO_MODEL';
1085: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_config)
1086: THEN
1087: RETURN 'CONFIGURATION';
1088: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_included)
1089: THEN

Line 1088: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_included)

1084: RETURN 'ATO_MODEL';
1085: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_config)
1086: THEN
1087: RETURN 'CONFIGURATION';
1088: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_included)
1089: THEN
1090: RETURN 'II';
1091: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_kit)
1092: THEN

Line 1091: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_kit)

1087: RETURN 'CONFIGURATION';
1088: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_included)
1089: THEN
1090: RETURN 'II';
1091: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_kit)
1092: THEN
1093: RETURN 'KIT';
1094: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_model
1095: AND p_line_rec.line_id = p_line_rec.top_model_line_id

Line 1094: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_model

1090: RETURN 'II';
1091: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_kit)
1092: THEN
1093: RETURN 'KIT';
1094: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_model
1095: AND p_line_rec.line_id = p_line_rec.top_model_line_id
1096: AND p_line_rec.ato_line_id IS NULL
1097: )
1098: THEN

Line 1100: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_class

1096: AND p_line_rec.ato_line_id IS NULL
1097: )
1098: THEN
1099: RETURN 'PTO_MODEL';
1100: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_class
1101: AND p_line_rec.ato_line_id IS NULL
1102: )
1103: THEN
1104: RETURN 'PTO_CLASS';

Line 1105: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_option

1101: AND p_line_rec.ato_line_id IS NULL
1102: )
1103: THEN
1104: RETURN 'PTO_CLASS';
1105: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_option
1106: AND p_line_rec.ato_line_id IS NULL
1107: )
1108: THEN
1109: RETURN 'PTO_OPTION';

Line 1113: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_class

1109: RETURN 'PTO_OPTION';
1110: -- for ato under pto, we want to start ato model flow
1111: -- even if the item_type_code is class. For ato under ato
1112: -- start standard flow.
1113: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_class
1114: AND p_line_rec.ato_line_id IS NOT NULL
1115: )
1116: THEN
1117: IF p_line_rec.ato_line_id = p_line_rec.line_id

Line 1123: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_option

1119: RETURN 'ATO_MODEL';
1120: ELSE
1121: RETURN 'ATO_CLASS'; --FP bug no 4572207
1122: END IF;
1123: ELSIF ( p_line_rec.item_type_code = oe_globals.g_item_option
1124: AND p_line_rec.ato_line_id IS NOT NULL
1125: )
1126: THEN
1127: RETURN 'ATO_OPTION'; --FB bug no 4572207

Line 1128: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_standard)

1124: AND p_line_rec.ato_line_id IS NOT NULL
1125: )
1126: THEN
1127: RETURN 'ATO_OPTION'; --FB bug no 4572207
1128: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_standard)
1129: THEN
1130: RETURN 'STANDARD';
1131: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_service)
1132: THEN

Line 1131: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_service)

1127: RETURN 'ATO_OPTION'; --FB bug no 4572207
1128: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_standard)
1129: THEN
1130: RETURN 'STANDARD';
1131: ELSIF (p_line_rec.item_type_code = oe_globals.g_item_service)
1132: THEN
1133: RETURN 'SERVICE';
1134: ELSE
1135: fnd_message.set_name ('ONT', 'OE_INVALID_WF_ITEM_TYPE');

Line 1175: IF (NOT oe_globals.g_flow_processing_started)

1171:
1172: -- This code should be invoked again, once it starts executing
1173: -- Starting flows can cause the creation of new lines, but we do not
1174: -- want the creation call to get in here again.
1175: IF (NOT oe_globals.g_flow_processing_started)
1176: THEN
1177: oe_globals.g_flow_processing_started := TRUE;
1178:
1179: IF l_debug_level > 0

Line 1177: oe_globals.g_flow_processing_started := TRUE;

1173: -- Starting flows can cause the creation of new lines, but we do not
1174: -- want the creation call to get in here again.
1175: IF (NOT oe_globals.g_flow_processing_started)
1176: THEN
1177: oe_globals.g_flow_processing_started := TRUE;
1178:
1179: IF l_debug_level > 0
1180: THEN
1181: oe_debug_pub.ADD ('FLOW PROCESSING STARTED');

Line 1188: IF (oe_globals.g_start_header_flow IS NOT NULL)

1184: -- Issue Savepoint
1185: SAVEPOINT start_all_flows;
1186:
1187: -- Check if Header flow needs to be started
1188: IF (oe_globals.g_start_header_flow IS NOT NULL)
1189: THEN
1190: BEGIN
1191: -- Sanity Check to verify that header exists
1192: -- The create of the header could have been rolled back

Line 1197: WHERE header_id = oe_globals.g_start_header_flow;

1193: -- but the PL/SQL global is not in synch.
1194: SELECT order_type_id
1195: INTO l_type_id
1196: FROM oe_order_headers_all
1197: WHERE header_id = oe_globals.g_start_header_flow;
1198:
1199: IF l_debug_level > 0
1200: THEN
1201: oe_debug_pub.ADD ('STARTING HEADER FLOW');

Line 1205: start_flow (oe_globals.g_wfi_hdr,

1201: oe_debug_pub.ADD ('STARTING HEADER FLOW');
1202: END IF;
1203:
1204: -- Start flow and clear global
1205: start_flow (oe_globals.g_wfi_hdr,
1206: oe_globals.g_start_header_flow
1207: );
1208: oe_globals.g_start_header_flow := NULL;
1209: EXCEPTION

Line 1206: oe_globals.g_start_header_flow

1202: END IF;
1203:
1204: -- Start flow and clear global
1205: start_flow (oe_globals.g_wfi_hdr,
1206: oe_globals.g_start_header_flow
1207: );
1208: oe_globals.g_start_header_flow := NULL;
1209: EXCEPTION
1210: WHEN NO_DATA_FOUND

Line 1208: oe_globals.g_start_header_flow := NULL;

1204: -- Start flow and clear global
1205: start_flow (oe_globals.g_wfi_hdr,
1206: oe_globals.g_start_header_flow
1207: );
1208: oe_globals.g_start_header_flow := NULL;
1209: EXCEPTION
1210: WHEN NO_DATA_FOUND
1211: THEN
1212: IF l_debug_level > 0

Line 1216: || oe_globals.g_start_header_flow

1212: IF l_debug_level > 0
1213: THEN
1214: oe_debug_pub.ADD
1215: ( 'HEADER '
1216: || oe_globals.g_start_header_flow
1217: || ' IS MISSING , BUT ID EXISTS IN GLOBAL TABLE'
1218: );
1219: END IF;
1220:

Line 1221: oe_globals.g_start_header_flow := NULL;

1217: || ' IS MISSING , BUT ID EXISTS IN GLOBAL TABLE'
1218: );
1219: END IF;
1220:
1221: oe_globals.g_start_header_flow := NULL;
1222: END;
1223: END IF;
1224:
1225: -- Check if Line Flows need to be started

Line 1226: IF (oe_globals.g_start_line_flows_tbl.COUNT > 0)

1222: END;
1223: END IF;
1224:
1225: -- Check if Line Flows need to be started
1226: IF (oe_globals.g_start_line_flows_tbl.COUNT > 0)
1227: THEN
1228: -- This global table can grow while it is being processed, hence we can cannot
1229: -- loop thru using first ... count. Starting a line flow can create included item
1230: -- lines (booking, scheduling activity).

Line 1236: ctr := oe_globals.g_start_line_flows_tbl.FIRST;

1232: THEN
1233: oe_debug_pub.ADD ('START LINE FLOWS');
1234: END IF;
1235:
1236: ctr := oe_globals.g_start_line_flows_tbl.FIRST;
1237:
1238: WHILE (ctr IS NOT NULL)
1239: LOOP
1240: IF l_debug_level > 0

Line 1245: || oe_globals.g_start_line_flows_tbl (ctr).line_id

1241: THEN
1242: oe_debug_pub.ADD
1243: ( 'INSIDE LOOP '
1244: || 'LINE ID IS '
1245: || oe_globals.g_start_line_flows_tbl (ctr).line_id
1246: );
1247: END IF;
1248:
1249: BEGIN

Line 1261: oe_globals.g_start_line_flows_tbl (ctr).line_id;

1257: INTO l_type_id, l_item_type_code, l_ato_line_id,
1258: l_line_id
1259: FROM oe_order_lines_all
1260: WHERE line_id =
1261: oe_globals.g_start_line_flows_tbl (ctr).line_id;
1262:
1263: IF l_debug_level > 0
1264: THEN
1265: oe_debug_pub.ADD

Line 1268: || oe_globals.g_start_line_flows_tbl (ctr).line_id

1264: THEN
1265: oe_debug_pub.ADD
1266: ( 'STARTING LINE FLOW '
1267: || 'LINE ID = '
1268: || oe_globals.g_start_line_flows_tbl (ctr).line_id
1269: );
1270: END IF;
1271:
1272: IF l_item_type_code = 'CLASS'

Line 1283: IF oe_globals.g_start_line_flows_tbl (ctr).post_write_ato_line_id <>

1279: ('need to check wf assignment for ato under ato under pto, 3'
1280: );
1281: END IF;
1282:
1283: IF oe_globals.g_start_line_flows_tbl (ctr).post_write_ato_line_id <>
1284: l_ato_line_id
1285: THEN
1286: wf_engine.abortprocess
1287: (itemtype => oe_globals.g_wfi_lin,

Line 1287: (itemtype => oe_globals.g_wfi_lin,

1283: IF oe_globals.g_start_line_flows_tbl (ctr).post_write_ato_line_id <>
1284: l_ato_line_id
1285: THEN
1286: wf_engine.abortprocess
1287: (itemtype => oe_globals.g_wfi_lin,
1288: itemkey => oe_globals.g_start_line_flows_tbl
1289: (ctr).line_id
1290: );
1291: wf_purge.items

Line 1288: itemkey => oe_globals.g_start_line_flows_tbl

1284: l_ato_line_id
1285: THEN
1286: wf_engine.abortprocess
1287: (itemtype => oe_globals.g_wfi_lin,
1288: itemkey => oe_globals.g_start_line_flows_tbl
1289: (ctr).line_id
1290: );
1291: wf_purge.items
1292: (itemtype => oe_globals.g_wfi_lin,

Line 1292: (itemtype => oe_globals.g_wfi_lin,

1288: itemkey => oe_globals.g_start_line_flows_tbl
1289: (ctr).line_id
1290: );
1291: wf_purge.items
1292: (itemtype => oe_globals.g_wfi_lin,
1293: itemkey => oe_globals.g_start_line_flows_tbl
1294: (ctr).line_id,
1295: FORCE => TRUE,
1296: docommit => FALSE

Line 1293: itemkey => oe_globals.g_start_line_flows_tbl

1289: (ctr).line_id
1290: );
1291: wf_purge.items
1292: (itemtype => oe_globals.g_wfi_lin,
1293: itemkey => oe_globals.g_start_line_flows_tbl
1294: (ctr).line_id,
1295: FORCE => TRUE,
1296: docommit => FALSE
1297: );

Line 1299: (p_line_id => oe_globals.g_start_line_flows_tbl

1295: FORCE => TRUE,
1296: docommit => FALSE
1297: );
1298: oe_line_util.query_row
1299: (p_line_id => oe_globals.g_start_line_flows_tbl
1300: (ctr).line_id,
1301: x_line_rec => l_line_rec
1302: );
1303: l_item_type :=

Line 1309: start_flow (oe_globals.g_wfi_lin,

1305: create_lineworkitem (l_line_rec, l_item_type);
1306: END IF; -- if post_write_ato_line_id <> l_ato_line_id
1307: END IF; -- item_type = CLASS
1308:
1309: start_flow (oe_globals.g_wfi_lin,
1310: oe_globals.g_start_line_flows_tbl (ctr).line_id
1311: ); -- End bug 3000619
1312: EXCEPTION
1313: WHEN NO_DATA_FOUND

Line 1310: oe_globals.g_start_line_flows_tbl (ctr).line_id

1306: END IF; -- if post_write_ato_line_id <> l_ato_line_id
1307: END IF; -- item_type = CLASS
1308:
1309: start_flow (oe_globals.g_wfi_lin,
1310: oe_globals.g_start_line_flows_tbl (ctr).line_id
1311: ); -- End bug 3000619
1312: EXCEPTION
1313: WHEN NO_DATA_FOUND
1314: THEN

Line 1319: || oe_globals.g_start_line_flows_tbl (ctr).line_id

1315: IF l_debug_level > 0
1316: THEN
1317: oe_debug_pub.ADD
1318: ( 'LINE '
1319: || oe_globals.g_start_line_flows_tbl (ctr).line_id
1320: || ' IS MISSING , BUT ID EXISTS IN GLOBAL TABLE'
1321: );
1322: END IF;
1323: END;

Line 1325: ctr := oe_globals.g_start_line_flows_tbl.NEXT (ctr);

1321: );
1322: END IF;
1323: END;
1324:
1325: ctr := oe_globals.g_start_line_flows_tbl.NEXT (ctr);
1326: END LOOP;
1327:
1328: -- Clear the Global table.
1329: oe_globals.g_start_line_flows_tbl.DELETE;

Line 1329: oe_globals.g_start_line_flows_tbl.DELETE;

1325: ctr := oe_globals.g_start_line_flows_tbl.NEXT (ctr);
1326: END LOOP;
1327:
1328: -- Clear the Global table.
1329: oe_globals.g_start_line_flows_tbl.DELETE;
1330: END IF;
1331:
1332: -- Start OENH/OEBH handling
1333: IF (oe_globals.g_start_negotiate_header_flow IS NOT NULL)

Line 1333: IF (oe_globals.g_start_negotiate_header_flow IS NOT NULL)

1329: oe_globals.g_start_line_flows_tbl.DELETE;
1330: END IF;
1331:
1332: -- Start OENH/OEBH handling
1333: IF (oe_globals.g_start_negotiate_header_flow IS NOT NULL)
1334: THEN
1335: BEGIN
1336: -- Sanity Check to verify that negotiate header exists
1337: -- The create of the header could have been rolled back

Line 1339: IF oe_globals.g_sales_document_type_code = 'O'

1335: BEGIN
1336: -- Sanity Check to verify that negotiate header exists
1337: -- The create of the header could have been rolled back
1338: -- but the PL/SQL global is not in synch.
1339: IF oe_globals.g_sales_document_type_code = 'O'
1340: THEN
1341: SELECT header_id
1342: INTO l_header_id
1343: FROM oe_order_headers_all

Line 1344: WHERE header_id = oe_globals.g_start_negotiate_header_flow;

1340: THEN
1341: SELECT header_id
1342: INTO l_header_id
1343: FROM oe_order_headers_all
1344: WHERE header_id = oe_globals.g_start_negotiate_header_flow;
1345: ELSIF oe_globals.g_sales_document_type_code = 'B'
1346: THEN
1347: SELECT header_id
1348: INTO l_header_id

Line 1345: ELSIF oe_globals.g_sales_document_type_code = 'B'

1341: SELECT header_id
1342: INTO l_header_id
1343: FROM oe_order_headers_all
1344: WHERE header_id = oe_globals.g_start_negotiate_header_flow;
1345: ELSIF oe_globals.g_sales_document_type_code = 'B'
1346: THEN
1347: SELECT header_id
1348: INTO l_header_id
1349: FROM oe_blanket_headers_all

Line 1350: WHERE header_id = oe_globals.g_start_negotiate_header_flow;

1346: THEN
1347: SELECT header_id
1348: INTO l_header_id
1349: FROM oe_blanket_headers_all
1350: WHERE header_id = oe_globals.g_start_negotiate_header_flow;
1351: END IF;
1352:
1353: IF l_debug_level > 0
1354: THEN

Line 1359: start_flow (oe_globals.g_wfi_ngo,

1355: oe_debug_pub.ADD ('STARTING NEGOTIATE HEADER FLOW');
1356: END IF;
1357:
1358: -- Start flow and clear global
1359: start_flow (oe_globals.g_wfi_ngo,
1360: oe_globals.g_start_negotiate_header_flow
1361: );
1362: oe_globals.g_start_negotiate_header_flow := NULL;
1363: EXCEPTION

Line 1360: oe_globals.g_start_negotiate_header_flow

1356: END IF;
1357:
1358: -- Start flow and clear global
1359: start_flow (oe_globals.g_wfi_ngo,
1360: oe_globals.g_start_negotiate_header_flow
1361: );
1362: oe_globals.g_start_negotiate_header_flow := NULL;
1363: EXCEPTION
1364: WHEN NO_DATA_FOUND

Line 1362: oe_globals.g_start_negotiate_header_flow := NULL;

1358: -- Start flow and clear global
1359: start_flow (oe_globals.g_wfi_ngo,
1360: oe_globals.g_start_negotiate_header_flow
1361: );
1362: oe_globals.g_start_negotiate_header_flow := NULL;
1363: EXCEPTION
1364: WHEN NO_DATA_FOUND
1365: THEN
1366: IF l_debug_level > 0

Line 1370: || oe_globals.g_start_negotiate_header_flow

1366: IF l_debug_level > 0
1367: THEN
1368: oe_debug_pub.ADD
1369: ( 'Negotiate Header (OENH): '
1370: || oe_globals.g_start_negotiate_header_flow
1371: || ' IS MISSING , BUT ID EXISTS IN GLOBAL'
1372: );
1373: END IF;
1374:

Line 1375: oe_globals.g_start_negotiate_header_flow := NULL;

1371: || ' IS MISSING , BUT ID EXISTS IN GLOBAL'
1372: );
1373: END IF;
1374:
1375: oe_globals.g_start_negotiate_header_flow := NULL;
1376: END;
1377: END IF;
1378:
1379: IF (oe_globals.g_start_blanket_header_flow IS NOT NULL)

Line 1379: IF (oe_globals.g_start_blanket_header_flow IS NOT NULL)

1375: oe_globals.g_start_negotiate_header_flow := NULL;
1376: END;
1377: END IF;
1378:
1379: IF (oe_globals.g_start_blanket_header_flow IS NOT NULL)
1380: THEN
1381: BEGIN
1382: -- Sanity Check to verify that negotiate header exists
1383: -- The create of the header could have been rolled back

Line 1388: WHERE header_id = oe_globals.g_start_blanket_header_flow;

1384: -- but the PL/SQL global is not in synch.
1385: SELECT header_id
1386: INTO l_header_id
1387: FROM oe_blanket_headers_all
1388: WHERE header_id = oe_globals.g_start_blanket_header_flow;
1389:
1390: IF l_debug_level > 0
1391: THEN
1392: oe_debug_pub.ADD ('STARTING BLANKET HEADER FLOW');

Line 1396: start_flow (oe_globals.g_wfi_bkt,

1392: oe_debug_pub.ADD ('STARTING BLANKET HEADER FLOW');
1393: END IF;
1394:
1395: -- Start flow and clear global
1396: start_flow (oe_globals.g_wfi_bkt,
1397: oe_globals.g_start_blanket_header_flow
1398: );
1399: oe_globals.g_start_blanket_header_flow := NULL;
1400: EXCEPTION

Line 1397: oe_globals.g_start_blanket_header_flow

1393: END IF;
1394:
1395: -- Start flow and clear global
1396: start_flow (oe_globals.g_wfi_bkt,
1397: oe_globals.g_start_blanket_header_flow
1398: );
1399: oe_globals.g_start_blanket_header_flow := NULL;
1400: EXCEPTION
1401: WHEN NO_DATA_FOUND

Line 1399: oe_globals.g_start_blanket_header_flow := NULL;

1395: -- Start flow and clear global
1396: start_flow (oe_globals.g_wfi_bkt,
1397: oe_globals.g_start_blanket_header_flow
1398: );
1399: oe_globals.g_start_blanket_header_flow := NULL;
1400: EXCEPTION
1401: WHEN NO_DATA_FOUND
1402: THEN
1403: IF l_debug_level > 0

Line 1407: || oe_globals.g_start_blanket_header_flow

1403: IF l_debug_level > 0
1404: THEN
1405: oe_debug_pub.ADD
1406: ( 'Blanket Header (OEBH): '
1407: || oe_globals.g_start_blanket_header_flow
1408: || ' IS MISSING , BUT ID EXISTS IN GLOBAL'
1409: );
1410: END IF;
1411:

Line 1412: oe_globals.g_start_blanket_header_flow := NULL;

1408: || ' IS MISSING , BUT ID EXISTS IN GLOBAL'
1409: );
1410: END IF;
1411:
1412: oe_globals.g_start_blanket_header_flow := NULL;
1413: END;
1414: END IF;
1415:
1416: -- End of OENH/OEBH handling

Line 1419: oe_globals.g_flow_processing_started := FALSE;

1415:
1416: -- End of OENH/OEBH handling
1417:
1418: -- Reset global value
1419: oe_globals.g_flow_processing_started := FALSE;
1420: END IF;
1421:
1422: IF l_debug_level > 0
1423: THEN

Line 1451: oe_globals.g_start_header_flow := NULL;

1447: THEN
1448: oe_debug_pub.ADD ('IN CLEAR_FLOWSTART_GLOBALS');
1449: END IF;
1450:
1451: oe_globals.g_start_header_flow := NULL;
1452: oe_globals.g_start_negotiate_header_flow := NULL;
1453: oe_globals.g_start_blanket_header_flow := NULL;
1454: oe_globals.g_start_line_flows_tbl.DELETE;
1455: oe_globals.g_flow_processing_started := FALSE;

Line 1452: oe_globals.g_start_negotiate_header_flow := NULL;

1448: oe_debug_pub.ADD ('IN CLEAR_FLOWSTART_GLOBALS');
1449: END IF;
1450:
1451: oe_globals.g_start_header_flow := NULL;
1452: oe_globals.g_start_negotiate_header_flow := NULL;
1453: oe_globals.g_start_blanket_header_flow := NULL;
1454: oe_globals.g_start_line_flows_tbl.DELETE;
1455: oe_globals.g_flow_processing_started := FALSE;
1456: END clear_flowstart_globals;

Line 1453: oe_globals.g_start_blanket_header_flow := NULL;

1449: END IF;
1450:
1451: oe_globals.g_start_header_flow := NULL;
1452: oe_globals.g_start_negotiate_header_flow := NULL;
1453: oe_globals.g_start_blanket_header_flow := NULL;
1454: oe_globals.g_start_line_flows_tbl.DELETE;
1455: oe_globals.g_flow_processing_started := FALSE;
1456: END clear_flowstart_globals;
1457:

Line 1454: oe_globals.g_start_line_flows_tbl.DELETE;

1450:
1451: oe_globals.g_start_header_flow := NULL;
1452: oe_globals.g_start_negotiate_header_flow := NULL;
1453: oe_globals.g_start_blanket_header_flow := NULL;
1454: oe_globals.g_start_line_flows_tbl.DELETE;
1455: oe_globals.g_flow_processing_started := FALSE;
1456: END clear_flowstart_globals;
1457:
1458: PROCEDURE delete_row (p_type IN VARCHAR2, p_id IN NUMBER)

Line 1455: oe_globals.g_flow_processing_started := FALSE;

1451: oe_globals.g_start_header_flow := NULL;
1452: oe_globals.g_start_negotiate_header_flow := NULL;
1453: oe_globals.g_start_blanket_header_flow := NULL;
1454: oe_globals.g_start_line_flows_tbl.DELETE;
1455: oe_globals.g_flow_processing_started := FALSE;
1456: END clear_flowstart_globals;
1457:
1458: PROCEDURE delete_row (p_type IN VARCHAR2, p_id IN NUMBER)
1459: IS

Line 1479: WHERE item_type = oe_globals.g_wfi_hdr AND item_key = TO_CHAR (p_id);

1475: -- Start of 12609242
1476: SELECT COUNT (1)
1477: INTO l_count
1478: FROM wf_items
1479: WHERE item_type = oe_globals.g_wfi_hdr AND item_key = TO_CHAR (p_id);
1480:
1481: IF l_count > 0
1482: THEN
1483: --End of 12609242

Line 1484: wf_engine.itemstatus (itemtype => oe_globals.g_wfi_hdr,

1480:
1481: IF l_count > 0
1482: THEN
1483: --End of 12609242
1484: wf_engine.itemstatus (itemtype => oe_globals.g_wfi_hdr,
1485: itemkey => p_id,
1486: status => l_status,
1487: RESULT => l_result
1488: );

Line 1492: wf_engine.abortprocess (itemtype => oe_globals.g_wfi_hdr,

1488: );
1489:
1490: IF l_status <> 'COMPLETE'
1491: THEN
1492: wf_engine.abortprocess (itemtype => oe_globals.g_wfi_hdr,
1493: itemkey => p_id
1494: );
1495: END IF;
1496:

Line 1497: wf_purge.items (itemtype => oe_globals.g_wfi_hdr,

1493: itemkey => p_id
1494: );
1495: END IF;
1496:
1497: wf_purge.items (itemtype => oe_globals.g_wfi_hdr,
1498: itemkey => p_id,
1499: FORCE => TRUE,
1500: docommit => FALSE
1501: );

Line 1507: WHERE item_type = oe_globals.g_wfi_ngo AND item_key = TO_CHAR (p_id);

1503:
1504: SELECT COUNT (1)
1505: INTO l_count
1506: FROM wf_items
1507: WHERE item_type = oe_globals.g_wfi_ngo AND item_key = TO_CHAR (p_id);
1508:
1509: IF l_count > 0
1510: THEN
1511: wf_purge.items (itemtype => oe_globals.g_wfi_ngo,

Line 1511: wf_purge.items (itemtype => oe_globals.g_wfi_ngo,

1507: WHERE item_type = oe_globals.g_wfi_ngo AND item_key = TO_CHAR (p_id);
1508:
1509: IF l_count > 0
1510: THEN
1511: wf_purge.items (itemtype => oe_globals.g_wfi_ngo,
1512: itemkey => p_id,
1513: FORCE => TRUE,
1514: docommit => FALSE
1515: );

Line 1530: WHERE item_type = oe_globals.g_wfi_lin

1526: -- Start of 12609242
1527: SELECT COUNT (1)
1528: INTO l_count
1529: FROM wf_items
1530: WHERE item_type = oe_globals.g_wfi_lin
1531: AND item_key = TO_CHAR (p_id);
1532:
1533: IF l_count > 0
1534: THEN

Line 1536: wf_engine.itemstatus (itemtype => oe_globals.g_wfi_lin,

1532:
1533: IF l_count > 0
1534: THEN
1535: --End of 12609242
1536: wf_engine.itemstatus (itemtype => oe_globals.g_wfi_lin,
1537: itemkey => p_id,
1538: status => l_status,
1539: RESULT => l_result
1540: );

Line 1545: wf_engine.abortprocess (itemtype => oe_globals.g_wfi_lin,

1541:
1542: --Added the nvl condition to fix bug 2333095
1543: IF NVL (l_status, 'ACTIVE') <> 'COMPLETE'
1544: THEN
1545: wf_engine.abortprocess (itemtype => oe_globals.g_wfi_lin,
1546: itemkey => p_id
1547: );
1548: END IF;
1549:

Line 1555: wf_purge.items (itemtype => oe_globals.g_wfi_lin,

1551: THEN
1552: oe_debug_pub.ADD ('PURGING WF ITEM');
1553: END IF;
1554:
1555: wf_purge.items (itemtype => oe_globals.g_wfi_lin,
1556: itemkey => p_id,
1557: FORCE => TRUE,
1558: docommit => FALSE
1559: );

Line 1568: WHERE item_type = oe_globals.g_wfi_ngo AND item_key = TO_CHAR (p_id);

1564: --Start of 13020709
1565: SELECT COUNT (1)
1566: INTO l_count
1567: FROM wf_items
1568: WHERE item_type = oe_globals.g_wfi_ngo AND item_key = TO_CHAR (p_id);
1569:
1570: IF l_count > 0
1571: THEN
1572: --End of 13020709

Line 1573: wf_engine.itemstatus (itemtype => oe_globals.g_wfi_ngo,

1569:
1570: IF l_count > 0
1571: THEN
1572: --End of 13020709
1573: wf_engine.itemstatus (itemtype => oe_globals.g_wfi_ngo,
1574: itemkey => p_id,
1575: status => l_status,
1576: RESULT => l_result
1577: );

Line 1581: wf_engine.abortprocess (itemtype => oe_globals.g_wfi_ngo,

1577: );
1578:
1579: IF NVL (l_status, 'ACTIVE') <> 'COMPLETE'
1580: THEN
1581: wf_engine.abortprocess (itemtype => oe_globals.g_wfi_ngo,
1582: itemkey => p_id
1583: );
1584: END IF;
1585:

Line 1591: wf_purge.items (itemtype => oe_globals.g_wfi_ngo,

1587: THEN
1588: oe_debug_pub.ADD ('PURGING WF ITEM - Negotiate');
1589: END IF;
1590:
1591: wf_purge.items (itemtype => oe_globals.g_wfi_ngo,
1592: itemkey => p_id,
1593: FORCE => TRUE,
1594: docommit => FALSE
1595: );

Line 1603: --where item_type=OE_GLOBALS.G_WFI_NGO

1599: -- Bug 8537639
1600: SELECT COUNT (1)
1601: INTO l_count
1602: FROM wf_items
1603: --where item_type=OE_GLOBALS.G_WFI_NGO
1604: WHERE item_type = oe_globals.g_wfi_bkt --13020709
1605: AND item_key = TO_CHAR (p_id);
1606:
1607: IF l_count > 0

Line 1604: WHERE item_type = oe_globals.g_wfi_bkt --13020709

1600: SELECT COUNT (1)
1601: INTO l_count
1602: FROM wf_items
1603: --where item_type=OE_GLOBALS.G_WFI_NGO
1604: WHERE item_type = oe_globals.g_wfi_bkt --13020709
1605: AND item_key = TO_CHAR (p_id);
1606:
1607: IF l_count > 0
1608: THEN

Line 1610: wf_engine.itemstatus (itemtype => oe_globals.g_wfi_bkt,

1606:
1607: IF l_count > 0
1608: THEN
1609: -- Bug 8537639
1610: wf_engine.itemstatus (itemtype => oe_globals.g_wfi_bkt,
1611: itemkey => p_id,
1612: status => l_status,
1613: RESULT => l_result
1614: );

Line 1618: wf_engine.abortprocess (itemtype => oe_globals.g_wfi_bkt,

1614: );
1615:
1616: IF NVL (l_status, 'ACTIVE') <> 'COMPLETE'
1617: THEN
1618: wf_engine.abortprocess (itemtype => oe_globals.g_wfi_bkt,
1619: itemkey => p_id
1620: );
1621: END IF;
1622:

Line 1628: wf_purge.items (itemtype => oe_globals.g_wfi_bkt,

1624: THEN
1625: oe_debug_pub.ADD ('PURGING WF ITEM - BLANKET');
1626: END IF;
1627:
1628: wf_purge.items (itemtype => oe_globals.g_wfi_bkt,
1629: itemkey => p_id,
1630: FORCE => TRUE,
1631: docommit => FALSE
1632: );

Line 1639: WHERE item_type = oe_globals.g_wfi_ngo

1635: --Uncommented below Select clause for bug 13020709
1636: SELECT COUNT (1)
1637: INTO l_count
1638: FROM wf_items
1639: WHERE item_type = oe_globals.g_wfi_ngo
1640: AND item_key = TO_CHAR (p_id);
1641:
1642: IF l_count > 0
1643: THEN

Line 1644: wf_purge.items (itemtype => oe_globals.g_wfi_ngo,

1640: AND item_key = TO_CHAR (p_id);
1641:
1642: IF l_count > 0
1643: THEN
1644: wf_purge.items (itemtype => oe_globals.g_wfi_ngo,
1645: itemkey => p_id,
1646: FORCE => TRUE,
1647: docommit => FALSE
1648: );

Line 1770: IF oe_globals.g_aso_installed IS NULL

1766: SAVEPOINT update_flow_status_code;
1767: x_return_status := fnd_api.g_ret_sts_success;
1768:
1769: -- Check if the ASO is installed to call the NOTIFY_OC.
1770: IF oe_globals.g_aso_installed IS NULL
1771: THEN
1772: oe_globals.g_aso_installed :=
1773: oe_globals.check_product_installed (697);
1774: END IF;

Line 1772: oe_globals.g_aso_installed :=

1768:
1769: -- Check if the ASO is installed to call the NOTIFY_OC.
1770: IF oe_globals.g_aso_installed IS NULL
1771: THEN
1772: oe_globals.g_aso_installed :=
1773: oe_globals.check_product_installed (697);
1774: END IF;
1775:
1776: -- *** Negotiation Changes Start ***

Line 1773: oe_globals.check_product_installed (697);

1769: -- Check if the ASO is installed to call the NOTIFY_OC.
1770: IF oe_globals.g_aso_installed IS NULL
1771: THEN
1772: oe_globals.g_aso_installed :=
1773: oe_globals.check_product_installed (697);
1774: END IF;
1775:
1776: -- *** Negotiation Changes Start ***
1777: IF p_item_type IN (oe_globals.g_wfi_ngo, oe_globals.g_wfi_bkt)

Line 1777: IF p_item_type IN (oe_globals.g_wfi_ngo, oe_globals.g_wfi_bkt)

1773: oe_globals.check_product_installed (697);
1774: END IF;
1775:
1776: -- *** Negotiation Changes Start ***
1777: IF p_item_type IN (oe_globals.g_wfi_ngo, oe_globals.g_wfi_bkt)
1778: THEN
1779: IF p_header_id IS NOT NULL
1780: THEN
1781: -- validate p_flow_status

Line 1791: IF p_item_type = oe_globals.g_wfi_ngo

1787: AND enabled_flag = 'Y'
1788: AND SYSDATE BETWEEN NVL (start_date_active, SYSDATE)
1789: AND NVL (end_date_active, SYSDATE);
1790:
1791: IF p_item_type = oe_globals.g_wfi_ngo
1792: THEN
1793: IF p_sales_document_type_code IS NULL
1794: THEN
1795: -- for Negotiation, you must pass the document type code

Line 1920: oe_globals.g_opr_update;

1916: p_flow_status_code;
1917: oe_order_util.g_header_rec.last_update_date :=
1918: l_header_rec.last_update_date;
1919: oe_order_util.g_header_rec.operation :=
1920: oe_globals.g_opr_update;
1921:
1922: IF l_debug_level > 0
1923: THEN
1924: oe_debug_pub.ADD

Line 2026: ELSIF p_item_type = oe_globals.g_wfi_bkt

2022: last_updated_by = fnd_global.user_id,
2023: lock_control = lock_control + 1
2024: WHERE header_id = p_header_id;
2025: END IF; --check sales_document_type_code
2026: ELSIF p_item_type = oe_globals.g_wfi_bkt
2027: THEN
2028: IF l_debug_level > 0
2029: THEN
2030: oe_debug_pub.ADD

Line 2086: IF ( (oe_globals.g_aso_installed = 'Y')

2082: AND enabled_flag = 'Y'
2083: AND SYSDATE BETWEEN NVL (start_date_active, SYSDATE)
2084: AND NVL (end_date_active, SYSDATE);
2085:
2086: IF ( (oe_globals.g_aso_installed = 'Y')
2087: OR (NVL (fnd_profile.VALUE ('ONT_DBI_INSTALLED'), 'N') = 'Y')
2088: )
2089: THEN
2090: oe_line_util.lock_rows (p_line_id => p_line_id,

Line 2229: IF ( (oe_globals.g_aso_installed = 'Y')

2225: p_flow_status_code
2226: );
2227: END IF;
2228:
2229: IF ( (oe_globals.g_aso_installed = 'Y')
2230: OR (NVL (fnd_profile.VALUE ('ONT_DBI_INSTALLED'), 'N') = 'Y')
2231: )
2232: THEN
2233: l_line_tbl (1).flow_status_code := p_flow_status_code;

Line 2292: oe_globals.g_opr_update;

2288: l_line_tbl (1).header_id;
2289: oe_order_util.g_line_tbl (l_index).last_update_date :=
2290: l_line_tbl (1).last_update_date;
2291: oe_order_util.g_line_tbl (l_index).operation :=
2292: oe_globals.g_opr_update;
2293:
2294: IF l_debug_level > 0
2295: THEN
2296: oe_debug_pub.ADD

Line 2389: || oe_globals.g_aso_installed

2385: || l_line_tbl (1).header_id
2386: );
2387: oe_debug_pub.ADD
2388: ( ' GENESIS : UPDATE FLOW STATUS - g_aso_installed: '
2389: || oe_globals.g_aso_installed
2390: );
2391: oe_debug_pub.ADD
2392: ( ' GENESIS : UPDATE FLOW STATUS - DBI Installed: '
2393: || NVL (fnd_profile.VALUE ('ONT_DBI_INSTALLED'),

Line 2415: OR NOT ( (oe_globals.g_aso_installed = 'Y')

2411: -- code as well.
2412: ----
2413: -- The following call to raise Business Event has been done for bug 13534511
2414: IF ( p_flow_status_code LIKE '%REQ_REQUESTED'
2415: OR NOT ( (oe_globals.g_aso_installed = 'Y')
2416: OR (NVL (fnd_profile.VALUE ('ONT_DBI_INSTALLED'),
2417: 'N'
2418: ) = 'Y'
2419: )

Line 2534: oe_globals.g_opr_update;

2530: p_flow_status_code;
2531: oe_order_util.g_header_rec.last_update_date :=
2532: l_header_rec.last_update_date;
2533: oe_order_util.g_header_rec.operation :=
2534: oe_globals.g_opr_update;
2535:
2536: IF l_debug_level > 0
2537: THEN
2538: oe_debug_pub.ADD

Line 2933: IF oe_globals.g_aso_installed IS NULL

2929: SAVEPOINT update_quote_blanket;
2930: x_return_status := fnd_api.g_ret_sts_success;
2931:
2932: -- Check if the ASO is installed to call the NOTIFY_OC.
2933: IF oe_globals.g_aso_installed IS NULL
2934: THEN
2935: oe_globals.g_aso_installed :=
2936: oe_globals.check_product_installed (697);
2937: END IF;

Line 2935: oe_globals.g_aso_installed :=

2931:
2932: -- Check if the ASO is installed to call the NOTIFY_OC.
2933: IF oe_globals.g_aso_installed IS NULL
2934: THEN
2935: oe_globals.g_aso_installed :=
2936: oe_globals.check_product_installed (697);
2937: END IF;
2938:
2939: l_header_id := TO_NUMBER (p_item_key);

Line 2936: oe_globals.check_product_installed (697);

2932: -- Check if the ASO is installed to call the NOTIFY_OC.
2933: IF oe_globals.g_aso_installed IS NULL
2934: THEN
2935: oe_globals.g_aso_installed :=
2936: oe_globals.check_product_installed (697);
2937: END IF;
2938:
2939: l_header_id := TO_NUMBER (p_item_key);
2940:

Line 2954: IF p_item_type = oe_globals.g_wfi_bkt

2950: AND SYSDATE BETWEEN NVL (start_date_active, SYSDATE)
2951: AND NVL (end_date_active, SYSDATE);
2952: END IF;
2953:
2954: IF p_item_type = oe_globals.g_wfi_bkt
2955: THEN
2956: l_sales_document_type_code := 'B';
2957: ELSE -- itemtype = OENH
2958: l_sales_document_type_code :=

Line 3140: oe_order_util.g_header_rec.operation := oe_globals.g_opr_update;

3136: END IF;
3137:
3138: oe_order_util.g_header_rec.last_update_date :=
3139: l_header_rec.last_update_date;
3140: oe_order_util.g_header_rec.operation := oe_globals.g_opr_update;
3141:
3142: IF l_debug_level > 0
3143: THEN
3144: oe_debug_pub.ADD ( 'GLOBAL HEADER FLOW STATUS IS: '

Line 3531: IF p_item_type = oe_globals.g_wfi_ngo

3527: p_transaction_number,
3528: p_sales_document_type_code
3529: );
3530:
3531: IF p_item_type = oe_globals.g_wfi_ngo
3532: THEN
3533: oe_globals.g_start_negotiate_header_flow := p_header_id;
3534: ELSIF p_item_type = oe_globals.g_wfi_bkt
3535: THEN

Line 3533: oe_globals.g_start_negotiate_header_flow := p_header_id;

3529: );
3530:
3531: IF p_item_type = oe_globals.g_wfi_ngo
3532: THEN
3533: oe_globals.g_start_negotiate_header_flow := p_header_id;
3534: ELSIF p_item_type = oe_globals.g_wfi_bkt
3535: THEN
3536: oe_globals.g_start_blanket_header_flow := p_header_id;
3537:

Line 3534: ELSIF p_item_type = oe_globals.g_wfi_bkt

3530:
3531: IF p_item_type = oe_globals.g_wfi_ngo
3532: THEN
3533: oe_globals.g_start_negotiate_header_flow := p_header_id;
3534: ELSIF p_item_type = oe_globals.g_wfi_bkt
3535: THEN
3536: oe_globals.g_start_blanket_header_flow := p_header_id;
3537:
3538: -- For OEBH

Line 3536: oe_globals.g_start_blanket_header_flow := p_header_id;

3532: THEN
3533: oe_globals.g_start_negotiate_header_flow := p_header_id;
3534: ELSIF p_item_type = oe_globals.g_wfi_bkt
3535: THEN
3536: oe_globals.g_start_blanket_header_flow := p_header_id;
3537:
3538: -- For OEBH
3539: -- Check if a OENH flow exists, if so set the parent
3540: SELECT COUNT (1)

Line 3543: WHERE item_type = oe_globals.g_wfi_ngo

3539: -- Check if a OENH flow exists, if so set the parent
3540: SELECT COUNT (1)
3541: INTO l_count
3542: FROM wf_items
3543: WHERE item_type = oe_globals.g_wfi_ngo
3544: AND item_key = TO_CHAR (p_header_id);
3545:
3546: IF l_count > 0
3547: THEN

Line 3548: wf_item.set_item_parent (oe_globals.g_wfi_bkt,

3544: AND item_key = TO_CHAR (p_header_id);
3545:
3546: IF l_count > 0
3547: THEN
3548: wf_item.set_item_parent (oe_globals.g_wfi_bkt,
3549: TO_CHAR (p_header_id),
3550: oe_globals.g_wfi_ngo,
3551: TO_CHAR (p_header_id),
3552: ''

Line 3550: oe_globals.g_wfi_ngo,

3546: IF l_count > 0
3547: THEN
3548: wf_item.set_item_parent (oe_globals.g_wfi_bkt,
3549: TO_CHAR (p_header_id),
3550: oe_globals.g_wfi_ngo,
3551: TO_CHAR (p_header_id),
3552: ''
3553: );
3554: END IF;

Line 3557: oe_globals.g_sales_document_type_code := p_sales_document_type_code;

3553: );
3554: END IF;
3555: END IF;
3556:
3557: oe_globals.g_sales_document_type_code := p_sales_document_type_code;
3558:
3559: IF l_debug_level > 0
3560: THEN
3561: oe_debug_pub.ADD ('EXITING CREATESTART_HDRPROCESSINTERNAL');

Line 3663: l_avalue (4) := TO_NUMBER (oe_globals.g_org_id);

3659: l_avalue (2) := fnd_global.resp_appl_id;
3660: l_aname (3) := 'RESPONSIBILITY_ID';
3661: l_avalue (3) := fnd_global.resp_id;
3662: l_aname (4) := 'ORG_ID';
3663: l_avalue (4) := TO_NUMBER (oe_globals.g_org_id);
3664: l_aname (5) := 'TRANSACTION_NUMBER';
3665: l_avalue (5) := p_transaction_number;
3666:
3667: IF p_item_type = oe_globals.g_wfi_ngo

Line 3667: IF p_item_type = oe_globals.g_wfi_ngo

3663: l_avalue (4) := TO_NUMBER (oe_globals.g_org_id);
3664: l_aname (5) := 'TRANSACTION_NUMBER';
3665: l_avalue (5) := p_transaction_number;
3666:
3667: IF p_item_type = oe_globals.g_wfi_ngo
3668: THEN
3669: l_aname (6) := 'HEADER_ID';
3670: l_avalue (6) := p_header_id;
3671: END IF;

Line 3697: IF p_item_type = oe_globals.g_wfi_ngo

3693: 'NOTIFICATION_FROM_ROLE',
3694: l_user_name
3695: );
3696:
3697: IF p_item_type = oe_globals.g_wfi_ngo
3698: THEN
3699: -- if this is a negotiation flow, set some item attributes that
3700: -- only apply to negotiations
3701: l_aname2 (1) := 'SALES_DOCUMENT_TYPE_CODE';

Line 3755: wf_engine.setitemuserkey (oe_globals.g_wfi_ngo, p_header_id, l_user_key);

3751: );
3752: END IF;
3753:
3754: l_user_key := SUBSTRB (fnd_message.get, 1, 240);
3755: wf_engine.setitemuserkey (oe_globals.g_wfi_ngo, p_header_id, l_user_key);
3756: EXCEPTION
3757: WHEN OTHERS
3758: THEN
3759: IF oe_msg_pub.check_msg_level (oe_msg_pub.g_msg_lvl_unexp_error)

Line 3777: wf_engine.setitemuserkey (oe_globals.g_wfi_bkt, p_header_id,

3773: fnd_message.set_name ('ONT', 'OE_WF_BLANKET_ORDER');
3774: fnd_message.set_token ('BLANKET_NUMBER',
3775: TO_CHAR (p_transaction_number));
3776: l_user_key := SUBSTRB (fnd_message.get, 1, 240);
3777: wf_engine.setitemuserkey (oe_globals.g_wfi_bkt, p_header_id,
3778: l_user_key);
3779: EXCEPTION
3780: WHEN OTHERS
3781: THEN

Line 3867: wf_engine.getitemattrtext (oe_globals.g_wfi_ngo,

3863: THEN
3864: l_blanket_flag := 'Y';
3865: ELSE
3866: l_sales_document_type_code :=
3867: wf_engine.getitemattrtext (oe_globals.g_wfi_ngo,
3868: l_header_id, -- ame er 16084377
3869: 'SALES_DOCUMENT_TYPE_CODE'
3870: );
3871:

Line 5049: wf_engine.completeactivityinternalname (oe_globals.g_wfi_ngo,

5045: oe_debug_pub.ADD ('ELIGIBLE Activity: ' || l_activity);
5046: END IF;
5047:
5048: BEGIN
5049: wf_engine.completeactivityinternalname (oe_globals.g_wfi_ngo,
5050: TO_CHAR (p_header_id),
5051: l_activity,
5052: l_retval
5053: ,TRUE