DBA Data[Home] [Help]

APPS.AME_RULE_UTILITY_PKG dependencies on AME_RULES

Line 6: dummy ame_rules.description%type;

2: /* $Header: ameruleutility.pkb 120.3 2006/08/24 13:08:39 prasashe noship $ */
3: --+
4: function isDescriptionExists(ruleIdIn in integer
5: ,endDateIn in date) return boolean is
6: dummy ame_rules.description%type;
7: begin
8: select rule1.description into dummy
9: from ame_rules rule1
10: ,ame_rules rule2

Line 9: from ame_rules rule1

5: ,endDateIn in date) return boolean is
6: dummy ame_rules.description%type;
7: begin
8: select rule1.description into dummy
9: from ame_rules rule1
10: ,ame_rules rule2
11: where rule1.description = rule2.description
12: and rule1.end_date = endDateIn
13: and ((sysdate between rule2.start_date and nvl(rule2.end_date - (1/86400),sysdate))

Line 10: ,ame_rules rule2

6: dummy ame_rules.description%type;
7: begin
8: select rule1.description into dummy
9: from ame_rules rule1
10: ,ame_rules rule2
11: where rule1.description = rule2.description
12: and rule1.end_date = endDateIn
13: and ((sysdate between rule2.start_date and nvl(rule2.end_date - (1/86400),sysdate))
14: or

Line 53: select rule_type into dummy from ame_rules

49: --+
50: function isProdRule(ruleIdIn in integer)return boolean is
51: dummy number;
52: begin
53: select rule_type into dummy from ame_rules
54: where rule_id = ruleIdIn
55: and rownum < 2;
56: if dummy = 7 then
57: return true;

Line 76: ,ame_rules rul

72: select 'Y'
73: from ame_action_types aty
74: ,ame_actions act
75: ,ame_action_usages acu
76: ,ame_rules rul
77: ,ame_action_type_usages axu
78: where rul.rule_id = ruleIdIn
79: and rul.rule_id = acu.rule_id
80: and acu.action_id = act.action_id

Line 102: ,ame_rules rul

98: select 'Y'
99: from ame_action_types aty
100: ,ame_actions act
101: ,ame_action_usages acu
102: ,ame_rules rul
103: ,ame_action_type_usages axu
104: where rul.rule_id = ruleIdIn
105: and rul.rule_id = acu.rule_id
106: and acu.action_id = act.action_id

Line 158: ,ame_rules rules

154: select distinct atr.attribute_id, atr.name
155: from ame_attributes atr
156: ,ame_conditions cond
157: ,ame_condition_usages condu
158: ,ame_rules rules
159: where cond.attribute_id = atr.attribute_id
160: and condu.condition_id = cond.condition_id
161: and condu.rule_id = rules.rule_id
162: and rules.rule_id = ruleIdIn

Line 179: ,ame_rules rules

175: from ame_attributes atr
176: ,ame_action_usages acu
177: ,ame_actions act
178: ,ame_mandatory_attributes ama
179: ,ame_rules rules
180: where ama.attribute_id = atr.attribute_id
181: and act.action_id = acu.action_id
182: and act.action_type_id = ama.action_type_id
183: and acu.rule_id = rules.rule_id

Line 201: ,ame_rules rul

197: ,applicationIdIn in integer
198: ,endDatein in date) is
199: select name
200: from ame_item_classes itc
201: ,ame_rules rul
202: where rul.item_class_id = itc.item_class_id
203: and rul.rule_id = ruleIdIn
204: and sysdate between itc.start_date and nvl(itc.end_date - (1/86400), sysdate)
205: and rul.end_date = endDateIn

Line 221: from ame_rules rul

217: --+
218: cursor getItemClass(ruleIdIn in integer
219: ,endDateIn in date) is
220: select 'Y'
221: from ame_rules rul
222: ,ame_item_classes itc
223: where rul.rule_id = ruleIdIn
224: and rul.item_class_id = itc.item_class_id
225: and itc.name <> ame_util.headerItemClassName

Line 236: ,ame_rules rul

232: select distinct aty.action_type_id, aty.name
233: from ame_action_types aty
234: ,ame_actions act
235: ,ame_action_usages acu
236: ,ame_rules rul
237: where rul.rule_id = ruleIdIn
238: and rul.rule_id = acu.rule_id
239: and acu.action_id = act.action_id
240: and act.action_type_id = aty.action_type_id

Line 259: ,ame_rules rul

255: ,apg.name
256: from ame_action_types aty
257: ,ame_actions act
258: ,ame_action_usages acu
259: ,ame_rules rul
260: ,ame_approval_groups apg
261: where rul.rule_id = ruleIdIn
262: and rul.end_date = endDateIn
263: and rul.start_date < endDateIn

Line 285: from ame_rules rul

281: --+
282: cursor checkLMConditions(ruleIdIn in integer
283: ,endDateIn in date) is
284: select 'Y'
285: from ame_rules rul
286: ,ame_conditions con
287: ,ame_condition_usages cnu
288: ,wf_roles wf
289: where rul.rule_id = ruleIdIn

Line 494: ,ame_rules rules

490: select distinct atr.attribute_id, atr.name
491: from ame_attributes atr
492: ,ame_conditions cond
493: ,ame_condition_usages condu
494: ,ame_rules rules
495: where cond.attribute_id = atr.attribute_id
496: and condu.condition_id = cond.condition_id
497: and condu.rule_id = rules.rule_id
498: and rules.rule_id = ruleIdIn

Line 521: ,ame_rules rules

517: from ame_attributes atr
518: ,ame_action_usages acu
519: ,ame_actions act
520: ,ame_mandatory_attributes ama
521: ,ame_rules rules
522: where ama.attribute_id = atr.attribute_id
523: and act.action_id = acu.action_id
524: and act.action_type_id = ama.action_type_id
525: and acu.rule_id = rules.rule_id

Line 549: ,ame_rules rul

545: cursor checkItemClass(ruleIdIn in integer
546: ,applicationIdIn in integer) is
547: select name
548: from ame_item_classes itc
549: ,ame_rules rul
550: where rul.item_class_id = itc.item_class_id
551: and rul.rule_id = ruleIdIn
552: and sysdate between itc.start_date and nvl(itc.end_date - (1/86400), sysdate)
553: and ((sysdate between rul.start_date and nvl(rul.end_date - (1/86400),sysdate))

Line 571: from ame_rules rul

567: and sysdate between start_date and nvl(end_date - (1/86400), sysdate);
568: --+
569: cursor getItemClass(ruleIdIn in integer) is
570: select 'Y'
571: from ame_rules rul
572: ,ame_item_classes itc
573: where rul.rule_id = ruleIdIn
574: and rul.item_class_id = itc.item_class_id
575: and itc.name <> ame_util.headerItemClassName

Line 588: ,ame_rules rul

584: select distinct aty.action_type_id, aty.name
585: from ame_action_types aty
586: ,ame_actions act
587: ,ame_action_usages acu
588: ,ame_rules rul
589: where rul.rule_id = ruleIdIn
590: and rul.rule_id = acu.rule_id
591: and acu.action_id = act.action_id
592: and act.action_type_id = aty.action_type_id

Line 615: ,ame_rules rul

611: select apg.approval_group_id, apg.name
612: from ame_action_types aty
613: ,ame_actions act
614: ,ame_action_usages acu
615: ,ame_rules rul
616: ,ame_approval_groups apg
617: where rul.rule_id = ruleIdIn
618: and ((sysdate between rul.start_date and nvl(rul.end_date - (1/86400),sysdate))
619: or

Line 644: from ame_rules rul

640: ,'approval-group chain of authority');
641: --+
642: cursor checkLMConditions(ruleIdIn in integer) is
643: select 'Y'
644: from ame_rules rul
645: ,ame_conditions con
646: ,ame_condition_usages cnu
647: ,wf_roles wf
648: where rul.rule_id = ruleIdIn

Line 862: ,ame_rules rul

858: ) is
859: select count(*)
860: from ame_conditions con
861: ,ame_condition_usages cnu
862: ,ame_rules rul
863: where rul.rule_id = ruleIdIn
864: and rul.end_date = endDateIn
865: and cnu.rule_id = rul.rule_id
866: and cnu.end_date = rul.end_date

Line 874: ,ame_rules rul

870: cursor getActions(ruleIdIn in integer
871: ,endDateIn in date) is
872: select count(*)
873: from ame_action_usages acu
874: ,ame_rules rul
875: where rul.rule_id = ruleIdIn
876: and rul.end_date = endDateIn
877: and acu.rule_id = rul.rule_id
878: and acu.end_date = rul.end_date;

Line 886: ,ame_rules rul

882: ) is
883: select count(*)
884: from ame_actions act
885: ,ame_action_usages acu
886: ,ame_rules rul
887: where rul.rule_id = ruleIdIn
888: and rul.end_date = endDateIn
889: and acu.rule_id = rul.rule_id
890: and acu.end_date = rul.end_date

Line 899: ,ame_rules rul

895: ,endDateIn in date) is
896: select 'Y'
897: from ame_actions act
898: ,ame_action_usages acu
899: ,ame_rules rul
900: ,ame_action_types aty
901: where rul.rule_id = ruleIdIn
902: and rul.end_date = endDateIn
903: and acu.rule_id = rul.rule_id

Line 913: ,ame_rules rul

909: cursor getConditions(ruleIdIn in integer
910: ,endDateIn in date) is
911: select count(*)
912: from ame_condition_usages cnu
913: ,ame_rules rul
914: where rul.rule_id = ruleIdIn
915: and rul.end_date = endDateIn
916: and cnu.rule_id = rul.rule_id
917: and cnu.end_date = rul.end_date;

Line 1017: insert into ame_rules

1013:
1014: startDate := startDateIn;
1015: endDate := endDateIn;
1016: --+ rule
1017: insert into ame_rules
1018: (rule_id
1019: ,rule_type
1020: ,created_by
1021: ,creation_date

Line 1043: ,object_version_number+1 from ame_rules

1039: ,endDate
1040: ,description
1041: ,rule_key
1042: ,item_class_id
1043: ,object_version_number+1 from ame_rules
1044: where rule_id = ruleIdIn
1045: and end_date = ruleEndDateIn;
1046: --+ conditions
1047: for condRec in getConditions(ruleIdIn,ruleEndDateIn) loop

Line 1409: from ame_rules

1405: cursor getRuleDetails(l_effective_date in date) is
1406: select start_date
1407: ,end_date
1408: ,object_version_number
1409: from ame_rules
1410: where rule_id = p_rule_id
1411: and ((l_effective_date between start_date and nvl(end_date - ame_util.oneSecond, l_effective_date))
1412: or
1413: (l_effective_date < start_date and start_date < nvl(end_date,start_date + ame_util.oneSecond)));

Line 1522: from ame_rules

1518: procedure checkRuleId(p_rule_id in number) is
1519: --+
1520: cursor checkRule(p_rule_id in number) is
1521: select count(*)
1522: from ame_rules
1523: where rule_id = p_rule_id
1524: and ((sysdate between start_date and nvl(end_date - (1/86400),sysdate))
1525: or
1526: (sysdate < start_date and start_date < nvl(end_date, start_date + (1/86400)))

Line 1621: from ame_rules rul

1617: function rule_conditions_count(p_rule_id in integer) return integer is
1618: --+
1619: cursor rulCndCnt(p_rule_id in number) is
1620: select count(*)
1621: from ame_rules rul
1622: ,ame_condition_usages cnu
1623: where rul.rule_id = p_rule_id
1624: and cnu.rule_id = rul.rule_id
1625: and ((sysdate between rul.start_date and nvl(rul.end_date - (1/86400),sysdate))

Line 1761: ,ame_rules rul

1757: --+
1758: cursor getRuleActions(p_rule_id in integer) is
1759: select acu.action_id
1760: from ame_action_usages acu
1761: ,ame_rules rul
1762: where rul.rule_id = acu.rule_id
1763: and rul.rule_id = p_rule_id
1764: and ((sysdate between rul.start_date and nvl(rul.end_date - (1/86400),sysdate))
1765: or

Line 1812: ,ame_rules rul

1808: --+
1809: cursor getRuleConditions(p_rule_id in integer) is
1810: select cnu.condition_id
1811: from ame_condition_usages cnu
1812: ,ame_rules rul
1813: where rul.rule_id = cnu.rule_id
1814: and rul.rule_id = p_rule_id
1815: and ((sysdate between rul.start_date and nvl(rul.end_date - (1/86400),sysdate))
1816: or

Line 1852: l_rule_type ame_rules.rule_type%type;

1848: ,p_rule_type in integer
1849: ,p_action_rule_type in integer
1850: ,p_application_id in integer
1851: ,p_allow_production_action in boolean) return boolean is
1852: l_rule_type ame_rules.rule_type%type;
1853: --+
1854: begin
1855: --+
1856: l_rule_type := p_rule_type;

Line 1936: from ame_rules rul

1932: function is_LM_comb_rule(p_rule_id in integer) return boolean is
1933: --+
1934: cursor getLMConditions(p_rule_id in integer) is
1935: select count(*)
1936: from ame_rules rul
1937: ,ame_condition_usages cnu
1938: ,ame_conditions cnd
1939: where rul.rule_id = p_rule_id
1940: and cnu.rule_id = rul.rule_id

Line 2048: from ame_rules rul

2044: --+
2045: cursor getNonProdActionCnt(p_rule_id in integer
2046: ,p_action_id in integer) is
2047: select count(*)
2048: from ame_rules rul
2049: ,ame_action_usages acu
2050: ,ame_action_type_usages atyu
2051: ,ame_actions act
2052: where act.action_id <> p_action_id

Line 2252: from ame_rules rul

2248: ,p_condition_id in integer) is
2249: --+
2250: cursor get_sub_ic_cond(p_rule_id in integer) is
2251: select distinct atr.item_class_id
2252: from ame_rules rul
2253: ,ame_condition_usages cnu
2254: ,ame_attributes atr
2255: ,ame_conditions con
2256: ,ame_item_classes itc

Line 2275: l_item_class_id ame_rules.item_class_id%type;

2271: and sysdate between con.start_date and nvl(con.end_date - (1/86400),sysdate)
2272: and sysdate between atr.start_date and nvl(atr.end_date - (1/86400),sysdate)
2273: and sysdate between itc.start_date and nvl(itc.end_date - (1/86400),sysdate);
2274: --+
2275: l_item_class_id ame_rules.item_class_id%type;
2276: l_header_item_class_id ame_rules.item_class_id%type;
2277: l_sub_ic_cond_list ame_util.idList;
2278: l_con_item_class_id ame_rules.item_class_id%type;
2279: l_con_type ame_conditions.condition_type%type;

Line 2276: l_header_item_class_id ame_rules.item_class_id%type;

2272: and sysdate between atr.start_date and nvl(atr.end_date - (1/86400),sysdate)
2273: and sysdate between itc.start_date and nvl(itc.end_date - (1/86400),sysdate);
2274: --+
2275: l_item_class_id ame_rules.item_class_id%type;
2276: l_header_item_class_id ame_rules.item_class_id%type;
2277: l_sub_ic_cond_list ame_util.idList;
2278: l_con_item_class_id ame_rules.item_class_id%type;
2279: l_con_type ame_conditions.condition_type%type;
2280: begin

Line 2278: l_con_item_class_id ame_rules.item_class_id%type;

2274: --+
2275: l_item_class_id ame_rules.item_class_id%type;
2276: l_header_item_class_id ame_rules.item_class_id%type;
2277: l_sub_ic_cond_list ame_util.idList;
2278: l_con_item_class_id ame_rules.item_class_id%type;
2279: l_con_type ame_conditions.condition_type%type;
2280: begin
2281: --+
2282: select condition_type

Line 2311: from ame_rules

2307: end if;
2308: --+
2309: select nvl(item_class_id,l_header_item_class_id)
2310: into l_item_class_id
2311: from ame_rules
2312: where rule_id = p_rule_id
2313: and ((sysdate between start_date and nvl(end_date - (1/86400),sysdate))
2314: or
2315: (sysdate < start_date and start_date < nvl(end_date, start_date + (1/86400)))