123: where application_id = applicationIdIn
124: and sysdate between start_date and nvl(end_date - (1/86400), sysdate);
125: --+
126: cursor getActionTypeCursor is
127: select ame_actions.action_type_id
128: from ame_actions, ame_action_usages
129: where ame_action_usages.rule_id = p_rule_id
130: and ame_action_usages.action_id = ame_actions.action_id
131: and (p_effective_date between ame_action_usages.start_date
124: and sysdate between start_date and nvl(end_date - (1/86400), sysdate);
125: --+
126: cursor getActionTypeCursor is
127: select ame_actions.action_type_id
128: from ame_actions, ame_action_usages
129: where ame_action_usages.rule_id = p_rule_id
130: and ame_action_usages.action_id = ame_actions.action_id
131: and (p_effective_date between ame_action_usages.start_date
132: and nvl(ame_action_usages.end_date - ame_util.oneSecond, p_effective_date)
126: cursor getActionTypeCursor is
127: select ame_actions.action_type_id
128: from ame_actions, ame_action_usages
129: where ame_action_usages.rule_id = p_rule_id
130: and ame_action_usages.action_id = ame_actions.action_id
131: and (p_effective_date between ame_action_usages.start_date
132: and nvl(ame_action_usages.end_date - ame_util.oneSecond, p_effective_date)
133: or
134: (p_effective_date < ame_action_usages.start_date
132: and nvl(ame_action_usages.end_date - ame_util.oneSecond, p_effective_date)
133: or
134: (p_effective_date < ame_action_usages.start_date
135: and ame_action_usages.start_date < nvl(ame_action_usages.end_date, ame_action_usages.start_date + ame_util.oneSecond)))
136: and p_effective_date between ame_actions.start_date
137: and nvl(ame_actions.end_date - ame_util.oneSecond, p_effective_date) ;
138: begin
139: -- Check the value of the config variable 'allowAllApproverTypes' and 'productionFunctionality'
140: -- to ensure that rules of this type type can be defined for this transaction type.
133: or
134: (p_effective_date < ame_action_usages.start_date
135: and ame_action_usages.start_date < nvl(ame_action_usages.end_date, ame_action_usages.start_date + ame_util.oneSecond)))
136: and p_effective_date between ame_actions.start_date
137: and nvl(ame_actions.end_date - ame_util.oneSecond, p_effective_date) ;
138: begin
139: -- Check the value of the config variable 'allowAllApproverTypes' and 'productionFunctionality'
140: -- to ensure that rules of this type type can be defined for this transaction type.
141: --
497: --+
498: cursor getActionRuleType is
499: select atyu.rule_type
500: from ame_action_type_usages atyu
501: ,ame_actions act
502: where act.action_id = p_action_id
503: and act.action_type_id = atyu.action_type_id
504: and sysdate between act.start_date and nvl(act.end_date-(1/86400),sysdate)
505: and sysdate between atyu.start_date and nvl(atyu.end_date-(1/86400),sysdate);
932: cursor getReqAttributes is
933: select man.attribute_id
934: from ame_mandatory_attributes man
935: ,ame_action_usages acu
936: ,ame_actions act
937: where man.action_type_id = act.action_type_id
938: and acu.action_id = act.action_id
939: and acu.rule_id = p_rule_id
940: and l_effective_date between man.start_date and nvl(man.end_date - ame_util.oneSecond, l_effective_date)
1826: cursor getActionDetails is
1827: select aatu.action_type_id
1828: ,aatu.rule_type
1829: from ame_action_type_usages aatu
1830: ,ame_actions aa
1831: where aa.action_id = p_action_id
1832: and l_effective_date between aa.start_date
1833: and nvl(aa.end_date - ame_util.oneSecond, l_effective_date)
1834: and aa.action_type_id = aatu.action_type_id
1861: ,ruleIdIn in integer) is
1862: select man.attribute_id
1863: from ame_mandatory_attributes man
1864: ,ame_action_usages acu
1865: ,ame_actions act
1866: where man.action_type_id = act.action_type_id
1867: and acu.action_id = act.action_id
1868: and acu.action_id = actionIdIn
1869: and acu.rule_id = ruleIdIn
2767: cursor getReqAttributes is
2768: select man.attribute_id
2769: from ame_mandatory_attributes man
2770: ,ame_action_usages acu
2771: ,ame_actions act
2772: where man.action_type_id = act.action_type_id
2773: and acu.action_id = act.action_id
2774: and acu.rule_id = p_rule_id
2775: and l_effective_date between man.start_date and nvl(man.end_date - ame_util.oneSecond, l_effective_date)
3380: --+
3381: cursor getReqAttributeIds(actionIdIn in integer) is
3382: select man.attribute_id
3383: from ame_mandatory_attributes man
3384: ,ame_actions act
3385: where man.action_type_id = act.action_type_id
3386: and act.action_id = actionIdIn
3387: and l_effective_date between man.start_date and nvl(man.end_date - ame_util.oneSecond, l_effective_date)
3388: and l_effective_date between act.start_date and nvl(act.end_date - ame_util.oneSecond, l_effective_date);