3811: end fetchActiveConditionUsages;
3812: procedure fetchApplicableActions as
3813: cursor applicableActionsCursor(ruleIdIn in integer) is
3814: select
3815: ame_actions.action_type_id,
3816: ame_actions.parameter,
3817: ame_actions.parameter_two
3818: from
3819: ame_actions,
3812: procedure fetchApplicableActions as
3813: cursor applicableActionsCursor(ruleIdIn in integer) is
3814: select
3815: ame_actions.action_type_id,
3816: ame_actions.parameter,
3817: ame_actions.parameter_two
3818: from
3819: ame_actions,
3820: ame_action_usages
3813: cursor applicableActionsCursor(ruleIdIn in integer) is
3814: select
3815: ame_actions.action_type_id,
3816: ame_actions.parameter,
3817: ame_actions.parameter_two
3818: from
3819: ame_actions,
3820: ame_action_usages
3821: where
3815: ame_actions.action_type_id,
3816: ame_actions.parameter,
3817: ame_actions.parameter_two
3818: from
3819: ame_actions,
3820: ame_action_usages
3821: where
3822: ame_actions.action_id = ame_action_usages.action_id and
3823: ame_action_usages.rule_id = ruleIdIn and
3818: from
3819: ame_actions,
3820: ame_action_usages
3821: where
3822: ame_actions.action_id = ame_action_usages.action_id and
3823: ame_action_usages.rule_id = ruleIdIn and
3824: engEffectiveRuleDate between
3825: ame_actions.start_date and
3826: nvl(ame_actions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3821: where
3822: ame_actions.action_id = ame_action_usages.action_id and
3823: ame_action_usages.rule_id = ruleIdIn and
3824: engEffectiveRuleDate between
3825: ame_actions.start_date and
3826: nvl(ame_actions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3827: engEffectiveRuleDate between
3828: ame_action_usages.start_date and
3829: nvl(ame_action_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate);
3822: ame_actions.action_id = ame_action_usages.action_id and
3823: ame_action_usages.rule_id = ruleIdIn and
3824: engEffectiveRuleDate between
3825: ame_actions.start_date and
3826: nvl(ame_actions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3827: engEffectiveRuleDate between
3828: ame_action_usages.start_date and
3829: nvl(ame_action_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate);
3830: productionActionTypeId integer;
4441: and nvl(ame_condition_usages.end_date - (1/86400), engEffectiveRuleDate)))
4442: union
4443: select 1
4444: from ame_mandatory_attributes,
4445: ame_actions,
4446: ame_action_usages,
4447: ame_rules,
4448: ame_rule_usages
4449: where ame_mandatory_attributes.attribute_id = ame_attributes.attribute_id
4447: ame_rules,
4448: ame_rule_usages
4449: where ame_mandatory_attributes.attribute_id = ame_attributes.attribute_id
4450: and ame_mandatory_attributes.action_type_id =
4451: ame_actions.action_type_id
4452: and ame_actions.action_id = ame_action_usages.action_id
4453: and ame_action_usages.rule_id = ame_rules.rule_id
4454: and ame_rules.rule_id = ame_rule_usages.rule_id
4455: and ame_rule_usages.item_id = applicationIdIn
4448: ame_rule_usages
4449: where ame_mandatory_attributes.attribute_id = ame_attributes.attribute_id
4450: and ame_mandatory_attributes.action_type_id =
4451: ame_actions.action_type_id
4452: and ame_actions.action_id = ame_action_usages.action_id
4453: and ame_action_usages.rule_id = ame_rules.rule_id
4454: and ame_rules.rule_id = ame_rule_usages.rule_id
4455: and ame_rule_usages.item_id = applicationIdIn
4456: and ((engEffectiveRuleDate between ame_rules.start_date
4458: and ((engEffectiveRuleDate between ame_rule_usages.start_date
4459: and nvl(ame_rule_usages.end_date - (1/86400), engEffectiveRuleDate)))
4460: and engEffectiveRuleDate between ame_mandatory_attributes.start_date
4461: and nvl(ame_mandatory_attributes.end_date - (1/86400), engEffectiveRuleDate)
4462: and engEffectiveRuleDate between ame_actions.start_date
4463: and nvl(ame_actions.end_date - (1/86400), engEffectiveRuleDate)
4464: and ((engEffectiveRuleDate between ame_action_usages.start_date
4465: and nvl(ame_action_usages.end_date - (1/86400), engEffectiveRuleDate)))
4466: )
4459: and nvl(ame_rule_usages.end_date - (1/86400), engEffectiveRuleDate)))
4460: and engEffectiveRuleDate between ame_mandatory_attributes.start_date
4461: and nvl(ame_mandatory_attributes.end_date - (1/86400), engEffectiveRuleDate)
4462: and engEffectiveRuleDate between ame_actions.start_date
4463: and nvl(ame_actions.end_date - (1/86400), engEffectiveRuleDate)
4464: and ((engEffectiveRuleDate between ame_action_usages.start_date
4465: and nvl(ame_action_usages.end_date - (1/86400), engEffectiveRuleDate)))
4466: )
4467: /*
11943: exchangeAppItemId ame_util.stringType;
11944: exchangeApproverCategory ame_util.charType;
11945: exchangeItemClassId integer;
11946: exchangeItemId ame_util.stringType;
11947: exchangeParameter ame_actions.parameter%type;
11948: exchangeParameterTwo ame_actions.parameter_two%type;
11949: exchangePriority integer;
11950: exchangeRuleId integer;
11951: exchangeRuleItemClassId integer;
11944: exchangeApproverCategory ame_util.charType;
11945: exchangeItemClassId integer;
11946: exchangeItemId ame_util.stringType;
11947: exchangeParameter ame_actions.parameter%type;
11948: exchangeParameterTwo ame_actions.parameter_two%type;
11949: exchangePriority integer;
11950: exchangeRuleId integer;
11951: exchangeRuleItemClassId integer;
11952: exchangeRuleType ame_util.stringType;