3243: ame_rules.rule_id rule_id,
3244: nvl(ame_rules.item_class_id,
3245: headerItemClassIdIn) item_class_id,
3246: ame_rules.rule_type rule_type,
3247: ame_rule_usages.priority priority,
3248: ame_rule_usages.approver_category approver_category
3249: from
3250: ame_rules,
3251: ame_rule_usages,
3244: nvl(ame_rules.item_class_id,
3245: headerItemClassIdIn) item_class_id,
3246: ame_rules.rule_type rule_type,
3247: ame_rule_usages.priority priority,
3248: ame_rule_usages.approver_category approver_category
3249: from
3250: ame_rules,
3251: ame_rule_usages,
3252: ame_item_class_usages
3247: ame_rule_usages.priority priority,
3248: ame_rule_usages.approver_category approver_category
3249: from
3250: ame_rules,
3251: ame_rule_usages,
3252: ame_item_class_usages
3253: where
3254: ame_rules.rule_id = ame_rule_usages.rule_id and
3255: ame_rule_usages.item_id = engAmeApplicationId and
3250: ame_rules,
3251: ame_rule_usages,
3252: ame_item_class_usages
3253: where
3254: ame_rules.rule_id = ame_rule_usages.rule_id and
3255: ame_rule_usages.item_id = engAmeApplicationId and
3256: nvl(ame_rules.item_class_id, headerItemClassIdIn) = ame_item_class_usages.item_class_id and
3257: ame_item_class_usages.application_id = engAmeApplicationId and
3258: (processPrioritiesIn = ame_util.booleanFalse or
3251: ame_rule_usages,
3252: ame_item_class_usages
3253: where
3254: ame_rules.rule_id = ame_rule_usages.rule_id and
3255: ame_rule_usages.item_id = engAmeApplicationId and
3256: nvl(ame_rules.item_class_id, headerItemClassIdIn) = ame_item_class_usages.item_class_id and
3257: ame_item_class_usages.application_id = engAmeApplicationId and
3258: (processPrioritiesIn = ame_util.booleanFalse or
3259: (ame_rules.rule_type = ame_util.combinationRuleType and
3257: ame_item_class_usages.application_id = engAmeApplicationId and
3258: (processPrioritiesIn = ame_util.booleanFalse or
3259: (ame_rules.rule_type = ame_util.combinationRuleType and
3260: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3261: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3262: (ame_rules.rule_type = ame_util.authorityRuleType and
3263: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3264: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3265: (ame_rules.rule_type = ame_util.exceptionRuleType and
3260: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3261: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3262: (ame_rules.rule_type = ame_util.authorityRuleType and
3263: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3264: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3265: (ame_rules.rule_type = ame_util.exceptionRuleType and
3266: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3267: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3268: (ame_rules.rule_type = ame_util.listModRuleType and
3263: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3264: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3265: (ame_rules.rule_type = ame_util.exceptionRuleType and
3266: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3267: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3268: (ame_rules.rule_type = ame_util.listModRuleType and
3269: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3270: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3271: (ame_rules.rule_type = ame_util.substitutionRuleType and
3266: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3267: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3268: (ame_rules.rule_type = ame_util.listModRuleType and
3269: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3270: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3271: (ame_rules.rule_type = ame_util.substitutionRuleType and
3272: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3273: substRuleThresholdIn >= ame_rule_usages.priority)) or
3274: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3269: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3270: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3271: (ame_rules.rule_type = ame_util.substitutionRuleType and
3272: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3273: substRuleThresholdIn >= ame_rule_usages.priority)) or
3274: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3275: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3276: preRuleThresholdIn >= ame_rule_usages.priority)) or
3277: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3272: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3273: substRuleThresholdIn >= ame_rule_usages.priority)) or
3274: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3275: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3276: preRuleThresholdIn >= ame_rule_usages.priority)) or
3277: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3278: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3279: postRuleThresholdIn >= ame_rule_usages.priority)) or
3280: (ame_rules.rule_type = ame_util.productionRuleType and
3275: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3276: preRuleThresholdIn >= ame_rule_usages.priority)) or
3277: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3278: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3279: postRuleThresholdIn >= ame_rule_usages.priority)) or
3280: (ame_rules.rule_type = ame_util.productionRuleType and
3281: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3282: productionRuleThresholdIn >= ame_rule_usages.priority))) and
3283: (processProductionRulesIn = ame_util.booleanTrue or
3278: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3279: postRuleThresholdIn >= ame_rule_usages.priority)) or
3280: (ame_rules.rule_type = ame_util.productionRuleType and
3281: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3282: productionRuleThresholdIn >= ame_rule_usages.priority))) and
3283: (processProductionRulesIn = ame_util.booleanTrue or
3284: ame_rules.rule_type <> ame_util.productionRuleType) and
3285: not exists (select *
3286: from
3301: engEffectiveRuleDate between
3302: ame_rules.start_date and
3303: nvl(ame_rules.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3304: engEffectiveRuleDate between
3305: ame_rule_usages.start_date and
3306: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3307: engEffectiveRuleDate between
3308: ame_item_class_usages.start_date and
3309: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3302: ame_rules.start_date and
3303: nvl(ame_rules.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3304: engEffectiveRuleDate between
3305: ame_rule_usages.start_date and
3306: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3307: engEffectiveRuleDate between
3308: ame_item_class_usages.start_date and
3309: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3310: order by
3525: from
3526: ame_attributes,
3527: ame_conditions,
3528: ame_condition_usages,
3529: ame_rule_usages
3530: where
3531: ame_attributes.attribute_type = ame_util.stringAttributeType and
3532: ame_attributes.attribute_id = ame_conditions.attribute_id and
3533: ame_conditions.condition_id = ame_condition_usages.condition_id and
3530: where
3531: ame_attributes.attribute_type = ame_util.stringAttributeType and
3532: ame_attributes.attribute_id = ame_conditions.attribute_id and
3533: ame_conditions.condition_id = ame_condition_usages.condition_id and
3534: ame_condition_usages.rule_id = ame_rule_usages.rule_id and
3535: ame_rule_usages.item_id = engAmeApplicationId and
3536: engEffectiveRuleDate between
3537: ame_attributes.start_date and
3538: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3531: ame_attributes.attribute_type = ame_util.stringAttributeType and
3532: ame_attributes.attribute_id = ame_conditions.attribute_id and
3533: ame_conditions.condition_id = ame_condition_usages.condition_id and
3534: ame_condition_usages.rule_id = ame_rule_usages.rule_id and
3535: ame_rule_usages.item_id = engAmeApplicationId and
3536: engEffectiveRuleDate between
3537: ame_attributes.start_date and
3538: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3539: engEffectiveRuleDate between
3542: engEffectiveRuleDate between
3543: ame_condition_usages.start_date and
3544: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3545: engEffectiveRuleDate between
3546: ame_rule_usages.start_date and
3547: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)) and
3548: engEffectiveRuleDate between
3549: ame_string_values.start_date and
3550: nvl(ame_string_values.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3543: ame_condition_usages.start_date and
3544: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3545: engEffectiveRuleDate between
3546: ame_rule_usages.start_date and
3547: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)) and
3548: engEffectiveRuleDate between
3549: ame_string_values.start_date and
3550: nvl(ame_string_values.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3551: order by condition_id;
3580: ame_condition_usages.rule_id rule_id,
3581: ame_rules.rule_type rule_type,
3582: nvl(ame_rules.item_class_id,
3583: headerItemClassIdIn) rule_item_class,
3584: ame_rule_usages.priority priority,
3585: ame_rule_usages.approver_category
3586: from
3587: ame_attributes,
3588: ame_conditions,
3581: ame_rules.rule_type rule_type,
3582: nvl(ame_rules.item_class_id,
3583: headerItemClassIdIn) rule_item_class,
3584: ame_rule_usages.priority priority,
3585: ame_rule_usages.approver_category
3586: from
3587: ame_attributes,
3588: ame_conditions,
3589: ame_condition_usages,
3587: ame_attributes,
3588: ame_conditions,
3589: ame_condition_usages,
3590: ame_rules,
3591: ame_rule_usages
3592: where
3593: ame_attributes.attribute_id = ame_conditions.attribute_id and
3594: ame_conditions.condition_type <> ame_util.listModConditionType and
3595: ame_conditions.condition_id = ame_condition_usages.condition_id and
3593: ame_attributes.attribute_id = ame_conditions.attribute_id and
3594: ame_conditions.condition_type <> ame_util.listModConditionType and
3595: ame_conditions.condition_id = ame_condition_usages.condition_id and
3596: ame_condition_usages.rule_id = ame_rules.rule_id and
3597: ame_rules.rule_id = ame_rule_usages.rule_id and
3598: ame_rule_usages.item_id = engAmeApplicationId and
3599: (processPrioritiesIn = ame_util.booleanFalse or
3600: (ame_rules.rule_type = ame_util.combinationRuleType and
3601: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3594: ame_conditions.condition_type <> ame_util.listModConditionType and
3595: ame_conditions.condition_id = ame_condition_usages.condition_id and
3596: ame_condition_usages.rule_id = ame_rules.rule_id and
3597: ame_rules.rule_id = ame_rule_usages.rule_id and
3598: ame_rule_usages.item_id = engAmeApplicationId and
3599: (processPrioritiesIn = ame_util.booleanFalse or
3600: (ame_rules.rule_type = ame_util.combinationRuleType and
3601: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3602: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3598: ame_rule_usages.item_id = engAmeApplicationId and
3599: (processPrioritiesIn = ame_util.booleanFalse or
3600: (ame_rules.rule_type = ame_util.combinationRuleType and
3601: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3602: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3603: (ame_rules.rule_type = ame_util.authorityRuleType and
3604: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3605: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3606: (ame_rules.rule_type = ame_util.exceptionRuleType and
3601: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3602: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3603: (ame_rules.rule_type = ame_util.authorityRuleType and
3604: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3605: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3606: (ame_rules.rule_type = ame_util.exceptionRuleType and
3607: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3608: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3609: (ame_rules.rule_type = ame_util.listModRuleType and
3604: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3605: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3606: (ame_rules.rule_type = ame_util.exceptionRuleType and
3607: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3608: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3609: (ame_rules.rule_type = ame_util.listModRuleType and
3610: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3611: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3612: (ame_rules.rule_type = ame_util.substitutionRuleType and
3607: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3608: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3609: (ame_rules.rule_type = ame_util.listModRuleType and
3610: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3611: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3612: (ame_rules.rule_type = ame_util.substitutionRuleType and
3613: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3614: substRuleThresholdIn >= ame_rule_usages.priority)) or
3615: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3610: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3611: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3612: (ame_rules.rule_type = ame_util.substitutionRuleType and
3613: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3614: substRuleThresholdIn >= ame_rule_usages.priority)) or
3615: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3616: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3617: preRuleThresholdIn >= ame_rule_usages.priority)) or
3618: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3613: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3614: substRuleThresholdIn >= ame_rule_usages.priority)) or
3615: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3616: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3617: preRuleThresholdIn >= ame_rule_usages.priority)) or
3618: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3619: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3620: postRuleThresholdIn >= ame_rule_usages.priority)) or
3621: (ame_rules.rule_type = ame_util.productionRuleType and
3616: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3617: preRuleThresholdIn >= ame_rule_usages.priority)) or
3618: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3619: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3620: postRuleThresholdIn >= ame_rule_usages.priority)) or
3621: (ame_rules.rule_type = ame_util.productionRuleType and
3622: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3623: productionRuleThresholdIn >= ame_rule_usages.priority))) and
3624: (processProductionRulesIn = ame_util.booleanTrue or
3619: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3620: postRuleThresholdIn >= ame_rule_usages.priority)) or
3621: (ame_rules.rule_type = ame_util.productionRuleType and
3622: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3623: productionRuleThresholdIn >= ame_rule_usages.priority))) and
3624: (processProductionRulesIn = ame_util.booleanTrue or
3625: ame_rules.rule_type <> ame_util.productionRuleType) and
3626: engEffectiveRuleDate between
3627: ame_attributes.start_date and
3635: engEffectiveRuleDate between
3636: ame_rules.start_date and
3637: nvl(ame_rules.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3638: engEffectiveRuleDate between
3639: ame_rule_usages.start_date and
3640: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3641: order by
3642: rule_item_class,
3643: ame_rules.rule_type,
3636: ame_rules.start_date and
3637: nvl(ame_rules.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3638: engEffectiveRuleDate between
3639: ame_rule_usages.start_date and
3640: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3641: order by
3642: rule_item_class,
3643: ame_rules.rule_type,
3644: ame_rules.rule_id,
4424: select 1
4425: from ame_conditions,
4426: ame_condition_usages,
4427: ame_rules,
4428: ame_rule_usages
4429: where ame_conditions.attribute_id = ame_attributes.attribute_id
4430: and ame_conditions.condition_id = ame_condition_usages.condition_id
4431: and ame_condition_usages.rule_id = ame_rules.rule_id
4432: and ame_rules.rule_id = ame_rule_usages.rule_id
4428: ame_rule_usages
4429: where ame_conditions.attribute_id = ame_attributes.attribute_id
4430: and ame_conditions.condition_id = ame_condition_usages.condition_id
4431: and ame_condition_usages.rule_id = ame_rules.rule_id
4432: and ame_rules.rule_id = ame_rule_usages.rule_id
4433: and ame_rule_usages.item_id = applicationIdIn
4434: and ((engEffectiveRuleDate between ame_rules.start_date
4435: and nvl(ame_rules.end_date - (1/86400), engEffectiveRuleDate)))
4436: and ((engEffectiveRuleDate between ame_rule_usages.start_date
4429: where ame_conditions.attribute_id = ame_attributes.attribute_id
4430: and ame_conditions.condition_id = ame_condition_usages.condition_id
4431: and ame_condition_usages.rule_id = ame_rules.rule_id
4432: and ame_rules.rule_id = ame_rule_usages.rule_id
4433: and ame_rule_usages.item_id = applicationIdIn
4434: and ((engEffectiveRuleDate between ame_rules.start_date
4435: and nvl(ame_rules.end_date - (1/86400), engEffectiveRuleDate)))
4436: and ((engEffectiveRuleDate between ame_rule_usages.start_date
4437: and nvl(ame_rule_usages.end_date - (1/86400), engEffectiveRuleDate)))
4432: and ame_rules.rule_id = ame_rule_usages.rule_id
4433: and ame_rule_usages.item_id = applicationIdIn
4434: and ((engEffectiveRuleDate between ame_rules.start_date
4435: and nvl(ame_rules.end_date - (1/86400), engEffectiveRuleDate)))
4436: and ((engEffectiveRuleDate between ame_rule_usages.start_date
4437: and nvl(ame_rule_usages.end_date - (1/86400), engEffectiveRuleDate)))
4438: and engEffectiveRuleDate between ame_conditions.start_date
4439: and nvl(ame_conditions.end_date - (1/86400), engEffectiveRuleDate)
4440: and ((engEffectiveRuleDate between ame_condition_usages.start_date
4433: and ame_rule_usages.item_id = applicationIdIn
4434: and ((engEffectiveRuleDate between ame_rules.start_date
4435: and nvl(ame_rules.end_date - (1/86400), engEffectiveRuleDate)))
4436: and ((engEffectiveRuleDate between ame_rule_usages.start_date
4437: and nvl(ame_rule_usages.end_date - (1/86400), engEffectiveRuleDate)))
4438: and engEffectiveRuleDate between ame_conditions.start_date
4439: and nvl(ame_conditions.end_date - (1/86400), engEffectiveRuleDate)
4440: and ((engEffectiveRuleDate between ame_condition_usages.start_date
4441: and nvl(ame_condition_usages.end_date - (1/86400), engEffectiveRuleDate)))
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
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
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
4457: and nvl(ame_rules.end_date - (1/86400), engEffectiveRuleDate)))
4458: and ((engEffectiveRuleDate between ame_rule_usages.start_date
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
4457: and nvl(ame_rules.end_date - (1/86400), engEffectiveRuleDate)))
4458: and ((engEffectiveRuleDate between ame_rule_usages.start_date
4459: and nvl(ame_rule_usages.end_date - (1/86400), engEffectiveRuleDate)))
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
4457: and nvl(ame_rules.end_date - (1/86400), engEffectiveRuleDate)))
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
4455: and ame_rule_usages.item_id = applicationIdIn
4456: and ((engEffectiveRuleDate between ame_rules.start_date
4457: and nvl(ame_rules.end_date - (1/86400), engEffectiveRuleDate)))
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)