DBA Data[Home] [Help]

APPS.OKC_XPRT_UTIL_PVT dependencies on OKC_XPRT_QUESTION_ORDERS

Line 1004: Delete questions from the table OKC_XPRT_QUESTION_ORDERS for the template where the questions do not exist in

1000: l_Org_Id := Template_Rec.Org_Id;
1001: l_Intent := Template_Rec.Intent;
1002: END LOOP;
1003: /*
1004: Delete questions from the table OKC_XPRT_QUESTION_ORDERS for the template where the questions do not exist in
1005: the left and right hand side of OKC_XPRT_RULE_CONDITIONS or in OKC_XPRT_RULE_OUTCOMES
1006: for all rules associated to the template in table OKC_XPRT_TEMPLATE_RULES or rules
1007: with ORG_WIDE_FLAG='Y' and status in ('ACTIVE', 'DRAFT', 'REVISION', 'PENDINGPUB')
1008: */

Line 1014: '110: Deleting invalid questions from the table Okc_Xprt_Question_Orders');

1010: -- write to debug log file
1011: IF (Fnd_Log.Level_Procedure >= Fnd_Log.g_Current_Runtime_Level) THEN
1012: Fnd_Log.STRING(Fnd_Log.Level_Procedure,
1013: g_Module || l_Api_Name,
1014: '110: Deleting invalid questions from the table Okc_Xprt_Question_Orders');
1015: END IF;
1016:
1017:
1018: DELETE FROM Okc_Xprt_Question_Orders

Line 1018: DELETE FROM Okc_Xprt_Question_Orders

1014: '110: Deleting invalid questions from the table Okc_Xprt_Question_Orders');
1015: END IF;
1016:
1017:
1018: DELETE FROM Okc_Xprt_Question_Orders
1019: WHERE Template_Id = p_Template_Id
1020: AND NOT EXISTS
1021: (SELECT 1
1022: FROM Okc_Xprt_Rule_Conditions Cond,

Line 1029: AND ( ( to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Code

1025: Okc_xprt_questions_b quest
1026: WHERE Rules.Rule_Id = Cond.Rule_Id
1027: AND Rules.Rule_Id = Assoc.Rule_Id
1028: AND Assoc.Template_Id = p_Template_Id
1029: AND ( ( to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Code
1030: AND Cond.Object_Type = 'QUESTION') OR
1031: (to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Value_Code
1032: AND Cond.Object_Value_Type = 'QUESTION')
1033: )

Line 1031: (to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Value_Code

1027: AND Rules.Rule_Id = Assoc.Rule_Id
1028: AND Assoc.Template_Id = p_Template_Id
1029: AND ( ( to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Code
1030: AND Cond.Object_Type = 'QUESTION') OR
1031: (to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Value_Code
1032: AND Cond.Object_Value_Type = 'QUESTION')
1033: )
1034: AND quest.question_id = Okc_Xprt_Question_Orders.Question_Id
1035: AND Rules.Status_Code IN ('ACTIVE', 'DRAFT', 'REVISION', 'PENDINGDISABLE','PENDINGPUB')

Line 1034: AND quest.question_id = Okc_Xprt_Question_Orders.Question_Id

1030: AND Cond.Object_Type = 'QUESTION') OR
1031: (to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Value_Code
1032: AND Cond.Object_Value_Type = 'QUESTION')
1033: )
1034: AND quest.question_id = Okc_Xprt_Question_Orders.Question_Id
1035: AND Rules.Status_Code IN ('ACTIVE', 'DRAFT', 'REVISION', 'PENDINGDISABLE','PENDINGPUB')
1036: UNION ALL --perf Bug#5030444 Replaced UNION with UNION ALL
1037: SELECT 1
1038: FROM Okc_Xprt_Rule_Outcomes Outs,

Line 1045: AND to_char(Okc_Xprt_Question_Orders.Question_Id) =

1041: Okc_xprt_questions_b quest
1042: WHERE Rules.Rule_Id = Assoc.Rule_Id
1043: AND Rules.rule_id = Outs.rule_id
1044: AND Assoc.Template_Id = p_Template_Id
1045: AND to_char(Okc_Xprt_Question_Orders.Question_Id) =
1046: Outs.Object_Value_Id
1047: AND Outs.Object_Type = 'QUESTION'
1048: AND quest.question_id = Okc_Xprt_Question_Orders.Question_Id
1049: AND Rules.Status_Code IN ('ACTIVE', 'DRAFT', 'REVISION', 'PENDINGDISABLE','PENDINGPUB')

Line 1048: AND quest.question_id = Okc_Xprt_Question_Orders.Question_Id

1044: AND Assoc.Template_Id = p_Template_Id
1045: AND to_char(Okc_Xprt_Question_Orders.Question_Id) =
1046: Outs.Object_Value_Id
1047: AND Outs.Object_Type = 'QUESTION'
1048: AND quest.question_id = Okc_Xprt_Question_Orders.Question_Id
1049: AND Rules.Status_Code IN ('ACTIVE', 'DRAFT', 'REVISION', 'PENDINGDISABLE','PENDINGPUB')
1050: UNION ALL --perf Bug#5030444 Replaced UNION with UNION ALL
1051: SELECT 1
1052: FROM Okc_Xprt_Rule_Conditions Cond, okc_xprt_rule_hdrs_all Rules,

Line 1058: AND ( (to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Code

1054: WHERE Rules.Rule_Id = Cond.Rule_Id
1055: AND Rules.Org_Wide_Flag = 'Y'
1056: AND Rules.Org_Id = l_Org_Id
1057: AND Rules.Intent = l_Intent
1058: AND ( (to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Code
1059: AND Cond.Object_Type = 'QUESTION') OR
1060: (to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Value_Code
1061: AND Cond.Object_Value_Type = 'QUESTION')
1062: )

Line 1060: (to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Value_Code

1056: AND Rules.Org_Id = l_Org_Id
1057: AND Rules.Intent = l_Intent
1058: AND ( (to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Code
1059: AND Cond.Object_Type = 'QUESTION') OR
1060: (to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Value_Code
1061: AND Cond.Object_Value_Type = 'QUESTION')
1062: )
1063: AND quest.question_id = Okc_Xprt_Question_Orders.Question_Id
1064: AND Rules.Status_Code IN ('ACTIVE', 'DRAFT', 'REVISION', 'PENDINGDISABLE','PENDINGPUB')

Line 1063: AND quest.question_id = Okc_Xprt_Question_Orders.Question_Id

1059: AND Cond.Object_Type = 'QUESTION') OR
1060: (to_char(Okc_Xprt_Question_Orders.Question_Id) = Cond.Object_Value_Code
1061: AND Cond.Object_Value_Type = 'QUESTION')
1062: )
1063: AND quest.question_id = Okc_Xprt_Question_Orders.Question_Id
1064: AND Rules.Status_Code IN ('ACTIVE', 'DRAFT', 'REVISION', 'PENDINGDISABLE','PENDINGPUB')
1065: UNION ALL --perf Bug#5030444 Replaced UNION with UNION ALL
1066: SELECT 1
1067: FROM Okc_Xprt_Rule_Outcomes Outs, okc_xprt_rule_hdrs_all Rules,

Line 1073: AND to_char(Okc_Xprt_Question_Orders.Question_Id) =

1069: WHERE Rules.Rule_Id = Outs.Rule_Id
1070: AND Rules.Org_Wide_Flag = 'Y'
1071: AND Rules.Org_Id = l_Org_Id
1072: AND Rules.Intent = l_Intent
1073: AND to_char(Okc_Xprt_Question_Orders.Question_Id) =
1074: Outs.Object_Value_Id
1075: AND Outs.Object_Type = 'QUESTION'
1076: AND quest.question_id = Okc_Xprt_Question_Orders.Question_Id
1077: AND Rules.Status_Code IN ('ACTIVE', 'DRAFT', 'REVISION', 'PENDINGDISABLE','PENDINGPUB')

Line 1076: AND quest.question_id = Okc_Xprt_Question_Orders.Question_Id

1072: AND Rules.Intent = l_Intent
1073: AND to_char(Okc_Xprt_Question_Orders.Question_Id) =
1074: Outs.Object_Value_Id
1075: AND Outs.Object_Type = 'QUESTION'
1076: AND quest.question_id = Okc_Xprt_Question_Orders.Question_Id
1077: AND Rules.Status_Code IN ('ACTIVE', 'DRAFT', 'REVISION', 'PENDINGDISABLE','PENDINGPUB')
1078: );
1079:
1080: -- write to debug log file

Line 1084: '120: Deleted invalid questions from the table Okc_Xprt_Question_Orders');

1080: -- write to debug log file
1081: IF (Fnd_Log.Level_Procedure >= Fnd_Log.g_Current_Runtime_Level) THEN
1082: Fnd_Log.STRING(Fnd_Log.Level_Procedure,
1083: g_Module || l_Api_Name,
1084: '120: Deleted invalid questions from the table Okc_Xprt_Question_Orders');
1085: END IF;
1086: /*
1087: Initialize the statuses for the questions for the template
1088: */

Line 1098: UPDATE Okc_Xprt_Question_Orders

1094: Fnd_Log.STRING(Fnd_Log.Level_Procedure,
1095: g_Module || l_Api_Name,
1096: '130: Initialize the status for the questions for the template.');
1097: END IF;
1098: UPDATE Okc_Xprt_Question_Orders
1099: SET Question_Rule_Status = 'DRAFT',
1100: Last_Updated_By = l_user_id,
1101: Last_Update_Date = SYSDATE,
1102: Last_Update_Login = l_login_id,

Line 1189: 3. Run a loop on the cursor to update/insert records into OKC_XPRT_QUESTION_ORDERS and set Draft_rule_qst_flag = 'ACTIVE' or 'DRAFT' based on the rule status.

1185:
1186: BEGIN
1187:
1188: /*
1189: 3. Run a loop on the cursor to update/insert records into OKC_XPRT_QUESTION_ORDERS and set Draft_rule_qst_flag = 'ACTIVE' or 'DRAFT' based on the rule status.
1190:
1191: */
1192:
1193: FOR Question_Rec IN Active_Draft_Rule_Questions LOOP

Line 1198: UPDATE Okc_Xprt_Question_Orders

1194:
1195: l_Question_Id := Question_Rec.Question_Id;
1196:
1197:
1198: UPDATE Okc_Xprt_Question_Orders
1199: SET Question_Rule_Status = DECODE(Question_Rec.Status_Code, 'ACTIVE','ACTIVE','DRAFT' ),
1200: Last_Updated_By = l_user_id,
1201: Last_Update_Date = SYSDATE,
1202: Last_Update_Login = l_login_id,

Line 1209: INSERT INTO Okc_Xprt_Question_Orders

1205: AND Question_Id = l_Question_Id;
1206:
1207: IF SQL%NOTFOUND THEN
1208:
1209: INSERT INTO Okc_Xprt_Question_Orders
1210: (Question_Order_Id,
1211: Template_Id,
1212: Question_Id,
1213: Question_Rule_Status,

Line 1222: (OKC_XPRT_QUESTION_ORDERS_S.NEXTVAL,

1218: Last_Updated_By,
1219: Last_Update_Date,
1220: Last_Update_Login)
1221: VALUES
1222: (OKC_XPRT_QUESTION_ORDERS_S.NEXTVAL,
1223: p_Template_Id,
1224: l_Question_Id,
1225: DECODE(Question_Rec.Status_Code, 'ACTIVE','ACTIVE','DRAFT'),
1226: DECODE(Question_Rec.Status_Code, 'ACTIVE','Y','N'),

Line 1322: Run a loop on the cursor to update/insert records into OKC_XPRT_QUESTION_ORDERS and set QUESTION_RULE_STATUS = 'PENDINGPUB'.

1318: l_Question_Id NUMBER;
1319: BEGIN
1320:
1321: /*
1322: Run a loop on the cursor to update/insert records into OKC_XPRT_QUESTION_ORDERS and set QUESTION_RULE_STATUS = 'PENDINGPUB'.
1323:
1324: */
1325: FOR Question_Rec IN Pending_Rule_Questions LOOP
1326:

Line 1330: UPDATE Okc_Xprt_Question_Orders

1326:
1327: l_Question_Id := Question_Rec.Question_Id;
1328:
1329:
1330: UPDATE Okc_Xprt_Question_Orders
1331: SET Question_Rule_Status = DECODE(Question_Rule_Status,'ACTIVE','ACTIVE','PENDINGPUB'),
1332: Last_Updated_By = l_user_id,
1333: Last_Update_Date = SYSDATE,
1334: Last_Update_Login = l_login_id,

Line 1341: INSERT INTO Okc_Xprt_Question_Orders

1337: AND Question_Id = l_Question_Id ;
1338:
1339: IF SQL%NOTFOUND THEN
1340:
1341: INSERT INTO Okc_Xprt_Question_Orders
1342: (Question_Order_Id,
1343: Template_Id,
1344: Question_Id,
1345: Question_Rule_Status,

Line 1354: (OKC_XPRT_QUESTION_ORDERS_S.NEXTVAL,

1350: Last_Updated_By,
1351: Last_Update_Date,
1352: Last_Update_Login)
1353: VALUES
1354: (OKC_XPRT_QUESTION_ORDERS_S.NEXTVAL,
1355: p_Template_Id,
1356: l_Question_Id,
1357: 'PENDINGPUB',
1358: 'N',

Line 1377: UPDATE Okc_Xprt_Question_Orders

1373: For all other modes, only select 'ACTIVE' rules and 'PENDINGPUB' rules for the request id.
1374: */
1375:
1376:
1377: UPDATE Okc_Xprt_Question_Orders
1378: SET Mandatory_Flag = 'N',
1379: Last_Updated_By = l_user_id,
1380: Last_Update_Date = SYSDATE,
1381: Last_Update_Login = l_login_id

Line 1394: UPDATE Okc_Xprt_Question_Orders

1390: END IF;
1391:
1392: --Fix for perf Bug#5030429.Breaking big Update stmt into 4 small Update stmts one for each subquery
1393: --Update stmt1: set mandatory_flag = 'Y' for those questions which appear in the conditions of non-org wide rule
1394: UPDATE Okc_Xprt_Question_Orders
1395: SET Mandatory_Flag = 'Y',
1396: Last_Updated_By = l_user_id,
1397: Last_Update_Date = SYSDATE,
1398: Last_Update_Login = l_login_id

Line 1405: Okc_Xprt_Question_Orders Ord

1401: (SELECT Ord.Question_Id
1402: FROM Okc_Xprt_Rule_Conditions Cond,
1403: okc_xprt_rule_hdrs_all Rules,
1404: Okc_Xprt_Template_Rules Assoc,
1405: Okc_Xprt_Question_Orders Ord
1406: WHERE Rules.Rule_Id = Cond.Rule_Id
1407: AND Rules.Rule_Id = Assoc.Rule_Id
1408: AND Assoc.Template_Id = p_Template_Id
1409: AND (

Line 1417: UPDATE Okc_Xprt_Question_Orders

1413: AND Cond.Object_Value_Type = 'QUESTION')
1414: )
1415: );
1416: --Update stmt2: set mandatory_flag = 'Y' for those questions which appear in the conditions of ORG wide rule
1417: UPDATE Okc_Xprt_Question_Orders
1418: SET Mandatory_Flag = 'Y',
1419: Last_Updated_By = l_user_id,
1420: Last_Update_Date = SYSDATE,
1421: Last_Update_Login = l_login_id

Line 1427: Okc_Xprt_Question_Orders Ord

1423: AND Question_Id IN
1424: (SELECT Ord.Question_Id
1425: FROM Okc_Xprt_Rule_Conditions Cond,
1426: okc_xprt_rule_hdrs_all Rules,
1427: Okc_Xprt_Question_Orders Ord
1428: WHERE Rules.Rule_Id = Cond.Rule_Id
1429: AND Rules.Org_Wide_Flag = 'Y'
1430: AND Rules.Org_Id = l_Org_Id
1431: AND Rules.Intent = l_Intent

Line 1440: UPDATE Okc_Xprt_Question_Orders

1436: AND Cond.Object_Value_Type = 'QUESTION')
1437: )
1438: );
1439: --Update stmt3: set mandatory_flag = 'N' for those questions which appear in the outcome of non-ORG wide rule
1440: UPDATE Okc_Xprt_Question_Orders
1441: SET Mandatory_Flag = 'N',
1442: Last_Updated_By = l_user_id,
1443: Last_Update_Date = SYSDATE,
1444: Last_Update_Login = l_login_id

Line 1451: Okc_Xprt_Question_Orders Ord

1447: (SELECT Ord.Question_Id
1448: FROM Okc_Xprt_Rule_Outcomes Outs,
1449: okc_xprt_rule_hdrs_all Rules,
1450: Okc_Xprt_Template_Rules Assoc,
1451: Okc_Xprt_Question_Orders Ord
1452: WHERE Rules.Rule_Id = Assoc.Rule_Id
1453: AND Assoc.Template_Id = p_Template_Id
1454: AND to_char(Ord.Question_Id) = Outs.Object_Value_Id
1455: AND Outs.Object_Type = 'QUESTION'

Line 1460: UPDATE Okc_Xprt_Question_Orders

1456: AND rules.rule_id = outs.rule_id
1457: AND rules.status_code <> 'INACTIVE' --Added for Bug#4108690
1458: );
1459: --Update stmt4: set mandatory_flag = 'N' for those questions which appear in the outcome of ORG wide rule
1460: UPDATE Okc_Xprt_Question_Orders
1461: SET Mandatory_Flag = 'N',
1462: Last_Updated_By = l_user_id,
1463: Last_Update_Date = SYSDATE,
1464: Last_Update_Login = l_login_id

Line 1470: Okc_Xprt_Question_Orders Ord

1466: AND Question_Id IN
1467: (SELECT Ord.Question_Id
1468: FROM Okc_Xprt_Rule_Outcomes Outs,
1469: okc_xprt_rule_hdrs_all Rules,
1470: Okc_Xprt_Question_Orders Ord
1471: WHERE Rules.Rule_Id = Outs.Rule_Id
1472: AND Rules.Org_Wide_Flag = 'Y'
1473: AND Rules.Org_Id = l_Org_Id
1474: AND Rules.Intent = l_Intent

Line 1489: UPDATE Okc_Xprt_Question_Orders

1485: END IF;
1486: --Fix for perf Bug#5030086.Breaking big Update stmt into 4 small Update stmts
1487: --Update stmt1: set mandatory_flag = 'Y' for those questions which appear in the conditions of
1488: --Org and non-Org wide rules and rule status is ACTIVE
1489: UPDATE Okc_Xprt_Question_Orders
1490: SET Mandatory_Flag = 'Y',
1491: Last_Updated_By = l_user_id,
1492: Last_Update_Date = SYSDATE,
1493: Last_Update_Login = l_login_id

Line 1500: Okc_Xprt_Question_Orders Ord

1496: (SELECT Ord.Question_Id
1497: FROM Okc_Xprt_Rule_Conditions Cond,
1498: okc_xprt_rule_hdrs_all Rules,
1499: Okc_Xprt_Template_Rules Assoc,
1500: Okc_Xprt_Question_Orders Ord
1501: WHERE Rules.Rule_Id = Cond.Rule_Id
1502: AND Rules.Rule_Id = Assoc.Rule_Id
1503: AND Assoc.Template_Id = p_Template_Id
1504: AND (

Line 1515: Okc_Xprt_Question_Orders Ord

1511: UNION
1512: SELECT Ord.Question_Id
1513: FROM Okc_Xprt_Rule_Conditions Cond,
1514: okc_xprt_rule_hdrs_all Rules,
1515: Okc_Xprt_Question_Orders Ord
1516: WHERE Rules.Rule_Id = Cond.Rule_Id
1517: AND Rules.Org_Wide_Flag = 'Y'
1518: AND Rules.Org_Id = l_Org_Id
1519: AND Rules.Intent = l_Intent

Line 1530: UPDATE Okc_Xprt_Question_Orders

1526: AND Rules.Status_Code = 'ACTIVE');
1527:
1528: --Update stmt2: set mandatory_flag = 'Y' for those questions which appear in the conditions of
1529: --Org and non-Org wide rules and rule status is PENDINGPUB
1530: UPDATE Okc_Xprt_Question_Orders
1531: SET Mandatory_Flag = 'Y',
1532: Last_Updated_By = l_user_id,
1533: Last_Update_Date = SYSDATE,
1534: Last_Update_Login = l_login_id

Line 1541: Okc_Xprt_Question_Orders Ord

1537: (SELECT Ord.Question_Id
1538: FROM Okc_Xprt_Rule_Conditions Cond,
1539: okc_xprt_rule_hdrs_all Rules,
1540: Okc_Xprt_Template_Rules Assoc,
1541: Okc_Xprt_Question_Orders Ord
1542: WHERE Rules.Rule_Id = Cond.Rule_Id
1543: AND Rules.Rule_Id = Assoc.Rule_Id
1544: AND Assoc.Template_Id = p_Template_Id
1545: AND (

Line 1557: Okc_Xprt_Question_Orders Ord

1553: UNION
1554: SELECT Ord.Question_Id
1555: FROM Okc_Xprt_Rule_Conditions Cond,
1556: okc_xprt_rule_hdrs_all Rules,
1557: Okc_Xprt_Question_Orders Ord
1558: WHERE Rules.Rule_Id = Cond.Rule_Id
1559: AND Rules.Org_Wide_Flag = 'Y'
1560: AND Rules.Org_Id = l_Org_Id
1561: AND Rules.Intent = l_Intent

Line 1572: UPDATE Okc_Xprt_Question_Orders

1568: AND Rules.Status_Code = 'PENDINGPUB'
1569: AND Rules.Request_Id = l_conc_request_id );
1570: --Update stmt3: set mandatory_flag = 'N' for those questions which appear in the Outcome Section of
1571: --Org and non-Org wide rules and rule status is ACTIVE
1572: UPDATE Okc_Xprt_Question_Orders
1573: SET Mandatory_Flag = 'N',
1574: Last_Updated_By = l_user_id,
1575: Last_Update_Date = SYSDATE,
1576: Last_Update_Login = l_login_id

Line 1583: Okc_Xprt_Question_Orders Ord

1579: (SELECT Ord.Question_Id
1580: FROM Okc_Xprt_Rule_Outcomes Outs,
1581: okc_xprt_rule_hdrs_all Rules,
1582: Okc_Xprt_Template_Rules Assoc,
1583: Okc_Xprt_Question_Orders Ord
1584: WHERE Rules.Rule_Id = Assoc.Rule_Id
1585: AND Assoc.Template_Id = p_Template_Id
1586: AND to_char(Ord.Question_Id) = Outs.Object_Value_Id
1587: AND Outs.Object_Type = 'QUESTION'

Line 1594: Okc_Xprt_Question_Orders Ord

1590: UNION
1591: SELECT Ord.Question_Id
1592: FROM Okc_Xprt_Rule_Outcomes Outs,
1593: okc_xprt_rule_hdrs_all Rules,
1594: Okc_Xprt_Question_Orders Ord
1595: WHERE Rules.Rule_Id = Outs.Rule_Id
1596: AND Rules.Org_Wide_Flag = 'Y'
1597: AND Rules.Org_Id = l_Org_Id
1598: AND Rules.Intent = l_Intent

Line 1605: UPDATE Okc_Xprt_Question_Orders

1601: AND Rules.Status_Code = 'ACTIVE'
1602: AND rules.rule_id = outs.rule_id );
1603: --Update stmt4: set mandatory_flag = 'N' for those questions which appear in the Outcome Section of
1604: --Org and non-Org wide rules and rule status is PENDINGPUB
1605: UPDATE Okc_Xprt_Question_Orders
1606: SET Mandatory_Flag = 'N',
1607: Last_Updated_By = l_user_id,
1608: Last_Update_Date = SYSDATE,
1609: Last_Update_Login = l_login_id

Line 1616: Okc_Xprt_Question_Orders Ord

1612: (SELECT Ord.Question_Id
1613: FROM Okc_Xprt_Rule_Outcomes Outs,
1614: okc_xprt_rule_hdrs_all Rules,
1615: Okc_Xprt_Template_Rules Assoc,
1616: Okc_Xprt_Question_Orders Ord
1617: WHERE Rules.Rule_Id = Assoc.Rule_Id
1618: AND Assoc.Template_Id = p_Template_Id
1619: AND to_char(Ord.Question_Id) = Outs.Object_Value_Id
1620: AND Outs.Object_Type = 'QUESTION'

Line 1628: Okc_Xprt_Question_Orders Ord

1624: UNION
1625: SELECT Ord.Question_Id
1626: FROM Okc_Xprt_Rule_Outcomes Outs,
1627: okc_xprt_rule_hdrs_all Rules,
1628: Okc_Xprt_Question_Orders Ord
1629: WHERE Rules.Rule_Id = Outs.Rule_Id
1630: AND Rules.Org_Wide_Flag = 'Y'
1631: AND Rules.Org_Id = l_Org_Id
1632: AND Rules.Intent = l_Intent

Line 1661: FROM Okc_Xprt_Question_Orders

1657: l_Max_Seq NUMBER :=0;
1658: l_Question_Id NUMBER;
1659: CURSOR Questions_For_Seq IS
1660: SELECT Question_Id
1661: FROM Okc_Xprt_Question_Orders
1662: WHERE Template_Id = p_Template_Id
1663: AND Sequence_Num IS NULL
1664: ORDER BY Mandatory_Flag DESC;
1665:

Line 1670: FROM Okc_Xprt_Question_Orders

1666: BEGIN
1667: BEGIN
1668: SELECT MAX(Sequence_Num)
1669: INTO l_Max_Seq
1670: FROM Okc_Xprt_Question_Orders
1671: WHERE Template_Id = p_Template_Id;
1672: EXCEPTION
1673: WHEN OTHERS THEN
1674: l_Max_Seq := 0;

Line 1683: UPDATE Okc_Xprt_Question_Orders

1679:
1680: l_Question_Id := Question_Rec.Question_Id;
1681:
1682:
1683: UPDATE Okc_Xprt_Question_Orders
1684: SET Sequence_Num = l_Max_Seq
1685: WHERE Template_Id = p_Template_Id
1686: AND Question_Id = l_Question_Id;
1687:

Line 1786: Update the runtime_available_flag in okc_xprt_question_orders table

1782: Delete Production mode Publication
1783: DELETE the UI attached to the production publication
1784: Update Test mode Publication to Production mode
1785: Update Rule status in the current concurrent request id
1786: Update the runtime_available_flag in okc_xprt_question_orders table
1787: Delete records from okc_xprt_template_rules where deleted_flag = 'Y'
1788: commit the work
1789:
1790: This procedure can also be called in Template approval flow with mode 'TEMPLATE_APPROVAL'

Line 1795: Update the runtime_available_flag in okc_xprt_question_orders table

1791: This procedure does the following in 'TEMPLATE_APPROVAL' mode:
1792: For the called template
1793: Delete Production mode Publication
1794: Update Test mode Publication to Production mode
1795: Update the runtime_available_flag in okc_xprt_question_orders table
1796: */
1797: PROCEDURE create_production_publication
1798: (
1799: p_calling_mode IN VARCHAR2,

Line 2042: UPDATE Okc_Xprt_Question_Orders

2038: fnd_file.put_line(FND_FILE.LOG,' ');
2039:
2040: IF (p_calling_mode = 'PUBLISH') THEN
2041: -- Update all the Question order records that have question_rule_status as PENDINGPUB
2042: UPDATE Okc_Xprt_Question_Orders
2043: SET runtime_available_flag = 'Y',
2044: question_rule_status = 'ACTIVE',
2045: last_updated_by = FND_GLOBAL.USER_ID,
2046: last_update_date = SYSDATE,

Line 2072: UPDATE Okc_Xprt_Question_Orders

2068: END IF; -- p_calling_mode = 'PUBLISH'
2069:
2070: IF p_calling_mode = 'TEMPLATE_APPROVAL' THEN
2071: -- if template approval then go by template id
2072: UPDATE Okc_Xprt_Question_Orders
2073: SET runtime_available_flag = 'Y',
2074: last_updated_by = FND_GLOBAL.USER_ID,
2075: last_update_date = SYSDATE,
2076: last_update_login = FND_GLOBAL.LOGIN_ID

Line 8676: FROM okc_xprt_question_orders

8672:
8673: CURSOR c1 IS
8674: --Check if the Template has Active rules with questions
8675: SELECT 'X'
8676: FROM okc_xprt_question_orders
8677: WHERE question_rule_status = 'ACTIVE'
8678: AND template_id = p_template_id;
8679:
8680: l_value VARCHAR2(1) := 'N';

Line 10046: FROM okc_xprt_question_orders

10042: LOOP
10043: FOR rec_question IN csr_questions(rec_rule.rule_id)
10044: LOOP
10045: SELECT 'x' into l_dummy
10046: FROM okc_xprt_question_orders
10047: WHERE question_rule_status = 'ACTIVE'
10048: AND template_id = p_template_id
10049: AND question_id = rec_question.question_id;
10050: