103: then
104: --
105: -- Determine if the action type is one that is based on groups.
106: --
107: if X_ACTION_TYPE_NAME in (ame_util.preApprovalTypeName
108: ,ame_util.postApprovalTypeName
109: ,ame_util.groupChainApprovalTypeName
110: ) then
111: open CSR_GET_APPROVAL_GROUP_ID(X_PARAMETER);
104: --
105: -- Determine if the action type is one that is based on groups.
106: --
107: if X_ACTION_TYPE_NAME in (ame_util.preApprovalTypeName
108: ,ame_util.postApprovalTypeName
109: ,ame_util.groupChainApprovalTypeName
110: ) then
111: open CSR_GET_APPROVAL_GROUP_ID(X_PARAMETER);
112: fetch CSR_GET_APPROVAL_GROUP_ID into X_APPROVAL_GROUP_ID;
105: -- Determine if the action type is one that is based on groups.
106: --
107: if X_ACTION_TYPE_NAME in (ame_util.preApprovalTypeName
108: ,ame_util.postApprovalTypeName
109: ,ame_util.groupChainApprovalTypeName
110: ) then
111: open CSR_GET_APPROVAL_GROUP_ID(X_PARAMETER);
112: fetch CSR_GET_APPROVAL_GROUP_ID into X_APPROVAL_GROUP_ID;
113: L_PARAMETER := X_APPROVAL_GROUP_ID;
167: and sysdate between START_DATE
168: and nvl(END_DATE - (1/86400), sysdate);
169: invalidRuleTypeException exception;
170: errorCode integer;
171: errorMessage ame_util.longestStringType;
172: X_RULE_TYPE integer;
173: begin
174: open CSR_GET_RULE_TYPE(X_RULE_KEY);
175: fetch CSR_GET_RULE_TYPE
177: if CSR_GET_RULE_TYPE%notfound then
178: X_RULE_TYPE := null;
179: end if;
180: close CSR_GET_RULE_TYPE;
181: if (X_RULE_TYPE not in (ame_util.authorityRuleType
182: ,ame_util.exceptionRuleType
183: ,ame_util.preListGroupRuleType
184: ,ame_util.postListGroupRuleType
185: )) then
178: X_RULE_TYPE := null;
179: end if;
180: close CSR_GET_RULE_TYPE;
181: if (X_RULE_TYPE not in (ame_util.authorityRuleType
182: ,ame_util.exceptionRuleType
183: ,ame_util.preListGroupRuleType
184: ,ame_util.postListGroupRuleType
185: )) then
186: raise invalidRuleTypeException;
179: end if;
180: close CSR_GET_RULE_TYPE;
181: if (X_RULE_TYPE not in (ame_util.authorityRuleType
182: ,ame_util.exceptionRuleType
183: ,ame_util.preListGroupRuleType
184: ,ame_util.postListGroupRuleType
185: )) then
186: raise invalidRuleTypeException;
187: end if;
180: close CSR_GET_RULE_TYPE;
181: if (X_RULE_TYPE not in (ame_util.authorityRuleType
182: ,ame_util.exceptionRuleType
183: ,ame_util.preListGroupRuleType
184: ,ame_util.postListGroupRuleType
185: )) then
186: raise invalidRuleTypeException;
187: end if;
188: exception
188: exception
189: when invalidRuleTypeException then
190: errorCode := -20001;
191: errorMessage := 'AME is attempting to upload usages for an invalid rule type. ';
192: ame_util.runtimeException(packageNameIn => 'ame_action_usages',
193: routineNameIn => 'validate_rule_type',
194: exceptionNumberIn => errorCode,
195: exceptionStringIn => errorMessage);
196: raise_application_error(errorCode,
195: exceptionStringIn => errorMessage);
196: raise_application_error(errorCode,
197: errorMessage);
198: when others then
199: ame_util.runtimeException('ame_action_usages',
200: 'validate_rule_type',
201: sqlcode,
202: sqlerrm);
203: raise;
425: end if;
426: end;
427: exception
428: when others then
429: ame_util.runtimeException('ame_action_usages_api',
430: 'load_row',
431: sqlcode,
432: sqlerrm);
433: raise;