The following lines contain the word 'select', 'insert', 'update' or 'delete':
/* Update hasFinalAuthorityYN as needed. */
if(not tempRuleSatisfied and
hasFinalAuthorityYN = ame_util.booleanTrue) then
hasFinalAuthorityYN := ame_util.booleanFalse;
/* Update source. */
ame_util.appendRuleIdToSource(ruleIdIn => ruleIds(i),
sourceInOut => source);
insertCount integer;
insertCount := i ; /* Pre increment */
insertCount := insertCount + 1;
if j <> insertCount then
tempRuleId := allRuleIds(j);
allRuleIds(j) := allRuleIds(insertCount);
allRuleIndexes(j) := allRuleIndexes(insertCount);
actionParameters(j) := actionParameters(insertCount);
listModParameterTwos(j) := listModParameterTwos(insertCount);
listModParameterOnes(j) := listModParameterOnes(insertCount);
allRuleIds(insertCount) := tempRuleId;
allRuleIndexes(insertCount) := tempRuleIndex;
actionParameters(insertCount) := tempActionParameter;
listModParameterTwos(insertCount) := tempListModParameterTwo;
listModParameterOnes(insertCount) := tempListModParameterOne;
COAInsertee ame_util.approverRecord2;
insertionThreshhold integer;
parameters.delete;
tempApproverIndexes.delete;
insertionThreshhold := 0;
tempIndex := lastForwardeeIndexes(j) + insertionThreshhold;
All the approvers inserted this way will have an approver category of 'A'.
*/
if finalAuthorityNotFound then
extensionApprovers.delete;
/* get the next approver to be inserted */
ame_absolute_job_level_handler.getJobLevelAndSupervisor(
personIdIn => extensionApprovers(extIndex).orig_system_id,
jobLevelOut => tempJobLevel,
supervisorIdOut => tempSupervisorId);
extensionApprovers(extIndex).api_insertion := ame_util.oamGenerated;
/* check to see if there is a COA insertion after this approver. If a COA
insertion is found, keep checking till no more COA insertions. The check
for final authority will need to be done again. */
loop
/* Initialize COAInsertee approverRecord2 */
COAInsertee := ame_util.emptyApproverRecord2;
/* Check if there are any COAInsertions */
ame_engine.getHandlerCOAInsertion(nameIn => extensionApprovers(extIndex).name,
itemClassIn => extensionApprovers(extIndex).item_class,
itemIdIn => extensionApprovers(extIndex).item_id,
actionTypeIdIn => extensionApprovers(extIndex).action_type_id,
groupOrChainIdIn => extensionApprovers(extIndex).group_or_chain_id,
occurrenceIn => extensionApprovers(extIndex).occurrence,
approvalStatusIn => extensionApprovers(extIndex).approval_status,
nameOut => COAInsertee.name,
origSystemOut => COAInsertee.orig_system,
origSystemIdOut => COAInsertee.orig_system_id,
displayNameOut => COAInsertee.display_name,
sourceOut => COAInsertee.source);
if COAInsertee.name is null then
exit;
extensionApprovers(extIndex).name := COAInsertee.name;
extensionApprovers(extIndex).orig_system := COAInsertee.orig_system;
extensionApprovers(extIndex).orig_system_id := COAInsertee.orig_system_id;
extensionApprovers(extIndex).display_name := COAInsertee.display_name;
extensionApprovers(extIndex).source := COAInsertee.source;
extensionApprovers(extIndex).api_insertion := ame_util.apiAuthorityInsertion;
ame_engine.insertApprovers(firstIndexIn => lastForwardeeIndexes(j)+ insertionThreshhold + 1,
approversIn => extensionApprovers);
insertionThreshhold := insertionThreshhold + extensionApprovers.count;