DBA Data[Home] [Help]

APPS.AME_ENGINE dependencies on AME_UTIL

Line 20: engIsLocalTransaction to false. The ame_util.runtimeException checks engIsLocalTransaction

16: engIsLocalTransaction indicates whether the current engine cycle originates in an API
17: call or a test-tab routine. If the test tab is testing a real transaction ID, it should
18: set engIsTestTransaction to false (via a call to updateTransactionState), and it should
19: set engIsLocalTransaction to true. The API should set both engIsTestTransaction and
20: engIsLocalTransaction to false. The ame_util.runtimeException checks engIsLocalTransaction
21: to determine whether to log an exception to the Workflow context stack.
22: */
23: engIsLocalTransaction boolean := true;
24: /*

Line 27: engIsTestTransaction is initialized to true so ame_util.runtimeException will see

23: engIsLocalTransaction boolean := true;
24: /*
25: engIsTestTransaction indicates whether the current transaction is a test transaction.
26: If so, the engine fetches the transaction's attribute values from ame_test_trans_att_values.
27: engIsTestTransaction is initialized to true so ame_util.runtimeException will see
28: a value of true in the absence of a call to updateTransactionState, before the
29: call to ame_util.runtimeException. That is, unless a call to updateTransactionState
30: sets this variable's value, we assume the transaction is a test transaction, to
31: avoid writing spurious exceptions to the Workflow context stack.

Line 29: call to ame_util.runtimeException. That is, unless a call to updateTransactionState

25: engIsTestTransaction indicates whether the current transaction is a test transaction.
26: If so, the engine fetches the transaction's attribute values from ame_test_trans_att_values.
27: engIsTestTransaction is initialized to true so ame_util.runtimeException will see
28: a value of true in the absence of a call to updateTransactionState, before the
29: call to ame_util.runtimeException. That is, unless a call to updateTransactionState
30: sets this variable's value, we assume the transaction is a test transaction, to
31: avoid writing spurious exceptions to the Workflow context stack.
32: */
33: engIsTestTransaction boolean := true;

Line 49: engConfigVarNames ame_util.longStringList; /* kept compact */

45: engProcessProductionRules boolean;
46: engUpdateCurrentApproverList boolean;
47: engUpdateOldApproverList boolean;
48: /* configuration-variable caches */
49: engConfigVarNames ame_util.longStringList; /* kept compact */
50: engConfigVarValues ame_util.longStringList; /* kept compact */
51: /*
52: Generally, all runtime queries should use engEffectiveRuleDate in their date logic, to make sure
53: they all rely on the same snapshot of AME data. (Failure to do this can lead to inconsistent data

Line 50: engConfigVarValues ame_util.longStringList; /* kept compact */

46: engUpdateCurrentApproverList boolean;
47: engUpdateOldApproverList boolean;
48: /* configuration-variable caches */
49: engConfigVarNames ame_util.longStringList; /* kept compact */
50: engConfigVarValues ame_util.longStringList; /* kept compact */
51: /*
52: Generally, all runtime queries should use engEffectiveRuleDate in their date logic, to make sure
53: they all rely on the same snapshot of AME data. (Failure to do this can lead to inconsistent data
54: in different parts of the engine cycle, which could make the engine crash.)

Line 58: engForwardingBehaviors ame_util.stringList; /* kept compact */

54: in different parts of the engine cycle, which could make the engine crash.)
55: */
56: engEffectiveRuleDate date;
57: engEvalPrioritiesPerItem boolean;
58: engForwardingBehaviors ame_util.stringList; /* kept compact */
59: /*
60: engPriorityModes and engPriorityThresholds are indexed by rule-type constant, so their
61: indexes run from zero to seven.
62: */

Line 63: engPriorityModes ame_util.stringList;

59: /*
60: engPriorityModes and engPriorityThresholds are indexed by rule-type constant, so their
61: indexes run from zero to seven.
62: */
63: engPriorityModes ame_util.stringList;
64: engPriorityThresholds ame_util.idList;
65: /*
66: Approval-group members are cached (once fetched as required) in the engGroup variables. These
67: lists are compact. All of a group's members are in a consecutive order consistent with the

Line 64: engPriorityThresholds ame_util.idList;

60: engPriorityModes and engPriorityThresholds are indexed by rule-type constant, so their
61: indexes run from zero to seven.
62: */
63: engPriorityModes ame_util.stringList;
64: engPriorityThresholds ame_util.idList;
65: /*
66: Approval-group members are cached (once fetched as required) in the engGroup variables. These
67: lists are compact. All of a group's members are in a consecutive order consistent with the
68: group members' order numbers (whether static or dynamic in the group definition).

Line 70: engGroupMemberGroupIds ame_util.idList;

66: Approval-group members are cached (once fetched as required) in the engGroup variables. These
67: lists are compact. All of a group's members are in a consecutive order consistent with the
68: group members' order numbers (whether static or dynamic in the group definition).
69: */
70: engGroupMemberGroupIds ame_util.idList;
71: engGroupMemberNames ame_util.longStringList;
72: engGroupMemberOrderNumbers ame_util.idList;
73: engGroupMemberDisplayNames ame_util.longStringList;
74: engGroupMemberOrigSystems ame_util.stringList;

Line 71: engGroupMemberNames ame_util.longStringList;

67: lists are compact. All of a group's members are in a consecutive order consistent with the
68: group members' order numbers (whether static or dynamic in the group definition).
69: */
70: engGroupMemberGroupIds ame_util.idList;
71: engGroupMemberNames ame_util.longStringList;
72: engGroupMemberOrderNumbers ame_util.idList;
73: engGroupMemberDisplayNames ame_util.longStringList;
74: engGroupMemberOrigSystems ame_util.stringList;
75: engGroupMemberOrigSystemIds ame_util.idList;

Line 72: engGroupMemberOrderNumbers ame_util.idList;

68: group members' order numbers (whether static or dynamic in the group definition).
69: */
70: engGroupMemberGroupIds ame_util.idList;
71: engGroupMemberNames ame_util.longStringList;
72: engGroupMemberOrderNumbers ame_util.idList;
73: engGroupMemberDisplayNames ame_util.longStringList;
74: engGroupMemberOrigSystems ame_util.stringList;
75: engGroupMemberOrigSystemIds ame_util.idList;
76: -- Array to keep track if approval group needs to be rerun for each item class, item ID

Line 73: engGroupMemberDisplayNames ame_util.longStringList;

69: */
70: engGroupMemberGroupIds ame_util.idList;
71: engGroupMemberNames ame_util.longStringList;
72: engGroupMemberOrderNumbers ame_util.idList;
73: engGroupMemberDisplayNames ame_util.longStringList;
74: engGroupMemberOrigSystems ame_util.stringList;
75: engGroupMemberOrigSystemIds ame_util.idList;
76: -- Array to keep track if approval group needs to be rerun for each item class, item ID
77: engGroupUseItemBind ame_util.charList;

Line 74: engGroupMemberOrigSystems ame_util.stringList;

70: engGroupMemberGroupIds ame_util.idList;
71: engGroupMemberNames ame_util.longStringList;
72: engGroupMemberOrderNumbers ame_util.idList;
73: engGroupMemberDisplayNames ame_util.longStringList;
74: engGroupMemberOrigSystems ame_util.stringList;
75: engGroupMemberOrigSystemIds ame_util.idList;
76: -- Array to keep track if approval group needs to be rerun for each item class, item ID
77: engGroupUseItemBind ame_util.charList;
78: /* approver lists */

Line 75: engGroupMemberOrigSystemIds ame_util.idList;

71: engGroupMemberNames ame_util.longStringList;
72: engGroupMemberOrderNumbers ame_util.idList;
73: engGroupMemberDisplayNames ame_util.longStringList;
74: engGroupMemberOrigSystems ame_util.stringList;
75: engGroupMemberOrigSystemIds ame_util.idList;
76: -- Array to keep track if approval group needs to be rerun for each item class, item ID
77: engGroupUseItemBind ame_util.charList;
78: /* approver lists */
79: engDeletedApproverList ame_util.approversTable2; /* kept compact */

Line 77: engGroupUseItemBind ame_util.charList;

73: engGroupMemberDisplayNames ame_util.longStringList;
74: engGroupMemberOrigSystems ame_util.stringList;
75: engGroupMemberOrigSystemIds ame_util.idList;
76: -- Array to keep track if approval group needs to be rerun for each item class, item ID
77: engGroupUseItemBind ame_util.charList;
78: /* approver lists */
79: engDeletedApproverList ame_util.approversTable2; /* kept compact */
80: engInsertedApproverList ame_util.approversTable2; /* kept compact */
81: engOldApproverList ame_util.approversTable2; /* kept compact, read only */

Line 79: engDeletedApproverList ame_util.approversTable2; /* kept compact */

75: engGroupMemberOrigSystemIds ame_util.idList;
76: -- Array to keep track if approval group needs to be rerun for each item class, item ID
77: engGroupUseItemBind ame_util.charList;
78: /* approver lists */
79: engDeletedApproverList ame_util.approversTable2; /* kept compact */
80: engInsertedApproverList ame_util.approversTable2; /* kept compact */
81: engOldApproverList ame_util.approversTable2; /* kept compact, read only */
82: /* lists related to approver insertion and deletion */
83: engInsertionOrderTypeList ame_util.stringList; /* corresponds in order to engInsertedApproverList */

Line 80: engInsertedApproverList ame_util.approversTable2; /* kept compact */

76: -- Array to keep track if approval group needs to be rerun for each item class, item ID
77: engGroupUseItemBind ame_util.charList;
78: /* approver lists */
79: engDeletedApproverList ame_util.approversTable2; /* kept compact */
80: engInsertedApproverList ame_util.approversTable2; /* kept compact */
81: engOldApproverList ame_util.approversTable2; /* kept compact, read only */
82: /* lists related to approver insertion and deletion */
83: engInsertionOrderTypeList ame_util.stringList; /* corresponds in order to engInsertedApproverList */
84: engInsertionParameterList ame_util.longestStringList; /* corresponds in order to engInsertedApproverList */

Line 81: engOldApproverList ame_util.approversTable2; /* kept compact, read only */

77: engGroupUseItemBind ame_util.charList;
78: /* approver lists */
79: engDeletedApproverList ame_util.approversTable2; /* kept compact */
80: engInsertedApproverList ame_util.approversTable2; /* kept compact */
81: engOldApproverList ame_util.approversTable2; /* kept compact, read only */
82: /* lists related to approver insertion and deletion */
83: engInsertionOrderTypeList ame_util.stringList; /* corresponds in order to engInsertedApproverList */
84: engInsertionParameterList ame_util.longestStringList; /* corresponds in order to engInsertedApproverList */
85: engInsertionIsSpecialForwardee ame_util.charList; /* ame_util.booleanTrue if insertee is a special forwardee */

Line 83: engInsertionOrderTypeList ame_util.stringList; /* corresponds in order to engInsertedApproverList */

79: engDeletedApproverList ame_util.approversTable2; /* kept compact */
80: engInsertedApproverList ame_util.approversTable2; /* kept compact */
81: engOldApproverList ame_util.approversTable2; /* kept compact, read only */
82: /* lists related to approver insertion and deletion */
83: engInsertionOrderTypeList ame_util.stringList; /* corresponds in order to engInsertedApproverList */
84: engInsertionParameterList ame_util.longestStringList; /* corresponds in order to engInsertedApproverList */
85: engInsertionIsSpecialForwardee ame_util.charList; /* ame_util.booleanTrue if insertee is a special forwardee */
86: engInsApproverIndex ame_util.idList; /*maintain the approver index for the insertion*/
87: /* action-type configuration data, all sparse, indexed by action-type ID */

Line 84: engInsertionParameterList ame_util.longestStringList; /* corresponds in order to engInsertedApproverList */

80: engInsertedApproverList ame_util.approversTable2; /* kept compact */
81: engOldApproverList ame_util.approversTable2; /* kept compact, read only */
82: /* lists related to approver insertion and deletion */
83: engInsertionOrderTypeList ame_util.stringList; /* corresponds in order to engInsertedApproverList */
84: engInsertionParameterList ame_util.longestStringList; /* corresponds in order to engInsertedApproverList */
85: engInsertionIsSpecialForwardee ame_util.charList; /* ame_util.booleanTrue if insertee is a special forwardee */
86: engInsApproverIndex ame_util.idList; /*maintain the approver index for the insertion*/
87: /* action-type configuration data, all sparse, indexed by action-type ID */
88: engActionTypeChainOrderModes ame_util.charList;

Line 85: engInsertionIsSpecialForwardee ame_util.charList; /* ame_util.booleanTrue if insertee is a special forwardee */

81: engOldApproverList ame_util.approversTable2; /* kept compact, read only */
82: /* lists related to approver insertion and deletion */
83: engInsertionOrderTypeList ame_util.stringList; /* corresponds in order to engInsertedApproverList */
84: engInsertionParameterList ame_util.longestStringList; /* corresponds in order to engInsertedApproverList */
85: engInsertionIsSpecialForwardee ame_util.charList; /* ame_util.booleanTrue if insertee is a special forwardee */
86: engInsApproverIndex ame_util.idList; /*maintain the approver index for the insertion*/
87: /* action-type configuration data, all sparse, indexed by action-type ID */
88: engActionTypeChainOrderModes ame_util.charList;
89: engActionTypeOrderNumbers ame_util.idList;

Line 86: engInsApproverIndex ame_util.idList; /*maintain the approver index for the insertion*/

82: /* lists related to approver insertion and deletion */
83: engInsertionOrderTypeList ame_util.stringList; /* corresponds in order to engInsertedApproverList */
84: engInsertionParameterList ame_util.longestStringList; /* corresponds in order to engInsertedApproverList */
85: engInsertionIsSpecialForwardee ame_util.charList; /* ame_util.booleanTrue if insertee is a special forwardee */
86: engInsApproverIndex ame_util.idList; /*maintain the approver index for the insertion*/
87: /* action-type configuration data, all sparse, indexed by action-type ID */
88: engActionTypeChainOrderModes ame_util.charList;
89: engActionTypeOrderNumbers ame_util.idList;
90: engActionTypeVotingRegimes ame_util.charList;

Line 88: engActionTypeChainOrderModes ame_util.charList;

84: engInsertionParameterList ame_util.longestStringList; /* corresponds in order to engInsertedApproverList */
85: engInsertionIsSpecialForwardee ame_util.charList; /* ame_util.booleanTrue if insertee is a special forwardee */
86: engInsApproverIndex ame_util.idList; /*maintain the approver index for the insertion*/
87: /* action-type configuration data, all sparse, indexed by action-type ID */
88: engActionTypeChainOrderModes ame_util.charList;
89: engActionTypeOrderNumbers ame_util.idList;
90: engActionTypeVotingRegimes ame_util.charList;
91: engActionTypeNames ame_util.stringList;
92: engActionTypeUsages ame_util.idList;

Line 89: engActionTypeOrderNumbers ame_util.idList;

85: engInsertionIsSpecialForwardee ame_util.charList; /* ame_util.booleanTrue if insertee is a special forwardee */
86: engInsApproverIndex ame_util.idList; /*maintain the approver index for the insertion*/
87: /* action-type configuration data, all sparse, indexed by action-type ID */
88: engActionTypeChainOrderModes ame_util.charList;
89: engActionTypeOrderNumbers ame_util.idList;
90: engActionTypeVotingRegimes ame_util.charList;
91: engActionTypeNames ame_util.stringList;
92: engActionTypeUsages ame_util.idList;
93: engActionTypePackageNames ame_util.stringList;

Line 90: engActionTypeVotingRegimes ame_util.charList;

86: engInsApproverIndex ame_util.idList; /*maintain the approver index for the insertion*/
87: /* action-type configuration data, all sparse, indexed by action-type ID */
88: engActionTypeChainOrderModes ame_util.charList;
89: engActionTypeOrderNumbers ame_util.idList;
90: engActionTypeVotingRegimes ame_util.charList;
91: engActionTypeNames ame_util.stringList;
92: engActionTypeUsages ame_util.idList;
93: engActionTypePackageNames ame_util.stringList;
94: /*

Line 91: engActionTypeNames ame_util.stringList;

87: /* action-type configuration data, all sparse, indexed by action-type ID */
88: engActionTypeChainOrderModes ame_util.charList;
89: engActionTypeOrderNumbers ame_util.idList;
90: engActionTypeVotingRegimes ame_util.charList;
91: engActionTypeNames ame_util.stringList;
92: engActionTypeUsages ame_util.idList;
93: engActionTypePackageNames ame_util.stringList;
94: /*
95: list-modification condition caches, all sparse, indexed by the ID of the rule using the LM condition,

Line 92: engActionTypeUsages ame_util.idList;

88: engActionTypeChainOrderModes ame_util.charList;
89: engActionTypeOrderNumbers ame_util.idList;
90: engActionTypeVotingRegimes ame_util.charList;
91: engActionTypeNames ame_util.stringList;
92: engActionTypeUsages ame_util.idList;
93: engActionTypePackageNames ame_util.stringList;
94: /*
95: list-modification condition caches, all sparse, indexed by the ID of the rule using the LM condition,
96: not by the condition ID (It's more efficient to index by rule ID.)

Line 93: engActionTypePackageNames ame_util.stringList;

89: engActionTypeOrderNumbers ame_util.idList;
90: engActionTypeVotingRegimes ame_util.charList;
91: engActionTypeNames ame_util.stringList;
92: engActionTypeUsages ame_util.idList;
93: engActionTypePackageNames ame_util.stringList;
94: /*
95: list-modification condition caches, all sparse, indexed by the ID of the rule using the LM condition,
96: not by the condition ID (It's more efficient to index by rule ID.)
97: */

Line 98: engLMParameterOnes ame_util.stringList;

94: /*
95: list-modification condition caches, all sparse, indexed by the ID of the rule using the LM condition,
96: not by the condition ID (It's more efficient to index by rule ID.)
97: */
98: engLMParameterOnes ame_util.stringList;
99: engLMParameterTwos ame_util.longStringList;
100: /*
101: The item-class usages are stored in engItemClassIds, engItemClassNames, engItemClassOrderNumbers,
102: engItemClassParModes, and engItemClassSublistModes. All of these are compact, and ordered by

Line 99: engLMParameterTwos ame_util.longStringList;

95: list-modification condition caches, all sparse, indexed by the ID of the rule using the LM condition,
96: not by the condition ID (It's more efficient to index by rule ID.)
97: */
98: engLMParameterOnes ame_util.stringList;
99: engLMParameterTwos ame_util.longStringList;
100: /*
101: The item-class usages are stored in engItemClassIds, engItemClassNames, engItemClassOrderNumbers,
102: engItemClassParModes, and engItemClassSublistModes. All of these are compact, and ordered by
103: item_class_order_number order. If engItemClassIds(i) is a given item class' item-class ID, then

Line 109: engItemClassIds ame_util.idList;

105: data structures for an item class with the item-class ID item_class_id is
106: engItemClassIndexes(item_class_id). engItemClassItemIdIndexes(i) is the index of the first item
107: ID in itemIds of the item class with ID engItemClassIds(i).
108: */
109: engItemClassIds ame_util.idList;
110: engItemClassIndexes ame_util.idList;
111: engItemClassItemIdIndexes ame_util.idList;
112: engItemClassNames ame_util.stringList;
113: engItemClassOrderNumbers ame_util.idList;

Line 110: engItemClassIndexes ame_util.idList;

106: engItemClassIndexes(item_class_id). engItemClassItemIdIndexes(i) is the index of the first item
107: ID in itemIds of the item class with ID engItemClassIds(i).
108: */
109: engItemClassIds ame_util.idList;
110: engItemClassIndexes ame_util.idList;
111: engItemClassItemIdIndexes ame_util.idList;
112: engItemClassNames ame_util.stringList;
113: engItemClassOrderNumbers ame_util.idList;
114: engItemClassParModes ame_util.charList;

Line 111: engItemClassItemIdIndexes ame_util.idList;

107: ID in itemIds of the item class with ID engItemClassIds(i).
108: */
109: engItemClassIds ame_util.idList;
110: engItemClassIndexes ame_util.idList;
111: engItemClassItemIdIndexes ame_util.idList;
112: engItemClassNames ame_util.stringList;
113: engItemClassOrderNumbers ame_util.idList;
114: engItemClassParModes ame_util.charList;
115: engItemClassSublistModes ame_util.charList;

Line 112: engItemClassNames ame_util.stringList;

108: */
109: engItemClassIds ame_util.idList;
110: engItemClassIndexes ame_util.idList;
111: engItemClassItemIdIndexes ame_util.idList;
112: engItemClassNames ame_util.stringList;
113: engItemClassOrderNumbers ame_util.idList;
114: engItemClassParModes ame_util.charList;
115: engItemClassSublistModes ame_util.charList;
116: /*

Line 113: engItemClassOrderNumbers ame_util.idList;

109: engItemClassIds ame_util.idList;
110: engItemClassIndexes ame_util.idList;
111: engItemClassItemIdIndexes ame_util.idList;
112: engItemClassNames ame_util.stringList;
113: engItemClassOrderNumbers ame_util.idList;
114: engItemClassParModes ame_util.charList;
115: engItemClassSublistModes ame_util.charList;
116: /*
117: engItemCounts(i) is the number of items of the item class with item-class ID

Line 114: engItemClassParModes ame_util.charList;

110: engItemClassIndexes ame_util.idList;
111: engItemClassItemIdIndexes ame_util.idList;
112: engItemClassNames ame_util.stringList;
113: engItemClassOrderNumbers ame_util.idList;
114: engItemClassParModes ame_util.charList;
115: engItemClassSublistModes ame_util.charList;
116: /*
117: engItemCounts(i) is the number of items of the item class with item-class ID
118: engItemClassIds(i). engItemIds contains the item-ID lists returned by all

Line 115: engItemClassSublistModes ame_util.charList;

111: engItemClassItemIdIndexes ame_util.idList;
112: engItemClassNames ame_util.stringList;
113: engItemClassOrderNumbers ame_util.idList;
114: engItemClassParModes ame_util.charList;
115: engItemClassSublistModes ame_util.charList;
116: /*
117: engItemCounts(i) is the number of items of the item class with item-class ID
118: engItemClassIds(i). engItemIds contains the item-ID lists returned by all
119: of the item classes' item-ID queries, in item_class_order_number order.

Line 121: engItemCounts ame_util.idList; /* compact */

117: engItemCounts(i) is the number of items of the item class with item-class ID
118: engItemClassIds(i). engItemIds contains the item-ID lists returned by all
119: of the item classes' item-ID queries, in item_class_order_number order.
120: */
121: engItemCounts ame_util.idList; /* compact */
122: engItemIds ame_util.stringList; /* compact */
123: /* attributes */
124: engAttributeIsStatics ame_util.charList; /* indexed by attribute id */
125: engAttributeItemClassIds ame_util.idList; /* indexed by attribute id */

Line 122: engItemIds ame_util.stringList; /* compact */

118: engItemClassIds(i). engItemIds contains the item-ID lists returned by all
119: of the item classes' item-ID queries, in item_class_order_number order.
120: */
121: engItemCounts ame_util.idList; /* compact */
122: engItemIds ame_util.stringList; /* compact */
123: /* attributes */
124: engAttributeIsStatics ame_util.charList; /* indexed by attribute id */
125: engAttributeItemClassIds ame_util.idList; /* indexed by attribute id */
126: engAttributeNames ame_util.stringList; /* indexed by attribute id */

Line 124: engAttributeIsStatics ame_util.charList; /* indexed by attribute id */

120: */
121: engItemCounts ame_util.idList; /* compact */
122: engItemIds ame_util.stringList; /* compact */
123: /* attributes */
124: engAttributeIsStatics ame_util.charList; /* indexed by attribute id */
125: engAttributeItemClassIds ame_util.idList; /* indexed by attribute id */
126: engAttributeNames ame_util.stringList; /* indexed by attribute id */
127: engAttributeTypes ame_util.stringList; /* indexed by attribute id */
128: /* New arrays to store the query details and whether they need to be evaluated

Line 125: engAttributeItemClassIds ame_util.idList; /* indexed by attribute id */

121: engItemCounts ame_util.idList; /* compact */
122: engItemIds ame_util.stringList; /* compact */
123: /* attributes */
124: engAttributeIsStatics ame_util.charList; /* indexed by attribute id */
125: engAttributeItemClassIds ame_util.idList; /* indexed by attribute id */
126: engAttributeNames ame_util.stringList; /* indexed by attribute id */
127: engAttributeTypes ame_util.stringList; /* indexed by attribute id */
128: /* New arrays to store the query details and whether they need to be evaluated
129: for each itemClass and itemID */

Line 126: engAttributeNames ame_util.stringList; /* indexed by attribute id */

122: engItemIds ame_util.stringList; /* compact */
123: /* attributes */
124: engAttributeIsStatics ame_util.charList; /* indexed by attribute id */
125: engAttributeItemClassIds ame_util.idList; /* indexed by attribute id */
126: engAttributeNames ame_util.stringList; /* indexed by attribute id */
127: engAttributeTypes ame_util.stringList; /* indexed by attribute id */
128: /* New arrays to store the query details and whether they need to be evaluated
129: for each itemClass and itemID */
130: engAttributeQueries ame_util.longestStringList;

Line 127: engAttributeTypes ame_util.stringList; /* indexed by attribute id */

123: /* attributes */
124: engAttributeIsStatics ame_util.charList; /* indexed by attribute id */
125: engAttributeItemClassIds ame_util.idList; /* indexed by attribute id */
126: engAttributeNames ame_util.stringList; /* indexed by attribute id */
127: engAttributeTypes ame_util.stringList; /* indexed by attribute id */
128: /* New arrays to store the query details and whether they need to be evaluated
129: for each itemClass and itemID */
130: engAttributeQueries ame_util.longestStringList;
131: engAttributeVariant ame_util.stringList;

Line 130: engAttributeQueries ame_util.longestStringList;

126: engAttributeNames ame_util.stringList; /* indexed by attribute id */
127: engAttributeTypes ame_util.stringList; /* indexed by attribute id */
128: /* New arrays to store the query details and whether they need to be evaluated
129: for each itemClass and itemID */
130: engAttributeQueries ame_util.longestStringList;
131: engAttributeVariant ame_util.stringList;
132: /*
133: The attribute values are kept compact. The values of the attribute with ID i
134: are stored starting at the index engAttributeValueIndexes(i), in the order

Line 131: engAttributeVariant ame_util.stringList;

127: engAttributeTypes ame_util.stringList; /* indexed by attribute id */
128: /* New arrays to store the query details and whether they need to be evaluated
129: for each itemClass and itemID */
130: engAttributeQueries ame_util.longestStringList;
131: engAttributeVariant ame_util.stringList;
132: /*
133: The attribute values are kept compact. The values of the attribute with ID i
134: are stored starting at the index engAttributeValueIndexes(i), in the order
135: that their item IDs occur in engItemIds.

Line 137: engAttributeValueIndexes ame_util.idList; /* indexed by attribute id */

133: The attribute values are kept compact. The values of the attribute with ID i
134: are stored starting at the index engAttributeValueIndexes(i), in the order
135: that their item IDs occur in engItemIds.
136: */
137: engAttributeValueIndexes ame_util.idList; /* indexed by attribute id */
138: engAttributeValues1 ame_util.attributeValueList; /* compact */
139: engAttributeValues2 ame_util.attributeValueList; /* compact */
140: engAttributeValues3 ame_util.attributeValueList; /* compact */
141: /*

Line 138: engAttributeValues1 ame_util.attributeValueList; /* compact */

134: are stored starting at the index engAttributeValueIndexes(i), in the order
135: that their item IDs occur in engItemIds.
136: */
137: engAttributeValueIndexes ame_util.idList; /* indexed by attribute id */
138: engAttributeValues1 ame_util.attributeValueList; /* compact */
139: engAttributeValues2 ame_util.attributeValueList; /* compact */
140: engAttributeValues3 ame_util.attributeValueList; /* compact */
141: /*
142: engHeaderConditionValues caches the truth values of conditions on

Line 139: engAttributeValues2 ame_util.attributeValueList; /* compact */

135: that their item IDs occur in engItemIds.
136: */
137: engAttributeValueIndexes ame_util.idList; /* indexed by attribute id */
138: engAttributeValues1 ame_util.attributeValueList; /* compact */
139: engAttributeValues2 ame_util.attributeValueList; /* compact */
140: engAttributeValues3 ame_util.attributeValueList; /* compact */
141: /*
142: engHeaderConditionValues caches the truth values of conditions on
143: attributes in the header item class. It is indexed by condition ID.

Line 140: engAttributeValues3 ame_util.attributeValueList; /* compact */

136: */
137: engAttributeValueIndexes ame_util.idList; /* indexed by attribute id */
138: engAttributeValues1 ame_util.attributeValueList; /* compact */
139: engAttributeValues2 ame_util.attributeValueList; /* compact */
140: engAttributeValues3 ame_util.attributeValueList; /* compact */
141: /*
142: engHeaderConditionValues caches the truth values of conditions on
143: attributes in the header item class. It is indexed by condition ID.
144: */

Line 145: engHeaderConditionValues ame_util.charList;

141: /*
142: engHeaderConditionValues caches the truth values of conditions on
143: attributes in the header item class. It is indexed by condition ID.
144: */
145: engHeaderConditionValues ame_util.charList;
146: /*
147: The engACUsage variables store active condition usages and related data.
148: engACUsageRulePriorities, engACUsageRuleTypes, and engACUsageRuleApprCategories
149: are indexed by rule ID; the other variables are indexed consecutively, and are

Line 164: engACUsageConditionIds ame_util.idList;

160: engACUsageItemClassCounts(item_class_id) is the number of rows in the
161: engACUsage variables for the item class with ID item_class_id, starting at
162: the index engACUsageFirstIndexes(item_class_id).
163: */
164: engACUsageConditionIds ame_util.idList;
165: engACUsageFirstIndexes ame_util.idList;
166: engACUsageItemClassCounts ame_util.idList;
167: engACUsageRuleIds ame_util.idList;
168: engACUsageRulePriorities ame_util.idList; /* indexed by rule ID */

Line 165: engACUsageFirstIndexes ame_util.idList;

161: engACUsage variables for the item class with ID item_class_id, starting at
162: the index engACUsageFirstIndexes(item_class_id).
163: */
164: engACUsageConditionIds ame_util.idList;
165: engACUsageFirstIndexes ame_util.idList;
166: engACUsageItemClassCounts ame_util.idList;
167: engACUsageRuleIds ame_util.idList;
168: engACUsageRulePriorities ame_util.idList; /* indexed by rule ID */
169: engACUsageRuleTypes ame_util.idList; /* indexed by rule ID */

Line 166: engACUsageItemClassCounts ame_util.idList;

162: the index engACUsageFirstIndexes(item_class_id).
163: */
164: engACUsageConditionIds ame_util.idList;
165: engACUsageFirstIndexes ame_util.idList;
166: engACUsageItemClassCounts ame_util.idList;
167: engACUsageRuleIds ame_util.idList;
168: engACUsageRulePriorities ame_util.idList; /* indexed by rule ID */
169: engACUsageRuleTypes ame_util.idList; /* indexed by rule ID */
170: engACUsageRuleApprCategories ame_util.charList; /* indexed by rule ID */

Line 167: engACUsageRuleIds ame_util.idList;

163: */
164: engACUsageConditionIds ame_util.idList;
165: engACUsageFirstIndexes ame_util.idList;
166: engACUsageItemClassCounts ame_util.idList;
167: engACUsageRuleIds ame_util.idList;
168: engACUsageRulePriorities ame_util.idList; /* indexed by rule ID */
169: engACUsageRuleTypes ame_util.idList; /* indexed by rule ID */
170: engACUsageRuleApprCategories ame_util.charList; /* indexed by rule ID */
171: /*

Line 168: engACUsageRulePriorities ame_util.idList; /* indexed by rule ID */

164: engACUsageConditionIds ame_util.idList;
165: engACUsageFirstIndexes ame_util.idList;
166: engACUsageItemClassCounts ame_util.idList;
167: engACUsageRuleIds ame_util.idList;
168: engACUsageRulePriorities ame_util.idList; /* indexed by rule ID */
169: engACUsageRuleTypes ame_util.idList; /* indexed by rule ID */
170: engACUsageRuleApprCategories ame_util.charList; /* indexed by rule ID */
171: /*
172: The engAC variables store properties of conditions in the active condition usages.

Line 169: engACUsageRuleTypes ame_util.idList; /* indexed by rule ID */

165: engACUsageFirstIndexes ame_util.idList;
166: engACUsageItemClassCounts ame_util.idList;
167: engACUsageRuleIds ame_util.idList;
168: engACUsageRulePriorities ame_util.idList; /* indexed by rule ID */
169: engACUsageRuleTypes ame_util.idList; /* indexed by rule ID */
170: engACUsageRuleApprCategories ame_util.charList; /* indexed by rule ID */
171: /*
172: The engAC variables store properties of conditions in the active condition usages.
173: They are indexed by condition ID.

Line 170: engACUsageRuleApprCategories ame_util.charList; /* indexed by rule ID */

166: engACUsageItemClassCounts ame_util.idList;
167: engACUsageRuleIds ame_util.idList;
168: engACUsageRulePriorities ame_util.idList; /* indexed by rule ID */
169: engACUsageRuleTypes ame_util.idList; /* indexed by rule ID */
170: engACUsageRuleApprCategories ame_util.charList; /* indexed by rule ID */
171: /*
172: The engAC variables store properties of conditions in the active condition usages.
173: They are indexed by condition ID.
174: */

Line 175: engACAttributeIds ame_util.idList;

171: /*
172: The engAC variables store properties of conditions in the active condition usages.
173: They are indexed by condition ID.
174: */
175: engACAttributeIds ame_util.idList;
176: engACConditionTypes ame_util.stringList;
177: engACIncludeLowerLimits ame_util.charList;
178: engACIncludeUpperLimits ame_util.charList;
179: engACParameterOnes ame_util.stringList;

Line 176: engACConditionTypes ame_util.stringList;

172: The engAC variables store properties of conditions in the active condition usages.
173: They are indexed by condition ID.
174: */
175: engACAttributeIds ame_util.idList;
176: engACConditionTypes ame_util.stringList;
177: engACIncludeLowerLimits ame_util.charList;
178: engACIncludeUpperLimits ame_util.charList;
179: engACParameterOnes ame_util.stringList;
180: engACParameterThrees ame_util.stringList;

Line 177: engACIncludeLowerLimits ame_util.charList;

173: They are indexed by condition ID.
174: */
175: engACAttributeIds ame_util.idList;
176: engACConditionTypes ame_util.stringList;
177: engACIncludeLowerLimits ame_util.charList;
178: engACIncludeUpperLimits ame_util.charList;
179: engACParameterOnes ame_util.stringList;
180: engACParameterThrees ame_util.stringList;
181: engACParameterTwos ame_util.longStringList;

Line 178: engACIncludeUpperLimits ame_util.charList;

174: */
175: engACAttributeIds ame_util.idList;
176: engACConditionTypes ame_util.stringList;
177: engACIncludeLowerLimits ame_util.charList;
178: engACIncludeUpperLimits ame_util.charList;
179: engACParameterOnes ame_util.stringList;
180: engACParameterThrees ame_util.stringList;
181: engACParameterTwos ame_util.longStringList;
182: /*

Line 179: engACParameterOnes ame_util.stringList;

175: engACAttributeIds ame_util.idList;
176: engACConditionTypes ame_util.stringList;
177: engACIncludeLowerLimits ame_util.charList;
178: engACIncludeUpperLimits ame_util.charList;
179: engACParameterOnes ame_util.stringList;
180: engACParameterThrees ame_util.stringList;
181: engACParameterTwos ame_util.longStringList;
182: /*
183: engACStringValues stores string values for active conditions on string attributes.

Line 180: engACParameterThrees ame_util.stringList;

176: engACConditionTypes ame_util.stringList;
177: engACIncludeLowerLimits ame_util.charList;
178: engACIncludeUpperLimits ame_util.charList;
179: engACParameterOnes ame_util.stringList;
180: engACParameterThrees ame_util.stringList;
181: engACParameterTwos ame_util.longStringList;
182: /*
183: engACStringValues stores string values for active conditions on string attributes.
184: It is ordered by condition ID. engACStringValueFirstIndexes(condition_id) is the

Line 181: engACParameterTwos ame_util.longStringList;

177: engACIncludeLowerLimits ame_util.charList;
178: engACIncludeUpperLimits ame_util.charList;
179: engACParameterOnes ame_util.stringList;
180: engACParameterThrees ame_util.stringList;
181: engACParameterTwos ame_util.longStringList;
182: /*
183: engACStringValues stores string values for active conditions on string attributes.
184: It is ordered by condition ID. engACStringValueFirstIndexes(condition_id) is the
185: index of the first row in engACStringValues for the condition with ID condition_id.

Line 191: engACStringValueCounts ame_util.idList;

187: engACStringValueCounts(condition_id) is the number of rows in
188: engACStringValues for the condition with ID condition_id, starting at
189: the index engACStringValueFirstIndexes(condition_id).
190: */
191: engACStringValueCounts ame_util.idList;
192: engACStringValueFirstIndexes ame_util.idList;
193: engACStringValues ame_util.attributeValueList;
194: /*
195: >> engApp indexing

Line 192: engACStringValueFirstIndexes ame_util.idList;

188: engACStringValues for the condition with ID condition_id, starting at
189: the index engACStringValueFirstIndexes(condition_id).
190: */
191: engACStringValueCounts ame_util.idList;
192: engACStringValueFirstIndexes ame_util.idList;
193: engACStringValues ame_util.attributeValueList;
194: /*
195: >> engApp indexing
196: The variables

Line 193: engACStringValues ame_util.attributeValueList;

189: the index engACStringValueFirstIndexes(condition_id).
190: */
191: engACStringValueCounts ame_util.idList;
192: engACStringValueFirstIndexes ame_util.idList;
193: engACStringValues ame_util.attributeValueList;
194: /*
195: >> engApp indexing
196: The variables
197: engAppHandlerFirstIndex

Line 297: engAppActionTypeIds ame_util.idList;

293: rules will have been fetched unnecessarily. The assumption here is that exception
294: rules are deprecated, so if performance becomes an issue, exception rules should be
295: converted to list-creation rules with appropriate priorities.
296: */
297: engAppActionTypeIds ame_util.idList;
298: engAppAppItemIds ame_util.stringList;
299: engAppApproverCategories ame_util.charList;
300: engAppHandlerFirstIndex integer;
301: engAppHandlerLastIndex integer;

Line 298: engAppAppItemIds ame_util.stringList;

294: rules are deprecated, so if performance becomes an issue, exception rules should be
295: converted to list-creation rules with appropriate priorities.
296: */
297: engAppActionTypeIds ame_util.idList;
298: engAppAppItemIds ame_util.stringList;
299: engAppApproverCategories ame_util.charList;
300: engAppHandlerFirstIndex integer;
301: engAppHandlerLastIndex integer;
302: engAppItemClassIds ame_util.idList;

Line 299: engAppApproverCategories ame_util.charList;

295: converted to list-creation rules with appropriate priorities.
296: */
297: engAppActionTypeIds ame_util.idList;
298: engAppAppItemIds ame_util.stringList;
299: engAppApproverCategories ame_util.charList;
300: engAppHandlerFirstIndex integer;
301: engAppHandlerLastIndex integer;
302: engAppItemClassIds ame_util.idList;
303: engAppItemIds ame_util.stringList;

Line 302: engAppItemClassIds ame_util.idList;

298: engAppAppItemIds ame_util.stringList;
299: engAppApproverCategories ame_util.charList;
300: engAppHandlerFirstIndex integer;
301: engAppHandlerLastIndex integer;
302: engAppItemClassIds ame_util.idList;
303: engAppItemIds ame_util.stringList;
304: engAppLMSubItemClassIds ame_util.idList;
305: engAppLMSubItemIds ame_util.stringList;
306: engAppParameters ame_util.stringList;

Line 303: engAppItemIds ame_util.stringList;

299: engAppApproverCategories ame_util.charList;
300: engAppHandlerFirstIndex integer;
301: engAppHandlerLastIndex integer;
302: engAppItemClassIds ame_util.idList;
303: engAppItemIds ame_util.stringList;
304: engAppLMSubItemClassIds ame_util.idList;
305: engAppLMSubItemIds ame_util.stringList;
306: engAppParameters ame_util.stringList;
307: engAppParameterTwos ame_util.stringList;

Line 304: engAppLMSubItemClassIds ame_util.idList;

300: engAppHandlerFirstIndex integer;
301: engAppHandlerLastIndex integer;
302: engAppItemClassIds ame_util.idList;
303: engAppItemIds ame_util.stringList;
304: engAppLMSubItemClassIds ame_util.idList;
305: engAppLMSubItemIds ame_util.stringList;
306: engAppParameters ame_util.stringList;
307: engAppParameterTwos ame_util.stringList;
308: engAppPriorities ame_util.idList;

Line 305: engAppLMSubItemIds ame_util.stringList;

301: engAppHandlerLastIndex integer;
302: engAppItemClassIds ame_util.idList;
303: engAppItemIds ame_util.stringList;
304: engAppLMSubItemClassIds ame_util.idList;
305: engAppLMSubItemIds ame_util.stringList;
306: engAppParameters ame_util.stringList;
307: engAppParameterTwos ame_util.stringList;
308: engAppPriorities ame_util.idList;
309: engAppRuleIds ame_util.idList;

Line 306: engAppParameters ame_util.stringList;

302: engAppItemClassIds ame_util.idList;
303: engAppItemIds ame_util.stringList;
304: engAppLMSubItemClassIds ame_util.idList;
305: engAppLMSubItemIds ame_util.stringList;
306: engAppParameters ame_util.stringList;
307: engAppParameterTwos ame_util.stringList;
308: engAppPriorities ame_util.idList;
309: engAppRuleIds ame_util.idList;
310: engRuleAppliedYN ame_util.charList;

Line 307: engAppParameterTwos ame_util.stringList;

303: engAppItemIds ame_util.stringList;
304: engAppLMSubItemClassIds ame_util.idList;
305: engAppLMSubItemIds ame_util.stringList;
306: engAppParameters ame_util.stringList;
307: engAppParameterTwos ame_util.stringList;
308: engAppPriorities ame_util.idList;
309: engAppRuleIds ame_util.idList;
310: engRuleAppliedYN ame_util.charList;
311: engAppRuleItemClassIds ame_util.idList;

Line 308: engAppPriorities ame_util.idList;

304: engAppLMSubItemClassIds ame_util.idList;
305: engAppLMSubItemIds ame_util.stringList;
306: engAppParameters ame_util.stringList;
307: engAppParameterTwos ame_util.stringList;
308: engAppPriorities ame_util.idList;
309: engAppRuleIds ame_util.idList;
310: engRuleAppliedYN ame_util.charList;
311: engAppRuleItemClassIds ame_util.idList;
312: engAppRuleTypes ame_util.idList;

Line 309: engAppRuleIds ame_util.idList;

305: engAppLMSubItemIds ame_util.stringList;
306: engAppParameters ame_util.stringList;
307: engAppParameterTwos ame_util.stringList;
308: engAppPriorities ame_util.idList;
309: engAppRuleIds ame_util.idList;
310: engRuleAppliedYN ame_util.charList;
311: engAppRuleItemClassIds ame_util.idList;
312: engAppRuleTypes ame_util.idList;
313: /*

Line 310: engRuleAppliedYN ame_util.charList;

306: engAppParameters ame_util.stringList;
307: engAppParameterTwos ame_util.stringList;
308: engAppPriorities ame_util.idList;
309: engAppRuleIds ame_util.idList;
310: engRuleAppliedYN ame_util.charList;
311: engAppRuleItemClassIds ame_util.idList;
312: engAppRuleTypes ame_util.idList;
313: /*
314: The engAppPerAppProd variables contain per-approver productions sorted by rule ID.

Line 311: engAppRuleItemClassIds ame_util.idList;

307: engAppParameterTwos ame_util.stringList;
308: engAppPriorities ame_util.idList;
309: engAppRuleIds ame_util.idList;
310: engRuleAppliedYN ame_util.charList;
311: engAppRuleItemClassIds ame_util.idList;
312: engAppRuleTypes ame_util.idList;
313: /*
314: The engAppPerAppProd variables contain per-approver productions sorted by rule ID.
315: fetchApplicableActions populates these variables. Then populateEngStVariables transfers

Line 312: engAppRuleTypes ame_util.idList;

308: engAppPriorities ame_util.idList;
309: engAppRuleIds ame_util.idList;
310: engRuleAppliedYN ame_util.charList;
311: engAppRuleItemClassIds ame_util.idList;
312: engAppRuleTypes ame_util.idList;
313: /*
314: The engAppPerAppProd variables contain per-approver productions sorted by rule ID.
315: fetchApplicableActions populates these variables. Then populateEngStVariables transfers
316: the values into engStProductionIndexes, engStVariableNames, and engStVariableValues,

Line 323: engAppPerAppProdFirstIndexes ame_util.idList;

319: by a rule appear in consecutive order in the engAppPerAppProd variables.
320: engAppPerAppProdFirstIndexes(i) is the index of the first row in the other
321: engAppPerAppProd variables that contains a production generated by the rule with ID i.
322: */
323: engAppPerAppProdFirstIndexes ame_util.idList;
324: engAppPerAppProdRuleIds ame_util.idList;
325: engAppPerAppProdVariableNames ame_util.stringList;
326: engAppPerAppProdVariableValues ame_util.stringList;
327: /* engRepeatSubstitutions is a new private engine flag indicating whether the substitution handler

Line 324: engAppPerAppProdRuleIds ame_util.idList;

320: engAppPerAppProdFirstIndexes(i) is the index of the first row in the other
321: engAppPerAppProd variables that contains a production generated by the rule with ID i.
322: */
323: engAppPerAppProdFirstIndexes ame_util.idList;
324: engAppPerAppProdRuleIds ame_util.idList;
325: engAppPerAppProdVariableNames ame_util.stringList;
326: engAppPerAppProdVariableValues ame_util.stringList;
327: /* engRepeatSubstitutions is a new private engine flag indicating whether the substitution handler
328: needs to be called a second time after adhoc insertions and surrogate processing */

Line 325: engAppPerAppProdVariableNames ame_util.stringList;

321: engAppPerAppProd variables that contains a production generated by the rule with ID i.
322: */
323: engAppPerAppProdFirstIndexes ame_util.idList;
324: engAppPerAppProdRuleIds ame_util.idList;
325: engAppPerAppProdVariableNames ame_util.stringList;
326: engAppPerAppProdVariableValues ame_util.stringList;
327: /* engRepeatSubstitutions is a new private engine flag indicating whether the substitution handler
328: needs to be called a second time after adhoc insertions and surrogate processing */
329: engRepeatSubstitutions boolean;

Line 326: engAppPerAppProdVariableValues ame_util.stringList;

322: */
323: engAppPerAppProdFirstIndexes ame_util.idList;
324: engAppPerAppProdRuleIds ame_util.idList;
325: engAppPerAppProdVariableNames ame_util.stringList;
326: engAppPerAppProdVariableValues ame_util.stringList;
327: /* engRepeatSubstitutions is a new private engine flag indicating whether the substitution handler
328: needs to be called a second time after adhoc insertions and surrogate processing */
329: engRepeatSubstitutions boolean;
330: /* engAppSub variables store relevant data needed to call the substitution handler a second time. */

Line 343: ame_util.repeatedStatus are not nulled, even though the approver occurs several times.

339: - engStItemIds, engStItemClasses, engStItemIndexes, and engStItemSources relate approvers in
340: engStApprovers to the items requiring them. If the item_id and item_class fields of an
341: approverRecord2 in engStApprovers are null, several items require the approver. (The
342: converse is not true. The item_id and item_class fields of an approver with the status
343: ame_util.repeatedStatus are not nulled, even though the approver occurs several times.
344: Only the first occurrence of an approver within the applicable repeated-approvers grouping
345: will have null item_id and item_class values, when several items require the approver.)
346: If such an approver is at index i in engStApprovers, and engStItemIndexes(j) = i, then
347: engStItemIds(j) is the ID of an item requiring the approver, engStItemClasses(j) is the

Line 376: engStApprovalProcessCompleteYN ame_util.charType;

372: - engStItemAppProcesscompleteYN is compact. It stores the approval-process status per item.
373: It is ordered so that the approval-process status of engItemIds(i) is
374: engStItemAppProcessCompleteYN(i).
375: */
376: engStApprovalProcessCompleteYN ame_util.charType;
377: engStApprovers ame_util.approversTable2;
378: /* This global variable stores the approver tree */
379: engStApproversTree ame_util.approversTreeTable;
380: engStItemClasses ame_util.stringList;

Line 377: engStApprovers ame_util.approversTable2;

373: It is ordered so that the approval-process status of engItemIds(i) is
374: engStItemAppProcessCompleteYN(i).
375: */
376: engStApprovalProcessCompleteYN ame_util.charType;
377: engStApprovers ame_util.approversTable2;
378: /* This global variable stores the approver tree */
379: engStApproversTree ame_util.approversTreeTable;
380: engStItemClasses ame_util.stringList;
381: engStItemIds ame_util.stringList;

Line 379: engStApproversTree ame_util.approversTreeTable;

375: */
376: engStApprovalProcessCompleteYN ame_util.charType;
377: engStApprovers ame_util.approversTable2;
378: /* This global variable stores the approver tree */
379: engStApproversTree ame_util.approversTreeTable;
380: engStItemClasses ame_util.stringList;
381: engStItemIds ame_util.stringList;
382: engStItemIndexes ame_util.idList;
383: engStItemSources ame_util.longStringList;

Line 380: engStItemClasses ame_util.stringList;

376: engStApprovalProcessCompleteYN ame_util.charType;
377: engStApprovers ame_util.approversTable2;
378: /* This global variable stores the approver tree */
379: engStApproversTree ame_util.approversTreeTable;
380: engStItemClasses ame_util.stringList;
381: engStItemIds ame_util.stringList;
382: engStItemIndexes ame_util.idList;
383: engStItemSources ame_util.longStringList;
384: engStProductionIndexes ame_util.idList;

Line 381: engStItemIds ame_util.stringList;

377: engStApprovers ame_util.approversTable2;
378: /* This global variable stores the approver tree */
379: engStApproversTree ame_util.approversTreeTable;
380: engStItemClasses ame_util.stringList;
381: engStItemIds ame_util.stringList;
382: engStItemIndexes ame_util.idList;
383: engStItemSources ame_util.longStringList;
384: engStProductionIndexes ame_util.idList;
385: /* Following two global variables to store repeated indexes */

Line 382: engStItemIndexes ame_util.idList;

378: /* This global variable stores the approver tree */
379: engStApproversTree ame_util.approversTreeTable;
380: engStItemClasses ame_util.stringList;
381: engStItemIds ame_util.stringList;
382: engStItemIndexes ame_util.idList;
383: engStItemSources ame_util.longStringList;
384: engStProductionIndexes ame_util.idList;
385: /* Following two global variables to store repeated indexes */
386: engStRepeatedIndexes ame_util.idList;

Line 383: engStItemSources ame_util.longStringList;

379: engStApproversTree ame_util.approversTreeTable;
380: engStItemClasses ame_util.stringList;
381: engStItemIds ame_util.stringList;
382: engStItemIndexes ame_util.idList;
383: engStItemSources ame_util.longStringList;
384: engStProductionIndexes ame_util.idList;
385: /* Following two global variables to store repeated indexes */
386: engStRepeatedIndexes ame_util.idList;
387: engStRepeatedAppIndexes ame_util.idList;

Line 384: engStProductionIndexes ame_util.idList;

380: engStItemClasses ame_util.stringList;
381: engStItemIds ame_util.stringList;
382: engStItemIndexes ame_util.idList;
383: engStItemSources ame_util.longStringList;
384: engStProductionIndexes ame_util.idList;
385: /* Following two global variables to store repeated indexes */
386: engStRepeatedIndexes ame_util.idList;
387: engStRepeatedAppIndexes ame_util.idList;
388: engStRuleDescriptions ame_util.stringList;

Line 386: engStRepeatedIndexes ame_util.idList;

382: engStItemIndexes ame_util.idList;
383: engStItemSources ame_util.longStringList;
384: engStProductionIndexes ame_util.idList;
385: /* Following two global variables to store repeated indexes */
386: engStRepeatedIndexes ame_util.idList;
387: engStRepeatedAppIndexes ame_util.idList;
388: engStRuleDescriptions ame_util.stringList;
389: engStRuleIds ame_util.idList;
390: engStRuleIndexes ame_util.idList;

Line 387: engStRepeatedAppIndexes ame_util.idList;

383: engStItemSources ame_util.longStringList;
384: engStProductionIndexes ame_util.idList;
385: /* Following two global variables to store repeated indexes */
386: engStRepeatedIndexes ame_util.idList;
387: engStRepeatedAppIndexes ame_util.idList;
388: engStRuleDescriptions ame_util.stringList;
389: engStRuleIds ame_util.idList;
390: engStRuleIndexes ame_util.idList;
391: engStSourceTypes ame_util.stringList;

Line 388: engStRuleDescriptions ame_util.stringList;

384: engStProductionIndexes ame_util.idList;
385: /* Following two global variables to store repeated indexes */
386: engStRepeatedIndexes ame_util.idList;
387: engStRepeatedAppIndexes ame_util.idList;
388: engStRuleDescriptions ame_util.stringList;
389: engStRuleIds ame_util.idList;
390: engStRuleIndexes ame_util.idList;
391: engStSourceTypes ame_util.stringList;
392: /* Following two global variables store the list of suspended items */

Line 389: engStRuleIds ame_util.idList;

385: /* Following two global variables to store repeated indexes */
386: engStRepeatedIndexes ame_util.idList;
387: engStRepeatedAppIndexes ame_util.idList;
388: engStRuleDescriptions ame_util.stringList;
389: engStRuleIds ame_util.idList;
390: engStRuleIndexes ame_util.idList;
391: engStSourceTypes ame_util.stringList;
392: /* Following two global variables store the list of suspended items */
393: engStSuspendedItems ame_util.stringList;

Line 390: engStRuleIndexes ame_util.idList;

386: engStRepeatedIndexes ame_util.idList;
387: engStRepeatedAppIndexes ame_util.idList;
388: engStRuleDescriptions ame_util.stringList;
389: engStRuleIds ame_util.idList;
390: engStRuleIndexes ame_util.idList;
391: engStSourceTypes ame_util.stringList;
392: /* Following two global variables store the list of suspended items */
393: engStSuspendedItems ame_util.stringList;
394: engStSuspendedItemClasses ame_util.stringList;

Line 391: engStSourceTypes ame_util.stringList;

387: engStRepeatedAppIndexes ame_util.idList;
388: engStRuleDescriptions ame_util.stringList;
389: engStRuleIds ame_util.idList;
390: engStRuleIndexes ame_util.idList;
391: engStSourceTypes ame_util.stringList;
392: /* Following two global variables store the list of suspended items */
393: engStSuspendedItems ame_util.stringList;
394: engStSuspendedItemClasses ame_util.stringList;
395: engStVariableNames ame_util.stringList;

Line 393: engStSuspendedItems ame_util.stringList;

389: engStRuleIds ame_util.idList;
390: engStRuleIndexes ame_util.idList;
391: engStSourceTypes ame_util.stringList;
392: /* Following two global variables store the list of suspended items */
393: engStSuspendedItems ame_util.stringList;
394: engStSuspendedItemClasses ame_util.stringList;
395: engStVariableNames ame_util.stringList;
396: engStVariableValues ame_util.stringList;
397: engStProductionsTable ame_util2.productionsTable;

Line 394: engStSuspendedItemClasses ame_util.stringList;

390: engStRuleIndexes ame_util.idList;
391: engStSourceTypes ame_util.stringList;
392: /* Following two global variables store the list of suspended items */
393: engStSuspendedItems ame_util.stringList;
394: engStSuspendedItemClasses ame_util.stringList;
395: engStVariableNames ame_util.stringList;
396: engStVariableValues ame_util.stringList;
397: engStProductionsTable ame_util2.productionsTable;
398: engStItemAppProcessCompleteYN ame_util.charList;

Line 395: engStVariableNames ame_util.stringList;

391: engStSourceTypes ame_util.stringList;
392: /* Following two global variables store the list of suspended items */
393: engStSuspendedItems ame_util.stringList;
394: engStSuspendedItemClasses ame_util.stringList;
395: engStVariableNames ame_util.stringList;
396: engStVariableValues ame_util.stringList;
397: engStProductionsTable ame_util2.productionsTable;
398: engStItemAppProcessCompleteYN ame_util.charList;
399: engStInsertionIndexes ame_util.idList;

Line 396: engStVariableValues ame_util.stringList;

392: /* Following two global variables store the list of suspended items */
393: engStSuspendedItems ame_util.stringList;
394: engStSuspendedItemClasses ame_util.stringList;
395: engStVariableNames ame_util.stringList;
396: engStVariableValues ame_util.stringList;
397: engStProductionsTable ame_util2.productionsTable;
398: engStItemAppProcessCompleteYN ame_util.charList;
399: engStInsertionIndexes ame_util.idList;
400: engInsertionOrderList ame_util.idList;

Line 397: engStProductionsTable ame_util2.productionsTable;

393: engStSuspendedItems ame_util.stringList;
394: engStSuspendedItemClasses ame_util.stringList;
395: engStVariableNames ame_util.stringList;
396: engStVariableValues ame_util.stringList;
397: engStProductionsTable ame_util2.productionsTable;
398: engStItemAppProcessCompleteYN ame_util.charList;
399: engStInsertionIndexes ame_util.idList;
400: engInsertionOrderList ame_util.idList;
401: /*eng deviation list*/

Line 398: engStItemAppProcessCompleteYN ame_util.charList;

394: engStSuspendedItemClasses ame_util.stringList;
395: engStVariableNames ame_util.stringList;
396: engStVariableValues ame_util.stringList;
397: engStProductionsTable ame_util2.productionsTable;
398: engStItemAppProcessCompleteYN ame_util.charList;
399: engStInsertionIndexes ame_util.idList;
400: engInsertionOrderList ame_util.idList;
401: /*eng deviation list*/
402: engDeviationResultList ame_approver_deviation_pkg.deviationReasonList;

Line 399: engStInsertionIndexes ame_util.idList;

395: engStVariableNames ame_util.stringList;
396: engStVariableValues ame_util.stringList;
397: engStProductionsTable ame_util2.productionsTable;
398: engStItemAppProcessCompleteYN ame_util.charList;
399: engStInsertionIndexes ame_util.idList;
400: engInsertionOrderList ame_util.idList;
401: /*eng deviation list*/
402: engDeviationResultList ame_approver_deviation_pkg.deviationReasonList;
403: engInsertionReasonList ame_util.stringList;

Line 400: engInsertionOrderList ame_util.idList;

396: engStVariableValues ame_util.stringList;
397: engStProductionsTable ame_util2.productionsTable;
398: engStItemAppProcessCompleteYN ame_util.charList;
399: engStInsertionIndexes ame_util.idList;
400: engInsertionOrderList ame_util.idList;
401: /*eng deviation list*/
402: engDeviationResultList ame_approver_deviation_pkg.deviationReasonList;
403: engInsertionReasonList ame_util.stringList;
404: engInsertionDateList ame_util.dateList;

Line 403: engInsertionReasonList ame_util.stringList;

399: engStInsertionIndexes ame_util.idList;
400: engInsertionOrderList ame_util.idList;
401: /*eng deviation list*/
402: engDeviationResultList ame_approver_deviation_pkg.deviationReasonList;
403: engInsertionReasonList ame_util.stringList;
404: engInsertionDateList ame_util.dateList;
405: engSuppressionDateList ame_util.dateList;
406: engSupperssionReasonList ame_util.stringList;
407: engTempReason varchar2(50);

Line 404: engInsertionDateList ame_util.dateList;

400: engInsertionOrderList ame_util.idList;
401: /*eng deviation list*/
402: engDeviationResultList ame_approver_deviation_pkg.deviationReasonList;
403: engInsertionReasonList ame_util.stringList;
404: engInsertionDateList ame_util.dateList;
405: engSuppressionDateList ame_util.dateList;
406: engSupperssionReasonList ame_util.stringList;
407: engTempReason varchar2(50);
408: engTempDate date;

Line 405: engSuppressionDateList ame_util.dateList;

401: /*eng deviation list*/
402: engDeviationResultList ame_approver_deviation_pkg.deviationReasonList;
403: engInsertionReasonList ame_util.stringList;
404: engInsertionDateList ame_util.dateList;
405: engSuppressionDateList ame_util.dateList;
406: engSupperssionReasonList ame_util.stringList;
407: engTempReason varchar2(50);
408: engTempDate date;
409: /*************************************************************************************

Line 406: engSupperssionReasonList ame_util.stringList;

402: engDeviationResultList ame_approver_deviation_pkg.deviationReasonList;
403: engInsertionReasonList ame_util.stringList;
404: engInsertionDateList ame_util.dateList;
405: engSuppressionDateList ame_util.dateList;
406: engSupperssionReasonList ame_util.stringList;
407: engTempReason varchar2(50);
408: engTempDate date;
409: /*************************************************************************************
410: forward declarations of private functions

Line 442: (approverRecordIn in ame_util.approverRecord2

438: /*************************************************************************************
439: forward declarations of private procedures
440: *************************************************************************************/
441: procedure addApproverToTree
442: (approverRecordIn in ame_util.approverRecord2
443: ,approverIndexIn in integer
444: ,approverLocationIn in boolean default ame_util.lastAmongEquals);
445: procedure calculateApproverOrderNumbers;
446: procedure compactEngAppLists(compactPrioritiesIn in boolean,

Line 444: ,approverLocationIn in boolean default ame_util.lastAmongEquals);

440: *************************************************************************************/
441: procedure addApproverToTree
442: (approverRecordIn in ame_util.approverRecord2
443: ,approverIndexIn in integer
444: ,approverLocationIn in boolean default ame_util.lastAmongEquals);
445: procedure calculateApproverOrderNumbers;
446: procedure compactEngAppLists(compactPrioritiesIn in boolean,
447: compactActionTypeIdsIn in boolean,
448: compactParametersIn in boolean);

Line 497: procedure prepareItemData(approverIndexesIn in ame_util.idList default ame_util.emptyIdList

493: ,historyTypeIn varchar2);
494: procedure parseForwardingBehaviors(forwardingBehaviorsIn in varchar2);
495: procedure parsePriorityModes(priorityModesIn in varchar2);
496: procedure populateEngStVariables;
497: procedure prepareItemData(approverIndexesIn in ame_util.idList default ame_util.emptyIdList
498: ,itemIndexesOut out nocopy ame_util.idList
499: ,itemItemClassesOut out nocopy ame_util.stringList
500: ,itemIdsOut out nocopy ame_util.stringList
501: ,itemSourcesOut out nocopy ame_util.longStringList);

Line 498: ,itemIndexesOut out nocopy ame_util.idList

494: procedure parseForwardingBehaviors(forwardingBehaviorsIn in varchar2);
495: procedure parsePriorityModes(priorityModesIn in varchar2);
496: procedure populateEngStVariables;
497: procedure prepareItemData(approverIndexesIn in ame_util.idList default ame_util.emptyIdList
498: ,itemIndexesOut out nocopy ame_util.idList
499: ,itemItemClassesOut out nocopy ame_util.stringList
500: ,itemIdsOut out nocopy ame_util.stringList
501: ,itemSourcesOut out nocopy ame_util.longStringList);
502: procedure preparePerApproverProductions

Line 499: ,itemItemClassesOut out nocopy ame_util.stringList

495: procedure parsePriorityModes(priorityModesIn in varchar2);
496: procedure populateEngStVariables;
497: procedure prepareItemData(approverIndexesIn in ame_util.idList default ame_util.emptyIdList
498: ,itemIndexesOut out nocopy ame_util.idList
499: ,itemItemClassesOut out nocopy ame_util.stringList
500: ,itemIdsOut out nocopy ame_util.stringList
501: ,itemSourcesOut out nocopy ame_util.longStringList);
502: procedure preparePerApproverProductions
503: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList

Line 500: ,itemIdsOut out nocopy ame_util.stringList

496: procedure populateEngStVariables;
497: procedure prepareItemData(approverIndexesIn in ame_util.idList default ame_util.emptyIdList
498: ,itemIndexesOut out nocopy ame_util.idList
499: ,itemItemClassesOut out nocopy ame_util.stringList
500: ,itemIdsOut out nocopy ame_util.stringList
501: ,itemSourcesOut out nocopy ame_util.longStringList);
502: procedure preparePerApproverProductions
503: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList
504: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList

Line 501: ,itemSourcesOut out nocopy ame_util.longStringList);

497: procedure prepareItemData(approverIndexesIn in ame_util.idList default ame_util.emptyIdList
498: ,itemIndexesOut out nocopy ame_util.idList
499: ,itemItemClassesOut out nocopy ame_util.stringList
500: ,itemIdsOut out nocopy ame_util.stringList
501: ,itemSourcesOut out nocopy ame_util.longStringList);
502: procedure preparePerApproverProductions
503: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList
504: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
505: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList

Line 503: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList

499: ,itemItemClassesOut out nocopy ame_util.stringList
500: ,itemIdsOut out nocopy ame_util.stringList
501: ,itemSourcesOut out nocopy ame_util.longStringList);
502: procedure preparePerApproverProductions
503: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList
504: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
505: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
506: ,prodIndexesOut out nocopy ame_util.idList
507: ,productionNamesOut out nocopy ame_util.stringList

Line 504: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList

500: ,itemIdsOut out nocopy ame_util.stringList
501: ,itemSourcesOut out nocopy ame_util.longStringList);
502: procedure preparePerApproverProductions
503: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList
504: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
505: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
506: ,prodIndexesOut out nocopy ame_util.idList
507: ,productionNamesOut out nocopy ame_util.stringList
508: ,productionValuesOut out nocopy ame_util.stringList);

Line 505: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList

501: ,itemSourcesOut out nocopy ame_util.longStringList);
502: procedure preparePerApproverProductions
503: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList
504: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
505: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
506: ,prodIndexesOut out nocopy ame_util.idList
507: ,productionNamesOut out nocopy ame_util.stringList
508: ,productionValuesOut out nocopy ame_util.stringList);
509: procedure prepareRuleData;

Line 506: ,prodIndexesOut out nocopy ame_util.idList

502: procedure preparePerApproverProductions
503: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList
504: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
505: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
506: ,prodIndexesOut out nocopy ame_util.idList
507: ,productionNamesOut out nocopy ame_util.stringList
508: ,productionValuesOut out nocopy ame_util.stringList);
509: procedure prepareRuleData;
510: procedure processActionType;

Line 507: ,productionNamesOut out nocopy ame_util.stringList

503: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList
504: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
505: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
506: ,prodIndexesOut out nocopy ame_util.idList
507: ,productionNamesOut out nocopy ame_util.stringList
508: ,productionValuesOut out nocopy ame_util.stringList);
509: procedure prepareRuleData;
510: procedure processActionType;
511: procedure processAdHocInsertions;

Line 508: ,productionValuesOut out nocopy ame_util.stringList);

504: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
505: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
506: ,prodIndexesOut out nocopy ame_util.idList
507: ,productionNamesOut out nocopy ame_util.stringList
508: ,productionValuesOut out nocopy ame_util.stringList);
509: procedure prepareRuleData;
510: procedure processActionType;
511: procedure processAdHocInsertions;
512: procedure processSuppressions;

Line 550: function approversMatch(approverRecord1In in ame_util.approverRecord2,

546: /*************************************************************************************
547: functions
548: *************************************************************************************/
549: /******************************** boolean functions *********************************/
550: function approversMatch(approverRecord1In in ame_util.approverRecord2,
551: approverRecord2In in ame_util.approverRecord2) return boolean as
552: begin
553: /* The following if statement's conditions are in decreasing order of specificity for efficiency. */
554: if(approverRecord1In.name = approverRecord2In.name and

Line 551: approverRecord2In in ame_util.approverRecord2) return boolean as

547: functions
548: *************************************************************************************/
549: /******************************** boolean functions *********************************/
550: function approversMatch(approverRecord1In in ame_util.approverRecord2,
551: approverRecord2In in ame_util.approverRecord2) return boolean as
552: begin
553: /* The following if statement's conditions are in decreasing order of specificity for efficiency. */
554: if(approverRecord1In.name = approverRecord2In.name and
555: approverRecord1In.occurrence = approverRecord2In.occurrence and

Line 565: ame_util.runtimeException(packageNameIn => 'ame_engine',

561: end if;
562: return(false);
563: exception
564: when others then
565: ame_util.runtimeException(packageNameIn => 'ame_engine',
566: routineNameIn => 'approversMatch',
567: exceptionNumberIn => sqlcode,
568: exceptionStringIn => sqlerrm);
569: raise;

Line 574: if (engAttributeNames(attributeIdIn) = ame_util.jobLevelStartingPointAttribute or

570: return(false);
571: end approversMatch;
572: function checkAttributeVariant(attributeIdIn in integer) return varchar2 as
573: begin
574: if (engAttributeNames(attributeIdIn) = ame_util.jobLevelStartingPointAttribute or
575: engAttributeNames(attributeIdIn) = ame_util.nonDefStartingPointPosAttr or
576: engAttributeNames(attributeIdIn) = ame_util.nonDefPosStructureAttr or
577: engAttributeNames(attributeIdIn) = ame_util.supStartingPointAttribute or
578: engAttributeNames(attributeIdIn) = ame_util.firstStartingPointAttribute or

Line 575: engAttributeNames(attributeIdIn) = ame_util.nonDefStartingPointPosAttr or

571: end approversMatch;
572: function checkAttributeVariant(attributeIdIn in integer) return varchar2 as
573: begin
574: if (engAttributeNames(attributeIdIn) = ame_util.jobLevelStartingPointAttribute or
575: engAttributeNames(attributeIdIn) = ame_util.nonDefStartingPointPosAttr or
576: engAttributeNames(attributeIdIn) = ame_util.nonDefPosStructureAttr or
577: engAttributeNames(attributeIdIn) = ame_util.supStartingPointAttribute or
578: engAttributeNames(attributeIdIn) = ame_util.firstStartingPointAttribute or
579: engAttributeNames(attributeIdIn) = ame_util.secondStartingPointAttribute ) then

Line 576: engAttributeNames(attributeIdIn) = ame_util.nonDefPosStructureAttr or

572: function checkAttributeVariant(attributeIdIn in integer) return varchar2 as
573: begin
574: if (engAttributeNames(attributeIdIn) = ame_util.jobLevelStartingPointAttribute or
575: engAttributeNames(attributeIdIn) = ame_util.nonDefStartingPointPosAttr or
576: engAttributeNames(attributeIdIn) = ame_util.nonDefPosStructureAttr or
577: engAttributeNames(attributeIdIn) = ame_util.supStartingPointAttribute or
578: engAttributeNames(attributeIdIn) = ame_util.firstStartingPointAttribute or
579: engAttributeNames(attributeIdIn) = ame_util.secondStartingPointAttribute ) then
580: return(ame_util.booleanTrue);

Line 577: engAttributeNames(attributeIdIn) = ame_util.supStartingPointAttribute or

573: begin
574: if (engAttributeNames(attributeIdIn) = ame_util.jobLevelStartingPointAttribute or
575: engAttributeNames(attributeIdIn) = ame_util.nonDefStartingPointPosAttr or
576: engAttributeNames(attributeIdIn) = ame_util.nonDefPosStructureAttr or
577: engAttributeNames(attributeIdIn) = ame_util.supStartingPointAttribute or
578: engAttributeNames(attributeIdIn) = ame_util.firstStartingPointAttribute or
579: engAttributeNames(attributeIdIn) = ame_util.secondStartingPointAttribute ) then
580: return(ame_util.booleanTrue);
581: else

Line 578: engAttributeNames(attributeIdIn) = ame_util.firstStartingPointAttribute or

574: if (engAttributeNames(attributeIdIn) = ame_util.jobLevelStartingPointAttribute or
575: engAttributeNames(attributeIdIn) = ame_util.nonDefStartingPointPosAttr or
576: engAttributeNames(attributeIdIn) = ame_util.nonDefPosStructureAttr or
577: engAttributeNames(attributeIdIn) = ame_util.supStartingPointAttribute or
578: engAttributeNames(attributeIdIn) = ame_util.firstStartingPointAttribute or
579: engAttributeNames(attributeIdIn) = ame_util.secondStartingPointAttribute ) then
580: return(ame_util.booleanTrue);
581: else
582: return(ame_util.booleanFalse);

Line 579: engAttributeNames(attributeIdIn) = ame_util.secondStartingPointAttribute ) then

575: engAttributeNames(attributeIdIn) = ame_util.nonDefStartingPointPosAttr or
576: engAttributeNames(attributeIdIn) = ame_util.nonDefPosStructureAttr or
577: engAttributeNames(attributeIdIn) = ame_util.supStartingPointAttribute or
578: engAttributeNames(attributeIdIn) = ame_util.firstStartingPointAttribute or
579: engAttributeNames(attributeIdIn) = ame_util.secondStartingPointAttribute ) then
580: return(ame_util.booleanTrue);
581: else
582: return(ame_util.booleanFalse);
583: end if;

Line 580: return(ame_util.booleanTrue);

576: engAttributeNames(attributeIdIn) = ame_util.nonDefPosStructureAttr or
577: engAttributeNames(attributeIdIn) = ame_util.supStartingPointAttribute or
578: engAttributeNames(attributeIdIn) = ame_util.firstStartingPointAttribute or
579: engAttributeNames(attributeIdIn) = ame_util.secondStartingPointAttribute ) then
580: return(ame_util.booleanTrue);
581: else
582: return(ame_util.booleanFalse);
583: end if;
584: end;

Line 582: return(ame_util.booleanFalse);

578: engAttributeNames(attributeIdIn) = ame_util.firstStartingPointAttribute or
579: engAttributeNames(attributeIdIn) = ame_util.secondStartingPointAttribute ) then
580: return(ame_util.booleanTrue);
581: else
582: return(ame_util.booleanFalse);
583: end if;
584: end;
585: function getVariantAttributeValue(attributeIdIn in integer,
586: itemClassIn in varchar2,

Line 589: dynamicQuery ame_util.longestStringType;

585: function getVariantAttributeValue(attributeIdIn in integer,
586: itemClassIn in varchar2,
587: itemIdIn in varchar2) return number as
588: dynamicCursor integer;
589: dynamicQuery ame_util.longestStringType;
590: rowsFound integer;
591: tempAttributeValues1 dbms_sql.varchar2_table;
592: begin
593: if engIsTestTransaction then

Line 594: if checkAttributeVariant(attributeIdIn) = ame_util.booleanTrue then

590: rowsFound integer;
591: tempAttributeValues1 dbms_sql.varchar2_table;
592: begin
593: if engIsTestTransaction then
594: if checkAttributeVariant(attributeIdIn) = ame_util.booleanTrue then
595: return (getTestVariantAttValue(attributeIdIn => attributeIdIn
596: ,itemClassIdIn => getItemClassId(itemClassNameIn => itemClassIn)
597: ,itemIdIn => itemIdIn));
598: else

Line 604: dynamicQuery := ame_util.removeReturns(stringIn => engAttributeQueries(attributeIdIn),

600: end if;
601: end if;
602: /* fetch the value for real transactions using the dynamic query */
603: if(engAttributeVariant.exists(attributeIdIn))then
604: dynamicQuery := ame_util.removeReturns(stringIn => engAttributeQueries(attributeIdIn),
605: replaceWithSpaces => true);
606: dynamicCursor := dbms_sql.open_cursor;
607: dbms_sql.parse(dynamicCursor,
608: dynamicQuery,

Line 610: if(instrb(dynamicQuery, ame_util.transactionIdPlaceholder) > 0) then

606: dynamicCursor := dbms_sql.open_cursor;
607: dbms_sql.parse(dynamicCursor,
608: dynamicQuery,
609: dbms_sql.native);
610: if(instrb(dynamicQuery, ame_util.transactionIdPlaceholder) > 0) then
611: dbms_sql.bind_variable(dynamicCursor,
612: ame_util.transactionIdPlaceholder,
613: engTransactionId,
614: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */

Line 612: ame_util.transactionIdPlaceholder,

608: dynamicQuery,
609: dbms_sql.native);
610: if(instrb(dynamicQuery, ame_util.transactionIdPlaceholder) > 0) then
611: dbms_sql.bind_variable(dynamicCursor,
612: ame_util.transactionIdPlaceholder,
613: engTransactionId,
614: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
615: end if;
616: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then

Line 616: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then

612: ame_util.transactionIdPlaceholder,
613: engTransactionId,
614: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
615: end if;
616: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then
617: dbms_sql.bind_variable(dynamicCursor,
618: ame_util2.itemClassPlaceHolder,
619: itemClassIn,
620: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */

Line 618: ame_util2.itemClassPlaceHolder,

614: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
615: end if;
616: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then
617: dbms_sql.bind_variable(dynamicCursor,
618: ame_util2.itemClassPlaceHolder,
619: itemClassIn,
620: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
621: end if;
622: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then

Line 622: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then

618: ame_util2.itemClassPlaceHolder,
619: itemClassIn,
620: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
621: end if;
622: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then
623: dbms_sql.bind_variable(dynamicCursor,
624: ame_util2.itemIdPlaceHolder,
625: itemIdIn,
626: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */

Line 624: ame_util2.itemIdPlaceHolder,

620: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
621: end if;
622: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then
623: dbms_sql.bind_variable(dynamicCursor,
624: ame_util2.itemIdPlaceHolder,
625: itemIdIn,
626: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
627: end if;
628: dbms_sql.define_array(dynamicCursor,

Line 631: ame_util.attributeValueTypeLength,

627: end if;
628: dbms_sql.define_array(dynamicCursor,
629: 1,
630: tempAttributeValues1,
631: ame_util.attributeValueTypeLength,
632: 1);
633: rowsFound := dbms_sql.execute(dynamicCursor);
634: loop
635: rowsFound := dbms_sql.fetch_rows(dynamicCursor);

Line 650: ame_util.runtimeException(packageNameIn => 'ame_engine',

646: return(engAttributeValues1(engAttributeValueIndexes(attributeIdIn)));
647: end if;
648: exception
649: when others then
650: ame_util.runtimeException(packageNameIn => 'ame_engine',
651: routineNameIn => 'getVariantAttributeValue',
652: exceptionNumberIn => sqlcode,
653: exceptionStringIn => sqlerrm);
654: raise;

Line 666: ame_util.runtimeException(packageNameIn => 'ame_engine',

662: itemClassIn => itemClassIn,
663: itemIdIn => itemIdIn));
664: exception
665: when others then
666: ame_util.runtimeException(packageNameIn => 'ame_engine',
667: routineNameIn => 'getVariantAttributeValue2',
668: exceptionNumberIn => sqlcode,
669: exceptionStringIn => sqlerrm);
670: raise;

Line 680: attributeValue1 ame_util.attributeValueType;

676: attributeId integer;
677: attributeNumberValue number;
678: attributeType ame_attributes.attribute_type%type;
679: attributeTypeException exception;
680: attributeValue1 ame_util.attributeValueType;
681: attributeValue2 ame_util.attributeValueType;
682: attributeValue3 ame_util.attributeValueType;
683: attributeValueDate date;
684: errorCode integer;

Line 681: attributeValue2 ame_util.attributeValueType;

677: attributeNumberValue number;
678: attributeType ame_attributes.attribute_type%type;
679: attributeTypeException exception;
680: attributeValue1 ame_util.attributeValueType;
681: attributeValue2 ame_util.attributeValueType;
682: attributeValue3 ame_util.attributeValueType;
683: attributeValueDate date;
684: errorCode integer;
685: errorMessage ame_util.longestStringType;

Line 682: attributeValue3 ame_util.attributeValueType;

678: attributeType ame_attributes.attribute_type%type;
679: attributeTypeException exception;
680: attributeValue1 ame_util.attributeValueType;
681: attributeValue2 ame_util.attributeValueType;
682: attributeValue3 ame_util.attributeValueType;
683: attributeValueDate date;
684: errorCode integer;
685: errorMessage ame_util.longestStringType;
686: headerLevelCondition boolean;

Line 685: errorMessage ame_util.longestStringType;

681: attributeValue2 ame_util.attributeValueType;
682: attributeValue3 ame_util.attributeValueType;
683: attributeValueDate date;
684: errorCode integer;
685: errorMessage ame_util.longestStringType;
686: headerLevelCondition boolean;
687: includeLowerLimit ame_conditions.include_lower_limit%type;
688: includeUpperLimit ame_conditions.include_upper_limit%type;
689: parameterOne ame_conditions.parameter_one%type;

Line 699: ame_util.headerItemClassName) then

695: parameterTwoNumber number;
696: begin
697: /* Check whether the condition is on a header-level attribute. */
698: if(engItemClassNames(engItemClassIndexes(engAttributeItemClassIds(engACAttributeIds(conditionIdIn)))) =
699: ame_util.headerItemClassName) then
700: headerLevelCondition := true;
701: else
702: headerLevelCondition := false;
703: end if;

Line 711: if(engHeaderConditionValues(conditionIdIn) = ame_util.booleanTrue) then

707: not engIsTestTransaction and
708: not engAttributeVariant.exists(attributeId) and
709: engHeaderConditionValues.exists(conditionIdIn)) then
710: /* The value is cached. */
711: if(engHeaderConditionValues(conditionIdIn) = ame_util.booleanTrue) then
712: return(true);
713: end if;
714: return(false);
715: end if;

Line 718: if(attributeType <> ame_util.stringAttributeType) then

714: return(false);
715: end if;
716: /* The value must be calculated. */
717: attributeType := engAttributeTypes(attributeId);
718: if(attributeType <> ame_util.stringAttributeType) then
719: includeLowerLimit := engACIncludeLowerLimits(conditionIdIn);
720: includeUpperLimit := engACIncludeUpperLimits(conditionIdIn);
721: parameterOne := engACParameterOnes(conditionIdIn);
722: parameterTwo := engACParameterTwos(conditionIdIn);

Line 745: if(attributeType = ame_util.numberAttributeType or

741: attributeValue2Out => attributeValue2,
742: attributeValue3Out => attributeValue3);
743: end if;
744: /* numbers and currencies */
745: if(attributeType = ame_util.numberAttributeType or
746: attributeType = ame_util.currencyAttributeType) then
747: /* First handle the case of a null value. */
748: if(attributeValue1 is null) then
749: if(parameterOne is null and

Line 746: attributeType = ame_util.currencyAttributeType) then

742: attributeValue3Out => attributeValue3);
743: end if;
744: /* numbers and currencies */
745: if(attributeType = ame_util.numberAttributeType or
746: attributeType = ame_util.currencyAttributeType) then
747: /* First handle the case of a null value. */
748: if(attributeValue1 is null) then
749: if(parameterOne is null and
750: parameterTwo is null) then

Line 752: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;

748: if(attributeValue1 is null) then
749: if(parameterOne is null and
750: parameterTwo is null) then
751: if(headerLevelCondition) then
752: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
753: end if;
754: return(true);
755: else
756: if(headerLevelCondition) then

Line 757: engHeaderConditionValues(conditionIdIn) := ame_util.booleanFalse;

753: end if;
754: return(true);
755: else
756: if(headerLevelCondition) then
757: engHeaderConditionValues(conditionIdIn) := ame_util.booleanFalse;
758: end if;
759: return(false);
760: end if;
761: end if;

Line 763: if(attributeType = ame_util.currencyAttributeType and

759: return(false);
760: end if;
761: end if;
762: /* Now handle the other cases. */
763: if(attributeType = ame_util.currencyAttributeType and
764: /* Issue 6 of the Bug list bug (4094080) */
765: /* modified form parameterThree <> attributeValue3 to */
766: /* parameterThree <> attributeValue2 */
767: parameterThree <> attributeValue2) then

Line 769: ame_util.convertCurrency(fromCurrencyCodeIn => attributeValue2,

765: /* modified form parameterThree <> attributeValue3 to */
766: /* parameterThree <> attributeValue2 */
767: parameterThree <> attributeValue2) then
768: attributeNumberValue :=
769: ame_util.convertCurrency(fromCurrencyCodeIn => attributeValue2,
770: toCurrencyCodeIn => parameterThree,
771: conversionTypeIn => attributeValue3,
772: amountIn => fnd_number.canonical_to_number(canonical => attributeValue1),
773: dateIn => engEffectiveRuleDate,

Line 780: if(includeLowerLimit = ame_util.booleanTrue and

776: attributeNumberValue := fnd_number.canonical_to_number(canonical => attributeValue1);
777: end if;
778: parameterOneNumber := fnd_number.canonical_to_number(canonical => parameterOne);
779: parameterTwoNumber := fnd_number.canonical_to_number(canonical => parameterTwo);
780: if(includeLowerLimit = ame_util.booleanTrue and
781: attributeNumberValue = parameterOneNumber) then
782: if(headerLevelCondition) then
783: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
784: end if;

Line 783: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;

779: parameterTwoNumber := fnd_number.canonical_to_number(canonical => parameterTwo);
780: if(includeLowerLimit = ame_util.booleanTrue and
781: attributeNumberValue = parameterOneNumber) then
782: if(headerLevelCondition) then
783: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
784: end if;
785: return(true);
786: end if;
787: if(includeUpperLimit = ame_util.booleanTrue and

Line 787: if(includeUpperLimit = ame_util.booleanTrue and

783: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
784: end if;
785: return(true);
786: end if;
787: if(includeUpperLimit = ame_util.booleanTrue and
788: attributeNumberValue = parameterTwoNumber) then
789: if(headerLevelCondition) then
790: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
791: end if;

Line 790: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;

786: end if;
787: if(includeUpperLimit = ame_util.booleanTrue and
788: attributeNumberValue = parameterTwoNumber) then
789: if(headerLevelCondition) then
790: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
791: end if;
792: return(true);
793: end if;
794: if((parameterOneNumber is null and attributeNumberValue < parameterTwoNumber) or

Line 798: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;

794: if((parameterOneNumber is null and attributeNumberValue < parameterTwoNumber) or
795: (parameterOneNumber < attributeNumberValue and parameterTwoNumber is null) or
796: (parameterOneNumber < attributeNumberValue and attributeNumberValue < parameterTwoNumber)) then
797: if(headerLevelCondition) then
798: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
799: end if;
800: return(true);
801: end if;
802: /* dates */

Line 803: elsif(attributeType = ame_util.dateAttributeType) then

799: end if;
800: return(true);
801: end if;
802: /* dates */
803: elsif(attributeType = ame_util.dateAttributeType) then
804: attributeValueDate := ame_util.versionStringToDate(stringDateIn => attributeValue1);
805: parameterOneDate := ame_util.versionStringToDate(stringDateIn => parameterOne);
806: parameterTwoDate := ame_util.versionStringToDate(stringDateIn => parameterTwo);
807: /* First handle the case of a null value. */

Line 804: attributeValueDate := ame_util.versionStringToDate(stringDateIn => attributeValue1);

800: return(true);
801: end if;
802: /* dates */
803: elsif(attributeType = ame_util.dateAttributeType) then
804: attributeValueDate := ame_util.versionStringToDate(stringDateIn => attributeValue1);
805: parameterOneDate := ame_util.versionStringToDate(stringDateIn => parameterOne);
806: parameterTwoDate := ame_util.versionStringToDate(stringDateIn => parameterTwo);
807: /* First handle the case of a null value. */
808: if(attributeValue1 is null) then

Line 805: parameterOneDate := ame_util.versionStringToDate(stringDateIn => parameterOne);

801: end if;
802: /* dates */
803: elsif(attributeType = ame_util.dateAttributeType) then
804: attributeValueDate := ame_util.versionStringToDate(stringDateIn => attributeValue1);
805: parameterOneDate := ame_util.versionStringToDate(stringDateIn => parameterOne);
806: parameterTwoDate := ame_util.versionStringToDate(stringDateIn => parameterTwo);
807: /* First handle the case of a null value. */
808: if(attributeValue1 is null) then
809: if(parameterOne is null and

Line 806: parameterTwoDate := ame_util.versionStringToDate(stringDateIn => parameterTwo);

802: /* dates */
803: elsif(attributeType = ame_util.dateAttributeType) then
804: attributeValueDate := ame_util.versionStringToDate(stringDateIn => attributeValue1);
805: parameterOneDate := ame_util.versionStringToDate(stringDateIn => parameterOne);
806: parameterTwoDate := ame_util.versionStringToDate(stringDateIn => parameterTwo);
807: /* First handle the case of a null value. */
808: if(attributeValue1 is null) then
809: if(parameterOne is null and
810: parameterTwo is null) then

Line 812: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;

808: if(attributeValue1 is null) then
809: if(parameterOne is null and
810: parameterTwo is null) then
811: if(headerLevelCondition) then
812: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
813: end if;
814: return(true);
815: else
816: if(headerLevelCondition) then

Line 817: engHeaderConditionValues(conditionIdIn) := ame_util.booleanFalse;

813: end if;
814: return(true);
815: else
816: if(headerLevelCondition) then
817: engHeaderConditionValues(conditionIdIn) := ame_util.booleanFalse;
818: end if;
819: return(false);
820: end if;
821: end if;

Line 823: if(includeLowerLimit = ame_util.booleanTrue and

819: return(false);
820: end if;
821: end if;
822: /* Now handle the other cases. */
823: if(includeLowerLimit = ame_util.booleanTrue and
824: attributeValueDate = parameterOneDate) then
825: if(headerLevelCondition) then
826: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
827: end if;

Line 826: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;

822: /* Now handle the other cases. */
823: if(includeLowerLimit = ame_util.booleanTrue and
824: attributeValueDate = parameterOneDate) then
825: if(headerLevelCondition) then
826: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
827: end if;
828: return(true);
829: end if;
830: if(includeUpperLimit = ame_util.booleanTrue and

Line 830: if(includeUpperLimit = ame_util.booleanTrue and

826: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
827: end if;
828: return(true);
829: end if;
830: if(includeUpperLimit = ame_util.booleanTrue and
831: attributeValueDate = parameterTwoDate) then
832: if(headerLevelCondition) then
833: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
834: end if;

Line 833: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;

829: end if;
830: if(includeUpperLimit = ame_util.booleanTrue and
831: attributeValueDate = parameterTwoDate) then
832: if(headerLevelCondition) then
833: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
834: end if;
835: return(true);
836: end if;
837: if((parameterOneDate is null and attributeValueDate < parameterTwoDate) or

Line 841: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;

837: if((parameterOneDate is null and attributeValueDate < parameterTwoDate) or
838: (parameterOneDate < attributeValueDate and parameterTwoDate is null) or
839: (parameterOneDate < attributeValueDate and attributeValueDate < parameterTwoDate)) then
840: if(headerLevelCondition) then
841: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
842: end if;
843: return(true);
844: end if;
845: /* booleans */

Line 846: elsif(attributeType = ame_util.booleanAttributeType) then

842: end if;
843: return(true);
844: end if;
845: /* booleans */
846: elsif(attributeType = ame_util.booleanAttributeType) then
847: if((attributeValue1 is null and
848: parameterOne is null) or
849: attributeValue1 = parameterOne) then
850: if(headerLevelCondition) then

Line 851: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;

847: if((attributeValue1 is null and
848: parameterOne is null) or
849: attributeValue1 = parameterOne) then
850: if(headerLevelCondition) then
851: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
852: end if;
853: return(true); /* If both pseudo-booleans are null, the condition applies. */
854: end if;
855: return(false);

Line 857: elsif(attributeType = ame_util.stringAttributeType) then

853: return(true); /* If both pseudo-booleans are null, the condition applies. */
854: end if;
855: return(false);
856: /* strings */
857: elsif(attributeType = ame_util.stringAttributeType) then
858: /* Note that if the attribute value and a string value are both null, the condition applies. */
859: for stringValueIndex in
860: engACStringValueFirstIndexes(conditionIdIn) ..
861: (engACStringValueFirstIndexes(conditionIdIn) + engACStringValueCounts(conditionIdIn) - 1) loop

Line 865: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;

861: (engACStringValueFirstIndexes(conditionIdIn) + engACStringValueCounts(conditionIdIn) - 1) loop
862: if((attributeValue1 is null and engACStringValues(stringValueIndex) is null) or
863: attributeValue1 = engACStringValues(stringValueIndex)) then
864: if(headerLevelCondition) then
865: engHeaderConditionValues(conditionIdIn) := ame_util.booleanTrue;
866: end if;
867: return(true);
868: end if;
869: end loop;

Line 875: engHeaderConditionValues(conditionIdIn) := ame_util.booleanFalse;

871: raise attributeTypeException;
872: end if;
873: /* The condition is not satisfied. */
874: if(headerLevelCondition) then
875: engHeaderConditionValues(conditionIdIn) := ame_util.booleanFalse;
876: end if;
877: return(false);
878: exception
879: when attributeTypeException then

Line 881: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

877: return(false);
878: exception
879: when attributeTypeException then
880: errorCode := -20001;
881: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
882: messageNameIn => 'AME_400113_ENG_ATTR_UNREG_TYPE');
883: ame_util.runtimeException(packageNameIn => 'ame_engine',
884: routineNameIn => 'conditionIsSatisfied',
885: exceptionNumberIn => errorCode,

Line 883: ame_util.runtimeException(packageNameIn => 'ame_engine',

879: when attributeTypeException then
880: errorCode := -20001;
881: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
882: messageNameIn => 'AME_400113_ENG_ATTR_UNREG_TYPE');
883: ame_util.runtimeException(packageNameIn => 'ame_engine',
884: routineNameIn => 'conditionIsSatisfied',
885: exceptionNumberIn => errorCode,
886: exceptionStringIn => errorMessage);
887: raise_application_error(errorCode,

Line 891: ame_util.runtimeException(packageNameIn => 'ame_engine',

887: raise_application_error(errorCode,
888: errorMessage);
889: return(null);
890: when others then
891: ame_util.runtimeException(packageNameIn => 'ame_engine',
892: routineNameIn => 'conditionIsSatisfied',
893: exceptionNumberIn => sqlcode,
894: exceptionStringIn => sqlerrm);
895: raise;

Line 903: ame_util.runtimeException(packageNameIn => 'ame_engine',

899: begin
900: return(engEvalPrioritiesPerItem);
901: exception
902: when others then
903: ame_util.runtimeException(packageNameIn => 'ame_engine',
904: routineNameIn => 'evalPrioritiesPerItem',
905: exceptionNumberIn => sqlcode,
906: exceptionStringIn => sqlerrm);
907: raise;

Line 922: ame_util.runtimeException(packageNameIn => 'ame_engine',

918: end loop;
919: return(false);
920: exception
921: when others then
922: ame_util.runtimeException(packageNameIn => 'ame_engine',
923: routineNameIn => 'insertionExists',
924: exceptionNumberIn => sqlcode,
925: exceptionStringIn => sqlerrm);
926: raise;

Line 934: ame_util.runtimeException(packageNameIn => 'ame_engine',

930: begin
931: return(engIsLocalTransaction);
932: exception
933: when others then
934: ame_util.runtimeException(packageNameIn => 'ame_engine',
935: routineNameIn => 'isLocalTransaction',
936: exceptionNumberIn => sqlcode,
937: exceptionStringIn => sqlerrm);
938: raise;

Line 943: if(engAttributeIsStatics(attributeIdIn) = ame_util.booleanTrue) then

939: return(null);
940: end isLocalTransaction;
941: function isStaticAttUsage(attributeIdIn in integer) return boolean as
942: begin
943: if(engAttributeIsStatics(attributeIdIn) = ame_util.booleanTrue) then
944: return(true);
945: end if;
946: return(false);
947: exception

Line 949: ame_util.runtimeException(packageNameIn => 'ame_engine',

945: end if;
946: return(false);
947: exception
948: when others then
949: ame_util.runtimeException(packageNameIn => 'ame_engine',
950: routineNameIn => 'isStaticAttUsage',
951: exceptionNumberIn => sqlcode,
952: exceptionStringIn => sqlerrm);
953: raise;

Line 961: ame_util.runtimeException(packageNameIn => 'ame_engine',

957: begin
958: return(engIsTestTransaction);
959: exception
960: when others then
961: ame_util.runtimeException(packageNameIn => 'ame_engine',
962: routineNameIn => 'isTestTransaction',
963: exceptionNumberIn => sqlcode,
964: exceptionStringIn => sqlerrm);
965: raise;

Line 970: if checkAttributeVariant(attributeIdIn) = ame_util.booleanTrue then

966: return(null);
967: end isTestTransaction;
968: function isVariant(attributeIdIn in integer) return boolean as
969: begin
970: if checkAttributeVariant(attributeIdIn) = ame_util.booleanTrue then
971: if engIsTestTransaction then
972: return true;
973: elsif engAttributeVariant.exists(attributeIdIn) then
974: return true;

Line 980: ame_util.runtimeException(packageNameIn => 'ame_engine',

976: end if;
977: return false;
978: exception
979: when others then
980: ame_util.runtimeException(packageNameIn => 'ame_engine',
981: routineNameIn => 'isVariant',
982: exceptionNumberIn => sqlcode,
983: exceptionStringIn => sqlerrm);
984: raise;

Line 992: ame_util.runtimeException(packageNameIn => 'ame_engine',

988: begin
989: return(engProcessPriorities);
990: exception
991: when others then
992: ame_util.runtimeException(packageNameIn => 'ame_engine',
993: routineNameIn => 'processPriorities',
994: exceptionNumberIn => sqlcode,
995: exceptionStringIn => sqlerrm);
996: raise;

Line 1004: ame_util.runtimeException(packageNameIn => 'ame_engine',

1000: begin
1001: return(engProcessProductionActions);
1002: exception
1003: when others then
1004: ame_util.runtimeException(packageNameIn => 'ame_engine',
1005: routineNameIn => 'processProductionActions',
1006: exceptionNumberIn => sqlcode,
1007: exceptionStringIn => sqlerrm);
1008: raise;

Line 1016: ame_util.runtimeException(packageNameIn => 'ame_engine',

1012: begin
1013: return(engProcessProductionRules);
1014: exception
1015: when others then
1016: ame_util.runtimeException(packageNameIn => 'ame_engine',
1017: routineNameIn => 'processProductionRules',
1018: exceptionNumberIn => sqlcode,
1019: exceptionStringIn => sqlerrm);
1020: raise;

Line 1038: nvl(end_date - ame_util.oneSecond, sysdate) and

1034: (transaction_type_id = transactionTypeIdIn)) and
1035: /* Don't use engEffectiveRuleDate here. */
1036: sysdate between
1037: start_date and
1038: nvl(end_date - ame_util.oneSecond, sysdate) and
1039: rownum < 2; /* Avoids second fetch otherwise required by ANSI standard to check for too many rows. */
1040: return(ameApplicationId);
1041: exception
1042: when others then

Line 1043: ame_util.runtimeException(packageNameIn => 'ame_engine',

1039: rownum < 2; /* Avoids second fetch otherwise required by ANSI standard to check for too many rows. */
1040: return(ameApplicationId);
1041: exception
1042: when others then
1043: ame_util.runtimeException(packageNameIn => 'ame_engine',
1044: routineNameIn => 'fetchAmeApplicationId',
1045: exceptionNumberIn => sqlcode,
1046: exceptionStringIn => sqlerrm);
1047: raise;

Line 1056: ame_util.runtimeException(packageNameIn => 'ame_engine',

1052: begin
1053: return(engActionTypeChainOrderModes(actionTypeIdIn));
1054: exception
1055: when others then
1056: ame_util.runtimeException(packageNameIn => 'ame_engine',
1057: routineNameIn => 'getActionTypeChainOrderMode',
1058: exceptionNumberIn => sqlcode,
1059: exceptionStringIn => sqlerrm);
1060: raise;

Line 1076: ame_util.runtimeException(packageNameIn => 'ame_engine',

1072: end loop;
1073: return(null);
1074: exception
1075: when others then
1076: ame_util.runtimeException(packageNameIn => 'ame_engine',
1077: routineNameIn => 'getActionTypeId',
1078: exceptionNumberIn => sqlcode,
1079: exceptionStringIn => sqlerrm);
1080: raise;

Line 1088: ame_util.runtimeException(packageNameIn => 'ame_engine',

1084: begin
1085: return(engActionTypeNames(actionTypeIdIn));
1086: exception
1087: when others then
1088: ame_util.runtimeException(packageNameIn => 'ame_engine',
1089: routineNameIn => 'getActionTypeName',
1090: exceptionNumberIn => sqlcode,
1091: exceptionStringIn => sqlerrm);
1092: raise;

Line 1100: ame_util.runtimeException(packageNameIn => 'ame_engine',

1096: begin
1097: return(engActionTypeOrderNumbers(actionTypeIdIn));
1098: exception
1099: when others then
1100: ame_util.runtimeException(packageNameIn => 'ame_engine',
1101: routineNameIn => 'getActionTypeOrderNumber',
1102: exceptionNumberIn => sqlcode,
1103: exceptionStringIn => sqlerrm);
1104: raise;

Line 1112: ame_util.runtimeException(packageNameIn => 'ame_engine',

1108: begin
1109: return(engActionTypePackageNames(actionTypeIdIn));
1110: exception
1111: when others then
1112: ame_util.runtimeException(packageNameIn => 'ame_engine',
1113: routineNameIn => 'getActionTypePackageName',
1114: exceptionNumberIn => sqlcode,
1115: exceptionStringIn => sqlerrm);
1116: raise;

Line 1124: ame_util.runtimeException(packageNameIn => 'ame_engine',

1120: begin /* getActionTypeUsage returns the rule type that uses the input action type. */
1121: return(engActionTypeUsages(actionTypeIdIn));
1122: exception
1123: when others then
1124: ame_util.runtimeException(packageNameIn => 'ame_engine',
1125: routineNameIn => 'getActionTypeUsage',
1126: exceptionNumberIn => sqlcode,
1127: exceptionStringIn => sqlerrm);
1128: raise;

Line 1133: if(actionTypeIdIn = ame_util.nullInsertionActionTypeId or actionTypeIdIn = -2 ) then

1129: return(null);
1130: end getActionTypeUsage;
1131: function getActionTypeVotingRegime(actionTypeIdIn in integer) return varchar2 as
1132: begin
1133: if(actionTypeIdIn = ame_util.nullInsertionActionTypeId or actionTypeIdIn = -2 ) then
1134: return(null);
1135: end if;
1136: return(engActionTypeVotingRegimes(actionTypeIdIn));
1137: exception

Line 1139: ame_util.runtimeException(packageNameIn => 'ame_engine',

1135: end if;
1136: return(engActionTypeVotingRegimes(actionTypeIdIn));
1137: exception
1138: when others then
1139: ame_util.runtimeException(packageNameIn => 'ame_engine',
1140: routineNameIn => 'getActionTypeVotingRegime',
1141: exceptionNumberIn => sqlcode,
1142: exceptionStringIn => sqlerrm);
1143: raise;

Line 1151: ame_util.runtimeException(packageNameIn => 'ame_engine',

1147: begin
1148: return(engAmeApplicationId);
1149: exception
1150: when others then
1151: ame_util.runtimeException(packageNameIn => 'ame_engine',
1152: routineNameIn => 'getAmeApplicationId',
1153: exceptionNumberIn => sqlcode,
1154: exceptionStringIn => sqlerrm);
1155: raise;

Line 1163: ame_util.runtimeException(packageNameIn => 'ame_engine',

1159: begin
1160: return(engStApprovalProcessCompleteYN);
1161: exception
1162: when others then
1163: ame_util.runtimeException(packageNameIn => 'ame_engine',
1164: routineNameIn => 'getApprovalProcessCompleteYN',
1165: exceptionNumberIn => sqlcode,
1166: exceptionStringIn => sqlerrm);
1167: raise;

Line 1172: errorMessage ame_util.longestStringType;

1168: return(null);
1169: end getApprovalProcessCompleteYN;
1170: function getAttributeIdByName(attributeNameIn in varchar2) return integer as
1171: errorCode integer;
1172: errorMessage ame_util.longestStringType;
1173: notFoundException exception;
1174: tempIndex integer;
1175: begin
1176: tempIndex := engAttributeNames.first;

Line 1189: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

1185: end loop;
1186: exception
1187: when notFoundException then
1188: errorCode := -20001;
1189: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
1190: messageNameIn => 'AME_400680_NO_ID_FOR_ATTR',
1191: tokenNameOneIn => 'ATTRIBUTE_NAME',
1192: tokenValueOneIn => attributeNameIn);
1193: ame_util.runtimeException(packageNameIn => 'ame_engine',

Line 1193: ame_util.runtimeException(packageNameIn => 'ame_engine',

1189: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
1190: messageNameIn => 'AME_400680_NO_ID_FOR_ATTR',
1191: tokenNameOneIn => 'ATTRIBUTE_NAME',
1192: tokenValueOneIn => attributeNameIn);
1193: ame_util.runtimeException(packageNameIn => 'ame_engine',
1194: routineNameIn => 'getAttributeIdByName',
1195: exceptionNumberIn => errorCode,
1196: exceptionStringIn => errorMessage);
1197: raise_application_error(errorCode, errorMessage);

Line 1200: ame_util.runtimeException(packageNameIn => 'ame_engine',

1196: exceptionStringIn => errorMessage);
1197: raise_application_error(errorCode, errorMessage);
1198: return(null);
1199: when others then
1200: ame_util.runtimeException(packageNameIn => 'ame_engine',
1201: routineNameIn => 'getAttributeIdByName',
1202: exceptionNumberIn => sqlcode,
1203: exceptionStringIn => attributeNameIn || ': ' || sqlerrm);
1204: raise;

Line 1212: ame_util.runtimeException(packageNameIn => 'ame_engine',

1208: begin
1209: return(engAttributeNames(attributeIdIn));
1210: exception
1211: when others then
1212: ame_util.runtimeException(packageNameIn => 'ame_engine',
1213: routineNameIn => 'getAttributeName',
1214: exceptionNumberIn => sqlcode,
1215: exceptionStringIn => sqlerrm);
1216: raise;

Line 1224: ame_util.runtimeException(packageNameIn => 'ame_engine',

1220: begin
1221: return(engAttributeTypes(attributeIdIn));
1222: exception
1223: when others then
1224: ame_util.runtimeException(packageNameIn => 'ame_engine',
1225: routineNameIn => 'getAttributeType',
1226: exceptionNumberIn => sqlcode,
1227: exceptionStringIn => sqlerrm);
1228: raise;

Line 1233: errorMessage ame_util.longestStringType;

1229: return(null);
1230: end getAttributeType;
1231: function getConfigVarValue(configVarNameIn in varchar2) return varchar2 as
1232: errorCode integer;
1233: errorMessage ame_util.longestStringType;
1234: noValueException exception;
1235: begin
1236: for i in 1 .. engConfigVarNames.count loop
1237: if(engConfigVarNames(i) = configVarNameIn) then

Line 1245: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',

1241: raise noValueException;
1242: exception
1243: when noValueException then
1244: errorCode := -20001;
1245: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',
1246: messageNameIn => 'AME_400114_ENG_INV_CON_VAR',
1247: tokenNameOneIn => 'CONFIG_VAR',
1248: tokenValueOneIn => configVarNameIn);
1249: ame_util.runtimeException(packageNameIn => 'ame_engine',

Line 1249: ame_util.runtimeException(packageNameIn => 'ame_engine',

1245: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',
1246: messageNameIn => 'AME_400114_ENG_INV_CON_VAR',
1247: tokenNameOneIn => 'CONFIG_VAR',
1248: tokenValueOneIn => configVarNameIn);
1249: ame_util.runtimeException(packageNameIn => 'ame_engine',
1250: routineNameIn => 'getConfigVarValue',
1251: exceptionNumberIn => errorCode,
1252: exceptionStringIn => errorMessage);
1253: raise_application_error(errorCode,

Line 1256: ame_util.runtimeException(packageNameIn => 'ame_engine',

1252: exceptionStringIn => errorMessage);
1253: raise_application_error(errorCode,
1254: errorMessage);
1255: when others then
1256: ame_util.runtimeException(packageNameIn => 'ame_engine',
1257: routineNameIn => 'getConfigVarValue',
1258: exceptionNumberIn => sqlcode,
1259: exceptionStringIn => sqlerrm);
1260: raise;

Line 1268: ame_util.runtimeException(packageNameIn => 'ame_engine',

1264: begin
1265: return(engEffectiveRuleDate);
1266: exception
1267: when others then
1268: ame_util.runtimeException(packageNameIn => 'ame_engine',
1269: routineNameIn => 'getEffectiveRuleDate',
1270: exceptionNumberIn => sqlcode,
1271: exceptionStringIn => sqlerrm);
1272: raise;

Line 1280: ame_util.runtimeException(packageNameIn => 'ame_engine',

1276: begin
1277: return(engFndApplicationId);
1278: exception
1279: when others then
1280: ame_util.runtimeException(packageNameIn => 'ame_engine',
1281: routineNameIn => 'getFndApplicationId',
1282: exceptionNumberIn => sqlcode,
1283: exceptionStringIn => sqlerrm);
1284: raise;

Line 1291: errorMessage ame_util.longestStringType;

1287: function getForwardingBehavior(forwarderTypeIn in varchar2,
1288: forwardeeTypeIn in varchar2,
1289: approvalStatusIn in varchar2) return varchar2 as
1290: errorCode integer;
1291: errorMessage ame_util.longestStringType;
1292: badArgsException exception;
1293: begin
1294: if(forwarderTypeIn = ame_util.chainOfAuthorityForwarder) then
1295: if(forwardeeTypeIn = ame_util.previousSameChainForwardee) then

Line 1294: if(forwarderTypeIn = ame_util.chainOfAuthorityForwarder) then

1290: errorCode integer;
1291: errorMessage ame_util.longestStringType;
1292: badArgsException exception;
1293: begin
1294: if(forwarderTypeIn = ame_util.chainOfAuthorityForwarder) then
1295: if(forwardeeTypeIn = ame_util.previousSameChainForwardee) then
1296: if(approvalStatusIn = ame_util.forwardStatus) then
1297: return(engForwardingBehaviors(1));
1298: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then

Line 1295: if(forwardeeTypeIn = ame_util.previousSameChainForwardee) then

1291: errorMessage ame_util.longestStringType;
1292: badArgsException exception;
1293: begin
1294: if(forwarderTypeIn = ame_util.chainOfAuthorityForwarder) then
1295: if(forwardeeTypeIn = ame_util.previousSameChainForwardee) then
1296: if(approvalStatusIn = ame_util.forwardStatus) then
1297: return(engForwardingBehaviors(1));
1298: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1299: return(engForwardingBehaviors(2));

Line 1296: if(approvalStatusIn = ame_util.forwardStatus) then

1292: badArgsException exception;
1293: begin
1294: if(forwarderTypeIn = ame_util.chainOfAuthorityForwarder) then
1295: if(forwardeeTypeIn = ame_util.previousSameChainForwardee) then
1296: if(approvalStatusIn = ame_util.forwardStatus) then
1297: return(engForwardingBehaviors(1));
1298: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1299: return(engForwardingBehaviors(2));
1300: end if;

Line 1298: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then

1294: if(forwarderTypeIn = ame_util.chainOfAuthorityForwarder) then
1295: if(forwardeeTypeIn = ame_util.previousSameChainForwardee) then
1296: if(approvalStatusIn = ame_util.forwardStatus) then
1297: return(engForwardingBehaviors(1));
1298: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1299: return(engForwardingBehaviors(2));
1300: end if;
1301: elsif(forwardeeTypeIn = ame_util.subordSameHierarchyForwardee) then
1302: if(approvalStatusIn = ame_util.forwardStatus) then

Line 1301: elsif(forwardeeTypeIn = ame_util.subordSameHierarchyForwardee) then

1297: return(engForwardingBehaviors(1));
1298: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1299: return(engForwardingBehaviors(2));
1300: end if;
1301: elsif(forwardeeTypeIn = ame_util.subordSameHierarchyForwardee) then
1302: if(approvalStatusIn = ame_util.forwardStatus) then
1303: return(engForwardingBehaviors(3));
1304: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1305: return(engForwardingBehaviors(4));

Line 1302: if(approvalStatusIn = ame_util.forwardStatus) then

1298: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1299: return(engForwardingBehaviors(2));
1300: end if;
1301: elsif(forwardeeTypeIn = ame_util.subordSameHierarchyForwardee) then
1302: if(approvalStatusIn = ame_util.forwardStatus) then
1303: return(engForwardingBehaviors(3));
1304: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1305: return(engForwardingBehaviors(4));
1306: end if;

Line 1304: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then

1300: end if;
1301: elsif(forwardeeTypeIn = ame_util.subordSameHierarchyForwardee) then
1302: if(approvalStatusIn = ame_util.forwardStatus) then
1303: return(engForwardingBehaviors(3));
1304: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1305: return(engForwardingBehaviors(4));
1306: end if;
1307: elsif(forwardeeTypeIn = ame_util.alreadyInListForwardee) then
1308: if(approvalStatusIn = ame_util.forwardStatus) then

Line 1307: elsif(forwardeeTypeIn = ame_util.alreadyInListForwardee) then

1303: return(engForwardingBehaviors(3));
1304: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1305: return(engForwardingBehaviors(4));
1306: end if;
1307: elsif(forwardeeTypeIn = ame_util.alreadyInListForwardee) then
1308: if(approvalStatusIn = ame_util.forwardStatus) then
1309: return(engForwardingBehaviors(5));
1310: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1311: return(engForwardingBehaviors(6));

Line 1308: if(approvalStatusIn = ame_util.forwardStatus) then

1304: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1305: return(engForwardingBehaviors(4));
1306: end if;
1307: elsif(forwardeeTypeIn = ame_util.alreadyInListForwardee) then
1308: if(approvalStatusIn = ame_util.forwardStatus) then
1309: return(engForwardingBehaviors(5));
1310: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1311: return(engForwardingBehaviors(6));
1312: end if;

Line 1310: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then

1306: end if;
1307: elsif(forwardeeTypeIn = ame_util.alreadyInListForwardee) then
1308: if(approvalStatusIn = ame_util.forwardStatus) then
1309: return(engForwardingBehaviors(5));
1310: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1311: return(engForwardingBehaviors(6));
1312: end if;
1313: end if;
1314: elsif(forwarderTypeIn = ame_util.adHocForwarder) then

Line 1314: elsif(forwarderTypeIn = ame_util.adHocForwarder) then

1310: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1311: return(engForwardingBehaviors(6));
1312: end if;
1313: end if;
1314: elsif(forwarderTypeIn = ame_util.adHocForwarder) then
1315: if(forwardeeTypein = ame_util.alreadyInListForwardee) then
1316: if(approvalStatusIn = ame_util.forwardStatus) then
1317: return(engForwardingBehaviors(7));
1318: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then

Line 1315: if(forwardeeTypein = ame_util.alreadyInListForwardee) then

1311: return(engForwardingBehaviors(6));
1312: end if;
1313: end if;
1314: elsif(forwarderTypeIn = ame_util.adHocForwarder) then
1315: if(forwardeeTypein = ame_util.alreadyInListForwardee) then
1316: if(approvalStatusIn = ame_util.forwardStatus) then
1317: return(engForwardingBehaviors(7));
1318: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1319: return(engForwardingBehaviors(8));

Line 1316: if(approvalStatusIn = ame_util.forwardStatus) then

1312: end if;
1313: end if;
1314: elsif(forwarderTypeIn = ame_util.adHocForwarder) then
1315: if(forwardeeTypein = ame_util.alreadyInListForwardee) then
1316: if(approvalStatusIn = ame_util.forwardStatus) then
1317: return(engForwardingBehaviors(7));
1318: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1319: return(engForwardingBehaviors(8));
1320: end if;

Line 1318: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then

1314: elsif(forwarderTypeIn = ame_util.adHocForwarder) then
1315: if(forwardeeTypein = ame_util.alreadyInListForwardee) then
1316: if(approvalStatusIn = ame_util.forwardStatus) then
1317: return(engForwardingBehaviors(7));
1318: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
1319: return(engForwardingBehaviors(8));
1320: end if;
1321: end if;
1322: end if;

Line 1327: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

1323: raise badArgsException;
1324: exception
1325: when badArgsException then
1326: errorCode := -20001;
1327: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
1328: messageNameIn => 'AME_400115_ENG_INV_VAL_ARG');
1329: ame_util.runtimeException(packageNameIn => 'ame_engine',
1330: routineNameIn => 'getForwardingBehavior',
1331: exceptionNumberIn => errorCode,

Line 1329: ame_util.runtimeException(packageNameIn => 'ame_engine',

1325: when badArgsException then
1326: errorCode := -20001;
1327: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
1328: messageNameIn => 'AME_400115_ENG_INV_VAL_ARG');
1329: ame_util.runtimeException(packageNameIn => 'ame_engine',
1330: routineNameIn => 'getForwardingBehavior',
1331: exceptionNumberIn => errorCode,
1332: exceptionStringIn => errorMessage);
1333: raise_application_error(errorCode,

Line 1337: ame_util.runtimeException(packageNameIn => 'ame_engine',

1333: raise_application_error(errorCode,
1334: errorMessage);
1335: return(null);
1336: when others then
1337: ame_util.runtimeException(packageNameIn => 'ame_engine',
1338: routineNameIn => 'getForwardingBehavior',
1339: exceptionNumberIn => sqlcode,
1340: exceptionStringIn => sqlerrm);
1341: raise;

Line 1349: ame_util.runtimeException(packageNameIn => 'ame_engine',

1345: begin
1346: return(engAppActionTypeIds(engAppHandlerFirstIndex));
1347: exception
1348: when others then
1349: ame_util.runtimeException(packageNameIn => 'ame_engine',
1350: routineNameIn => 'getHandlerActionTypeId',
1351: exceptionNumberIn => sqlcode,
1352: exceptionStringIn => sqlerrm);
1353: raise;

Line 1361: ame_util.runtimeException(packageNameIn => 'ame_engine',

1357: begin
1358: return(engActionTypeOrderNumbers(engAppActionTypeIds(engAppHandlerFirstIndex)));
1359: exception
1360: when others then
1361: ame_util.runtimeException(packageNameIn => 'ame_engine',
1362: routineNameIn => 'getHandlerActionTypeOrderNum',
1363: exceptionNumberIn => sqlcode,
1364: exceptionStringIn => sqlerrm);
1365: raise;

Line 1368: function getHandlerApprovalStatus(approverIn in ame_util.approverRecord2) return varchar2 as

1364: exceptionStringIn => sqlerrm);
1365: raise;
1366: return(null);
1367: end getHandlerActionTypeOrderNum;
1368: function getHandlerApprovalStatus(approverIn in ame_util.approverRecord2) return varchar2 as
1369: begin
1370: for i in 1 .. engOldApproverList.count loop
1371: if(approversMatch(approverRecord1In => approverIn,
1372: approverRecord2In => engOldApproverList(i))) then

Line 1379: ame_util.runtimeException(packageNameIn => 'ame_engine',

1375: end loop;
1376: return(null);
1377: exception
1378: when others then
1379: ame_util.runtimeException(packageNameIn => 'ame_engine',
1380: routineNameIn => 'getHandlerApprovalStatus',
1381: exceptionNumberIn => sqlcode,
1382: exceptionStringIn => sqlerrm);
1383: raise;

Line 1388: errorMessage ame_util.longestStringType;

1384: return(null);
1385: end getHandlerApprovalStatus;
1386: function getHandlerAuthority return varchar2 as
1387: errorCode integer;
1388: errorMessage ame_util.longestStringType;
1389: badRuleTypeException exception;
1390: ruleType integer;
1391: begin
1392: ruleType := getHandlerRuleType;

Line 1393: if(ruleType = ame_util.preListGroupRuleType) then

1389: badRuleTypeException exception;
1390: ruleType integer;
1391: begin
1392: ruleType := getHandlerRuleType;
1393: if(ruleType = ame_util.preListGroupRuleType) then
1394: return(ame_util.preApprover);
1395: elsif(ruleType = ame_util.postListGroupRuleType) then
1396: return(ame_util.postApprover);
1397: elsif(ruleType = ame_util.authorityRuleType) then

Line 1394: return(ame_util.preApprover);

1390: ruleType integer;
1391: begin
1392: ruleType := getHandlerRuleType;
1393: if(ruleType = ame_util.preListGroupRuleType) then
1394: return(ame_util.preApprover);
1395: elsif(ruleType = ame_util.postListGroupRuleType) then
1396: return(ame_util.postApprover);
1397: elsif(ruleType = ame_util.authorityRuleType) then
1398: return(ame_util.authorityApprover);

Line 1395: elsif(ruleType = ame_util.postListGroupRuleType) then

1391: begin
1392: ruleType := getHandlerRuleType;
1393: if(ruleType = ame_util.preListGroupRuleType) then
1394: return(ame_util.preApprover);
1395: elsif(ruleType = ame_util.postListGroupRuleType) then
1396: return(ame_util.postApprover);
1397: elsif(ruleType = ame_util.authorityRuleType) then
1398: return(ame_util.authorityApprover);
1399: else

Line 1396: return(ame_util.postApprover);

1392: ruleType := getHandlerRuleType;
1393: if(ruleType = ame_util.preListGroupRuleType) then
1394: return(ame_util.preApprover);
1395: elsif(ruleType = ame_util.postListGroupRuleType) then
1396: return(ame_util.postApprover);
1397: elsif(ruleType = ame_util.authorityRuleType) then
1398: return(ame_util.authorityApprover);
1399: else
1400: raise badRuleTypeException;

Line 1397: elsif(ruleType = ame_util.authorityRuleType) then

1393: if(ruleType = ame_util.preListGroupRuleType) then
1394: return(ame_util.preApprover);
1395: elsif(ruleType = ame_util.postListGroupRuleType) then
1396: return(ame_util.postApprover);
1397: elsif(ruleType = ame_util.authorityRuleType) then
1398: return(ame_util.authorityApprover);
1399: else
1400: raise badRuleTypeException;
1401: end if;

Line 1398: return(ame_util.authorityApprover);

1394: return(ame_util.preApprover);
1395: elsif(ruleType = ame_util.postListGroupRuleType) then
1396: return(ame_util.postApprover);
1397: elsif(ruleType = ame_util.authorityRuleType) then
1398: return(ame_util.authorityApprover);
1399: else
1400: raise badRuleTypeException;
1401: end if;
1402: exception

Line 1405: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

1401: end if;
1402: exception
1403: when badRuleTypeException then
1404: errorCode := -20001;
1405: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
1406: messageNameIn => 'AME_400681_INV_HANDLER_RUL_TYP');
1407: ame_util.runtimeException(packageNameIn => 'ame_engine',
1408: routineNameIn => 'getHandlerAuthority',
1409: exceptionNumberIn => errorCode,

Line 1407: ame_util.runtimeException(packageNameIn => 'ame_engine',

1403: when badRuleTypeException then
1404: errorCode := -20001;
1405: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
1406: messageNameIn => 'AME_400681_INV_HANDLER_RUL_TYP');
1407: ame_util.runtimeException(packageNameIn => 'ame_engine',
1408: routineNameIn => 'getHandlerAuthority',
1409: exceptionNumberIn => errorCode,
1410: exceptionStringIn => errorMessage);
1411: raise_application_error(errorCode,

Line 1415: ame_util.runtimeException(packageNameIn => 'ame_engine',

1411: raise_application_error(errorCode,
1412: errorMessage);
1413: return(null);
1414: when others then
1415: ame_util.runtimeException(packageNameIn => 'ame_engine',
1416: routineNameIn => 'getHandlerAuthority',
1417: exceptionNumberIn => sqlcode,
1418: exceptionStringIn => sqlerrm);
1419: raise;

Line 1427: ame_util.runtimeException(packageNameIn => 'ame_engine',

1423: begin
1424: return(engAppRuleItemClassIds(engAppHandlerFirstIndex));
1425: exception
1426: when others then
1427: ame_util.runtimeException(packageNameIn => 'ame_engine',
1428: routineNameIn => 'getHandlerItemClassId',
1429: exceptionNumberIn => sqlcode,
1430: exceptionStringIn => sqlerrm);
1431: raise;

Line 1439: ame_util.runtimeException(packageNameIn => 'ame_engine',

1435: begin
1436: return(getItemClassName(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex)));
1437: exception
1438: when others then
1439: ame_util.runtimeException(packageNameIn => 'ame_engine',
1440: routineNameIn => 'getHandlerItemClassName',
1441: exceptionNumberIn => sqlcode,
1442: exceptionStringIn => sqlerrm);
1443: raise;

Line 1451: ame_util.runtimeException(packageNameIn => 'ame_engine',

1447: begin
1448: return(engItemClassOrderNumbers(engItemClassIndexes(engAppRuleItemClassIds(engAppHandlerFirstIndex))));
1449: exception
1450: when others then
1451: ame_util.runtimeException(packageNameIn => 'ame_engine',
1452: routineNameIn => 'getHandlerItemClassOrderNumber',
1453: exceptionNumberIn => sqlcode,
1454: exceptionStringIn => sqlerrm);
1455: raise;

Line 1463: ame_util.runtimeException(packageNameIn => 'ame_engine',

1459: begin
1460: return(engAppAppItemIds(engAppHandlerFirstIndex));
1461: exception
1462: when others then
1463: ame_util.runtimeException(packageNameIn => 'ame_engine',
1464: routineNameIn => 'getHandlerItemId',
1465: exceptionNumberIn => sqlcode,
1466: exceptionStringIn => sqlerrm);
1467: raise;

Line 1473: ame_util.parallelItems) then

1469: end getHandlerItemId;
1470: function getHandlerItemOrderNumber return integer as
1471: begin
1472: if(getItemClassParMode(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex)) =
1473: ame_util.parallelItems) then
1474: return(1);
1475: else /* The parallelization modes is ame_util.serialItems. */
1476: return(1 + getItemOffset(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex),
1477: itemIdIn => engAppAppItemIds(engAppHandlerFirstIndex)));

Line 1475: else /* The parallelization modes is ame_util.serialItems. */

1471: begin
1472: if(getItemClassParMode(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex)) =
1473: ame_util.parallelItems) then
1474: return(1);
1475: else /* The parallelization modes is ame_util.serialItems. */
1476: return(1 + getItemOffset(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex),
1477: itemIdIn => engAppAppItemIds(engAppHandlerFirstIndex)));
1478: end if;
1479: exception

Line 1481: ame_util.runtimeException(packageNameIn => 'ame_engine',

1477: itemIdIn => engAppAppItemIds(engAppHandlerFirstIndex)));
1478: end if;
1479: exception
1480: when others then
1481: ame_util.runtimeException(packageNameIn => 'ame_engine',
1482: routineNameIn => 'getHandlerItemOrderNumber',
1483: exceptionNumberIn => sqlcode,
1484: exceptionStringIn => sqlerrm);
1485: raise;

Line 1516: if(engStApprovers(i).action_type_id <> ame_util.nullInsertionActionTypeId and

1512: nullInsertionGroupOrChainId, and one of the input arguments is null, match the most
1513: recently added group or chain.
1514: */
1515: for i in reverse 1 .. engStApproversCount loop
1516: if(engStApprovers(i).action_type_id <> ame_util.nullInsertionActionTypeId and
1517: engStApprovers(i).group_or_chain_id <> ame_util.nullInsertionGroupOrChainId and
1518: engStApprovers(i).item_class is not null and
1519: engStApprovers(i).item_id is not null and
1520: engStApprovers(i).action_type_id is not null and

Line 1517: engStApprovers(i).group_or_chain_id <> ame_util.nullInsertionGroupOrChainId and

1513: recently added group or chain.
1514: */
1515: for i in reverse 1 .. engStApproversCount loop
1516: if(engStApprovers(i).action_type_id <> ame_util.nullInsertionActionTypeId and
1517: engStApprovers(i).group_or_chain_id <> ame_util.nullInsertionGroupOrChainId and
1518: engStApprovers(i).item_class is not null and
1519: engStApprovers(i).item_id is not null and
1520: engStApprovers(i).action_type_id is not null and
1521: engStApprovers(i).group_or_chain_id is not null) then

Line 1566: ame_util.runtimeException(packageNameIn => 'ame_engine',

1562: end loop;
1563: return(occurrence);
1564: exception
1565: when others then
1566: ame_util.runtimeException(packageNameIn => 'ame_engine',
1567: routineNameIn => 'getHandlerOccurrence',
1568: exceptionNumberIn => sqlcode,
1569: exceptionStringIn => sqlerrm);
1570: raise;

Line 1578: ame_util.runtimeException(packageNameIn => 'ame_engine',

1574: begin
1575: return(engAppRuleTypes(engAppHandlerFirstIndex));
1576: exception
1577: when others then
1578: ame_util.runtimeException(packageNameIn => 'ame_engine',
1579: routineNameIn => 'getHandlerRuleType',
1580: exceptionNumberIn => sqlcode,
1581: exceptionStringIn => sqlerrm);
1582: raise;

Line 1606: ame_util.runtimeException(packageNameIn => 'ame_engine',

1602: exception
1603: when no_data_found then
1604: return(null);
1605: when others then
1606: ame_util.runtimeException(packageNameIn => 'ame_engine',
1607: routineNameIn => 'getHandlerState',
1608: exceptionNumberIn => sqlcode,
1609: exceptionStringIn => sqlerrm);
1610: raise;

Line 1614: handlerAuthority ame_util.charType;

1610: raise;
1611: return(null);
1612: end getHandlerState;
1613: function getHandlerSublistOrderNum return integer as
1614: handlerAuthority ame_util.charType;
1615: itemClassSublistMode ame_util.charType;
1616: begin
1617: handlerAuthority := getHandlerAuthority;
1618: itemClassSublistMode := getItemClassSublistMode(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex));

Line 1615: itemClassSublistMode ame_util.charType;

1611: return(null);
1612: end getHandlerState;
1613: function getHandlerSublistOrderNum return integer as
1614: handlerAuthority ame_util.charType;
1615: itemClassSublistMode ame_util.charType;
1616: begin
1617: handlerAuthority := getHandlerAuthority;
1618: itemClassSublistMode := getItemClassSublistMode(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex));
1619: if(itemClassSublistMode = ame_util.serialSublists) then

Line 1619: if(itemClassSublistMode = ame_util.serialSublists) then

1615: itemClassSublistMode ame_util.charType;
1616: begin
1617: handlerAuthority := getHandlerAuthority;
1618: itemClassSublistMode := getItemClassSublistMode(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex));
1619: if(itemClassSublistMode = ame_util.serialSublists) then
1620: if(handlerAuthority = ame_util.preApprover) then
1621: return(1);
1622: elsif(handlerAuthority = ame_util.authorityApprover) then
1623: return(2);

Line 1620: if(handlerAuthority = ame_util.preApprover) then

1616: begin
1617: handlerAuthority := getHandlerAuthority;
1618: itemClassSublistMode := getItemClassSublistMode(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex));
1619: if(itemClassSublistMode = ame_util.serialSublists) then
1620: if(handlerAuthority = ame_util.preApprover) then
1621: return(1);
1622: elsif(handlerAuthority = ame_util.authorityApprover) then
1623: return(2);
1624: else

Line 1622: elsif(handlerAuthority = ame_util.authorityApprover) then

1618: itemClassSublistMode := getItemClassSublistMode(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex));
1619: if(itemClassSublistMode = ame_util.serialSublists) then
1620: if(handlerAuthority = ame_util.preApprover) then
1621: return(1);
1622: elsif(handlerAuthority = ame_util.authorityApprover) then
1623: return(2);
1624: else
1625: return(3);
1626: end if;

Line 1627: elsif(itemClassSublistMode = ame_util.parallelSublists) then

1623: return(2);
1624: else
1625: return(3);
1626: end if;
1627: elsif(itemClassSublistMode = ame_util.parallelSublists) then
1628: return(1);
1629: elsif(itemClassSublistMode = ame_util.preFirst) then
1630: if(handlerAuthority = ame_util.preApprover) then
1631: return(1);

Line 1629: elsif(itemClassSublistMode = ame_util.preFirst) then

1625: return(3);
1626: end if;
1627: elsif(itemClassSublistMode = ame_util.parallelSublists) then
1628: return(1);
1629: elsif(itemClassSublistMode = ame_util.preFirst) then
1630: if(handlerAuthority = ame_util.preApprover) then
1631: return(1);
1632: else
1633: return(2);

Line 1630: if(handlerAuthority = ame_util.preApprover) then

1626: end if;
1627: elsif(itemClassSublistMode = ame_util.parallelSublists) then
1628: return(1);
1629: elsif(itemClassSublistMode = ame_util.preFirst) then
1630: if(handlerAuthority = ame_util.preApprover) then
1631: return(1);
1632: else
1633: return(2);
1634: end if;

Line 1636: if(handlerAuthority = ame_util.postApprover) then

1632: else
1633: return(2);
1634: end if;
1635: else
1636: if(handlerAuthority = ame_util.postApprover) then
1637: return(2);
1638: else
1639: return(1);
1640: end if;

Line 1644: ame_util.runtimeException(packageNameIn => 'ame_engine',

1640: end if;
1641: end if;
1642: exception
1643: when others then
1644: ame_util.runtimeException(packageNameIn => 'ame_engine',
1645: routineNameIn => 'getHandlerSublistOrderNum',
1646: exceptionNumberIn => sqlcode,
1647: exceptionStringIn => sqlerrm);
1648: raise;

Line 1656: ame_util.runtimeException(packageNameIn => 'ame_engine',

1652: begin
1653: return(engAttributeValues1(engAttributeValueIndexes(attributeIdIn)));
1654: exception
1655: when others then
1656: ame_util.runtimeException(packageNameIn => 'ame_engine',
1657: routineNameIn => 'getHeaderAttValue1',
1658: exceptionNumberIn => sqlcode,
1659: exceptionStringIn => sqlerrm);
1660: raise;

Line 1666: tempValue ame_util.attributeValueType;

1662: end getHeaderAttValue1;
1663: function getTestVariantAttValue(attributeIdIn in integer,
1664: itemClassIdIn in integer,
1665: itemIdIn in varchar2) return number as
1666: tempValue ame_util.attributeValueType;
1667: begin
1668: select attribute_value_1 into tempValue from ame_test_trans_att_values
1669: where application_id = engAmeApplicationId
1670: and transaction_id = engTransactionId

Line 1684: and item_class_id = getItemClassId(ame_util.headerItemClassName)

1680: from ame_test_trans_att_values
1681: where application_id = engAmeApplicationId
1682: and transaction_id = engTransactionId
1683: and attribute_id = attributeIdIn
1684: and item_class_id = getItemClassId(ame_util.headerItemClassName)
1685: and item_id = engTransactionId;
1686: return tempValue;
1687: exception
1688: when others then

Line 1689: ame_util.runtimeException(packageNameIn => 'ame_engine',

1685: and item_id = engTransactionId;
1686: return tempValue;
1687: exception
1688: when others then
1689: ame_util.runtimeException(packageNameIn => 'ame_engine',
1690: routineNameIn => 'getTestVariantAttValue',
1691: exceptionNumberIn => sqlcode,
1692: exceptionStringIn => sqlerrm);
1693: raise;

Line 1697: ame_util.runtimeException(packageNameIn => 'ame_engine',

1693: raise;
1694: return(null);
1695: end;
1696: when others then
1697: ame_util.runtimeException(packageNameIn => 'ame_engine',
1698: routineNameIn => 'getTestVariantAttValue',
1699: exceptionNumberIn => sqlcode,
1700: exceptionStringIn => sqlerrm);
1701: raise;

Line 1709: if checkAttributeVariant(attributeId) = ame_util.booleanTrue then

1705: attributeId integer;
1706: begin
1707: if engIsTestTransaction then
1708: attributeId := getAttributeIdByName(attributeNameIn => attributeNameIn);
1709: if checkAttributeVariant(attributeId) = ame_util.booleanTrue then
1710: return getTestVariantAttValue(attributeIdIn => attributeId
1711: ,itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex)
1712: ,itemIdIn => engAppAppItemIds(engAppHandlerFirstIndex));
1713: else

Line 1727: ame_util.runtimeException(packageNameIn => 'ame_engine',

1723: end if;
1724: end if;
1725: exception
1726: when others then
1727: ame_util.runtimeException(packageNameIn => 'ame_engine',
1728: routineNameIn => 'getHeaderAttValue2',
1729: exceptionNumberIn => sqlcode,
1730: exceptionStringIn => sqlerrm);
1731: raise;

Line 1742: ame_util.runtimeException(packageNameIn => 'ame_engine',

1738: getItemOffset(itemClassIdIn => engAttributeItemClassIds(attributeIdIn),
1739: itemIdIn => itemIdIn)));
1740: exception
1741: when others then
1742: ame_util.runtimeException(packageNameIn => 'ame_engine',
1743: routineNameIn => 'getItemAttValue1',
1744: exceptionNumberIn => sqlcode,
1745: exceptionStringIn => sqlerrm);
1746: raise;

Line 1759: ame_util.runtimeException(packageNameIn => 'ame_engine',

1755: getItemOffset(itemClassIdIn => engAttributeItemClassIds(attributeId),
1756: itemIdIn => itemIdIn)));
1757: exception
1758: when others then
1759: ame_util.runtimeException(packageNameIn => 'ame_engine',
1760: routineNameIn => 'getItemAttValue2',
1761: exceptionNumberIn => sqlcode,
1762: exceptionStringIn => sqlerrm);
1763: raise;

Line 1776: ame_util.runtimeException(packageNameIn => 'ame_engine',

1772: end loop;
1773: return(null);
1774: exception
1775: when others then
1776: ame_util.runtimeException(packageNameIn => 'ame_engine',
1777: routineNameIn => 'getItemClassId',
1778: exceptionNumberIn => sqlcode,
1779: exceptionStringIn => sqlerrm);
1780: raise;

Line 1788: ame_util.runtimeException(packageNameIn => 'ame_engine',

1784: begin
1785: return(engItemClassNames(engItemClassIndexes(itemClassIdIn)));
1786: exception
1787: when others then
1788: ame_util.runtimeException(packageNameIn => 'ame_engine',
1789: routineNameIn => 'getItemClassName',
1790: exceptionNumberIn => sqlcode,
1791: exceptionStringIn => sqlerrm);
1792: raise;

Line 1800: ame_util.runtimeException(packageNameIn => 'ame_engine',

1796: begin
1797: return(engItemClassOrderNumbers(engItemClassIndexes(itemClassIdIn)));
1798: exception
1799: when others then
1800: ame_util.runtimeException(packageNameIn => 'ame_engine',
1801: routineNameIn => 'getItemClassOrderNumber',
1802: exceptionNumberIn => sqlcode,
1803: exceptionStringIn => sqlerrm);
1804: raise;

Line 1812: ame_util.runtimeException(packageNameIn => 'ame_engine',

1808: begin
1809: return(engItemClassParModes(engItemClassIndexes(itemClassIdIn)));
1810: exception
1811: when others then
1812: ame_util.runtimeException(packageNameIn => 'ame_engine',
1813: routineNameIn => 'getItemClassParMode',
1814: exceptionNumberIn => sqlcode,
1815: exceptionStringIn => sqlerrm);
1816: raise;

Line 1824: ame_util.runtimeException(packageNameIn => 'ame_engine',

1820: begin
1821: return(engItemClassSublistModes(engItemClassIndexes(itemClassIdIn)));
1822: exception
1823: when others then
1824: ame_util.runtimeException(packageNameIn => 'ame_engine',
1825: routineNameIn => 'getItemClassSublistMode',
1826: exceptionNumberIn => sqlcode,
1827: exceptionStringIn => sqlerrm);
1828: raise;

Line 1834: errorMessage ame_util.longestStringType;

1830: end getItemClassSublistMode;
1831: function getItemIndex(itemClassIdIn in integer,
1832: itemIdIn in varchar2) return integer as
1833: errorCode integer;
1834: errorMessage ame_util.longestStringType;
1835: firstItemIndex integer;
1836: itemClassIndex integer;
1837: noIndexException exception;
1838: begin

Line 1850: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

1846: raise noIndexException;
1847: exception
1848: when noIndexException then
1849: errorCode := -20001;
1850: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
1851: messageNameIn => 'AME_400682_ENG_INV_ITEM_OFFSET');
1852: ame_util.runtimeException(packageNameIn => 'ame_engine',
1853: routineNameIn => 'getItemIndex',
1854: exceptionNumberIn => errorCode,

Line 1852: ame_util.runtimeException(packageNameIn => 'ame_engine',

1848: when noIndexException then
1849: errorCode := -20001;
1850: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
1851: messageNameIn => 'AME_400682_ENG_INV_ITEM_OFFSET');
1852: ame_util.runtimeException(packageNameIn => 'ame_engine',
1853: routineNameIn => 'getItemIndex',
1854: exceptionNumberIn => errorCode,
1855: exceptionStringIn => errorMessage);
1856: raise_application_error(errorCode,

Line 1860: ame_util.runtimeException(packageNameIn => 'ame_engine',

1856: raise_application_error(errorCode,
1857: errorMessage);
1858: return(null);
1859: when others then
1860: ame_util.runtimeException(packageNameIn => 'ame_engine',
1861: routineNameIn => 'getItemIndex',
1862: exceptionNumberIn => sqlcode,
1863: exceptionStringIn => sqlerrm);
1864: raise;

Line 1870: errorMessage ame_util.longestStringType;

1866: end getItemIndex;
1867: function getItemOffset(itemClassIdIn in integer,
1868: itemIdIn in varchar2) return integer as
1869: errorCode integer;
1870: errorMessage ame_util.longestStringType;
1871: firstItemIndex integer;
1872: itemClassIndex integer;
1873: noOffsetException exception;
1874: begin

Line 1886: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

1882: raise noOffsetException;
1883: exception
1884: when noOffsetException then
1885: errorCode := -20001;
1886: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
1887: messageNameIn => 'AME_400682_ENG_INV_ITEM_OFFSET');
1888: ame_util.runtimeException(packageNameIn => 'ame_engine',
1889: routineNameIn => 'getItemOffset',
1890: exceptionNumberIn => errorCode,

Line 1888: ame_util.runtimeException(packageNameIn => 'ame_engine',

1884: when noOffsetException then
1885: errorCode := -20001;
1886: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
1887: messageNameIn => 'AME_400682_ENG_INV_ITEM_OFFSET');
1888: ame_util.runtimeException(packageNameIn => 'ame_engine',
1889: routineNameIn => 'getItemOffset',
1890: exceptionNumberIn => errorCode,
1891: exceptionStringIn => errorMessage);
1892: raise_application_error(errorCode,

Line 1896: ame_util.runtimeException(packageNameIn => 'ame_engine',

1892: raise_application_error(errorCode,
1893: errorMessage);
1894: return(null);
1895: when others then
1896: ame_util.runtimeException(packageNameIn => 'ame_engine',
1897: routineNameIn => 'getItemOffset',
1898: exceptionNumberIn => sqlcode,
1899: exceptionStringIn => sqlerrm);
1900: raise;

Line 1908: if(getItemClassParMode(itemClassIdIn => itemClassId) = ame_util.parallelItems) then

1904: itemIdIn in varchar2) return integer as
1905: itemClassId integer;
1906: begin
1907: itemClassId := getItemClassId(itemClassNameIn => itemClassNameIn);
1908: if(getItemClassParMode(itemClassIdIn => itemClassId) = ame_util.parallelItems) then
1909: return(1);
1910: else /* The parallelization modes is ame_util.serialItems. */
1911: return(1 + getItemOffset(itemClassIdIn => itemClassId,
1912: itemIdIn => itemIdIn));

Line 1910: else /* The parallelization modes is ame_util.serialItems. */

1906: begin
1907: itemClassId := getItemClassId(itemClassNameIn => itemClassNameIn);
1908: if(getItemClassParMode(itemClassIdIn => itemClassId) = ame_util.parallelItems) then
1909: return(1);
1910: else /* The parallelization modes is ame_util.serialItems. */
1911: return(1 + getItemOffset(itemClassIdIn => itemClassId,
1912: itemIdIn => itemIdIn));
1913: end if;
1914: exception

Line 1916: ame_util.runtimeException(packageNameIn => 'ame_engine',

1912: itemIdIn => itemIdIn));
1913: end if;
1914: exception
1915: when others then
1916: ame_util.runtimeException(packageNameIn => 'ame_engine',
1917: routineNameIn => 'getItemOrderNumber',
1918: exceptionNumberIn => sqlcode,
1919: exceptionStringIn => sqlerrm);
1920: raise;

Line 1939: ame_util.runtimeException(packageNameIn => 'ame_engine',

1935: return (maxInsertionOrderNumber + 1);
1936: end if;
1937: exception
1938: when others then
1939: ame_util.runtimeException(packageNameIn => 'ame_engine',
1940: routineNameIn => 'getNextInsertionOrder',
1941: exceptionNumberIn => sqlcode,
1942: exceptionStringIn => sqlerrm);
1943: raise;

Line 1961: ame_util.runtimeException(packageNameIn => 'ame_engine',

1957: end loop;
1958: return(maxOrderNumber + 1);
1959: exception
1960: when others then
1961: ame_util.runtimeException(packageNameIn => 'ame_engine',
1962: routineNameIn => 'getNullActionTypeOrderNumber',
1963: exceptionNumberIn => sqlcode,
1964: exceptionStringIn => sqlerrm);
1965: raise;

Line 1975: elsif (engGroupUseItemBind(groupIdIn) = ame_util.booleanTrue) then

1971: tempIndex := 0; /* pre-increment */
1972: -- Check if group is defined or has to be re run for every item class/item ID
1973: if(not engGroupUseItemBind.exists(groupIdIn)) then
1974: fetchRuntimeGroup(groupIdIn => groupIdIn);
1975: elsif (engGroupUseItemBind(groupIdIn) = ame_util.booleanTrue) then
1976: fetchRuntimeGroup(groupIdIn => groupIdIn);
1977: end if;
1978: /* Group membership must exist in engGroupMemberGroupIds now. */
1979: for i in 1 .. engGroupMemberGroupIds.count loop

Line 1989: ame_util.runtimeException(packageNameIn => 'ame_engine',

1985: end if;
1986: end loop;
1987: exception
1988: when others then
1989: ame_util.runtimeException(packageNameIn => 'ame_engine',
1990: routineNameIn => 'getRuntimeGroupCount',
1991: exceptionNumberIn => sqlcode,
1992: exceptionStringIn => sqlerrm);
1993: raise;

Line 1998: itemClassSublistMode ame_util.charType;

1994: return(null);
1995: end getRuntimeGroupCount;
1996: function getSublistOrderNum(itemClassNameIn in varchar2,
1997: authorityIn in varchar2) return integer as
1998: itemClassSublistMode ame_util.charType;
1999: begin
2000: itemClassSublistMode :=
2001: getItemClassSublistMode(itemClassIdIn => getItemClassId(itemClassNameIn => itemClassNameIn));
2002: if(itemClassSublistMode = ame_util.serialSublists) then

Line 2002: if(itemClassSublistMode = ame_util.serialSublists) then

1998: itemClassSublistMode ame_util.charType;
1999: begin
2000: itemClassSublistMode :=
2001: getItemClassSublistMode(itemClassIdIn => getItemClassId(itemClassNameIn => itemClassNameIn));
2002: if(itemClassSublistMode = ame_util.serialSublists) then
2003: if(authorityIn = ame_util.preApprover) then
2004: return(1);
2005: elsif(authorityIn = ame_util.authorityApprover) then
2006: return(2);

Line 2003: if(authorityIn = ame_util.preApprover) then

1999: begin
2000: itemClassSublistMode :=
2001: getItemClassSublistMode(itemClassIdIn => getItemClassId(itemClassNameIn => itemClassNameIn));
2002: if(itemClassSublistMode = ame_util.serialSublists) then
2003: if(authorityIn = ame_util.preApprover) then
2004: return(1);
2005: elsif(authorityIn = ame_util.authorityApprover) then
2006: return(2);
2007: else

Line 2005: elsif(authorityIn = ame_util.authorityApprover) then

2001: getItemClassSublistMode(itemClassIdIn => getItemClassId(itemClassNameIn => itemClassNameIn));
2002: if(itemClassSublistMode = ame_util.serialSublists) then
2003: if(authorityIn = ame_util.preApprover) then
2004: return(1);
2005: elsif(authorityIn = ame_util.authorityApprover) then
2006: return(2);
2007: else
2008: return(3);
2009: end if;

Line 2010: elsif(itemClassSublistMode = ame_util.parallelSublists) then

2006: return(2);
2007: else
2008: return(3);
2009: end if;
2010: elsif(itemClassSublistMode = ame_util.parallelSublists) then
2011: return(1);
2012: elsif(itemClassSublistMode = ame_util.preFirst) then
2013: if(authorityIn = ame_util.preApprover) then
2014: return(1);

Line 2012: elsif(itemClassSublistMode = ame_util.preFirst) then

2008: return(3);
2009: end if;
2010: elsif(itemClassSublistMode = ame_util.parallelSublists) then
2011: return(1);
2012: elsif(itemClassSublistMode = ame_util.preFirst) then
2013: if(authorityIn = ame_util.preApprover) then
2014: return(1);
2015: else
2016: return(2);

Line 2013: if(authorityIn = ame_util.preApprover) then

2009: end if;
2010: elsif(itemClassSublistMode = ame_util.parallelSublists) then
2011: return(1);
2012: elsif(itemClassSublistMode = ame_util.preFirst) then
2013: if(authorityIn = ame_util.preApprover) then
2014: return(1);
2015: else
2016: return(2);
2017: end if;

Line 2019: if(authorityIn = ame_util.postApprover) then

2015: else
2016: return(2);
2017: end if;
2018: else
2019: if(authorityIn = ame_util.postApprover) then
2020: return(2);
2021: else
2022: return(1);
2023: end if;

Line 2027: ame_util.runtimeException(packageNameIn => 'ame_engine',

2023: end if;
2024: end if;
2025: exception
2026: when others then
2027: ame_util.runtimeException(packageNameIn => 'ame_engine',
2028: routineNameIn => 'getSublistOrderNum',
2029: exceptionNumberIn => sqlcode,
2030: exceptionStringIn => sqlerrm);
2031: raise;

Line 2039: ame_util.runtimeException(packageNameIn => 'ame_engine',

2035: begin
2036: return(engTransactionID);
2037: exception
2038: when others then
2039: ame_util.runtimeException(packageNameIn => 'ame_engine',
2040: routineNameIn => 'getTransactionId',
2041: exceptionNumberIn => sqlcode,
2042: exceptionStringIn => sqlerrm);
2043: raise;

Line 2051: ame_util.runtimeException(packageNameIn => 'ame_engine',

2047: begin
2048: return(engTransactionTypeID);
2049: exception
2050: when others then
2051: ame_util.runtimeException(packageNameIn => 'ame_engine',
2052: routineNameIn => 'getTransactionTypeId',
2053: exceptionNumberIn => sqlcode,
2054: exceptionStringIn => sqlerrm);
2055: raise;

Line 2141: ame_util.runtimeException(packageNameIn => 'ame_engine',

2137: end if;
2138: return(true);
2139: exception
2140: when others then
2141: ame_util.runtimeException(packageNameIn => 'ame_engine',
2142: routineNameIn => 'compareApplicableRules',
2143: exceptionNumberIn => sqlcode,
2144: exceptionStringIn => sqlerrm);
2145: raise;

Line 2151: procedure addApprover(approverIn in ame_util.approverRecord2) as

2147: end compareApplicableRules;
2148: /*************************************************************************************
2149: procedures
2150: *************************************************************************************/
2151: procedure addApprover(approverIn in ame_util.approverRecord2) as
2152: errorCode integer;
2153: errorMessage ame_util.longestStringType;
2154: listTooLongException exception;
2155: nullFieldException exception;

Line 2153: errorMessage ame_util.longestStringType;

2149: procedures
2150: *************************************************************************************/
2151: procedure addApprover(approverIn in ame_util.approverRecord2) as
2152: errorCode integer;
2153: errorMessage ame_util.longestStringType;
2154: listTooLongException exception;
2155: nullFieldException exception;
2156: begin
2157: if(engStApprovers.count > 2500) then

Line 2182: ame_util.copyApproverRecord2(approverRecord2In => approverIn,

2178: approverIn.group_or_chain_order_number is null or
2179: approverIn.member_order_number is null) then
2180: raise nullFieldException;
2181: end if;
2182: ame_util.copyApproverRecord2(approverRecord2In => approverIn,
2183: approverRecord2Out => engStApprovers(engStApprovers.count + 1));
2184: /* Add the approver to the tree whenever he is added to the approver list */
2185: /* Approvers location in list is engStApprovers.count */
2186: /* Add the approver as the last approver among the approvers with same */

Line 2192: ,approverLocationIn => ame_util.lastAmongEquals);

2188: if engPrepareApproverTree then
2189: addApproverToTree
2190: (approverRecordIn => engStApprovers(engStApprovers.count)
2191: ,approverIndexIn => engStApprovers.count
2192: ,approverLocationIn => ame_util.lastAmongEquals);
2193: end if;
2194: exception
2195: when listTooLongException then
2196: errorCode := -20001;

Line 2198: ame_util.getMessage(applicationShortNameIn => 'PER',

2194: exception
2195: when listTooLongException then
2196: errorCode := -20001;
2197: errorMessage :=
2198: ame_util.getMessage(applicationShortNameIn => 'PER',
2199: messageNameIn => 'AME_400118_ENG_LOOP_CHA_AUTH');
2200: ame_util.runtimeException(packageNameIn => 'ame_engine',
2201: routineNameIn => 'addApprover',
2202: exceptionNumberIn => errorCode,

Line 2200: ame_util.runtimeException(packageNameIn => 'ame_engine',

2196: errorCode := -20001;
2197: errorMessage :=
2198: ame_util.getMessage(applicationShortNameIn => 'PER',
2199: messageNameIn => 'AME_400118_ENG_LOOP_CHA_AUTH');
2200: ame_util.runtimeException(packageNameIn => 'ame_engine',
2201: routineNameIn => 'addApprover',
2202: exceptionNumberIn => errorCode,
2203: exceptionStringIn => errorMessage);
2204: raise_application_error(errorCode,

Line 2208: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

2204: raise_application_error(errorCode,
2205: errorMessage);
2206: when nullFieldException then
2207: errorCode := -20001;
2208: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
2209: messageNameIn => 'AME_400683_APPR_REC_INV');
2210: ame_util.runtimeException(packageNameIn => 'ame_engine',
2211: routineNameIn => 'addApprover',
2212: exceptionNumberIn => errorCode,

Line 2210: ame_util.runtimeException(packageNameIn => 'ame_engine',

2206: when nullFieldException then
2207: errorCode := -20001;
2208: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
2209: messageNameIn => 'AME_400683_APPR_REC_INV');
2210: ame_util.runtimeException(packageNameIn => 'ame_engine',
2211: routineNameIn => 'addApprover',
2212: exceptionNumberIn => errorCode,
2213: exceptionStringIn => errorMessage);
2214: raise_application_error(errorCode,

Line 2217: ame_util.runtimeException(packageNameIn => 'ame_engine',

2213: exceptionStringIn => errorMessage);
2214: raise_application_error(errorCode,
2215: errorMessage);
2216: when others then
2217: ame_util.runtimeException(packageNameIn => 'ame_engine',
2218: routineNameIn => 'addApprover',
2219: exceptionNumberIn => sqlcode,
2220: exceptionStringIn => sqlerrm);
2221: raise;

Line 2234: ame_util.runtimeException(packageNameIn => 'ame_engine',

2230: engTempReason := null;
2231: engTempDate := null;
2232: exception
2233: when others then
2234: ame_util.runtimeException(packageNameIn => 'ame_engine',
2235: routineNameIn => 'addApproversTodevList',
2236: exceptionNumberIn => sqlcode,
2237: exceptionStringIn => sqlerrm);
2238: end addApproversTodevList;

Line 2241: (approverRecordIn in ame_util.approverRecord2

2237: exceptionStringIn => sqlerrm);
2238: end addApproversTodevList;
2239: /* This procedure is used to add an approver to the approver tree */
2240: procedure addApproverToTree
2241: (approverRecordIn in ame_util.approverRecord2
2242: ,approverIndexIn in integer
2243: ,approverLocationIn in boolean default ame_util.lastAmongEquals) is
2244: orderNumbers ame_util.idList;
2245: treeLevelIds ame_util.stringList;

Line 2243: ,approverLocationIn in boolean default ame_util.lastAmongEquals) is

2239: /* This procedure is used to add an approver to the approver tree */
2240: procedure addApproverToTree
2241: (approverRecordIn in ame_util.approverRecord2
2242: ,approverIndexIn in integer
2243: ,approverLocationIn in boolean default ame_util.lastAmongEquals) is
2244: orderNumbers ame_util.idList;
2245: treeLevelIds ame_util.stringList;
2246: approverIndexs ame_util.idList;
2247: previousTreeNodeIndex integer;

Line 2244: orderNumbers ame_util.idList;

2240: procedure addApproverToTree
2241: (approverRecordIn in ame_util.approverRecord2
2242: ,approverIndexIn in integer
2243: ,approverLocationIn in boolean default ame_util.lastAmongEquals) is
2244: orderNumbers ame_util.idList;
2245: treeLevelIds ame_util.stringList;
2246: approverIndexs ame_util.idList;
2247: previousTreeNodeIndex integer;
2248: currentTreeNodeIndex integer;

Line 2245: treeLevelIds ame_util.stringList;

2241: (approverRecordIn in ame_util.approverRecord2
2242: ,approverIndexIn in integer
2243: ,approverLocationIn in boolean default ame_util.lastAmongEquals) is
2244: orderNumbers ame_util.idList;
2245: treeLevelIds ame_util.stringList;
2246: approverIndexs ame_util.idList;
2247: previousTreeNodeIndex integer;
2248: currentTreeNodeIndex integer;
2249: newTreeNodeIndex integer;

Line 2246: approverIndexs ame_util.idList;

2242: ,approverIndexIn in integer
2243: ,approverLocationIn in boolean default ame_util.lastAmongEquals) is
2244: orderNumbers ame_util.idList;
2245: treeLevelIds ame_util.stringList;
2246: approverIndexs ame_util.idList;
2247: previousTreeNodeIndex integer;
2248: currentTreeNodeIndex integer;
2249: newTreeNodeIndex integer;
2250: newTreeNode ame_util.approverTreeRecord;

Line 2250: newTreeNode ame_util.approverTreeRecord;

2246: approverIndexs ame_util.idList;
2247: previousTreeNodeIndex integer;
2248: currentTreeNodeIndex integer;
2249: newTreeNodeIndex integer;
2250: newTreeNode ame_util.approverTreeRecord;
2251: currentSiblingTreeNodeIndex integer;
2252: lowerOrderLastSiblingIndex integer;
2253: higherOrderFirstSiblingIndex integer;
2254: sameOrderFirstSiblingIndex integer;

Line 2262: newTreeNode.parent_index := ame_util.noParentIndex;

2258: /* Initialise the tree with the transaction level node if the tree */
2259: /* is not yet built.The tree level node will have min_order of 1 */
2260: /* which is the minimum allowed approver order number */
2261: if engStApproversTree.count = 0 then
2262: newTreeNode.parent_index := ame_util.noParentIndex;
2263: newTreeNode.child_index := ame_util.noChildIndex;
2264: newTreeNode.sibling_index := ame_util.noSiblingIndex;
2265: newTreeNode.approver_index := ame_util.noApproverIndex;
2266: newTreeNode.tree_level_id := -1;

Line 2263: newTreeNode.child_index := ame_util.noChildIndex;

2259: /* is not yet built.The tree level node will have min_order of 1 */
2260: /* which is the minimum allowed approver order number */
2261: if engStApproversTree.count = 0 then
2262: newTreeNode.parent_index := ame_util.noParentIndex;
2263: newTreeNode.child_index := ame_util.noChildIndex;
2264: newTreeNode.sibling_index := ame_util.noSiblingIndex;
2265: newTreeNode.approver_index := ame_util.noApproverIndex;
2266: newTreeNode.tree_level_id := -1;
2267: newTreeNode.order_number := -1;

Line 2264: newTreeNode.sibling_index := ame_util.noSiblingIndex;

2260: /* which is the minimum allowed approver order number */
2261: if engStApproversTree.count = 0 then
2262: newTreeNode.parent_index := ame_util.noParentIndex;
2263: newTreeNode.child_index := ame_util.noChildIndex;
2264: newTreeNode.sibling_index := ame_util.noSiblingIndex;
2265: newTreeNode.approver_index := ame_util.noApproverIndex;
2266: newTreeNode.tree_level_id := -1;
2267: newTreeNode.order_number := -1;
2268: newTreeNode.min_order := ame_util.minimumApproverOrderNumber;

Line 2265: newTreeNode.approver_index := ame_util.noApproverIndex;

2261: if engStApproversTree.count = 0 then
2262: newTreeNode.parent_index := ame_util.noParentIndex;
2263: newTreeNode.child_index := ame_util.noChildIndex;
2264: newTreeNode.sibling_index := ame_util.noSiblingIndex;
2265: newTreeNode.approver_index := ame_util.noApproverIndex;
2266: newTreeNode.tree_level_id := -1;
2267: newTreeNode.order_number := -1;
2268: newTreeNode.min_order := ame_util.minimumApproverOrderNumber;
2269: newTreeNode.is_suspended := ame_util.booleanFalse;

Line 2268: newTreeNode.min_order := ame_util.minimumApproverOrderNumber;

2264: newTreeNode.sibling_index := ame_util.noSiblingIndex;
2265: newTreeNode.approver_index := ame_util.noApproverIndex;
2266: newTreeNode.tree_level_id := -1;
2267: newTreeNode.order_number := -1;
2268: newTreeNode.min_order := ame_util.minimumApproverOrderNumber;
2269: newTreeNode.is_suspended := ame_util.booleanFalse;
2270: -- newTreeNode.repeated_index := -1;
2271: newTreeNode.tree_level := 0;
2272: engStApproversTree(1) := newTreeNode;

Line 2269: newTreeNode.is_suspended := ame_util.booleanFalse;

2265: newTreeNode.approver_index := ame_util.noApproverIndex;
2266: newTreeNode.tree_level_id := -1;
2267: newTreeNode.order_number := -1;
2268: newTreeNode.min_order := ame_util.minimumApproverOrderNumber;
2269: newTreeNode.is_suspended := ame_util.booleanFalse;
2270: -- newTreeNode.repeated_index := -1;
2271: newTreeNode.tree_level := 0;
2272: engStApproversTree(1) := newTreeNode;
2273: end if;

Line 2288: approverIndexs(1) := ame_util.noApproverIndex;

2284: treeLevelIds(3) := approverRecordIn.authority;
2285: treeLevelIds(4) := to_char(approverRecordIn.action_type_id);
2286: treeLevelIds(5) := to_char(approverRecordIn.group_or_chain_id);
2287: treeLevelIds(6) := approverRecordIn.name;
2288: approverIndexs(1) := ame_util.noApproverIndex;
2289: approverIndexs(2) := ame_util.noApproverIndex;
2290: approverIndexs(3) := ame_util.noApproverIndex;
2291: approverIndexs(4) := ame_util.noApproverIndex;
2292: approverIndexs(5) := ame_util.noApproverIndex;

Line 2289: approverIndexs(2) := ame_util.noApproverIndex;

2285: treeLevelIds(4) := to_char(approverRecordIn.action_type_id);
2286: treeLevelIds(5) := to_char(approverRecordIn.group_or_chain_id);
2287: treeLevelIds(6) := approverRecordIn.name;
2288: approverIndexs(1) := ame_util.noApproverIndex;
2289: approverIndexs(2) := ame_util.noApproverIndex;
2290: approverIndexs(3) := ame_util.noApproverIndex;
2291: approverIndexs(4) := ame_util.noApproverIndex;
2292: approverIndexs(5) := ame_util.noApproverIndex;
2293: approverIndexs(6) := approverIndexIn;

Line 2290: approverIndexs(3) := ame_util.noApproverIndex;

2286: treeLevelIds(5) := to_char(approverRecordIn.group_or_chain_id);
2287: treeLevelIds(6) := approverRecordIn.name;
2288: approverIndexs(1) := ame_util.noApproverIndex;
2289: approverIndexs(2) := ame_util.noApproverIndex;
2290: approverIndexs(3) := ame_util.noApproverIndex;
2291: approverIndexs(4) := ame_util.noApproverIndex;
2292: approverIndexs(5) := ame_util.noApproverIndex;
2293: approverIndexs(6) := approverIndexIn;
2294: /* Starting with the transaction node traverse the tree through the */

Line 2291: approverIndexs(4) := ame_util.noApproverIndex;

2287: treeLevelIds(6) := approverRecordIn.name;
2288: approverIndexs(1) := ame_util.noApproverIndex;
2289: approverIndexs(2) := ame_util.noApproverIndex;
2290: approverIndexs(3) := ame_util.noApproverIndex;
2291: approverIndexs(4) := ame_util.noApproverIndex;
2292: approverIndexs(5) := ame_util.noApproverIndex;
2293: approverIndexs(6) := approverIndexIn;
2294: /* Starting with the transaction node traverse the tree through the */
2295: /* item class,item,sublist,action type,group or chain and finally */

Line 2292: approverIndexs(5) := ame_util.noApproverIndex;

2288: approverIndexs(1) := ame_util.noApproverIndex;
2289: approverIndexs(2) := ame_util.noApproverIndex;
2290: approverIndexs(3) := ame_util.noApproverIndex;
2291: approverIndexs(4) := ame_util.noApproverIndex;
2292: approverIndexs(5) := ame_util.noApproverIndex;
2293: approverIndexs(6) := approverIndexIn;
2294: /* Starting with the transaction node traverse the tree through the */
2295: /* item class,item,sublist,action type,group or chain and finally */
2296: /* insert the approver into the tree.In the way if any of other nodes */

Line 2301: = ame_util.noChildIndex then

2297: /* are missing create them. */
2298: previousTreeNodeIndex := 1;
2299: for i in 1 .. 6 loop
2300: if engStApproversTree(previousTreeNodeIndex).child_index
2301: = ame_util.noChildIndex then
2302: newTreeNode.parent_index := previousTreeNodeIndex;
2303: newTreeNode.sibling_index := ame_util.noSiblingIndex;
2304: newTreeNode.child_index := ame_util.noChildIndex;
2305: newTreeNode.approver_index := approverIndexs(i);

Line 2303: newTreeNode.sibling_index := ame_util.noSiblingIndex;

2299: for i in 1 .. 6 loop
2300: if engStApproversTree(previousTreeNodeIndex).child_index
2301: = ame_util.noChildIndex then
2302: newTreeNode.parent_index := previousTreeNodeIndex;
2303: newTreeNode.sibling_index := ame_util.noSiblingIndex;
2304: newTreeNode.child_index := ame_util.noChildIndex;
2305: newTreeNode.approver_index := approverIndexs(i);
2306: newTreeNode.tree_level_id := treeLevelIds(i);
2307: newTreeNode.order_number := orderNumbers(i);

Line 2304: newTreeNode.child_index := ame_util.noChildIndex;

2300: if engStApproversTree(previousTreeNodeIndex).child_index
2301: = ame_util.noChildIndex then
2302: newTreeNode.parent_index := previousTreeNodeIndex;
2303: newTreeNode.sibling_index := ame_util.noSiblingIndex;
2304: newTreeNode.child_index := ame_util.noChildIndex;
2305: newTreeNode.approver_index := approverIndexs(i);
2306: newTreeNode.tree_level_id := treeLevelIds(i);
2307: newTreeNode.order_number := orderNumbers(i);
2308: newTreeNode.is_suspended := ame_util.booleanFalse;

Line 2308: newTreeNode.is_suspended := ame_util.booleanFalse;

2304: newTreeNode.child_index := ame_util.noChildIndex;
2305: newTreeNode.approver_index := approverIndexs(i);
2306: newTreeNode.tree_level_id := treeLevelIds(i);
2307: newTreeNode.order_number := orderNumbers(i);
2308: newTreeNode.is_suspended := ame_util.booleanFalse;
2309: newTreeNode.tree_level := i;
2310: newTreeNodeIndex := engStApproversTree.last + 1;
2311: engStApproversTree(newTreeNodeIndex) := newTreeNode;
2312: engStApproversTree(previousTreeNodeIndex).child_index := newTreeNodeIndex;

Line 2347: exit when currentSiblingTreeNodeIndex = ame_util.noSiblingIndex;

2343: end if;
2344: end if;
2345: currentSiblingTreeNodeIndex
2346: := engStApproversTree(currentSiblingTreeNodeIndex).sibling_index;
2347: exit when currentSiblingTreeNodeIndex = ame_util.noSiblingIndex;
2348: end loop;
2349: if not currentTreeNodeFound then
2350: if approverLocationIn then
2351: /* approverLocationIn is ame_util.firstAmongEquals */

Line 2351: /* approverLocationIn is ame_util.firstAmongEquals */

2347: exit when currentSiblingTreeNodeIndex = ame_util.noSiblingIndex;
2348: end loop;
2349: if not currentTreeNodeFound then
2350: if approverLocationIn then
2351: /* approverLocationIn is ame_util.firstAmongEquals */
2352: newTreeNode.parent_index := previousTreeNodeIndex;
2353: if sameOrderFirstSiblingIndex = -1 then
2354: newTreeNode.sibling_index := higherOrderFirstSiblingIndex;
2355: else

Line 2358: newTreeNode.child_index := ame_util.noChildIndex;

2354: newTreeNode.sibling_index := higherOrderFirstSiblingIndex;
2355: else
2356: newTreeNode.sibling_index := sameOrderFirstSiblingIndex;
2357: end if;
2358: newTreeNode.child_index := ame_util.noChildIndex;
2359: newTreeNode.approver_index := approverIndexs(i);
2360: newTreeNode.tree_level_id := treeLevelIds(i);
2361: newTreeNode.order_number := orderNumbers(i);
2362: newTreeNode.is_suspended := ame_util.booleanFalse;

Line 2362: newTreeNode.is_suspended := ame_util.booleanFalse;

2358: newTreeNode.child_index := ame_util.noChildIndex;
2359: newTreeNode.approver_index := approverIndexs(i);
2360: newTreeNode.tree_level_id := treeLevelIds(i);
2361: newTreeNode.order_number := orderNumbers(i);
2362: newTreeNode.is_suspended := ame_util.booleanFalse;
2363: newTreeNode.tree_level := i;
2364: newTreeNodeIndex := engStApproversTree.last + 1;
2365: engStApproversTree(newTreeNodeIndex) := newTreeNode;
2366: if lowerOrderLastSiblingIndex = -1 then

Line 2373: /* approverLocationIn is ame_util.lastAmongEquals */

2369: engStApproversTree(lowerOrderLastSiblingIndex).sibling_index := newTreeNodeIndex;
2370: end if;
2371: currentTreeNodeIndex := newTreeNodeIndex;
2372: else
2373: /* approverLocationIn is ame_util.lastAmongEquals */
2374: newTreeNode.parent_index := previousTreeNodeIndex;
2375: newTreeNode.sibling_index := higherOrderFirstSiblingIndex;
2376: newTreeNode.child_index := ame_util.noChildIndex;
2377: newTreeNode.approver_index := approverIndexs(i);

Line 2376: newTreeNode.child_index := ame_util.noChildIndex;

2372: else
2373: /* approverLocationIn is ame_util.lastAmongEquals */
2374: newTreeNode.parent_index := previousTreeNodeIndex;
2375: newTreeNode.sibling_index := higherOrderFirstSiblingIndex;
2376: newTreeNode.child_index := ame_util.noChildIndex;
2377: newTreeNode.approver_index := approverIndexs(i);
2378: newTreeNode.tree_level_id := treeLevelIds(i);
2379: newTreeNode.order_number := orderNumbers(i);
2380: newTreeNode.is_suspended := ame_util.booleanFalse;

Line 2380: newTreeNode.is_suspended := ame_util.booleanFalse;

2376: newTreeNode.child_index := ame_util.noChildIndex;
2377: newTreeNode.approver_index := approverIndexs(i);
2378: newTreeNode.tree_level_id := treeLevelIds(i);
2379: newTreeNode.order_number := orderNumbers(i);
2380: newTreeNode.is_suspended := ame_util.booleanFalse;
2381: newTreeNode.tree_level := i;
2382: newTreeNodeIndex := engStApproversTree.last + 1;
2383: engStApproversTree(newTreeNodeIndex) := newTreeNode;
2384: if sameOrderLastSiblingIndex = -1 and lowerOrderLastSiblingIndex = -1 then

Line 2400: ame_util.runtimeException(packageNameIn => 'ame_engine',

2396: end loop;
2397: addApproversTodevList(approverRecordIndexIn => approverIndexIn);
2398: exception
2399: when others then
2400: ame_util.runtimeException(packageNameIn => 'ame_engine',
2401: routineNameIn => 'addApproverToTree',
2402: exceptionNumberIn => sqlcode,
2403: exceptionStringIn => sqlerrm);
2404: raise;

Line 2410: stoppingRule ame_util.stringType;

2406: procedure calculateApproverOrderNumbers as
2407: maximumApproverOrderNumber integer;
2408: transactionApprovalStatus integer;
2409: transactionhasSuspendedItems boolean;
2410: stoppingRule ame_util.stringType;
2411: headerItemRejected boolean;
2412: loopIndex integer;
2413: begin
2414: /* The call to finalizeTree does the following */

Line 2428: (attributeNameIn => ame_util.rejectionResponseAttribute);

2424: ,rejectedItemsExistOut => transactionhasSuspendedItems);
2425: engStApproversTree(1).status := transactionApprovalStatus;
2426: engStApproversTree(1).max_order := maximumApproverOrderNumber;
2427: stoppingRule := ame_engine.getHeaderAttValue2
2428: (attributeNameIn => ame_util.rejectionResponseAttribute);
2429: if transactionhasSuspendedItems then
2430: /* Check if any of the suspended item is a header item */
2431: /* If a header item is suspended then it is as good as */
2432: /* the entire transaction being suspended */

Line 2435: if engStSuspendedItemClasses(i) = ame_util.headerItemClassName then

2431: /* If a header item is suspended then it is as good as */
2432: /* the entire transaction being suspended */
2433: headerItemRejected := false;
2434: for i in 1 .. engStSuspendedItemClasses.count loop
2435: if engStSuspendedItemClasses(i) = ame_util.headerItemClassName then
2436: headerItemRejected := true;
2437: exit;
2438: end if;
2439: end loop;

Line 2440: if stoppingRule = ame_util.stopAllItems or headerItemRejected then

2436: headerItemRejected := true;
2437: exit;
2438: end if;
2439: end loop;
2440: if stoppingRule = ame_util.stopAllItems or headerItemRejected then
2441: /* Suspend the transaction node */
2442: engStApproversTree(1).is_suspended := ame_util.booleanTrue;
2443: elsif stoppingRule = ame_util.continueAllOtherItems then
2444: /* Suspend all items in the suspended items list */

Line 2442: engStApproversTree(1).is_suspended := ame_util.booleanTrue;

2438: end if;
2439: end loop;
2440: if stoppingRule = ame_util.stopAllItems or headerItemRejected then
2441: /* Suspend the transaction node */
2442: engStApproversTree(1).is_suspended := ame_util.booleanTrue;
2443: elsif stoppingRule = ame_util.continueAllOtherItems then
2444: /* Suspend all items in the suspended items list */
2445: for i in 1 .. engStSuspendedItems.count loop
2446: /* Approvers Tree can be sparse */

Line 2443: elsif stoppingRule = ame_util.continueAllOtherItems then

2439: end loop;
2440: if stoppingRule = ame_util.stopAllItems or headerItemRejected then
2441: /* Suspend the transaction node */
2442: engStApproversTree(1).is_suspended := ame_util.booleanTrue;
2443: elsif stoppingRule = ame_util.continueAllOtherItems then
2444: /* Suspend all items in the suspended items list */
2445: for i in 1 .. engStSuspendedItems.count loop
2446: /* Approvers Tree can be sparse */
2447: loopIndex := engStApproversTree.first;

Line 2453: engStApproversTree(loopIndex).is_suspended := ame_util.booleanTrue;

2449: if(engStApproversTree(loopIndex).tree_level = 2 and
2450: engStApproversTree(loopIndex).tree_level_id = engStSuspendedItems(i) and
2451: engStApproversTree(engStApproversTree(loopIndex).parent_index).tree_level_id
2452: = engStSuspendedItemClasses(i)) then
2453: engStApproversTree(loopIndex).is_suspended := ame_util.booleanTrue;
2454: exit;
2455: end if;
2456: exit when loopIndex = engStApproversTree.last;
2457: loopIndex := engStApproversTree.next(loopIndex);

Line 2460: elsif stoppingRule = ame_util.continueOtherSubItems then

2456: exit when loopIndex = engStApproversTree.last;
2457: loopIndex := engStApproversTree.next(loopIndex);
2458: end loop;
2459: end loop;
2460: elsif stoppingRule = ame_util.continueOtherSubItems then
2461: /* Suspend all items in the suspended items list and header item */
2462: for i in 1 .. engStSuspendedItems.count loop
2463: /* Approvers Tree can be sparse */
2464: loopIndex := engStApproversTree.first;

Line 2472: = ame_util.headerItemClassName))) then

2468: engStApproversTree(engStApproversTree(loopIndex).parent_index).tree_level_id
2469: = engStSuspendedItemClasses(i))
2470: or
2471: (engStApproversTree(engStApproversTree(loopIndex).parent_index).tree_level_id
2472: = ame_util.headerItemClassName))) then
2473: engStApproversTree(loopIndex).is_suspended := ame_util.booleanTrue;
2474: end if;
2475: exit when loopIndex = engStApproversTree.last;
2476: loopIndex := engStApproversTree.next(loopIndex);

Line 2473: engStApproversTree(loopIndex).is_suspended := ame_util.booleanTrue;

2469: = engStSuspendedItemClasses(i))
2470: or
2471: (engStApproversTree(engStApproversTree(loopIndex).parent_index).tree_level_id
2472: = ame_util.headerItemClassName))) then
2473: engStApproversTree(loopIndex).is_suspended := ame_util.booleanTrue;
2474: end if;
2475: exit when loopIndex = engStApproversTree.last;
2476: loopIndex := engStApproversTree.next(loopIndex);
2477: end loop;

Line 2483: ame_util.runtimeException(packageNameIn => 'ame_engine',

2479: end if;
2480: end if;
2481: exception
2482: when others then
2483: ame_util.runtimeException(packageNameIn => 'ame_engine',
2484: routineNameIn => 'calculateApproverOrderNumbers',
2485: exceptionNumberIn => sqlcode,
2486: exceptionStringIn => sqlerrm);
2487: raise;

Line 2492: procedure checkApprover(approverIn in ame_util.approverRecord2) is

2488: end calculateApproverOrderNumbers;
2489: --+
2490: --+ check Approver
2491: --+
2492: procedure checkApprover(approverIn in ame_util.approverRecord2) is
2493: errorCode integer;
2494: errorMessage ame_util.longestStringType;
2495: tempApproverTypeCount integer;
2496: tempApproverType ame_approver_types.orig_system%type;

Line 2494: errorMessage ame_util.longestStringType;

2490: --+ check Approver
2491: --+
2492: procedure checkApprover(approverIn in ame_util.approverRecord2) is
2493: errorCode integer;
2494: errorMessage ame_util.longestStringType;
2495: tempApproverTypeCount integer;
2496: tempApproverType ame_approver_types.orig_system%type;
2497: invalidApproverException1 exception;
2498: invalidApproverException2 exception;

Line 2504: if getConfigVarValue(ame_util.allowAllApproverTypesConfigVar) = ame_util.yes then

2500: tempApproverType := approverIn.orig_system;
2501: if tempApproverType like 'FND_RESP%' then
2502: return;
2503: end if;
2504: if getConfigVarValue(ame_util.allowAllApproverTypesConfigVar) = ame_util.yes then
2505: select count(*)
2506: into tempApproverTypeCount
2507: from ame_approver_types
2508: where orig_system = approverIn.orig_system

Line 2514: if(tempApproverType in (ame_util.perOrigSystem

2510: if tempApproverTypeCount = 0 then
2511: raise invalidApproverException1;
2512: end if;
2513: else
2514: if(tempApproverType in (ame_util.perOrigSystem
2515: ,ame_util.fndUserOrigSystem )) then
2516: null;
2517: else
2518: raise invalidApproverException2;

Line 2515: ,ame_util.fndUserOrigSystem )) then

2511: raise invalidApproverException1;
2512: end if;
2513: else
2514: if(tempApproverType in (ame_util.perOrigSystem
2515: ,ame_util.fndUserOrigSystem )) then
2516: null;
2517: else
2518: raise invalidApproverException2;
2519: end if;

Line 2529: ame_util.runtimeException(packageNameIn => 'ame_engine',

2525: ||approverIn.display_name
2526: ||' belongs to approver type '
2527: ||approverIn.orig_system
2528: ||' which is not registered in AME.';
2529: ame_util.runtimeException(packageNameIn => 'ame_engine',
2530: routineNameIn => 'checkApprover',
2531: exceptionNumberIn => errorCode,
2532: exceptionStringIn => errorMessage);
2533: raise_application_error(errorCode,

Line 2542: ame_util.runtimeException(packageNameIn => 'ame_engine',

2538: ||approverIn.display_name
2539: ||' belongs to approver type '
2540: ||approverIn.orig_system
2541: ||'. And the allowAllApproverTypes configuration variable set to No.';
2542: ame_util.runtimeException(packageNameIn => 'ame_engine',
2543: routineNameIn => 'checkApprover',
2544: exceptionNumberIn => errorCode,
2545: exceptionStringIn => errorMessage);
2546: raise_application_error(errorCode,

Line 2564: ame_util.runtimeException(packageNameIn => 'ame_engine',

2560: ((parameter is null and parameterIn is null) or
2561: (parameter = parameterIn));
2562: exception
2563: when others then
2564: ame_util.runtimeException(packageNameIn => 'ame_engine',
2565: routineNameIn => 'clearHandlerState',
2566: exceptionNumberIn => sqlcode,
2567: exceptionStringIn => sqlerrm);
2568: raise;

Line 2631: ame_util.runtimeException(packageNameIn => 'ame_engine',

2627: engAppParameterTwos.delete(tempFirstIndex, tempLastIndex);
2628: end if;
2629: exception
2630: when others then
2631: ame_util.runtimeException(packageNameIn => 'ame_engine',
2632: routineNameIn => 'compactEngAppLists',
2633: exceptionNumberIn => sqlcode,
2634: exceptionStringIn => sqlerrm);
2635: raise;

Line 2639: currentACUsageConditionIds ame_util.idList;

2635: raise;
2636: end compactEngAppLists;
2637: procedure doPerItemRuleEvaluation(itemClassIdIn in integer,
2638: itemIndexIn in varchar2) as
2639: currentACUsageConditionIds ame_util.idList;
2640: currentACUsageRuleIds ame_util.idList;
2641: currentConditionRuleCounts ame_util.idList;
2642: tempConditionId integer;
2643: tempConditionId2 integer;

Line 2640: currentACUsageRuleIds ame_util.idList;

2636: end compactEngAppLists;
2637: procedure doPerItemRuleEvaluation(itemClassIdIn in integer,
2638: itemIndexIn in varchar2) as
2639: currentACUsageConditionIds ame_util.idList;
2640: currentACUsageRuleIds ame_util.idList;
2641: currentConditionRuleCounts ame_util.idList;
2642: tempConditionId integer;
2643: tempConditionId2 integer;
2644: tempHighestRuleCount integer;

Line 2641: currentConditionRuleCounts ame_util.idList;

2637: procedure doPerItemRuleEvaluation(itemClassIdIn in integer,
2638: itemIndexIn in varchar2) as
2639: currentACUsageConditionIds ame_util.idList;
2640: currentACUsageRuleIds ame_util.idList;
2641: currentConditionRuleCounts ame_util.idList;
2642: tempConditionId integer;
2643: tempConditionId2 integer;
2644: tempHighestRuleCount integer;
2645: tempIndex integer;

Line 2648: tempPendingRuleIds ame_util.idList;

2644: tempHighestRuleCount integer;
2645: tempIndex integer;
2646: tempIndex2 integer;
2647: tempIndex3 integer;
2648: tempPendingRuleIds ame_util.idList;
2649: tempRuleApplies boolean;
2650: tempRuleId integer;
2651: begin
2652: /* Handle the null case (no active conditions) first. */

Line 2762: engRuleAppliedYN(tempIndex2) := ame_util.booleanTrue;

2758: tempIndex2 := engAppRuleIds.count + 1;
2759: tempRuleId := tempPendingRuleIds(pendingRuleIndex);
2760: engAppRuleIds(tempIndex2) := tempRuleId;
2761: engAppRuleTypes(tempIndex2) := engACUsageRuleTypes(tempRuleId);
2762: engRuleAppliedYN(tempIndex2) := ame_util.booleanTrue;
2763: engAppPriorities(tempIndex2) := engACUsageRulePriorities(tempRuleId);
2764: engAppApproverCategories(tempIndex2) := engACUsageRuleApprCategories(tempRuleId);
2765: engAppItemClassIds(tempIndex2) := itemClassIdIn;
2766: engAppItemIds(tempIndex2) := engItemIds(itemIndexIn);

Line 2814: ame_util.runtimeException(packageNameIn => 'ame_engine',

2810: end if;
2811: end loop;
2812: exception
2813: when others then
2814: ame_util.runtimeException(packageNameIn => 'ame_engine',
2815: routineNameIn => 'doPerItemRuleEvaluation',
2816: exceptionNumberIn => sqlcode,
2817: exceptionStringIn => sqlerrm);
2818: raise;

Line 2822: currentACUsageConditionIds ame_util.idList;

2818: raise;
2819: end doPerItemRuleEvaluation;
2820: procedure doStrictHeaderRuleEvaluation(itemClassIndexIn in integer,
2821: itemClassIdIn in integer) as
2822: currentACUsageConditionIds ame_util.idList;
2823: currentACUsageRuleIds ame_util.idList;
2824: headerItemIndex integer;
2825: tempFirstRuleIndex integer;
2826: tempLastRuleIndex integer;

Line 2823: currentACUsageRuleIds ame_util.idList;

2819: end doPerItemRuleEvaluation;
2820: procedure doStrictHeaderRuleEvaluation(itemClassIndexIn in integer,
2821: itemClassIdIn in integer) as
2822: currentACUsageConditionIds ame_util.idList;
2823: currentACUsageRuleIds ame_util.idList;
2824: headerItemIndex integer;
2825: tempFirstRuleIndex integer;
2826: tempLastRuleIndex integer;
2827: tempIndex integer;

Line 2831: tempItemId ame_util.stringType;

2827: tempIndex integer;
2828: tempIndex2 integer;
2829: tempItemClassId integer;
2830: tempItemClassIndex integer;
2831: tempItemId ame_util.stringType;
2832: tempLowerLimit integer;
2833: tempRuleApplies boolean;
2834: tempRuleId integer;
2835: tempRuleId2 integer;

Line 2953: engRuleAppliedYN(tempIndex2) := ame_util.booleanTrue;

2949: tempIndex2 := engAppRuleIds.count + 1;
2950: tempRuleId2 := currentACUsageRuleIds(tempFirstRuleIndex);
2951: engAppRuleIds(tempIndex2) := tempRuleId2;
2952: engAppRuleTypes(tempIndex2) := engACUsageRuleTypes(tempRuleId2);
2953: engRuleAppliedYN(tempIndex2) := ame_util.booleanTrue;
2954: engAppPriorities(tempIndex2) := engACUsageRulePriorities(tempRuleId2);
2955: engAppApproverCategories(tempIndex2) := engACUsageRuleApprCategories(tempRuleId2);
2956: /* These two variables indicate which item satisfied the rule. */
2957: engAppItemClassIds(tempIndex2) := tempItemClassId;

Line 2972: ame_util.runtimeException(packageNameIn => 'ame_engine',

2968: end if;
2969: end loop;
2970: exception
2971: when others then
2972: ame_util.runtimeException(packageNameIn => 'ame_engine',
2973: routineNameIn => 'doStrictHeaderRuleEvaluation',
2974: exceptionNumberIn => sqlcode,
2975: exceptionStringIn => sqlerrm);
2976: raise;

Line 2980: currentACUsageConditionIds ame_util.idList;

2976: raise;
2977: end doStrictHeaderRuleEvaluation;
2978: procedure doWeakHeaderRuleEvaluation(itemClassIndexIn in integer,
2979: itemClassIdIn in integer) as
2980: currentACUsageConditionIds ame_util.idList;
2981: currentACUsageRuleIds ame_util.idList;
2982: currentConditionRuleCounts ame_util.idList;
2983: tempAttributeItemClassIndex integer;
2984: tempConditionId integer;

Line 2981: currentACUsageRuleIds ame_util.idList;

2977: end doStrictHeaderRuleEvaluation;
2978: procedure doWeakHeaderRuleEvaluation(itemClassIndexIn in integer,
2979: itemClassIdIn in integer) as
2980: currentACUsageConditionIds ame_util.idList;
2981: currentACUsageRuleIds ame_util.idList;
2982: currentConditionRuleCounts ame_util.idList;
2983: tempAttributeItemClassIndex integer;
2984: tempConditionId integer;
2985: tempConditionId2 integer;

Line 2982: currentConditionRuleCounts ame_util.idList;

2978: procedure doWeakHeaderRuleEvaluation(itemClassIndexIn in integer,
2979: itemClassIdIn in integer) as
2980: currentACUsageConditionIds ame_util.idList;
2981: currentACUsageRuleIds ame_util.idList;
2982: currentConditionRuleCounts ame_util.idList;
2983: tempAttributeItemClassIndex integer;
2984: tempConditionId integer;
2985: tempConditionId2 integer;
2986: tempConditionIsSatisfied boolean;

Line 2992: tempPendingRuleIds ame_util.idList;

2988: tempIndex integer;
2989: tempIndex2 integer;
2990: tempIndex3 integer;
2991: tempLowerLimit integer;
2992: tempPendingRuleIds ame_util.idList;
2993: tempRuleApplies boolean;
2994: tempRuleId integer;
2995: tempUpperLimit integer;
2996: begin

Line 3126: engRuleAppliedYN(tempIndex2) := ame_util.booleanTrue;

3122: tempIndex2 := engAppRuleIds.count + 1;
3123: tempRuleId := tempPendingRuleIds(pendingRuleIndex);
3124: engAppRuleIds(tempIndex2) := tempRuleId;
3125: engAppRuleTypes(tempIndex2) := engACUsageRuleTypes(tempRuleId);
3126: engRuleAppliedYN(tempIndex2) := ame_util.booleanTrue;
3127: engAppPriorities(tempIndex2) := engACUsageRulePriorities(tempRuleId);
3128: engAppApproverCategories(tempIndex2) := engACUsageRuleApprCategories(tempRuleId);
3129: engAppItemClassIds(tempIndex2) := itemClassIdIn;
3130: engAppItemIds(tempIndex2) := engTransactionId;

Line 3172: ame_util.runtimeException(packageNameIn => 'ame_engine',

3168: end if;
3169: end loop;
3170: exception
3171: when others then
3172: ame_util.runtimeException(packageNameIn => 'ame_engine',
3173: routineNameIn => 'doWeakHeaderRuleEvaluation',
3174: exceptionNumberIn => sqlcode,
3175: exceptionStringIn => sqlerrm);
3176: raise;

Line 3218: (processPrioritiesIn = ame_util.booleanFalse or

3214: ame_rules.rule_id = ame_rule_usages.rule_id and
3215: ame_rule_usages.item_id = engAmeApplicationId and
3216: nvl(ame_rules.item_class_id, headerItemClassIdIn) = ame_item_class_usages.item_class_id and
3217: ame_item_class_usages.application_id = engAmeApplicationId and
3218: (processPrioritiesIn = ame_util.booleanFalse or
3219: (ame_rules.rule_type = ame_util.combinationRuleType and
3220: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3221: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3222: (ame_rules.rule_type = ame_util.authorityRuleType and

Line 3219: (ame_rules.rule_type = ame_util.combinationRuleType and

3215: ame_rule_usages.item_id = engAmeApplicationId and
3216: nvl(ame_rules.item_class_id, headerItemClassIdIn) = ame_item_class_usages.item_class_id and
3217: ame_item_class_usages.application_id = engAmeApplicationId and
3218: (processPrioritiesIn = ame_util.booleanFalse or
3219: (ame_rules.rule_type = ame_util.combinationRuleType and
3220: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3221: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3222: (ame_rules.rule_type = ame_util.authorityRuleType and
3223: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3220: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or

3216: nvl(ame_rules.item_class_id, headerItemClassIdIn) = ame_item_class_usages.item_class_id and
3217: ame_item_class_usages.application_id = engAmeApplicationId and
3218: (processPrioritiesIn = ame_util.booleanFalse or
3219: (ame_rules.rule_type = ame_util.combinationRuleType and
3220: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3221: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3222: (ame_rules.rule_type = ame_util.authorityRuleType and
3223: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3224: authorityRuleThresholdIn >= ame_rule_usages.priority)) or

Line 3222: (ame_rules.rule_type = ame_util.authorityRuleType and

3218: (processPrioritiesIn = ame_util.booleanFalse or
3219: (ame_rules.rule_type = ame_util.combinationRuleType and
3220: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3221: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3222: (ame_rules.rule_type = ame_util.authorityRuleType and
3223: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3224: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3225: (ame_rules.rule_type = ame_util.exceptionRuleType and
3226: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3223: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or

3219: (ame_rules.rule_type = ame_util.combinationRuleType and
3220: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3221: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3222: (ame_rules.rule_type = ame_util.authorityRuleType and
3223: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3224: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3225: (ame_rules.rule_type = ame_util.exceptionRuleType and
3226: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3227: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or

Line 3225: (ame_rules.rule_type = ame_util.exceptionRuleType and

3221: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3222: (ame_rules.rule_type = ame_util.authorityRuleType and
3223: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3224: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3225: (ame_rules.rule_type = ame_util.exceptionRuleType and
3226: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3227: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3228: (ame_rules.rule_type = ame_util.listModRuleType and
3229: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3226: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or

3222: (ame_rules.rule_type = ame_util.authorityRuleType and
3223: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3224: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3225: (ame_rules.rule_type = ame_util.exceptionRuleType and
3226: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3227: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3228: (ame_rules.rule_type = ame_util.listModRuleType and
3229: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3230: listModRuleThresholdIn >= ame_rule_usages.priority)) or

Line 3228: (ame_rules.rule_type = ame_util.listModRuleType and

3224: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3225: (ame_rules.rule_type = ame_util.exceptionRuleType and
3226: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3227: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3228: (ame_rules.rule_type = ame_util.listModRuleType and
3229: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3230: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3231: (ame_rules.rule_type = ame_util.substitutionRuleType and
3232: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3229: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or

3225: (ame_rules.rule_type = ame_util.exceptionRuleType and
3226: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3227: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3228: (ame_rules.rule_type = ame_util.listModRuleType and
3229: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3230: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3231: (ame_rules.rule_type = ame_util.substitutionRuleType and
3232: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3233: substRuleThresholdIn >= ame_rule_usages.priority)) or

Line 3231: (ame_rules.rule_type = ame_util.substitutionRuleType and

3227: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3228: (ame_rules.rule_type = ame_util.listModRuleType and
3229: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3230: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3231: (ame_rules.rule_type = ame_util.substitutionRuleType and
3232: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3233: substRuleThresholdIn >= ame_rule_usages.priority)) or
3234: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3235: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3232: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or

3228: (ame_rules.rule_type = ame_util.listModRuleType and
3229: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3230: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3231: (ame_rules.rule_type = ame_util.substitutionRuleType and
3232: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3233: substRuleThresholdIn >= ame_rule_usages.priority)) or
3234: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3235: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3236: preRuleThresholdIn >= ame_rule_usages.priority)) or

Line 3234: (ame_rules.rule_type = ame_util.preListGroupRuleType and

3230: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3231: (ame_rules.rule_type = ame_util.substitutionRuleType and
3232: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3233: substRuleThresholdIn >= ame_rule_usages.priority)) or
3234: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3235: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3236: preRuleThresholdIn >= ame_rule_usages.priority)) or
3237: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3238: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3235: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or

3231: (ame_rules.rule_type = ame_util.substitutionRuleType and
3232: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3233: substRuleThresholdIn >= ame_rule_usages.priority)) or
3234: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3235: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3236: preRuleThresholdIn >= ame_rule_usages.priority)) or
3237: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3238: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3239: postRuleThresholdIn >= ame_rule_usages.priority)) or

Line 3237: (ame_rules.rule_type = ame_util.postListGroupRuleType and

3233: substRuleThresholdIn >= ame_rule_usages.priority)) or
3234: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3235: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3236: preRuleThresholdIn >= ame_rule_usages.priority)) or
3237: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3238: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3239: postRuleThresholdIn >= ame_rule_usages.priority)) or
3240: (ame_rules.rule_type = ame_util.productionRuleType and
3241: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3238: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or

3234: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3235: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3236: preRuleThresholdIn >= ame_rule_usages.priority)) or
3237: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3238: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3239: postRuleThresholdIn >= ame_rule_usages.priority)) or
3240: (ame_rules.rule_type = ame_util.productionRuleType and
3241: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3242: productionRuleThresholdIn >= ame_rule_usages.priority))) and

Line 3240: (ame_rules.rule_type = ame_util.productionRuleType and

3236: preRuleThresholdIn >= ame_rule_usages.priority)) or
3237: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3238: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3239: postRuleThresholdIn >= ame_rule_usages.priority)) or
3240: (ame_rules.rule_type = ame_util.productionRuleType and
3241: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3242: productionRuleThresholdIn >= ame_rule_usages.priority))) and
3243: (processProductionRulesIn = ame_util.booleanTrue or
3244: ame_rules.rule_type <> ame_util.productionRuleType) and

Line 3241: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or

3237: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3238: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3239: postRuleThresholdIn >= ame_rule_usages.priority)) or
3240: (ame_rules.rule_type = ame_util.productionRuleType and
3241: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3242: productionRuleThresholdIn >= ame_rule_usages.priority))) and
3243: (processProductionRulesIn = ame_util.booleanTrue or
3244: ame_rules.rule_type <> ame_util.productionRuleType) and
3245: not exists (select *

Line 3243: (processProductionRulesIn = ame_util.booleanTrue or

3239: postRuleThresholdIn >= ame_rule_usages.priority)) or
3240: (ame_rules.rule_type = ame_util.productionRuleType and
3241: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3242: productionRuleThresholdIn >= ame_rule_usages.priority))) and
3243: (processProductionRulesIn = ame_util.booleanTrue or
3244: ame_rules.rule_type <> ame_util.productionRuleType) and
3245: not exists (select *
3246: from
3247: ame_conditions,

Line 3244: ame_rules.rule_type <> ame_util.productionRuleType) and

3240: (ame_rules.rule_type = ame_util.productionRuleType and
3241: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3242: productionRuleThresholdIn >= ame_rule_usages.priority))) and
3243: (processProductionRulesIn = ame_util.booleanTrue or
3244: ame_rules.rule_type <> ame_util.productionRuleType) and
3245: not exists (select *
3246: from
3247: ame_conditions,
3248: ame_condition_usages

Line 3250: ame_conditions.condition_type <> ame_util.listModConditionType and

3246: from
3247: ame_conditions,
3248: ame_condition_usages
3249: where
3250: ame_conditions.condition_type <> ame_util.listModConditionType and
3251: ame_conditions.condition_id = ame_condition_usages.condition_id and
3252: ame_condition_usages.rule_id = ame_rules.rule_id and
3253: engEffectiveRuleDate between
3254: ame_conditions.start_date and

Line 3255: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3251: ame_conditions.condition_id = ame_condition_usages.condition_id and
3252: ame_condition_usages.rule_id = ame_rules.rule_id and
3253: engEffectiveRuleDate between
3254: ame_conditions.start_date and
3255: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3256: engEffectiveRuleDate between
3257: ame_condition_usages.start_date and
3258: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3259: /* Avoids second fetch otherwise required by ANSI standard to check for too many rows. */

Line 3258: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3254: ame_conditions.start_date and
3255: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3256: engEffectiveRuleDate between
3257: ame_condition_usages.start_date and
3258: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3259: /* Avoids second fetch otherwise required by ANSI standard to check for too many rows. */
3260: rownum < 2) and
3261: engEffectiveRuleDate between
3262: ame_rules.start_date and

Line 3263: nvl(ame_rules.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3259: /* Avoids second fetch otherwise required by ANSI standard to check for too many rows. */
3260: rownum < 2) and
3261: engEffectiveRuleDate between
3262: ame_rules.start_date and
3263: nvl(ame_rules.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3264: engEffectiveRuleDate between
3265: ame_rule_usages.start_date and
3266: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3267: engEffectiveRuleDate between

Line 3266: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3262: ame_rules.start_date and
3263: nvl(ame_rules.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3264: engEffectiveRuleDate between
3265: ame_rule_usages.start_date and
3266: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3267: engEffectiveRuleDate between
3268: ame_item_class_usages.start_date and
3269: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3270: order by

Line 3269: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)

3265: ame_rule_usages.start_date and
3266: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3267: engEffectiveRuleDate between
3268: ame_item_class_usages.start_date and
3269: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3270: order by
3271: ame_item_class_usages.item_class_order_number,
3272: item_class_id,
3273: ame_rules.rule_type,

Line 3275: conditionlessItemClassIds ame_util.idList;

3271: ame_item_class_usages.item_class_order_number,
3272: item_class_id,
3273: ame_rules.rule_type,
3274: ame_rules.rule_id;
3275: conditionlessItemClassIds ame_util.idList;
3276: conditionlessRuleApprCats ame_util.charList;
3277: conditionlessRuleIds ame_util.idList;
3278: conditionlessRulePriorities ame_util.idList;
3279: conditionlessRuleTypes ame_util.stringList;

Line 3276: conditionlessRuleApprCats ame_util.charList;

3272: item_class_id,
3273: ame_rules.rule_type,
3274: ame_rules.rule_id;
3275: conditionlessItemClassIds ame_util.idList;
3276: conditionlessRuleApprCats ame_util.charList;
3277: conditionlessRuleIds ame_util.idList;
3278: conditionlessRulePriorities ame_util.idList;
3279: conditionlessRuleTypes ame_util.stringList;
3280: errorCode integer;

Line 3277: conditionlessRuleIds ame_util.idList;

3273: ame_rules.rule_type,
3274: ame_rules.rule_id;
3275: conditionlessItemClassIds ame_util.idList;
3276: conditionlessRuleApprCats ame_util.charList;
3277: conditionlessRuleIds ame_util.idList;
3278: conditionlessRulePriorities ame_util.idList;
3279: conditionlessRuleTypes ame_util.stringList;
3280: errorCode integer;
3281: errorMessage ame_util.longestStringType;

Line 3278: conditionlessRulePriorities ame_util.idList;

3274: ame_rules.rule_id;
3275: conditionlessItemClassIds ame_util.idList;
3276: conditionlessRuleApprCats ame_util.charList;
3277: conditionlessRuleIds ame_util.idList;
3278: conditionlessRulePriorities ame_util.idList;
3279: conditionlessRuleTypes ame_util.stringList;
3280: errorCode integer;
3281: errorMessage ame_util.longestStringType;
3282: firstConditionlessRuleFound boolean;

Line 3279: conditionlessRuleTypes ame_util.stringList;

3275: conditionlessItemClassIds ame_util.idList;
3276: conditionlessRuleApprCats ame_util.charList;
3277: conditionlessRuleIds ame_util.idList;
3278: conditionlessRulePriorities ame_util.idList;
3279: conditionlessRuleTypes ame_util.stringList;
3280: errorCode integer;
3281: errorMessage ame_util.longestStringType;
3282: firstConditionlessRuleFound boolean;
3283: firstConditionlessRuleIndex integer;

Line 3281: errorMessage ame_util.longestStringType;

3277: conditionlessRuleIds ame_util.idList;
3278: conditionlessRulePriorities ame_util.idList;
3279: conditionlessRuleTypes ame_util.stringList;
3280: errorCode integer;
3281: errorMessage ame_util.longestStringType;
3282: firstConditionlessRuleFound boolean;
3283: firstConditionlessRuleIndex integer;
3284: lastConditionlessRuleIndex integer;
3285: lowerBound integer;

Line 3287: processPriorities ame_util.charType;

3283: firstConditionlessRuleIndex integer;
3284: lastConditionlessRuleIndex integer;
3285: lowerBound integer;
3286: noRulesException exception;
3287: processPriorities ame_util.charType;
3288: processProductions ame_util.charType;
3289: tempIndex integer;
3290: tempItemClassId integer;
3291: upperBound integer;

Line 3288: processProductions ame_util.charType;

3284: lastConditionlessRuleIndex integer;
3285: lowerBound integer;
3286: noRulesException exception;
3287: processPriorities ame_util.charType;
3288: processProductions ame_util.charType;
3289: tempIndex integer;
3290: tempItemClassId integer;
3291: upperBound integer;
3292: upperBound2 integer;

Line 3296: processPriorities := ame_util.booleanTrue;

3292: upperBound2 integer;
3293: begin
3294: /* Fetch all conditionless rules and store them in local variables. */
3295: if(engProcessPriorities) then
3296: processPriorities := ame_util.booleanTrue;
3297: else
3298: processPriorities := ame_util.booleanFalse;
3299: end if;
3300: if(engProcessProductionRules) then

Line 3298: processPriorities := ame_util.booleanFalse;

3294: /* Fetch all conditionless rules and store them in local variables. */
3295: if(engProcessPriorities) then
3296: processPriorities := ame_util.booleanTrue;
3297: else
3298: processPriorities := ame_util.booleanFalse;
3299: end if;
3300: if(engProcessProductionRules) then
3301: processProductions := ame_util.booleanTrue;
3302: else

Line 3301: processProductions := ame_util.booleanTrue;

3297: else
3298: processPriorities := ame_util.booleanFalse;
3299: end if;
3300: if(engProcessProductionRules) then
3301: processProductions := ame_util.booleanTrue;
3302: else
3303: processProductions := ame_util.booleanFalse;
3304: end if;
3305: open conditionlessRuleCursor(processPrioritiesIn => processPriorities,

Line 3303: processProductions := ame_util.booleanFalse;

3299: end if;
3300: if(engProcessProductionRules) then
3301: processProductions := ame_util.booleanTrue;
3302: else
3303: processProductions := ame_util.booleanFalse;
3304: end if;
3305: open conditionlessRuleCursor(processPrioritiesIn => processPriorities,
3306: processProductionRulesIn => processProductions,
3307: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),

Line 3307: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),

3303: processProductions := ame_util.booleanFalse;
3304: end if;
3305: open conditionlessRuleCursor(processPrioritiesIn => processPriorities,
3306: processProductionRulesIn => processProductions,
3307: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),
3308: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),
3309: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3310: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3311: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),

Line 3308: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),

3304: end if;
3305: open conditionlessRuleCursor(processPrioritiesIn => processPriorities,
3306: processProductionRulesIn => processProductions,
3307: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),
3308: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),
3309: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3310: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3311: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3312: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),

Line 3309: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),

3305: open conditionlessRuleCursor(processPrioritiesIn => processPriorities,
3306: processProductionRulesIn => processProductions,
3307: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),
3308: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),
3309: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3310: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3311: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3312: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3313: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),

Line 3310: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),

3306: processProductionRulesIn => processProductions,
3307: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),
3308: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),
3309: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3310: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3311: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3312: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3313: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3314: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),

Line 3311: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),

3307: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),
3308: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),
3309: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3310: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3311: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3312: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3313: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3314: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3315: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),

Line 3312: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),

3308: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),
3309: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3310: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3311: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3312: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3313: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3314: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3315: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3316: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),

Line 3313: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),

3309: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3310: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3311: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3312: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3313: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3314: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3315: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3316: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3317: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),

Line 3314: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),

3310: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3311: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3312: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3313: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3314: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3315: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3316: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3317: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3318: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),

Line 3315: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),

3311: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3312: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3313: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3314: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3315: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3316: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3317: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3318: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3319: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),

Line 3316: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),

3312: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3313: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3314: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3315: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3316: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3317: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3318: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3319: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3320: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),

Line 3317: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),

3313: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3314: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3315: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3316: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3317: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3318: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3319: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3320: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3321: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),

Line 3318: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),

3314: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3315: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3316: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3317: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3318: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3319: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3320: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3321: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),
3322: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),

Line 3319: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),

3315: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3316: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3317: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3318: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3319: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3320: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3321: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),
3322: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),
3323: headerItemClassIdIn => getItemClassId(itemClassNameIn => ame_util.headerItemClassName));

Line 3320: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),

3316: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3317: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3318: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3319: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3320: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3321: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),
3322: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),
3323: headerItemClassIdIn => getItemClassId(itemClassNameIn => ame_util.headerItemClassName));
3324: fetch conditionlessRuleCursor bulk collect

Line 3321: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),

3317: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3318: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3319: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3320: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3321: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),
3322: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),
3323: headerItemClassIdIn => getItemClassId(itemClassNameIn => ame_util.headerItemClassName));
3324: fetch conditionlessRuleCursor bulk collect
3325: into

Line 3322: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),

3318: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3319: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3320: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3321: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),
3322: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),
3323: headerItemClassIdIn => getItemClassId(itemClassNameIn => ame_util.headerItemClassName));
3324: fetch conditionlessRuleCursor bulk collect
3325: into
3326: conditionlessRuleIds,

Line 3323: headerItemClassIdIn => getItemClassId(itemClassNameIn => ame_util.headerItemClassName));

3319: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3320: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3321: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),
3322: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),
3323: headerItemClassIdIn => getItemClassId(itemClassNameIn => ame_util.headerItemClassName));
3324: fetch conditionlessRuleCursor bulk collect
3325: into
3326: conditionlessRuleIds,
3327: conditionlessItemClassIds,

Line 3374: engRuleAppliedYN(tempIndex) := ame_util.booleanTrue;

3370: engAppRuleIds(tempIndex) := conditionlessRuleIds(conditionlessRuleIndex);
3371: engAppPriorities(tempIndex) := conditionlessRulePriorities(conditionlessRuleIndex);
3372: engAppApproverCategories(tempIndex) := conditionlessRuleApprCats(conditionlessRuleIndex);
3373: engAppRuleTypes(tempIndex) := conditionlessRuleTypes(conditionlessRuleIndex);
3374: engRuleAppliedYN(tempIndex) := ame_util.booleanTrue;
3375: /* These are the item class and item to which the rule applies. */
3376: engAppItemClassIds(tempIndex) := tempItemClassId;
3377: engAppItemIds(tempIndex) := engItemIds(itemIndex);
3378: /*

Line 3388: if(engItemClassNames(itemClassIndex) = ame_util.headerItemClassName) then

3384: engAppAppItemIds(tempIndex) := engItemIds(itemIndex);
3385: end loop;
3386: end if;
3387: /* Evaluate the rules with conditions for this item. */
3388: if(engItemClassNames(itemClassIndex) = ame_util.headerItemClassName) then
3389: /*
3390: The header item class always has exactly one item, so one of the procedures
3391: in the following if/else will get called exactly once per engine cycle.
3392: */

Line 3393: if(getHeaderAttValue2(attributeNameIn => ame_util.restrictiveItemEvalAttribute) =

3389: /*
3390: The header item class always has exactly one item, so one of the procedures
3391: in the following if/else will get called exactly once per engine cycle.
3392: */
3393: if(getHeaderAttValue2(attributeNameIn => ame_util.restrictiveItemEvalAttribute) =
3394: ame_util.booleanAttributeTrue) then
3395: doStrictHeaderRuleEvaluation(itemClassIndexIn => itemClassIndex,
3396: itemClassIdIn => tempItemClassId);
3397: else

Line 3394: ame_util.booleanAttributeTrue) then

3390: The header item class always has exactly one item, so one of the procedures
3391: in the following if/else will get called exactly once per engine cycle.
3392: */
3393: if(getHeaderAttValue2(attributeNameIn => ame_util.restrictiveItemEvalAttribute) =
3394: ame_util.booleanAttributeTrue) then
3395: doStrictHeaderRuleEvaluation(itemClassIndexIn => itemClassIndex,
3396: itemClassIdIn => tempItemClassId);
3397: else
3398: doWeakHeaderRuleEvaluation(itemClassIndexIn => itemClassIndex,

Line 3415: if(engAppRuleTypes(i) in (ame_util.listModRuleType, ame_util.substitutionRuleType)) then

3411: to the header item class. Now set their item-class IDs and item IDs null and sort the
3412: applicable rules, so the list-modification and substitution rules get processed last.
3413: */
3414: for i in 1 .. engAppRuleIds.count loop
3415: if(engAppRuleTypes(i) in (ame_util.listModRuleType, ame_util.substitutionRuleType)) then
3416: engRuleAppliedYN(i) := ame_util.booleanFalse;
3417: engAppLMSubItemClassIds(engAppRuleIds(i)) := engAppRuleItemClassIds(i);
3418: engAppLMSubItemIds(engAppRuleIds(i)) := engAppAppItemIds(i);
3419: engAppRuleItemClassIds(i) := null;

Line 3416: engRuleAppliedYN(i) := ame_util.booleanFalse;

3412: applicable rules, so the list-modification and substitution rules get processed last.
3413: */
3414: for i in 1 .. engAppRuleIds.count loop
3415: if(engAppRuleTypes(i) in (ame_util.listModRuleType, ame_util.substitutionRuleType)) then
3416: engRuleAppliedYN(i) := ame_util.booleanFalse;
3417: engAppLMSubItemClassIds(engAppRuleIds(i)) := engAppRuleItemClassIds(i);
3418: engAppLMSubItemIds(engAppRuleIds(i)) := engAppAppItemIds(i);
3419: engAppRuleItemClassIds(i) := null;
3420: engAppAppItemIds(i) := null;

Line 3451: if(getHeaderAttValue2(attributeNameIn => ame_util.atLeastOneRuleAttribute) = ame_util.booleanAttributeTrue and

3447: end loop;
3448: end if;
3449: end if;
3450: /* Check for no rules, if AT_LEAST_ONE_RULE_MUST_APPLY is true. */
3451: if(getHeaderAttValue2(attributeNameIn => ame_util.atLeastOneRuleAttribute) = ame_util.booleanAttributeTrue and
3452: engAppRuleIds.count = 0) then
3453: raise noRulesException;
3454: end if;
3455: exception

Line 3458: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

3454: end if;
3455: exception
3456: when noRulesException then
3457: errorCode := -20001;
3458: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
3459: messageNameIn => 'AME_400117_ENG_ONE_RULE_APPLY');
3460: ame_util.runtimeException(packageNameIn => 'ame_engine',
3461: routineNameIn => 'evaluateRules',
3462: exceptionNumberIn => errorCode,

Line 3460: ame_util.runtimeException(packageNameIn => 'ame_engine',

3456: when noRulesException then
3457: errorCode := -20001;
3458: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
3459: messageNameIn => 'AME_400117_ENG_ONE_RULE_APPLY');
3460: ame_util.runtimeException(packageNameIn => 'ame_engine',
3461: routineNameIn => 'evaluateRules',
3462: exceptionNumberIn => errorCode,
3463: exceptionStringIn => errorMessage);
3464: raise_application_error(errorCode,

Line 3470: ame_util.runtimeException(packageNameIn => 'ame_engine',

3466: when others then
3467: if(conditionlessRuleCursor%isopen) then
3468: close conditionlessRuleCursor;
3469: end if;
3470: ame_util.runtimeException(packageNameIn => 'ame_engine',
3471: routineNameIn => 'evaluateRules',
3472: exceptionNumberIn => sqlcode,
3473: exceptionStringIn => sqlerrm);
3474: raise;

Line 3491: ame_attributes.attribute_type = ame_util.stringAttributeType and

3487: ame_conditions,
3488: ame_condition_usages,
3489: ame_rule_usages
3490: where
3491: ame_attributes.attribute_type = ame_util.stringAttributeType and
3492: ame_attributes.attribute_id = ame_conditions.attribute_id and
3493: ame_conditions.condition_id = ame_condition_usages.condition_id and
3494: ame_condition_usages.rule_id = ame_rule_usages.rule_id and
3495: ame_rule_usages.item_id = engAmeApplicationId and

Line 3498: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3494: ame_condition_usages.rule_id = ame_rule_usages.rule_id and
3495: ame_rule_usages.item_id = engAmeApplicationId and
3496: engEffectiveRuleDate between
3497: ame_attributes.start_date and
3498: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3499: engEffectiveRuleDate between
3500: ame_conditions.start_date and
3501: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3502: engEffectiveRuleDate between

Line 3501: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3497: ame_attributes.start_date and
3498: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3499: engEffectiveRuleDate between
3500: ame_conditions.start_date and
3501: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3502: engEffectiveRuleDate between
3503: ame_condition_usages.start_date and
3504: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3505: engEffectiveRuleDate between

Line 3504: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3500: ame_conditions.start_date and
3501: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3502: engEffectiveRuleDate between
3503: ame_condition_usages.start_date and
3504: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3505: engEffectiveRuleDate between
3506: ame_rule_usages.start_date and
3507: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)) and
3508: engEffectiveRuleDate between

Line 3507: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)) and

3503: ame_condition_usages.start_date and
3504: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3505: engEffectiveRuleDate between
3506: ame_rule_usages.start_date and
3507: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)) and
3508: engEffectiveRuleDate between
3509: ame_string_values.start_date and
3510: nvl(ame_string_values.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3511: order by condition_id;

Line 3510: nvl(ame_string_values.end_date - ame_util.oneSecond, engEffectiveRuleDate)

3506: ame_rule_usages.start_date and
3507: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)) and
3508: engEffectiveRuleDate between
3509: ame_string_values.start_date and
3510: nvl(ame_string_values.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3511: order by condition_id;
3512: cursor activeCondUsageCursor(processPrioritiesIn in varchar2,
3513: processProductionRulesIn in varchar2,
3514: combinationRulePriorityModeIn in varchar2,

Line 3554: ame_conditions.condition_type <> ame_util.listModConditionType and

3550: ame_rules,
3551: ame_rule_usages
3552: where
3553: ame_attributes.attribute_id = ame_conditions.attribute_id and
3554: ame_conditions.condition_type <> ame_util.listModConditionType and
3555: ame_conditions.condition_id = ame_condition_usages.condition_id and
3556: ame_condition_usages.rule_id = ame_rules.rule_id and
3557: ame_rules.rule_id = ame_rule_usages.rule_id and
3558: ame_rule_usages.item_id = engAmeApplicationId and

Line 3559: (processPrioritiesIn = ame_util.booleanFalse or

3555: ame_conditions.condition_id = ame_condition_usages.condition_id and
3556: ame_condition_usages.rule_id = ame_rules.rule_id and
3557: ame_rules.rule_id = ame_rule_usages.rule_id and
3558: ame_rule_usages.item_id = engAmeApplicationId and
3559: (processPrioritiesIn = ame_util.booleanFalse or
3560: (ame_rules.rule_type = ame_util.combinationRuleType and
3561: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3562: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3563: (ame_rules.rule_type = ame_util.authorityRuleType and

Line 3560: (ame_rules.rule_type = ame_util.combinationRuleType and

3556: ame_condition_usages.rule_id = ame_rules.rule_id and
3557: ame_rules.rule_id = ame_rule_usages.rule_id and
3558: ame_rule_usages.item_id = engAmeApplicationId and
3559: (processPrioritiesIn = ame_util.booleanFalse or
3560: (ame_rules.rule_type = ame_util.combinationRuleType and
3561: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3562: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3563: (ame_rules.rule_type = ame_util.authorityRuleType and
3564: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3561: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or

3557: ame_rules.rule_id = ame_rule_usages.rule_id and
3558: ame_rule_usages.item_id = engAmeApplicationId and
3559: (processPrioritiesIn = ame_util.booleanFalse or
3560: (ame_rules.rule_type = ame_util.combinationRuleType and
3561: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3562: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3563: (ame_rules.rule_type = ame_util.authorityRuleType and
3564: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3565: authorityRuleThresholdIn >= ame_rule_usages.priority)) or

Line 3563: (ame_rules.rule_type = ame_util.authorityRuleType and

3559: (processPrioritiesIn = ame_util.booleanFalse or
3560: (ame_rules.rule_type = ame_util.combinationRuleType and
3561: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3562: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3563: (ame_rules.rule_type = ame_util.authorityRuleType and
3564: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3565: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3566: (ame_rules.rule_type = ame_util.exceptionRuleType and
3567: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3564: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or

3560: (ame_rules.rule_type = ame_util.combinationRuleType and
3561: (combinationRulePriorityModeIn <> ame_util.absoluteRulePriority or
3562: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3563: (ame_rules.rule_type = ame_util.authorityRuleType and
3564: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3565: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3566: (ame_rules.rule_type = ame_util.exceptionRuleType and
3567: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3568: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or

Line 3566: (ame_rules.rule_type = ame_util.exceptionRuleType and

3562: combinationRuleThresholdIn >= ame_rule_usages.priority)) or
3563: (ame_rules.rule_type = ame_util.authorityRuleType and
3564: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3565: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3566: (ame_rules.rule_type = ame_util.exceptionRuleType and
3567: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3568: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3569: (ame_rules.rule_type = ame_util.listModRuleType and
3570: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3567: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or

3563: (ame_rules.rule_type = ame_util.authorityRuleType and
3564: (authorityRulePriorityModeIn <> ame_util.absoluteRulePriority or
3565: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3566: (ame_rules.rule_type = ame_util.exceptionRuleType and
3567: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3568: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3569: (ame_rules.rule_type = ame_util.listModRuleType and
3570: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3571: listModRuleThresholdIn >= ame_rule_usages.priority)) or

Line 3569: (ame_rules.rule_type = ame_util.listModRuleType and

3565: authorityRuleThresholdIn >= ame_rule_usages.priority)) or
3566: (ame_rules.rule_type = ame_util.exceptionRuleType and
3567: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3568: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3569: (ame_rules.rule_type = ame_util.listModRuleType and
3570: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3571: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3572: (ame_rules.rule_type = ame_util.substitutionRuleType and
3573: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3570: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or

3566: (ame_rules.rule_type = ame_util.exceptionRuleType and
3567: (exceptionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3568: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3569: (ame_rules.rule_type = ame_util.listModRuleType and
3570: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3571: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3572: (ame_rules.rule_type = ame_util.substitutionRuleType and
3573: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3574: substRuleThresholdIn >= ame_rule_usages.priority)) or

Line 3572: (ame_rules.rule_type = ame_util.substitutionRuleType and

3568: exceptionRuleThresholdIn >= ame_rule_usages.priority)) or
3569: (ame_rules.rule_type = ame_util.listModRuleType and
3570: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3571: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3572: (ame_rules.rule_type = ame_util.substitutionRuleType and
3573: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3574: substRuleThresholdIn >= ame_rule_usages.priority)) or
3575: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3576: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3573: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or

3569: (ame_rules.rule_type = ame_util.listModRuleType and
3570: (listModRulePriorityModeIn <> ame_util.absoluteRulePriority or
3571: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3572: (ame_rules.rule_type = ame_util.substitutionRuleType and
3573: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3574: substRuleThresholdIn >= ame_rule_usages.priority)) or
3575: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3576: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3577: preRuleThresholdIn >= ame_rule_usages.priority)) or

Line 3575: (ame_rules.rule_type = ame_util.preListGroupRuleType and

3571: listModRuleThresholdIn >= ame_rule_usages.priority)) or
3572: (ame_rules.rule_type = ame_util.substitutionRuleType and
3573: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3574: substRuleThresholdIn >= ame_rule_usages.priority)) or
3575: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3576: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3577: preRuleThresholdIn >= ame_rule_usages.priority)) or
3578: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3579: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3576: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or

3572: (ame_rules.rule_type = ame_util.substitutionRuleType and
3573: (substRulePriorityModeIn <> ame_util.absoluteRulePriority or
3574: substRuleThresholdIn >= ame_rule_usages.priority)) or
3575: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3576: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3577: preRuleThresholdIn >= ame_rule_usages.priority)) or
3578: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3579: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3580: postRuleThresholdIn >= ame_rule_usages.priority)) or

Line 3578: (ame_rules.rule_type = ame_util.postListGroupRuleType and

3574: substRuleThresholdIn >= ame_rule_usages.priority)) or
3575: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3576: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3577: preRuleThresholdIn >= ame_rule_usages.priority)) or
3578: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3579: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3580: postRuleThresholdIn >= ame_rule_usages.priority)) or
3581: (ame_rules.rule_type = ame_util.productionRuleType and
3582: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or

Line 3579: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or

3575: (ame_rules.rule_type = ame_util.preListGroupRuleType and
3576: (preRulePriorityModeIn <> ame_util.absoluteRulePriority or
3577: preRuleThresholdIn >= ame_rule_usages.priority)) or
3578: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3579: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3580: postRuleThresholdIn >= ame_rule_usages.priority)) or
3581: (ame_rules.rule_type = ame_util.productionRuleType and
3582: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3583: productionRuleThresholdIn >= ame_rule_usages.priority))) and

Line 3581: (ame_rules.rule_type = ame_util.productionRuleType and

3577: preRuleThresholdIn >= ame_rule_usages.priority)) or
3578: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3579: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3580: postRuleThresholdIn >= ame_rule_usages.priority)) or
3581: (ame_rules.rule_type = ame_util.productionRuleType and
3582: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3583: productionRuleThresholdIn >= ame_rule_usages.priority))) and
3584: (processProductionRulesIn = ame_util.booleanTrue or
3585: ame_rules.rule_type <> ame_util.productionRuleType) and

Line 3582: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or

3578: (ame_rules.rule_type = ame_util.postListGroupRuleType and
3579: (postRulePriorityModeIn <> ame_util.absoluteRulePriority or
3580: postRuleThresholdIn >= ame_rule_usages.priority)) or
3581: (ame_rules.rule_type = ame_util.productionRuleType and
3582: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3583: productionRuleThresholdIn >= ame_rule_usages.priority))) and
3584: (processProductionRulesIn = ame_util.booleanTrue or
3585: ame_rules.rule_type <> ame_util.productionRuleType) and
3586: engEffectiveRuleDate between

Line 3584: (processProductionRulesIn = ame_util.booleanTrue or

3580: postRuleThresholdIn >= ame_rule_usages.priority)) or
3581: (ame_rules.rule_type = ame_util.productionRuleType and
3582: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3583: productionRuleThresholdIn >= ame_rule_usages.priority))) and
3584: (processProductionRulesIn = ame_util.booleanTrue or
3585: ame_rules.rule_type <> ame_util.productionRuleType) and
3586: engEffectiveRuleDate between
3587: ame_attributes.start_date and
3588: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

Line 3585: ame_rules.rule_type <> ame_util.productionRuleType) and

3581: (ame_rules.rule_type = ame_util.productionRuleType and
3582: (productionRulePriorityModeIn <> ame_util.absoluteRulePriority or
3583: productionRuleThresholdIn >= ame_rule_usages.priority))) and
3584: (processProductionRulesIn = ame_util.booleanTrue or
3585: ame_rules.rule_type <> ame_util.productionRuleType) and
3586: engEffectiveRuleDate between
3587: ame_attributes.start_date and
3588: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3589: engEffectiveRuleDate between

Line 3588: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3584: (processProductionRulesIn = ame_util.booleanTrue or
3585: ame_rules.rule_type <> ame_util.productionRuleType) and
3586: engEffectiveRuleDate between
3587: ame_attributes.start_date and
3588: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3589: engEffectiveRuleDate between
3590: ame_conditions.start_date and
3591: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3592: engEffectiveRuleDate between

Line 3591: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3587: ame_attributes.start_date and
3588: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3589: engEffectiveRuleDate between
3590: ame_conditions.start_date and
3591: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3592: engEffectiveRuleDate between
3593: ame_condition_usages.start_date and
3594: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3595: engEffectiveRuleDate between

Line 3594: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3590: ame_conditions.start_date and
3591: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3592: engEffectiveRuleDate between
3593: ame_condition_usages.start_date and
3594: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3595: engEffectiveRuleDate between
3596: ame_rules.start_date and
3597: nvl(ame_rules.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3598: engEffectiveRuleDate between

Line 3597: nvl(ame_rules.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3593: ame_condition_usages.start_date and
3594: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3595: engEffectiveRuleDate between
3596: ame_rules.start_date and
3597: nvl(ame_rules.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3598: engEffectiveRuleDate between
3599: ame_rule_usages.start_date and
3600: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3601: order by

Line 3600: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)

3596: ame_rules.start_date and
3597: nvl(ame_rules.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3598: engEffectiveRuleDate between
3599: ame_rule_usages.start_date and
3600: nvl(ame_rule_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3601: order by
3602: rule_item_class,
3603: ame_rules.rule_type,
3604: ame_rules.rule_id,

Line 3611: tempACUAttributeIds ame_util.idList;

3607: The tempACU tables are buffers between the active-condition-usage fetch and
3608: the engAC variables. The temp variables are indexed consecutively, while
3609: the engAC variables are indexed by condition ID or rule ID.
3610: */
3611: tempACUAttributeIds ame_util.idList;
3612: tempACUConditionTypes ame_util.stringList;
3613: tempACUIncludeLowerLimits ame_util.charList;
3614: tempACUIncludeUpperLimits ame_util.charList;
3615: tempACUItemClassIds ame_util.idList;

Line 3612: tempACUConditionTypes ame_util.stringList;

3608: the engAC variables. The temp variables are indexed consecutively, while
3609: the engAC variables are indexed by condition ID or rule ID.
3610: */
3611: tempACUAttributeIds ame_util.idList;
3612: tempACUConditionTypes ame_util.stringList;
3613: tempACUIncludeLowerLimits ame_util.charList;
3614: tempACUIncludeUpperLimits ame_util.charList;
3615: tempACUItemClassIds ame_util.idList;
3616: tempACUParameterOnes ame_util.stringList;

Line 3613: tempACUIncludeLowerLimits ame_util.charList;

3609: the engAC variables are indexed by condition ID or rule ID.
3610: */
3611: tempACUAttributeIds ame_util.idList;
3612: tempACUConditionTypes ame_util.stringList;
3613: tempACUIncludeLowerLimits ame_util.charList;
3614: tempACUIncludeUpperLimits ame_util.charList;
3615: tempACUItemClassIds ame_util.idList;
3616: tempACUParameterOnes ame_util.stringList;
3617: tempACUParameterThrees ame_util.stringList;

Line 3614: tempACUIncludeUpperLimits ame_util.charList;

3610: */
3611: tempACUAttributeIds ame_util.idList;
3612: tempACUConditionTypes ame_util.stringList;
3613: tempACUIncludeLowerLimits ame_util.charList;
3614: tempACUIncludeUpperLimits ame_util.charList;
3615: tempACUItemClassIds ame_util.idList;
3616: tempACUParameterOnes ame_util.stringList;
3617: tempACUParameterThrees ame_util.stringList;
3618: tempACUParameterTwos ame_util.longStringList;

Line 3615: tempACUItemClassIds ame_util.idList;

3611: tempACUAttributeIds ame_util.idList;
3612: tempACUConditionTypes ame_util.stringList;
3613: tempACUIncludeLowerLimits ame_util.charList;
3614: tempACUIncludeUpperLimits ame_util.charList;
3615: tempACUItemClassIds ame_util.idList;
3616: tempACUParameterOnes ame_util.stringList;
3617: tempACUParameterThrees ame_util.stringList;
3618: tempACUParameterTwos ame_util.longStringList;
3619: tempACURuleApprCats ame_util.charList;

Line 3616: tempACUParameterOnes ame_util.stringList;

3612: tempACUConditionTypes ame_util.stringList;
3613: tempACUIncludeLowerLimits ame_util.charList;
3614: tempACUIncludeUpperLimits ame_util.charList;
3615: tempACUItemClassIds ame_util.idList;
3616: tempACUParameterOnes ame_util.stringList;
3617: tempACUParameterThrees ame_util.stringList;
3618: tempACUParameterTwos ame_util.longStringList;
3619: tempACURuleApprCats ame_util.charList;
3620: tempACURulePriorities ame_util.idList;

Line 3617: tempACUParameterThrees ame_util.stringList;

3613: tempACUIncludeLowerLimits ame_util.charList;
3614: tempACUIncludeUpperLimits ame_util.charList;
3615: tempACUItemClassIds ame_util.idList;
3616: tempACUParameterOnes ame_util.stringList;
3617: tempACUParameterThrees ame_util.stringList;
3618: tempACUParameterTwos ame_util.longStringList;
3619: tempACURuleApprCats ame_util.charList;
3620: tempACURulePriorities ame_util.idList;
3621: tempACURuleTypes ame_util.idList;

Line 3618: tempACUParameterTwos ame_util.longStringList;

3614: tempACUIncludeUpperLimits ame_util.charList;
3615: tempACUItemClassIds ame_util.idList;
3616: tempACUParameterOnes ame_util.stringList;
3617: tempACUParameterThrees ame_util.stringList;
3618: tempACUParameterTwos ame_util.longStringList;
3619: tempACURuleApprCats ame_util.charList;
3620: tempACURulePriorities ame_util.idList;
3621: tempACURuleTypes ame_util.idList;
3622: /*

Line 3619: tempACURuleApprCats ame_util.charList;

3615: tempACUItemClassIds ame_util.idList;
3616: tempACUParameterOnes ame_util.stringList;
3617: tempACUParameterThrees ame_util.stringList;
3618: tempACUParameterTwos ame_util.longStringList;
3619: tempACURuleApprCats ame_util.charList;
3620: tempACURulePriorities ame_util.idList;
3621: tempACURuleTypes ame_util.idList;
3622: /*
3623: tempACConditionIds is a buffer between the string-value fetch and the

Line 3620: tempACURulePriorities ame_util.idList;

3616: tempACUParameterOnes ame_util.stringList;
3617: tempACUParameterThrees ame_util.stringList;
3618: tempACUParameterTwos ame_util.longStringList;
3619: tempACURuleApprCats ame_util.charList;
3620: tempACURulePriorities ame_util.idList;
3621: tempACURuleTypes ame_util.idList;
3622: /*
3623: tempACConditionIds is a buffer between the string-value fetch and the
3624: engACStringValue variables.

Line 3621: tempACURuleTypes ame_util.idList;

3617: tempACUParameterThrees ame_util.stringList;
3618: tempACUParameterTwos ame_util.longStringList;
3619: tempACURuleApprCats ame_util.charList;
3620: tempACURulePriorities ame_util.idList;
3621: tempACURuleTypes ame_util.idList;
3622: /*
3623: tempACConditionIds is a buffer between the string-value fetch and the
3624: engACStringValue variables.
3625: */

Line 3626: tempACConditionIds ame_util.idList;

3622: /*
3623: tempACConditionIds is a buffer between the string-value fetch and the
3624: engACStringValue variables.
3625: */
3626: tempACConditionIds ame_util.idList;
3627: /* misc. local variables */
3628: processPriorities ame_util.charType;
3629: processProductions ame_util.charType;
3630: tempConditionID integer;

Line 3628: processPriorities ame_util.charType;

3624: engACStringValue variables.
3625: */
3626: tempACConditionIds ame_util.idList;
3627: /* misc. local variables */
3628: processPriorities ame_util.charType;
3629: processProductions ame_util.charType;
3630: tempConditionID integer;
3631: tempCount integer;
3632: tempItemClassID integer;

Line 3629: processProductions ame_util.charType;

3625: */
3626: tempACConditionIds ame_util.idList;
3627: /* misc. local variables */
3628: processPriorities ame_util.charType;
3629: processProductions ame_util.charType;
3630: tempConditionID integer;
3631: tempCount integer;
3632: tempItemClassID integer;
3633: tempRuleId integer;

Line 3640: processPriorities := ame_util.booleanTrue;

3636: Fetch all condition usages for conditions used by the rules that are used by
3637: the current transaction type.
3638: */
3639: if(engProcessPriorities) then
3640: processPriorities := ame_util.booleanTrue;
3641: else
3642: processPriorities := ame_util.booleanFalse;
3643: end if;
3644: if(engProcessProductionRules) then

Line 3642: processPriorities := ame_util.booleanFalse;

3638: */
3639: if(engProcessPriorities) then
3640: processPriorities := ame_util.booleanTrue;
3641: else
3642: processPriorities := ame_util.booleanFalse;
3643: end if;
3644: if(engProcessProductionRules) then
3645: processProductions := ame_util.booleanTrue;
3646: else

Line 3645: processProductions := ame_util.booleanTrue;

3641: else
3642: processPriorities := ame_util.booleanFalse;
3643: end if;
3644: if(engProcessProductionRules) then
3645: processProductions := ame_util.booleanTrue;
3646: else
3647: processProductions := ame_util.booleanFalse;
3648: end if;
3649: open activeCondUsageCursor(processPrioritiesIn => processPriorities,

Line 3647: processProductions := ame_util.booleanFalse;

3643: end if;
3644: if(engProcessProductionRules) then
3645: processProductions := ame_util.booleanTrue;
3646: else
3647: processProductions := ame_util.booleanFalse;
3648: end if;
3649: open activeCondUsageCursor(processPrioritiesIn => processPriorities,
3650: processProductionRulesIn => processProductions,
3651: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),

Line 3651: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),

3647: processProductions := ame_util.booleanFalse;
3648: end if;
3649: open activeCondUsageCursor(processPrioritiesIn => processPriorities,
3650: processProductionRulesIn => processProductions,
3651: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),
3652: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),
3653: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3654: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3655: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),

Line 3652: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),

3648: end if;
3649: open activeCondUsageCursor(processPrioritiesIn => processPriorities,
3650: processProductionRulesIn => processProductions,
3651: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),
3652: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),
3653: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3654: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3655: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3656: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),

Line 3653: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),

3649: open activeCondUsageCursor(processPrioritiesIn => processPriorities,
3650: processProductionRulesIn => processProductions,
3651: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),
3652: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),
3653: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3654: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3655: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3656: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3657: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),

Line 3654: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),

3650: processProductionRulesIn => processProductions,
3651: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),
3652: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),
3653: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3654: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3655: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3656: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3657: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3658: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),

Line 3655: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),

3651: combinationRulePriorityModeIn => engPriorityModes(ame_util.combinationRuleType),
3652: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),
3653: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3654: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3655: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3656: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3657: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3658: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3659: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),

Line 3656: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),

3652: combinationRuleThresholdIn => engPriorityThresholds(ame_util.combinationRuleType),
3653: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3654: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3655: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3656: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3657: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3658: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3659: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3660: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),

Line 3657: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),

3653: authorityRulePriorityModeIn => engPriorityModes(ame_util.authorityRuleType),
3654: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3655: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3656: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3657: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3658: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3659: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3660: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3661: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),

Line 3658: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),

3654: authorityRuleThresholdIn => engPriorityThresholds(ame_util.authorityRuleType),
3655: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3656: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3657: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3658: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3659: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3660: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3661: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3662: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),

Line 3659: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),

3655: exceptionRulePriorityModeIn => engPriorityModes(ame_util.exceptionRuleType),
3656: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3657: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3658: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3659: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3660: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3661: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3662: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3663: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),

Line 3660: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),

3656: exceptionRuleThresholdIn => engPriorityThresholds(ame_util.exceptionRuleType),
3657: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3658: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3659: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3660: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3661: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3662: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3663: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3664: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),

Line 3661: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),

3657: listModRulePriorityModeIn => engPriorityModes(ame_util.listModRuleType),
3658: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3659: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3660: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3661: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3662: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3663: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3664: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3665: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),

Line 3662: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),

3658: listModRuleThresholdIn => engPriorityThresholds(ame_util.listModRuleType),
3659: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3660: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3661: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3662: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3663: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3664: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3665: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),
3666: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),

Line 3663: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),

3659: substRulePriorityModeIn => engPriorityModes(ame_util.substitutionRuleType),
3660: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3661: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3662: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3663: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3664: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3665: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),
3666: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),
3667: headerItemClassIdIn => getItemClassId(itemClassNameIn => ame_util.headerItemClassName));

Line 3664: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),

3660: substRuleThresholdIn => engPriorityThresholds(ame_util.substitutionRuleType),
3661: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3662: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3663: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3664: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3665: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),
3666: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),
3667: headerItemClassIdIn => getItemClassId(itemClassNameIn => ame_util.headerItemClassName));
3668: fetch activeCondUsageCursor bulk collect

Line 3665: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),

3661: preRulePriorityModeIn => engPriorityModes(ame_util.preListGroupRuleType),
3662: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3663: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3664: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3665: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),
3666: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),
3667: headerItemClassIdIn => getItemClassId(itemClassNameIn => ame_util.headerItemClassName));
3668: fetch activeCondUsageCursor bulk collect
3669: into

Line 3666: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),

3662: preRuleThresholdIn => engPriorityThresholds(ame_util.preListGroupRuleType),
3663: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3664: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3665: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),
3666: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),
3667: headerItemClassIdIn => getItemClassId(itemClassNameIn => ame_util.headerItemClassName));
3668: fetch activeCondUsageCursor bulk collect
3669: into
3670: engACUsageConditionIds,

Line 3667: headerItemClassIdIn => getItemClassId(itemClassNameIn => ame_util.headerItemClassName));

3663: postRulePriorityModeIn => engPriorityModes(ame_util.postListGroupRuleType),
3664: postRuleThresholdIn => engPriorityThresholds(ame_util.postListGroupRuleType),
3665: productionRulePriorityModeIn => engPriorityModes(ame_util.productionRuleType),
3666: productionRuleThresholdIn => engPriorityThresholds(ame_util.productionRuleType),
3667: headerItemClassIdIn => getItemClassId(itemClassNameIn => ame_util.headerItemClassName));
3668: fetch activeCondUsageCursor bulk collect
3669: into
3670: engACUsageConditionIds,
3671: tempACUConditionTypes,

Line 3766: ame_util.runtimeException(packageNameIn => 'ame_engine',

3762: end if;
3763: if(activeCondStringValueCursor%isopen) then
3764: close activeCondStringValueCursor;
3765: end if;
3766: ame_util.runtimeException(packageNameIn => 'ame_engine',
3767: routineNameIn => 'fetchActiveConditionUsages',
3768: exceptionNumberIn => sqlcode,
3769: exceptionStringIn => sqlerrm);
3770: raise;

Line 3786: nvl(ame_actions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3782: ame_actions.action_id = ame_action_usages.action_id and
3783: ame_action_usages.rule_id = ruleIdIn and
3784: engEffectiveRuleDate between
3785: ame_actions.start_date and
3786: nvl(ame_actions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3787: engEffectiveRuleDate between
3788: ame_action_usages.start_date and
3789: nvl(ame_action_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate);
3790: productionActionTypeId integer;

Line 3789: nvl(ame_action_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate);

3785: ame_actions.start_date and
3786: nvl(ame_actions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3787: engEffectiveRuleDate between
3788: ame_action_usages.start_date and
3789: nvl(ame_action_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate);
3790: productionActionTypeId integer;
3791: tempActionTypeIds ame_util.idList;
3792: tempBoolean boolean;
3793: tempNewRuleIndex integer;

Line 3791: tempActionTypeIds ame_util.idList;

3787: engEffectiveRuleDate between
3788: ame_action_usages.start_date and
3789: nvl(ame_action_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate);
3790: productionActionTypeId integer;
3791: tempActionTypeIds ame_util.idList;
3792: tempBoolean boolean;
3793: tempNewRuleIndex integer;
3794: tempRuleCount integer;
3795: tempRuleIndex integer;

Line 3796: tempParameters ame_util.stringList;

3792: tempBoolean boolean;
3793: tempNewRuleIndex integer;
3794: tempRuleCount integer;
3795: tempRuleIndex integer;
3796: tempParameters ame_util.stringList;
3797: tempParameterTwos ame_util.stringList;
3798: tempPerAppProdIndex integer;
3799: begin
3800: /* Initialize per-approver-production variables. */

Line 3797: tempParameterTwos ame_util.stringList;

3793: tempNewRuleIndex integer;
3794: tempRuleCount integer;
3795: tempRuleIndex integer;
3796: tempParameters ame_util.stringList;
3797: tempParameterTwos ame_util.stringList;
3798: tempPerAppProdIndex integer;
3799: begin
3800: /* Initialize per-approver-production variables. */
3801: productionActionTypeId := getActionTypeId(actionTypeNameIn => ame_util.productionActionTypeName);

Line 3801: productionActionTypeId := getActionTypeId(actionTypeNameIn => ame_util.productionActionTypeName);

3797: tempParameterTwos ame_util.stringList;
3798: tempPerAppProdIndex integer;
3799: begin
3800: /* Initialize per-approver-production variables. */
3801: productionActionTypeId := getActionTypeId(actionTypeNameIn => ame_util.productionActionTypeName);
3802: tempPerAppProdIndex := 0; /* pre-increment */
3803: /* Delete priorities, to make sure they don't get used from here on. */
3804: engAppPriorities.delete;
3805: /* Fetch each applicable rule's actions. */

Line 3820: if(engAppRuleTypes(i) <> ame_util.productionRuleType) then

3816: tempParameters,
3817: tempParameterTwos;
3818: close applicableActionsCursor;
3819: /* Populate the engAppPerAppProd variables. */
3820: if(engAppRuleTypes(i) <> ame_util.productionRuleType) then
3821: tempBoolean := true; /* Here tempBoolean is true until a production action for this rule is found. */
3822: for j in 1 .. tempActionTypeIds.count loop
3823: if(engActionTypeUsages(tempActionTypeIds(j)) = ame_util.productionRuleType) then
3824: tempPerAppProdIndex := tempPerAppProdIndex + 1;

Line 3823: if(engActionTypeUsages(tempActionTypeIds(j)) = ame_util.productionRuleType) then

3819: /* Populate the engAppPerAppProd variables. */
3820: if(engAppRuleTypes(i) <> ame_util.productionRuleType) then
3821: tempBoolean := true; /* Here tempBoolean is true until a production action for this rule is found. */
3822: for j in 1 .. tempActionTypeIds.count loop
3823: if(engActionTypeUsages(tempActionTypeIds(j)) = ame_util.productionRuleType) then
3824: tempPerAppProdIndex := tempPerAppProdIndex + 1;
3825: if(tempBoolean) then
3826: tempBoolean := false;
3827: engAppPerAppProdFirstIndexes(engAppRuleIds(i)) := tempPerAppProdIndex;

Line 3871: if(engAppRuleTypes(i) = ame_util.combinationRuleType) then

3867: end loop;
3868: end loop;
3869: /* Convert combination rules to other rule types. */
3870: for i in 1 .. engAppRuleTypes.count loop
3871: if(engAppRuleTypes(i) = ame_util.combinationRuleType) then
3872: engAppRuleTypes(i) := engActionTypeUsages(engAppActionTypeIds(i));
3873: /* The following if statement was added to resolve bug 3522880. */
3874: if(engAppRuleTypes(i) in (ame_util.listModRuleType, ame_util.substitutionRuleType)) then
3875: engAppLMSubItemClassIds(engAppRuleIds(i)) := engAppRuleItemClassIds(i);

Line 3874: if(engAppRuleTypes(i) in (ame_util.listModRuleType, ame_util.substitutionRuleType)) then

3870: for i in 1 .. engAppRuleTypes.count loop
3871: if(engAppRuleTypes(i) = ame_util.combinationRuleType) then
3872: engAppRuleTypes(i) := engActionTypeUsages(engAppActionTypeIds(i));
3873: /* The following if statement was added to resolve bug 3522880. */
3874: if(engAppRuleTypes(i) in (ame_util.listModRuleType, ame_util.substitutionRuleType)) then
3875: engAppLMSubItemClassIds(engAppRuleIds(i)) := engAppRuleItemClassIds(i);
3876: engAppLMSubItemIds(engAppRuleIds(i)) := engAppAppItemIds(i);
3877: engAppRuleItemClassIds(i) := null;
3878: engAppAppItemIds(i) := null;

Line 3892: -- if(engAppRuleTypes(i) in (ame_util.listModRuleType, ame_util.substitutionRuleType)) then

3888: sortApplicableRules(sortByActionTypeIn => true);
3889: /* Restore the item-class IDs and item IDs of list-modification and substitution rules. */
3890: for i in 1 .. engAppRuleIds.count loop
3891: /* The following if statement was changed to resolve bug 3522880. */
3892: -- if(engAppRuleTypes(i) in (ame_util.listModRuleType, ame_util.substitutionRuleType)) then
3893: if(engAppRuleItemClassIds(i) is null) then
3894: engAppRuleItemClassIds(i) := engAppLMSubItemClassIds(engAppRuleIds(i));
3895: engAppAppItemIds(i) := engAppLMSubItemIds(engAppRuleIds(i));
3896: engRuleAppliedYN(i) := ame_util.booleanFalse;

Line 3896: engRuleAppliedYN(i) := ame_util.booleanFalse;

3892: -- if(engAppRuleTypes(i) in (ame_util.listModRuleType, ame_util.substitutionRuleType)) then
3893: if(engAppRuleItemClassIds(i) is null) then
3894: engAppRuleItemClassIds(i) := engAppLMSubItemClassIds(engAppRuleIds(i));
3895: engAppAppItemIds(i) := engAppLMSubItemIds(engAppRuleIds(i));
3896: engRuleAppliedYN(i) := ame_util.booleanFalse;
3897: end if;
3898: end loop;
3899: engAppLMSubItemClassIds.delete;
3900: engAppLMSubItemIds.delete;

Line 3906: ame_util.runtimeException(packageNameIn => 'ame_engine',

3902: when others then
3903: if(applicableActionsCursor%isopen) then
3904: close applicableActionsCursor;
3905: end if;
3906: ame_util.runtimeException(packageNameIn => 'ame_engine',
3907: routineNameIn => 'fetchApplicableActions',
3908: exceptionNumberIn => sqlcode,
3909: exceptionStringIn => sqlerrm);
3910: raise;

Line 3927: ame_attributes.name not in (ame_util.workflowItemKeyAttribute, ame_util.workflowItemTypeAttribute) and

3923: ame_attributes,
3924: ame_attribute_usages,
3925: ame_item_class_usages
3926: where
3927: ame_attributes.name not in (ame_util.workflowItemKeyAttribute, ame_util.workflowItemTypeAttribute) and
3928: ame_attributes.attribute_id = ame_attribute_usages.attribute_id and
3929: ame_attribute_usages.application_id = applicationIdIn and
3930: ame_item_class_usages.application_id = applicationIdIn and
3931: ame_attributes.item_class_id = ame_item_class_usages.item_class_id and

Line 3932: (fetchInactivesIn = ame_util.booleanTrue or

3928: ame_attributes.attribute_id = ame_attribute_usages.attribute_id and
3929: ame_attribute_usages.application_id = applicationIdIn and
3930: ame_item_class_usages.application_id = applicationIdIn and
3931: ame_attributes.item_class_id = ame_item_class_usages.item_class_id and
3932: (fetchInactivesIn = ame_util.booleanTrue or
3933: ame_attribute_usages.use_count > 0 or
3934: ame_attributes.attribute_id in
3935: (select ame_attributes2.attribute_id
3936: from

Line 3944: nvl(ame_attributes2.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3940: ame_attributes2.attribute_id = ame_mandatory_attributes.attribute_id and
3941: ame_mandatory_attributes.action_type_id = -1 and
3942: engEffectiveRuleDate between
3943: ame_attributes2.start_date and
3944: nvl(ame_attributes2.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3945: engEffectiveRuleDate between
3946: ame_mandatory_attributes.start_date and
3947: nvl(ame_mandatory_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate))) and
3948: engEffectiveRuleDate between

Line 3947: nvl(ame_mandatory_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate))) and

3943: ame_attributes2.start_date and
3944: nvl(ame_attributes2.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3945: engEffectiveRuleDate between
3946: ame_mandatory_attributes.start_date and
3947: nvl(ame_mandatory_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate))) and
3948: engEffectiveRuleDate between
3949: ame_attributes.start_date and
3950: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3951: engEffectiveRuleDate between

Line 3950: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3946: ame_mandatory_attributes.start_date and
3947: nvl(ame_mandatory_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate))) and
3948: engEffectiveRuleDate between
3949: ame_attributes.start_date and
3950: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3951: engEffectiveRuleDate between
3952: ame_attribute_usages.start_date and
3953: nvl(ame_attribute_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3954: engEffectiveRuleDate between

Line 3953: nvl(ame_attribute_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

3949: ame_attributes.start_date and
3950: nvl(ame_attributes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3951: engEffectiveRuleDate between
3952: ame_attribute_usages.start_date and
3953: nvl(ame_attribute_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3954: engEffectiveRuleDate between
3955: ame_item_class_usages.start_date and
3956: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3957: /*

Line 3956: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)

3952: ame_attribute_usages.start_date and
3953: nvl(ame_attribute_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
3954: engEffectiveRuleDate between
3955: ame_item_class_usages.start_date and
3956: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
3957: /*
3958: The order-by conditions are all necessary. The second is to break
3959: item_class_order_number ties in a determinate order. The third is
3960: to display attribute names in alphabetical order on the test tab.

Line 3993: item_class_id = getItemClassId(ame_util.headerItemClassName) and

3989: where
3990: application_id = engAmeApplicationId and
3991: transaction_id = engTransactionId and
3992: attribute_id = attributeIdIn and
3993: item_class_id = getItemClassId(ame_util.headerItemClassName) and
3994: item_id = engTransactionId;
3995: attributeCount integer;
3996: attributeIds ame_util.idList;
3997: attributeItemClassIds ame_util.idList;

Line 3996: attributeIds ame_util.idList;

3992: attribute_id = attributeIdIn and
3993: item_class_id = getItemClassId(ame_util.headerItemClassName) and
3994: item_id = engTransactionId;
3995: attributeCount integer;
3996: attributeIds ame_util.idList;
3997: attributeItemClassIds ame_util.idList;
3998: attributeNames ame_util.stringList;
3999: attributeTypes ame_util.stringList;
4000: dynamicCursor integer;

Line 3997: attributeItemClassIds ame_util.idList;

3993: item_class_id = getItemClassId(ame_util.headerItemClassName) and
3994: item_id = engTransactionId;
3995: attributeCount integer;
3996: attributeIds ame_util.idList;
3997: attributeItemClassIds ame_util.idList;
3998: attributeNames ame_util.stringList;
3999: attributeTypes ame_util.stringList;
4000: dynamicCursor integer;
4001: dynamicQuery ame_util.longestStringType;

Line 3998: attributeNames ame_util.stringList;

3994: item_id = engTransactionId;
3995: attributeCount integer;
3996: attributeIds ame_util.idList;
3997: attributeItemClassIds ame_util.idList;
3998: attributeNames ame_util.stringList;
3999: attributeTypes ame_util.stringList;
4000: dynamicCursor integer;
4001: dynamicQuery ame_util.longestStringType;
4002: errorCode integer;

Line 3999: attributeTypes ame_util.stringList;

3995: attributeCount integer;
3996: attributeIds ame_util.idList;
3997: attributeItemClassIds ame_util.idList;
3998: attributeNames ame_util.stringList;
3999: attributeTypes ame_util.stringList;
4000: dynamicCursor integer;
4001: dynamicQuery ame_util.longestStringType;
4002: errorCode integer;
4003: errorMessage ame_util.longestStringType;

Line 4001: dynamicQuery ame_util.longestStringType;

3997: attributeItemClassIds ame_util.idList;
3998: attributeNames ame_util.stringList;
3999: attributeTypes ame_util.stringList;
4000: dynamicCursor integer;
4001: dynamicQuery ame_util.longestStringType;
4002: errorCode integer;
4003: errorMessage ame_util.longestStringType;
4004: fetchInactives varchar2(1);
4005: isStatics ame_util.charList;

Line 4003: errorMessage ame_util.longestStringType;

3999: attributeTypes ame_util.stringList;
4000: dynamicCursor integer;
4001: dynamicQuery ame_util.longestStringType;
4002: errorCode integer;
4003: errorMessage ame_util.longestStringType;
4004: fetchInactives varchar2(1);
4005: isStatics ame_util.charList;
4006: queryStrings ame_util.longestStringList;
4007: rowCountException exception;

Line 4005: isStatics ame_util.charList;

4001: dynamicQuery ame_util.longestStringType;
4002: errorCode integer;
4003: errorMessage ame_util.longestStringType;
4004: fetchInactives varchar2(1);
4005: isStatics ame_util.charList;
4006: queryStrings ame_util.longestStringList;
4007: rowCountException exception;
4008: rowsFound integer;
4009: tempAttributeId integer;

Line 4006: queryStrings ame_util.longestStringList;

4002: errorCode integer;
4003: errorMessage ame_util.longestStringType;
4004: fetchInactives varchar2(1);
4005: isStatics ame_util.charList;
4006: queryStrings ame_util.longestStringList;
4007: rowCountException exception;
4008: rowsFound integer;
4009: tempAttributeId integer;
4010: tempAttributeName ame_attributes.name%type;

Line 4012: tempAttributeValue1 ame_util.attributeValueType;

4008: rowsFound integer;
4009: tempAttributeId integer;
4010: tempAttributeName ame_attributes.name%type;
4011: tempAttributeType ame_attributes.attribute_type%type;
4012: tempAttributeValue1 ame_util.attributeValueType;
4013: tempAttributeValue2 ame_util.attributeValueType;
4014: tempAttributeValue3 ame_util.attributeValueType;
4015: tempAttributeValueIndex integer;
4016: tempAttributeValues1 dbms_sql.varchar2_table;

Line 4013: tempAttributeValue2 ame_util.attributeValueType;

4009: tempAttributeId integer;
4010: tempAttributeName ame_attributes.name%type;
4011: tempAttributeType ame_attributes.attribute_type%type;
4012: tempAttributeValue1 ame_util.attributeValueType;
4013: tempAttributeValue2 ame_util.attributeValueType;
4014: tempAttributeValue3 ame_util.attributeValueType;
4015: tempAttributeValueIndex integer;
4016: tempAttributeValues1 dbms_sql.varchar2_table;
4017: tempAttributeValues2 dbms_sql.varchar2_table;

Line 4014: tempAttributeValue3 ame_util.attributeValueType;

4010: tempAttributeName ame_attributes.name%type;
4011: tempAttributeType ame_attributes.attribute_type%type;
4012: tempAttributeValue1 ame_util.attributeValueType;
4013: tempAttributeValue2 ame_util.attributeValueType;
4014: tempAttributeValue3 ame_util.attributeValueType;
4015: tempAttributeValueIndex integer;
4016: tempAttributeValues1 dbms_sql.varchar2_table;
4017: tempAttributeValues2 dbms_sql.varchar2_table;
4018: tempAttributeValues3 dbms_sql.varchar2_table;

Line 4026: fetchInactives := ame_util.booleanTrue;

4022: fetchInactives is necessary because we can't use a PL/SQL boolean variable
4023: in a select statement.
4024: */
4025: if(fetchInactivesIn) then
4026: fetchInactives := ame_util.booleanTrue;
4027: else
4028: fetchInactives := ame_util.booleanFalse;
4029: end if;
4030: /* Bulk fetch attributeCursor into a PL/SQL table. */

Line 4028: fetchInactives := ame_util.booleanFalse;

4024: */
4025: if(fetchInactivesIn) then
4026: fetchInactives := ame_util.booleanTrue;
4027: else
4028: fetchInactives := ame_util.booleanFalse;
4029: end if;
4030: /* Bulk fetch attributeCursor into a PL/SQL table. */
4031: open attributeCursor(applicationIdIn => engAmeApplicationId,
4032: fetchInactivesIn => fetchInactives);

Line 4061: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),

4057: engAttributeNames(tempAttributeId) := attributeNames(i);
4058: engAttributeTypes(tempAttributeId) := attributeTypes(i);
4059: engAttributeItemClassIds(tempAttributeId) := attributeItemClassIds(i);
4060: /* Check if the attribute is a variant and set the engAttributeQueries and engAttributeVariant accordingly */
4061: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),
4062: replaceWithSpaces => true);
4063: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then
4064: if ((isStatics(i) = ame_util.booleanFalse) and
4065: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or

Line 4063: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then

4059: engAttributeItemClassIds(tempAttributeId) := attributeItemClassIds(i);
4060: /* Check if the attribute is a variant and set the engAttributeQueries and engAttributeVariant accordingly */
4061: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),
4062: replaceWithSpaces => true);
4063: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then
4064: if ((isStatics(i) = ame_util.booleanFalse) and
4065: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or
4066: instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0)) then
4067: engAttributeVariant(tempAttributeId) := ame_util.booleanTrue;

Line 4064: if ((isStatics(i) = ame_util.booleanFalse) and

4060: /* Check if the attribute is a variant and set the engAttributeQueries and engAttributeVariant accordingly */
4061: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),
4062: replaceWithSpaces => true);
4063: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then
4064: if ((isStatics(i) = ame_util.booleanFalse) and
4065: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or
4066: instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0)) then
4067: engAttributeVariant(tempAttributeId) := ame_util.booleanTrue;
4068: engAttributeQueries(tempAttributeId) := queryStrings(i);

Line 4065: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or

4061: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),
4062: replaceWithSpaces => true);
4063: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then
4064: if ((isStatics(i) = ame_util.booleanFalse) and
4065: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or
4066: instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0)) then
4067: engAttributeVariant(tempAttributeId) := ame_util.booleanTrue;
4068: engAttributeQueries(tempAttributeId) := queryStrings(i);
4069: end if;

Line 4066: instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0)) then

4062: replaceWithSpaces => true);
4063: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then
4064: if ((isStatics(i) = ame_util.booleanFalse) and
4065: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or
4066: instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0)) then
4067: engAttributeVariant(tempAttributeId) := ame_util.booleanTrue;
4068: engAttributeQueries(tempAttributeId) := queryStrings(i);
4069: end if;
4070: end if;

Line 4067: engAttributeVariant(tempAttributeId) := ame_util.booleanTrue;

4063: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then
4064: if ((isStatics(i) = ame_util.booleanFalse) and
4065: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or
4066: instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0)) then
4067: engAttributeVariant(tempAttributeId) := ame_util.booleanTrue;
4068: engAttributeQueries(tempAttributeId) := queryStrings(i);
4069: end if;
4070: end if;
4071: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then

Line 4091: if(checkAttributeVariant(tempAttributeId) = ame_util.booleanTrue) then

4087: if(engIsTestTransaction) then
4088: tempAttributeValues1.delete;
4089: tempAttributeValues2.delete;
4090: tempAttributeValues3.delete;
4091: if(checkAttributeVariant(tempAttributeId) = ame_util.booleanTrue) then
4092: open testTransVariantHeaderCursor(attributeIdIn => tempAttributeId);
4093: fetch testTransVariantHeaderCursor bulk collect
4094: into tempAttributeValues1;
4095: close testTransVariantHeaderCursor;

Line 4097: if(tempAttributeType = ame_util.currencyAttributeType) then

4093: fetch testTransVariantHeaderCursor bulk collect
4094: into tempAttributeValues1;
4095: close testTransVariantHeaderCursor;
4096: else
4097: if(tempAttributeType = ame_util.currencyAttributeType) then
4098: open testTransCurrencyCursor(attributeIdIn => tempAttributeId);
4099: fetch testTransCurrencyCursor bulk collect
4100: into
4101: tempAttributeValues1,

Line 4115: if(tempAttributeType = ame_util.currencyAttributeType) then

4111: end if;
4112: for j in 1 .. tempAttributeValues1.count loop
4113: tempAttributeValueIndex := tempAttributeValueIndex + 1;
4114: engAttributeValues1(tempAttributeValueIndex) := tempAttributeValues1(j);
4115: if(tempAttributeType = ame_util.currencyAttributeType) then
4116: engAttributeValues2(tempAttributeValueIndex) := tempAttributeValues2(j);
4117: engAttributeValues3(tempAttributeValueIndex) := tempAttributeValues3(j);
4118: else
4119: engAttributeValues2(tempAttributeValueIndex) := null;

Line 4148: if(isStatics(i) = ame_util.booleanTrue) then

4144: end if;
4145: end loop;
4146: end if;
4147: else
4148: if(isStatics(i) = ame_util.booleanTrue) then
4149: /*
4150: Write the static usage into the attribute-value package variables once for each item
4151: of the attribute's item class.
4152: */

Line 4153: if(attributeTypes(i) = ame_util.currencyAttributeType) then

4149: /*
4150: Write the static usage into the attribute-value package variables once for each item
4151: of the attribute's item class.
4152: */
4153: if(attributeTypes(i) = ame_util.currencyAttributeType) then
4154: ame_util.parseStaticCurAttValue(applicationIdIn => engAmeApplicationId,
4155: attributeIdIn => tempAttributeId,
4156: attributeValueIn => queryStrings(i),
4157: localErrorIn => false,

Line 4154: ame_util.parseStaticCurAttValue(applicationIdIn => engAmeApplicationId,

4150: Write the static usage into the attribute-value package variables once for each item
4151: of the attribute's item class.
4152: */
4153: if(attributeTypes(i) = ame_util.currencyAttributeType) then
4154: ame_util.parseStaticCurAttValue(applicationIdIn => engAmeApplicationId,
4155: attributeIdIn => tempAttributeId,
4156: attributeValueIn => queryStrings(i),
4157: localErrorIn => false,
4158: amountOut => tempAttributeValue1,

Line 4186: ame_util.transactionIdPlaceholder in dynamicQuery get bound.

4182: tempAttributeValues2.delete;
4183: tempAttributeValues3.delete;
4184: /*
4185: We need to do old-style dynamic PL/SQL here to make sure all occurrences of
4186: ame_util.transactionIdPlaceholder in dynamicQuery get bound.
4187: */
4188: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),
4189: replaceWithSpaces => true);
4190: dynamicCursor := dbms_sql.open_cursor;

Line 4188: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),

4184: /*
4185: We need to do old-style dynamic PL/SQL here to make sure all occurrences of
4186: ame_util.transactionIdPlaceholder in dynamicQuery get bound.
4187: */
4188: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),
4189: replaceWithSpaces => true);
4190: dynamicCursor := dbms_sql.open_cursor;
4191: dbms_sql.parse(dynamicCursor,
4192: dynamicQuery,

Line 4194: if(instrb(dynamicQuery, ame_util.transactionIdPlaceholder) > 0) then

4190: dynamicCursor := dbms_sql.open_cursor;
4191: dbms_sql.parse(dynamicCursor,
4192: dynamicQuery,
4193: dbms_sql.native);
4194: if(instrb(dynamicQuery, ame_util.transactionIdPlaceholder) > 0) then
4195: dbms_sql.bind_variable(dynamicCursor,
4196: ame_util.transactionIdPlaceholder,
4197: engTransactionId,
4198: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */

Line 4196: ame_util.transactionIdPlaceholder,

4192: dynamicQuery,
4193: dbms_sql.native);
4194: if(instrb(dynamicQuery, ame_util.transactionIdPlaceholder) > 0) then
4195: dbms_sql.bind_variable(dynamicCursor,
4196: ame_util.transactionIdPlaceholder,
4197: engTransactionId,
4198: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4199: end if;
4200: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then

Line 4200: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then

4196: ame_util.transactionIdPlaceholder,
4197: engTransactionId,
4198: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4199: end if;
4200: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then
4201: dbms_sql.bind_variable(dynamicCursor,
4202: ame_util2.itemClassPlaceHolder,
4203: ame_util.headerItemClassName,
4204: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */

Line 4202: ame_util2.itemClassPlaceHolder,

4198: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4199: end if;
4200: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then
4201: dbms_sql.bind_variable(dynamicCursor,
4202: ame_util2.itemClassPlaceHolder,
4203: ame_util.headerItemClassName,
4204: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4205: end if;
4206: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then

Line 4203: ame_util.headerItemClassName,

4199: end if;
4200: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then
4201: dbms_sql.bind_variable(dynamicCursor,
4202: ame_util2.itemClassPlaceHolder,
4203: ame_util.headerItemClassName,
4204: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4205: end if;
4206: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then
4207: dbms_sql.bind_variable(dynamicCursor,

Line 4206: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then

4202: ame_util2.itemClassPlaceHolder,
4203: ame_util.headerItemClassName,
4204: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4205: end if;
4206: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then
4207: dbms_sql.bind_variable(dynamicCursor,
4208: ame_util2.itemIdPlaceHolder,
4209: engTransactionId,
4210: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */

Line 4208: ame_util2.itemIdPlaceHolder,

4204: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4205: end if;
4206: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then
4207: dbms_sql.bind_variable(dynamicCursor,
4208: ame_util2.itemIdPlaceHolder,
4209: engTransactionId,
4210: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4211: end if;
4212: dbms_sql.define_array(dynamicCursor,

Line 4215: ame_util.attributeValueTypeLength,

4211: end if;
4212: dbms_sql.define_array(dynamicCursor,
4213: 1,
4214: tempAttributeValues1,
4215: ame_util.attributeValueTypeLength,
4216: 1);
4217: if(tempAttributeType = ame_util.currencyAttributeType) then
4218: dbms_sql.define_array(dynamicCursor,
4219: 2,

Line 4217: if(tempAttributeType = ame_util.currencyAttributeType) then

4213: 1,
4214: tempAttributeValues1,
4215: ame_util.attributeValueTypeLength,
4216: 1);
4217: if(tempAttributeType = ame_util.currencyAttributeType) then
4218: dbms_sql.define_array(dynamicCursor,
4219: 2,
4220: tempAttributeValues2,
4221: ame_util.attributeValueTypeLength,

Line 4221: ame_util.attributeValueTypeLength,

4217: if(tempAttributeType = ame_util.currencyAttributeType) then
4218: dbms_sql.define_array(dynamicCursor,
4219: 2,
4220: tempAttributeValues2,
4221: ame_util.attributeValueTypeLength,
4222: 1);
4223: dbms_sql.define_array(dynamicCursor,
4224: 3,
4225: tempAttributeValues3,

Line 4226: ame_util.attributeValueTypeLength,

4222: 1);
4223: dbms_sql.define_array(dynamicCursor,
4224: 3,
4225: tempAttributeValues3,
4226: ame_util.attributeValueTypeLength,
4227: 1);
4228: end if;
4229: rowsFound := dbms_sql.execute(dynamicCursor);
4230: loop

Line 4235: if(tempAttributeType = ame_util.currencyAttributeType) then

4231: rowsFound := dbms_sql.fetch_rows(dynamicCursor);
4232: dbms_sql.column_value(dynamicCursor,
4233: 1,
4234: tempAttributeValues1);
4235: if(tempAttributeType = ame_util.currencyAttributeType) then
4236: dbms_sql.column_value(dynamicCursor,
4237: 2,
4238: tempAttributeValues2);
4239: dbms_sql.column_value(dynamicCursor,

Line 4254: if(tempAttributeType = ame_util.currencyAttributeType) then

4250: /* Transfer the attribute values into the appropriate package variables. */
4251: for j in 1 .. tempAttributeValues1.count loop
4252: tempAttributeValueIndex := tempAttributeValueIndex + 1;
4253: engAttributeValues1(tempAttributeValueIndex) := tempAttributeValues1(j);
4254: if(tempAttributeType = ame_util.currencyAttributeType) then
4255: engAttributeValues2(tempAttributeValueIndex) := tempAttributeValues2(j);
4256: engAttributeValues3(tempAttributeValueIndex) := tempAttributeValues3(j);
4257: else
4258: engAttributeValues2(tempAttributeValueIndex) := null;

Line 4300: ame_util.getMessage(applicationShortNameIn =>'PER',

4296: );
4297: end if;
4298: errorCode := -20001;
4299: errorMessage :=
4300: ame_util.getMessage(applicationShortNameIn =>'PER',
4301: messageNameIn => 'AME_400684_ATR_INV_DYN_USG',
4302: tokenNameOneIn => 'ATTRIBUTE_NAME',
4303: tokenValueOneIn => tempAttributeName);
4304: ame_util.runtimeException(packageNameIn => 'ame_engine',

Line 4304: ame_util.runtimeException(packageNameIn => 'ame_engine',

4300: ame_util.getMessage(applicationShortNameIn =>'PER',
4301: messageNameIn => 'AME_400684_ATR_INV_DYN_USG',
4302: tokenNameOneIn => 'ATTRIBUTE_NAME',
4303: tokenValueOneIn => tempAttributeName);
4304: ame_util.runtimeException(packageNameIn => 'ame_engine',
4305: routineNameIn => 'fetchAttributeValues',
4306: exceptionNumberIn => errorCode,
4307: exceptionStringIn => errorMessage);
4308: raise_application_error(errorCode,

Line 4332: ame_util.runtimeException(packageNameIn => 'ame_engine',

4328: ,'ame_engine.fetchAttributeValues'
4329: ,'Attribute ::: ' || tempAttributeName || '(' || tempAttributeId || '),error:'||errorMessage
4330: );
4331: end if;
4332: ame_util.runtimeException(packageNameIn => 'ame_engine',
4333: routineNameIn => 'fetchAttributeValues',
4334: exceptionNumberIn => sqlcode,
4335: exceptionStringIn => errorMessage);
4336: raise;

Line 4352: ame_attributes.name not in (ame_util.workflowItemKeyAttribute, ame_util.workflowItemTypeAttribute) and

4348: ame_attributes,
4349: ame_attribute_usages,
4350: ame_item_class_usages
4351: where
4352: ame_attributes.name not in (ame_util.workflowItemKeyAttribute, ame_util.workflowItemTypeAttribute) and
4353: ame_attributes.attribute_id = ame_attribute_usages.attribute_id and
4354: ame_attribute_usages.application_id = applicationIdIn and
4355: ame_item_class_usages.application_id = applicationIdIn and
4356: ame_attributes.item_class_id = ame_item_class_usages.item_class_id and

Line 4368: nvl(ame_attributes2.end_date - ame_util.oneSecond, sysdate) and

4364: ame_attributes2.attribute_id = ame_mandatory_attributes.attribute_id and
4365: ame_mandatory_attributes.action_type_id = -1 and
4366: sysdate between
4367: ame_attributes2.start_date and
4368: nvl(ame_attributes2.end_date - ame_util.oneSecond, sysdate) and
4369: sysdate between
4370: ame_mandatory_attributes.start_date and
4371: nvl(ame_mandatory_attributes.end_date - ame_util.oneSecond, sysdate))) and
4372: sysdate between

Line 4371: nvl(ame_mandatory_attributes.end_date - ame_util.oneSecond, sysdate))) and

4367: ame_attributes2.start_date and
4368: nvl(ame_attributes2.end_date - ame_util.oneSecond, sysdate) and
4369: sysdate between
4370: ame_mandatory_attributes.start_date and
4371: nvl(ame_mandatory_attributes.end_date - ame_util.oneSecond, sysdate))) and
4372: sysdate between
4373: ame_attributes.start_date and
4374: nvl(ame_attributes.end_date - ame_util.oneSecond, sysdate) and
4375: sysdate between

Line 4374: nvl(ame_attributes.end_date - ame_util.oneSecond, sysdate) and

4370: ame_mandatory_attributes.start_date and
4371: nvl(ame_mandatory_attributes.end_date - ame_util.oneSecond, sysdate))) and
4372: sysdate between
4373: ame_attributes.start_date and
4374: nvl(ame_attributes.end_date - ame_util.oneSecond, sysdate) and
4375: sysdate between
4376: ame_attribute_usages.start_date and
4377: nvl(ame_attribute_usages.end_date - ame_util.oneSecond, sysdate) and
4378: sysdate between

Line 4377: nvl(ame_attribute_usages.end_date - ame_util.oneSecond, sysdate) and

4373: ame_attributes.start_date and
4374: nvl(ame_attributes.end_date - ame_util.oneSecond, sysdate) and
4375: sysdate between
4376: ame_attribute_usages.start_date and
4377: nvl(ame_attribute_usages.end_date - ame_util.oneSecond, sysdate) and
4378: sysdate between
4379: ame_item_class_usages.start_date and
4380: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, sysdate) and
4381: -- Condition to check whether the attribute is used in the rule

Line 4380: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, sysdate) and

4376: ame_attribute_usages.start_date and
4377: nvl(ame_attribute_usages.end_date - ame_util.oneSecond, sysdate) and
4378: sysdate between
4379: ame_item_class_usages.start_date and
4380: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, sysdate) and
4381: -- Condition to check whether the attribute is used in the rule
4382: exists
4383: (
4384: select 1

Line 4463: item_class_id = getItemClassId(ame_util.headerItemClassName) and

4459: where
4460: application_id = engAmeApplicationId and
4461: transaction_id = engTransactionId and
4462: attribute_id = attributeIdIn and
4463: item_class_id = getItemClassId(ame_util.headerItemClassName) and
4464: item_id = engTransactionId;
4465: attributeCount integer;
4466: attributeIds ame_util.idList;
4467: attributeItemClassIds ame_util.idList;

Line 4466: attributeIds ame_util.idList;

4462: attribute_id = attributeIdIn and
4463: item_class_id = getItemClassId(ame_util.headerItemClassName) and
4464: item_id = engTransactionId;
4465: attributeCount integer;
4466: attributeIds ame_util.idList;
4467: attributeItemClassIds ame_util.idList;
4468: attributeNames ame_util.stringList;
4469: attributeTypes ame_util.stringList;
4470: dynamicCursor integer;

Line 4467: attributeItemClassIds ame_util.idList;

4463: item_class_id = getItemClassId(ame_util.headerItemClassName) and
4464: item_id = engTransactionId;
4465: attributeCount integer;
4466: attributeIds ame_util.idList;
4467: attributeItemClassIds ame_util.idList;
4468: attributeNames ame_util.stringList;
4469: attributeTypes ame_util.stringList;
4470: dynamicCursor integer;
4471: dynamicQuery ame_util.longestStringType;

Line 4468: attributeNames ame_util.stringList;

4464: item_id = engTransactionId;
4465: attributeCount integer;
4466: attributeIds ame_util.idList;
4467: attributeItemClassIds ame_util.idList;
4468: attributeNames ame_util.stringList;
4469: attributeTypes ame_util.stringList;
4470: dynamicCursor integer;
4471: dynamicQuery ame_util.longestStringType;
4472: errorCode integer;

Line 4469: attributeTypes ame_util.stringList;

4465: attributeCount integer;
4466: attributeIds ame_util.idList;
4467: attributeItemClassIds ame_util.idList;
4468: attributeNames ame_util.stringList;
4469: attributeTypes ame_util.stringList;
4470: dynamicCursor integer;
4471: dynamicQuery ame_util.longestStringType;
4472: errorCode integer;
4473: errorMessage ame_util.longestStringType;

Line 4471: dynamicQuery ame_util.longestStringType;

4467: attributeItemClassIds ame_util.idList;
4468: attributeNames ame_util.stringList;
4469: attributeTypes ame_util.stringList;
4470: dynamicCursor integer;
4471: dynamicQuery ame_util.longestStringType;
4472: errorCode integer;
4473: errorMessage ame_util.longestStringType;
4474: fetchInactives varchar2(1);
4475: isStatics ame_util.charList;

Line 4473: errorMessage ame_util.longestStringType;

4469: attributeTypes ame_util.stringList;
4470: dynamicCursor integer;
4471: dynamicQuery ame_util.longestStringType;
4472: errorCode integer;
4473: errorMessage ame_util.longestStringType;
4474: fetchInactives varchar2(1);
4475: isStatics ame_util.charList;
4476: queryStrings ame_util.longestStringList;
4477: rowCountException exception;

Line 4475: isStatics ame_util.charList;

4471: dynamicQuery ame_util.longestStringType;
4472: errorCode integer;
4473: errorMessage ame_util.longestStringType;
4474: fetchInactives varchar2(1);
4475: isStatics ame_util.charList;
4476: queryStrings ame_util.longestStringList;
4477: rowCountException exception;
4478: rowsFound integer;
4479: tempAttributeId integer;

Line 4476: queryStrings ame_util.longestStringList;

4472: errorCode integer;
4473: errorMessage ame_util.longestStringType;
4474: fetchInactives varchar2(1);
4475: isStatics ame_util.charList;
4476: queryStrings ame_util.longestStringList;
4477: rowCountException exception;
4478: rowsFound integer;
4479: tempAttributeId integer;
4480: tempAttributeName ame_attributes.name%type;

Line 4482: tempAttributeValue1 ame_util.attributeValueType;

4478: rowsFound integer;
4479: tempAttributeId integer;
4480: tempAttributeName ame_attributes.name%type;
4481: tempAttributeType ame_attributes.attribute_type%type;
4482: tempAttributeValue1 ame_util.attributeValueType;
4483: tempAttributeValue2 ame_util.attributeValueType;
4484: tempAttributeValue3 ame_util.attributeValueType;
4485: tempAttributeValueIndex integer;
4486: tempAttributeValues1 dbms_sql.varchar2_table;

Line 4483: tempAttributeValue2 ame_util.attributeValueType;

4479: tempAttributeId integer;
4480: tempAttributeName ame_attributes.name%type;
4481: tempAttributeType ame_attributes.attribute_type%type;
4482: tempAttributeValue1 ame_util.attributeValueType;
4483: tempAttributeValue2 ame_util.attributeValueType;
4484: tempAttributeValue3 ame_util.attributeValueType;
4485: tempAttributeValueIndex integer;
4486: tempAttributeValues1 dbms_sql.varchar2_table;
4487: tempAttributeValues2 dbms_sql.varchar2_table;

Line 4484: tempAttributeValue3 ame_util.attributeValueType;

4480: tempAttributeName ame_attributes.name%type;
4481: tempAttributeType ame_attributes.attribute_type%type;
4482: tempAttributeValue1 ame_util.attributeValueType;
4483: tempAttributeValue2 ame_util.attributeValueType;
4484: tempAttributeValue3 ame_util.attributeValueType;
4485: tempAttributeValueIndex integer;
4486: tempAttributeValues1 dbms_sql.varchar2_table;
4487: tempAttributeValues2 dbms_sql.varchar2_table;
4488: tempAttributeValues3 dbms_sql.varchar2_table;

Line 4521: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),

4517: engAttributeNames(tempAttributeId) := attributeNames(i);
4518: engAttributeTypes(tempAttributeId) := attributeTypes(i);
4519: engAttributeItemClassIds(tempAttributeId) := attributeItemClassIds(i);
4520: /* Check if the attribute is a variant and set the engAttributeQueries and engAttributeVariant accordingly */
4521: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),
4522: replaceWithSpaces => true);
4523: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then
4524: if ((isStatics(i) = ame_util.booleanFalse) and
4525: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or

Line 4523: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then

4519: engAttributeItemClassIds(tempAttributeId) := attributeItemClassIds(i);
4520: /* Check if the attribute is a variant and set the engAttributeQueries and engAttributeVariant accordingly */
4521: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),
4522: replaceWithSpaces => true);
4523: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then
4524: if ((isStatics(i) = ame_util.booleanFalse) and
4525: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or
4526: instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0)) then
4527: engAttributeVariant(tempAttributeId) := ame_util.booleanTrue;

Line 4524: if ((isStatics(i) = ame_util.booleanFalse) and

4520: /* Check if the attribute is a variant and set the engAttributeQueries and engAttributeVariant accordingly */
4521: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),
4522: replaceWithSpaces => true);
4523: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then
4524: if ((isStatics(i) = ame_util.booleanFalse) and
4525: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or
4526: instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0)) then
4527: engAttributeVariant(tempAttributeId) := ame_util.booleanTrue;
4528: engAttributeQueries(tempAttributeId) := queryStrings(i);

Line 4525: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or

4521: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),
4522: replaceWithSpaces => true);
4523: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then
4524: if ((isStatics(i) = ame_util.booleanFalse) and
4525: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or
4526: instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0)) then
4527: engAttributeVariant(tempAttributeId) := ame_util.booleanTrue;
4528: engAttributeQueries(tempAttributeId) := queryStrings(i);
4529: end if;

Line 4526: instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0)) then

4522: replaceWithSpaces => true);
4523: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then
4524: if ((isStatics(i) = ame_util.booleanFalse) and
4525: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or
4526: instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0)) then
4527: engAttributeVariant(tempAttributeId) := ame_util.booleanTrue;
4528: engAttributeQueries(tempAttributeId) := queryStrings(i);
4529: end if;
4530: end if;

Line 4527: engAttributeVariant(tempAttributeId) := ame_util.booleanTrue;

4523: if(checkAttributeVariant(attributeIdIn => tempAttributeId) = ame_util.booleanTrue) then
4524: if ((isStatics(i) = ame_util.booleanFalse) and
4525: (instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0 or
4526: instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0)) then
4527: engAttributeVariant(tempAttributeId) := ame_util.booleanTrue;
4528: engAttributeQueries(tempAttributeId) := queryStrings(i);
4529: end if;
4530: end if;
4531: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then

Line 4551: if(checkAttributeVariant(tempAttributeId) = ame_util.booleanTrue) then

4547: if(engIsTestTransaction) then
4548: tempAttributeValues1.delete;
4549: tempAttributeValues2.delete;
4550: tempAttributeValues3.delete;
4551: if(checkAttributeVariant(tempAttributeId) = ame_util.booleanTrue) then
4552: open testTransVariantHeaderCursor(attributeIdIn => tempAttributeId);
4553: fetch testTransVariantHeaderCursor bulk collect
4554: into tempAttributeValues1;
4555: close testTransVariantHeaderCursor;

Line 4557: if(tempAttributeType = ame_util.currencyAttributeType) then

4553: fetch testTransVariantHeaderCursor bulk collect
4554: into tempAttributeValues1;
4555: close testTransVariantHeaderCursor;
4556: else
4557: if(tempAttributeType = ame_util.currencyAttributeType) then
4558: open testTransCurrencyCursor(attributeIdIn => tempAttributeId);
4559: fetch testTransCurrencyCursor bulk collect
4560: into
4561: tempAttributeValues1,

Line 4575: if(tempAttributeType = ame_util.currencyAttributeType) then

4571: end if;
4572: for j in 1 .. tempAttributeValues1.count loop
4573: tempAttributeValueIndex := tempAttributeValueIndex + 1;
4574: engAttributeValues1(tempAttributeValueIndex) := tempAttributeValues1(j);
4575: if(tempAttributeType = ame_util.currencyAttributeType) then
4576: engAttributeValues2(tempAttributeValueIndex) := tempAttributeValues2(j);
4577: engAttributeValues3(tempAttributeValueIndex) := tempAttributeValues3(j);
4578: else
4579: engAttributeValues2(tempAttributeValueIndex) := null;

Line 4608: if(isStatics(i) = ame_util.booleanTrue) then

4604: end if;
4605: end loop;
4606: end if;
4607: else
4608: if(isStatics(i) = ame_util.booleanTrue) then
4609: /*
4610: Write the static usage into the attribute-value package variables once for each item
4611: of the attribute's item class.
4612: */

Line 4613: if(attributeTypes(i) = ame_util.currencyAttributeType) then

4609: /*
4610: Write the static usage into the attribute-value package variables once for each item
4611: of the attribute's item class.
4612: */
4613: if(attributeTypes(i) = ame_util.currencyAttributeType) then
4614: ame_util.parseStaticCurAttValue(applicationIdIn => engAmeApplicationId,
4615: attributeIdIn => tempAttributeId,
4616: attributeValueIn => queryStrings(i),
4617: localErrorIn => false,

Line 4614: ame_util.parseStaticCurAttValue(applicationIdIn => engAmeApplicationId,

4610: Write the static usage into the attribute-value package variables once for each item
4611: of the attribute's item class.
4612: */
4613: if(attributeTypes(i) = ame_util.currencyAttributeType) then
4614: ame_util.parseStaticCurAttValue(applicationIdIn => engAmeApplicationId,
4615: attributeIdIn => tempAttributeId,
4616: attributeValueIn => queryStrings(i),
4617: localErrorIn => false,
4618: amountOut => tempAttributeValue1,

Line 4646: ame_util.transactionIdPlaceholder in dynamicQuery get bound.

4642: tempAttributeValues2.delete;
4643: tempAttributeValues3.delete;
4644: /*
4645: We need to do old-style dynamic PL/SQL here to make sure all occurrences of
4646: ame_util.transactionIdPlaceholder in dynamicQuery get bound.
4647: */
4648: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),
4649: replaceWithSpaces => true);
4650: dynamicCursor := dbms_sql.open_cursor;

Line 4648: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),

4644: /*
4645: We need to do old-style dynamic PL/SQL here to make sure all occurrences of
4646: ame_util.transactionIdPlaceholder in dynamicQuery get bound.
4647: */
4648: dynamicQuery := ame_util.removeReturns(stringIn => queryStrings(i),
4649: replaceWithSpaces => true);
4650: dynamicCursor := dbms_sql.open_cursor;
4651: dbms_sql.parse(dynamicCursor,
4652: dynamicQuery,

Line 4654: if(instrb(dynamicQuery, ame_util.transactionIdPlaceholder) > 0) then

4650: dynamicCursor := dbms_sql.open_cursor;
4651: dbms_sql.parse(dynamicCursor,
4652: dynamicQuery,
4653: dbms_sql.native);
4654: if(instrb(dynamicQuery, ame_util.transactionIdPlaceholder) > 0) then
4655: dbms_sql.bind_variable(dynamicCursor,
4656: ame_util.transactionIdPlaceholder,
4657: engTransactionId,
4658: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */

Line 4656: ame_util.transactionIdPlaceholder,

4652: dynamicQuery,
4653: dbms_sql.native);
4654: if(instrb(dynamicQuery, ame_util.transactionIdPlaceholder) > 0) then
4655: dbms_sql.bind_variable(dynamicCursor,
4656: ame_util.transactionIdPlaceholder,
4657: engTransactionId,
4658: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4659: end if;
4660: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then

Line 4660: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then

4656: ame_util.transactionIdPlaceholder,
4657: engTransactionId,
4658: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4659: end if;
4660: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then
4661: dbms_sql.bind_variable(dynamicCursor,
4662: ame_util2.itemClassPlaceHolder,
4663: ame_util.headerItemClassName,
4664: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */

Line 4662: ame_util2.itemClassPlaceHolder,

4658: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4659: end if;
4660: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then
4661: dbms_sql.bind_variable(dynamicCursor,
4662: ame_util2.itemClassPlaceHolder,
4663: ame_util.headerItemClassName,
4664: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4665: end if;
4666: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then

Line 4663: ame_util.headerItemClassName,

4659: end if;
4660: if(instrb(dynamicQuery, ame_util2.itemClassPlaceHolder) > 0) then
4661: dbms_sql.bind_variable(dynamicCursor,
4662: ame_util2.itemClassPlaceHolder,
4663: ame_util.headerItemClassName,
4664: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4665: end if;
4666: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then
4667: dbms_sql.bind_variable(dynamicCursor,

Line 4666: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then

4662: ame_util2.itemClassPlaceHolder,
4663: ame_util.headerItemClassName,
4664: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4665: end if;
4666: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then
4667: dbms_sql.bind_variable(dynamicCursor,
4668: ame_util2.itemIdPlaceHolder,
4669: engTransactionId,
4670: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */

Line 4668: ame_util2.itemIdPlaceHolder,

4664: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4665: end if;
4666: if(instrb(dynamicQuery, ame_util2.itemIdPlaceHolder) > 0) then
4667: dbms_sql.bind_variable(dynamicCursor,
4668: ame_util2.itemIdPlaceHolder,
4669: engTransactionId,
4670: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
4671: end if;
4672: dbms_sql.define_array(dynamicCursor,

Line 4675: ame_util.attributeValueTypeLength,

4671: end if;
4672: dbms_sql.define_array(dynamicCursor,
4673: 1,
4674: tempAttributeValues1,
4675: ame_util.attributeValueTypeLength,
4676: 1);
4677: if(tempAttributeType = ame_util.currencyAttributeType) then
4678: dbms_sql.define_array(dynamicCursor,
4679: 2,

Line 4677: if(tempAttributeType = ame_util.currencyAttributeType) then

4673: 1,
4674: tempAttributeValues1,
4675: ame_util.attributeValueTypeLength,
4676: 1);
4677: if(tempAttributeType = ame_util.currencyAttributeType) then
4678: dbms_sql.define_array(dynamicCursor,
4679: 2,
4680: tempAttributeValues2,
4681: ame_util.attributeValueTypeLength,

Line 4681: ame_util.attributeValueTypeLength,

4677: if(tempAttributeType = ame_util.currencyAttributeType) then
4678: dbms_sql.define_array(dynamicCursor,
4679: 2,
4680: tempAttributeValues2,
4681: ame_util.attributeValueTypeLength,
4682: 1);
4683: dbms_sql.define_array(dynamicCursor,
4684: 3,
4685: tempAttributeValues3,

Line 4686: ame_util.attributeValueTypeLength,

4682: 1);
4683: dbms_sql.define_array(dynamicCursor,
4684: 3,
4685: tempAttributeValues3,
4686: ame_util.attributeValueTypeLength,
4687: 1);
4688: end if;
4689: rowsFound := dbms_sql.execute(dynamicCursor);
4690: loop

Line 4695: if(tempAttributeType = ame_util.currencyAttributeType) then

4691: rowsFound := dbms_sql.fetch_rows(dynamicCursor);
4692: dbms_sql.column_value(dynamicCursor,
4693: 1,
4694: tempAttributeValues1);
4695: if(tempAttributeType = ame_util.currencyAttributeType) then
4696: dbms_sql.column_value(dynamicCursor,
4697: 2,
4698: tempAttributeValues2);
4699: dbms_sql.column_value(dynamicCursor,

Line 4714: if(tempAttributeType = ame_util.currencyAttributeType) then

4710: /* Transfer the attribute values into the appropriate package variables. */
4711: for j in 1 .. tempAttributeValues1.count loop
4712: tempAttributeValueIndex := tempAttributeValueIndex + 1;
4713: engAttributeValues1(tempAttributeValueIndex) := tempAttributeValues1(j);
4714: if(tempAttributeType = ame_util.currencyAttributeType) then
4715: engAttributeValues2(tempAttributeValueIndex) := tempAttributeValues2(j);
4716: engAttributeValues3(tempAttributeValueIndex) := tempAttributeValues3(j);
4717: else
4718: engAttributeValues2(tempAttributeValueIndex) := null;

Line 4751: ame_util.getMessage(applicationShortNameIn =>'PER',

4747: end if;
4748: tempAttributeName := ame_attribute_pkg.getName(attributeIdIn => tempAttributeId);
4749: errorCode := -20001;
4750: errorMessage :=
4751: ame_util.getMessage(applicationShortNameIn =>'PER',
4752: messageNameIn => 'AME_400684_ATR_INV_DYN_USG',
4753: tokenNameOneIn => 'ATTRIBUTE_NAME',
4754: tokenValueOneIn => tempAttributeName);
4755: ame_util.runtimeException(packageNameIn => 'ame_engine',

Line 4755: ame_util.runtimeException(packageNameIn => 'ame_engine',

4751: ame_util.getMessage(applicationShortNameIn =>'PER',
4752: messageNameIn => 'AME_400684_ATR_INV_DYN_USG',
4753: tokenNameOneIn => 'ATTRIBUTE_NAME',
4754: tokenValueOneIn => tempAttributeName);
4755: ame_util.runtimeException(packageNameIn => 'ame_engine',
4756: routineNameIn => 'fetchOtherAttributeValues',
4757: exceptionNumberIn => errorCode,
4758: exceptionStringIn => errorMessage);
4759: raise_application_error(errorCode,

Line 4774: ame_util.runtimeException(packageNameIn => 'ame_engine',

4770: end if;
4771: if(testTransNonCurrencyCursor%isopen) then
4772: close testTransNonCurrencyCursor;
4773: end if;
4774: ame_util.runtimeException(packageNameIn => 'ame_engine',
4775: routineNameIn => 'fetchOtherAttributeValues',
4776: exceptionNumberIn => sqlcode,
4777: exceptionStringIn => sqlerrm);
4778: raise;

Line 4802: ame_action_type_usages.rule_type <> ame_util.exceptionRuleType and

4798: /*
4799: Only action types for list-creation and exception rules have two action-type usages;
4800: all other action types have exactly one (current) action-type usage each.
4801: */
4802: ame_action_type_usages.rule_type <> ame_util.exceptionRuleType and
4803: engEffectiveRuleDate between
4804: ame_action_type_config.start_date and
4805: nvl(ame_action_type_config.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
4806: engEffectiveRuleDate between

Line 4805: nvl(ame_action_type_config.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

4801: */
4802: ame_action_type_usages.rule_type <> ame_util.exceptionRuleType and
4803: engEffectiveRuleDate between
4804: ame_action_type_config.start_date and
4805: nvl(ame_action_type_config.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
4806: engEffectiveRuleDate between
4807: ame_action_types.start_date and
4808: nvl(ame_action_types.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
4809: engEffectiveRuleDate between

Line 4808: nvl(ame_action_types.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

4804: ame_action_type_config.start_date and
4805: nvl(ame_action_type_config.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
4806: engEffectiveRuleDate between
4807: ame_action_types.start_date and
4808: nvl(ame_action_types.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
4809: engEffectiveRuleDate between
4810: ame_action_type_usages.start_date and
4811: nvl(ame_action_type_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
4812: order by ame_action_types.action_type_id;

Line 4811: nvl(ame_action_type_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)

4807: ame_action_types.start_date and
4808: nvl(ame_action_types.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
4809: engEffectiveRuleDate between
4810: ame_action_type_usages.start_date and
4811: nvl(ame_action_type_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
4812: order by ame_action_types.action_type_id;
4813: cursor configVarCursor is
4814: select
4815: decode(nvl(application_id,0),0,0,-1) application_id,

Line 4828: nvl(end_date - ame_util.oneSecond, engEffectiveRuleDate)

4824: (application_id = 0 or application_id is null or application_id = engAmeApplicationId) and
4825: /* Config vars can impact the approver list, so use engEffectiveRuleDate here. */
4826: engEffectiveRuleDate between
4827: start_date and
4828: nvl(end_date - ame_util.oneSecond, engEffectiveRuleDate)
4829: order by
4830: variable_name,
4831: application_id;
4832: appIds ame_util.idList;

Line 4832: appIds ame_util.idList;

4828: nvl(end_date - ame_util.oneSecond, engEffectiveRuleDate)
4829: order by
4830: variable_name,
4831: application_id;
4832: appIds ame_util.idList;
4833: configVarIndex integer;
4834: variableNames ame_util.stringList;
4835: variableValues ame_util.longStringList;
4836: tempActionTypeId integer;

Line 4834: variableNames ame_util.stringList;

4830: variable_name,
4831: application_id;
4832: appIds ame_util.idList;
4833: configVarIndex integer;
4834: variableNames ame_util.stringList;
4835: variableValues ame_util.longStringList;
4836: tempActionTypeId integer;
4837: tempActionTypeIds ame_util.idList;
4838: tempActionTypeNames ame_util.stringList;

Line 4835: variableValues ame_util.longStringList;

4831: application_id;
4832: appIds ame_util.idList;
4833: configVarIndex integer;
4834: variableNames ame_util.stringList;
4835: variableValues ame_util.longStringList;
4836: tempActionTypeId integer;
4837: tempActionTypeIds ame_util.idList;
4838: tempActionTypeNames ame_util.stringList;
4839: tempActionTypePackageNames ame_util.stringList;

Line 4837: tempActionTypeIds ame_util.idList;

4833: configVarIndex integer;
4834: variableNames ame_util.stringList;
4835: variableValues ame_util.longStringList;
4836: tempActionTypeId integer;
4837: tempActionTypeIds ame_util.idList;
4838: tempActionTypeNames ame_util.stringList;
4839: tempActionTypePackageNames ame_util.stringList;
4840: tempActionTypeUsages ame_util.idList;
4841: tempChainOrderingModes ame_util.charList;

Line 4838: tempActionTypeNames ame_util.stringList;

4834: variableNames ame_util.stringList;
4835: variableValues ame_util.longStringList;
4836: tempActionTypeId integer;
4837: tempActionTypeIds ame_util.idList;
4838: tempActionTypeNames ame_util.stringList;
4839: tempActionTypePackageNames ame_util.stringList;
4840: tempActionTypeUsages ame_util.idList;
4841: tempChainOrderingModes ame_util.charList;
4842: tempOrderNumbers ame_util.idList;

Line 4839: tempActionTypePackageNames ame_util.stringList;

4835: variableValues ame_util.longStringList;
4836: tempActionTypeId integer;
4837: tempActionTypeIds ame_util.idList;
4838: tempActionTypeNames ame_util.stringList;
4839: tempActionTypePackageNames ame_util.stringList;
4840: tempActionTypeUsages ame_util.idList;
4841: tempChainOrderingModes ame_util.charList;
4842: tempOrderNumbers ame_util.idList;
4843: tempVotingRegimes ame_util.charList;

Line 4840: tempActionTypeUsages ame_util.idList;

4836: tempActionTypeId integer;
4837: tempActionTypeIds ame_util.idList;
4838: tempActionTypeNames ame_util.stringList;
4839: tempActionTypePackageNames ame_util.stringList;
4840: tempActionTypeUsages ame_util.idList;
4841: tempChainOrderingModes ame_util.charList;
4842: tempOrderNumbers ame_util.idList;
4843: tempVotingRegimes ame_util.charList;
4844: begin

Line 4841: tempChainOrderingModes ame_util.charList;

4837: tempActionTypeIds ame_util.idList;
4838: tempActionTypeNames ame_util.stringList;
4839: tempActionTypePackageNames ame_util.stringList;
4840: tempActionTypeUsages ame_util.idList;
4841: tempChainOrderingModes ame_util.charList;
4842: tempOrderNumbers ame_util.idList;
4843: tempVotingRegimes ame_util.charList;
4844: begin
4845: /* Fetch action-type configuration data. */

Line 4842: tempOrderNumbers ame_util.idList;

4838: tempActionTypeNames ame_util.stringList;
4839: tempActionTypePackageNames ame_util.stringList;
4840: tempActionTypeUsages ame_util.idList;
4841: tempChainOrderingModes ame_util.charList;
4842: tempOrderNumbers ame_util.idList;
4843: tempVotingRegimes ame_util.charList;
4844: begin
4845: /* Fetch action-type configuration data. */
4846: open actionTypeConfigCursor;

Line 4843: tempVotingRegimes ame_util.charList;

4839: tempActionTypePackageNames ame_util.stringList;
4840: tempActionTypeUsages ame_util.idList;
4841: tempChainOrderingModes ame_util.charList;
4842: tempOrderNumbers ame_util.idList;
4843: tempVotingRegimes ame_util.charList;
4844: begin
4845: /* Fetch action-type configuration data. */
4846: open actionTypeConfigCursor;
4847: fetch actionTypeConfigCursor bulk collect

Line 4893: if(engConfigVarNames(configVarIndex) = ame_util.forwardingConfigVar) then

4889: if(variableNames(i) <> variableNames(i - 1)) then
4890: configVarIndex := configVarIndex + 1;
4891: engConfigVarNames(configVarIndex) := variableNames(i);
4892: engConfigVarValues(configVarIndex) := variableValues(i);
4893: if(engConfigVarNames(configVarIndex) = ame_util.forwardingConfigVar) then
4894: parseForwardingBehaviors(forwardingBehaviorsIn => engConfigVarValues(configVarIndex));
4895: elsif(engConfigVarNames(configVarIndex) = ame_util.rulePriorityModesConfigVar) then
4896: parsePriorityModes(priorityModesIn => engConfigVarValues(configVarIndex));
4897: end if;

Line 4895: elsif(engConfigVarNames(configVarIndex) = ame_util.rulePriorityModesConfigVar) then

4891: engConfigVarNames(configVarIndex) := variableNames(i);
4892: engConfigVarValues(configVarIndex) := variableValues(i);
4893: if(engConfigVarNames(configVarIndex) = ame_util.forwardingConfigVar) then
4894: parseForwardingBehaviors(forwardingBehaviorsIn => engConfigVarValues(configVarIndex));
4895: elsif(engConfigVarNames(configVarIndex) = ame_util.rulePriorityModesConfigVar) then
4896: parsePriorityModes(priorityModesIn => engConfigVarValues(configVarIndex));
4897: end if;
4898: end if;
4899: end loop;

Line 4908: ame_util.runtimeException(packageNameIn => 'ame_engine',

4904: end if;
4905: if(configVarCursor%isopen) then
4906: close configVarCursor;
4907: end if;
4908: ame_util.runtimeException(packageNameIn => 'ame_engine',
4909: routineNameIn => 'fetchConfigVars',
4910: exceptionNumberIn => sqlcode,
4911: exceptionStringIn => sqlerrm);
4912: raise;

Line 4931: actionTypeIds ame_util.idList;

4927: from ame_temp_deletions
4928: where
4929: application_id = applicationIdIn and
4930: transaction_id = transactionIdIn;
4931: actionTypeIds ame_util.idList;
4932: approverCategories ame_util.charList;
4933: approverNames ame_util.longStringList;
4934: groupOrChainIds ame_util.idList;
4935: itemClasses ame_util.stringList;

Line 4932: approverCategories ame_util.charList;

4928: where
4929: application_id = applicationIdIn and
4930: transaction_id = transactionIdIn;
4931: actionTypeIds ame_util.idList;
4932: approverCategories ame_util.charList;
4933: approverNames ame_util.longStringList;
4934: groupOrChainIds ame_util.idList;
4935: itemClasses ame_util.stringList;
4936: itemIds ame_util.stringList;

Line 4933: approverNames ame_util.longStringList;

4929: application_id = applicationIdIn and
4930: transaction_id = transactionIdIn;
4931: actionTypeIds ame_util.idList;
4932: approverCategories ame_util.charList;
4933: approverNames ame_util.longStringList;
4934: groupOrChainIds ame_util.idList;
4935: itemClasses ame_util.stringList;
4936: itemIds ame_util.stringList;
4937: occurrences ame_util.idList;

Line 4934: groupOrChainIds ame_util.idList;

4930: transaction_id = transactionIdIn;
4931: actionTypeIds ame_util.idList;
4932: approverCategories ame_util.charList;
4933: approverNames ame_util.longStringList;
4934: groupOrChainIds ame_util.idList;
4935: itemClasses ame_util.stringList;
4936: itemIds ame_util.stringList;
4937: occurrences ame_util.idList;
4938: upperLimit integer;

Line 4935: itemClasses ame_util.stringList;

4931: actionTypeIds ame_util.idList;
4932: approverCategories ame_util.charList;
4933: approverNames ame_util.longStringList;
4934: groupOrChainIds ame_util.idList;
4935: itemClasses ame_util.stringList;
4936: itemIds ame_util.stringList;
4937: occurrences ame_util.idList;
4938: upperLimit integer;
4939: tempSuppressionDateList ame_util.dateList;

Line 4936: itemIds ame_util.stringList;

4932: approverCategories ame_util.charList;
4933: approverNames ame_util.longStringList;
4934: groupOrChainIds ame_util.idList;
4935: itemClasses ame_util.stringList;
4936: itemIds ame_util.stringList;
4937: occurrences ame_util.idList;
4938: upperLimit integer;
4939: tempSuppressionDateList ame_util.dateList;
4940: tempReasonList ame_util.stringList;

Line 4937: occurrences ame_util.idList;

4933: approverNames ame_util.longStringList;
4934: groupOrChainIds ame_util.idList;
4935: itemClasses ame_util.stringList;
4936: itemIds ame_util.stringList;
4937: occurrences ame_util.idList;
4938: upperLimit integer;
4939: tempSuppressionDateList ame_util.dateList;
4940: tempReasonList ame_util.stringList;
4941: begin

Line 4939: tempSuppressionDateList ame_util.dateList;

4935: itemClasses ame_util.stringList;
4936: itemIds ame_util.stringList;
4937: occurrences ame_util.idList;
4938: upperLimit integer;
4939: tempSuppressionDateList ame_util.dateList;
4940: tempReasonList ame_util.stringList;
4941: begin
4942: open deletedApproversCursor(applicationIdIn => engAmeApplicationId,
4943: transactionIdIn => engTransactionId);

Line 4940: tempReasonList ame_util.stringList;

4936: itemIds ame_util.stringList;
4937: occurrences ame_util.idList;
4938: upperLimit integer;
4939: tempSuppressionDateList ame_util.dateList;
4940: tempReasonList ame_util.stringList;
4941: begin
4942: open deletedApproversCursor(applicationIdIn => engAmeApplicationId,
4943: transactionIdIn => engTransactionId);
4944: fetch deletedApproversCursor bulk collect

Line 4971: ame_util.runtimeException(packageNameIn => 'ame_engine',

4967: when others then
4968: if(deletedApproversCursor%isopen) then
4969: close deletedApproversCursor;
4970: end if;
4971: ame_util.runtimeException(packageNameIn => 'ame_engine',
4972: routineNameIn => 'fetchDeletedApprovers',
4973: exceptionNumberIn => sqlcode,
4974: exceptionStringIn => sqlerrm);
4975: raise;

Line 4984: nvl(approver_category,ame_util.approvalApproverCategory) approver_category,

4980: select
4981: name,
4982: item_class,
4983: item_id,
4984: nvl(approver_category,ame_util.approvalApproverCategory) approver_category,
4985: api_insertion,
4986: authority,
4987: order_type,
4988: parameter,

Line 4999: approverApiInsertions ame_util.charList;

4995: where
4996: application_id = applicationIdIn and
4997: transaction_id = transactionIdIn
4998: order by insertion_order;
4999: approverApiInsertions ame_util.charList;
5000: approverAuthorities ame_util.charList;
5001: approverCategories ame_util.charList;
5002: approverItemClasses ame_util.stringList;
5003: approverItemIds ame_util.stringList;

Line 5000: approverAuthorities ame_util.charList;

4996: application_id = applicationIdIn and
4997: transaction_id = transactionIdIn
4998: order by insertion_order;
4999: approverApiInsertions ame_util.charList;
5000: approverAuthorities ame_util.charList;
5001: approverCategories ame_util.charList;
5002: approverItemClasses ame_util.stringList;
5003: approverItemIds ame_util.stringList;
5004: approverNames ame_util.longStringList;

Line 5001: approverCategories ame_util.charList;

4997: transaction_id = transactionIdIn
4998: order by insertion_order;
4999: approverApiInsertions ame_util.charList;
5000: approverAuthorities ame_util.charList;
5001: approverCategories ame_util.charList;
5002: approverItemClasses ame_util.stringList;
5003: approverItemIds ame_util.stringList;
5004: approverNames ame_util.longStringList;
5005: approvalStatuses ame_util.stringList;

Line 5002: approverItemClasses ame_util.stringList;

4998: order by insertion_order;
4999: approverApiInsertions ame_util.charList;
5000: approverAuthorities ame_util.charList;
5001: approverCategories ame_util.charList;
5002: approverItemClasses ame_util.stringList;
5003: approverItemIds ame_util.stringList;
5004: approverNames ame_util.longStringList;
5005: approvalStatuses ame_util.stringList;
5006: upperLimit integer;

Line 5003: approverItemIds ame_util.stringList;

4999: approverApiInsertions ame_util.charList;
5000: approverAuthorities ame_util.charList;
5001: approverCategories ame_util.charList;
5002: approverItemClasses ame_util.stringList;
5003: approverItemIds ame_util.stringList;
5004: approverNames ame_util.longStringList;
5005: approvalStatuses ame_util.stringList;
5006: upperLimit integer;
5007: begin

Line 5004: approverNames ame_util.longStringList;

5000: approverAuthorities ame_util.charList;
5001: approverCategories ame_util.charList;
5002: approverItemClasses ame_util.stringList;
5003: approverItemIds ame_util.stringList;
5004: approverNames ame_util.longStringList;
5005: approvalStatuses ame_util.stringList;
5006: upperLimit integer;
5007: begin
5008: open insertedApproversCursor(applicationIdIn => engAmeApplicationId,

Line 5005: approvalStatuses ame_util.stringList;

5001: approverCategories ame_util.charList;
5002: approverItemClasses ame_util.stringList;
5003: approverItemIds ame_util.stringList;
5004: approverNames ame_util.longStringList;
5005: approvalStatuses ame_util.stringList;
5006: upperLimit integer;
5007: begin
5008: open insertedApproversCursor(applicationIdIn => engAmeApplicationId,
5009: transactionIdIn => engTransactionId);

Line 5044: ame_util.runtimeException(packageNameIn => 'ame_engine',

5040: when others then
5041: if(insertedApproversCursor%isopen) then
5042: close insertedApproversCursor;
5043: end if;
5044: ame_util.runtimeException(packageNameIn => 'ame_engine',
5045: routineNameIn => 'fetchInsertedApprovers',
5046: exceptionNumberIn => sqlcode,
5047: exceptionStringIn => sqlerrm);
5048: raise;

Line 5067: nvl(ame_item_classes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

5063: ame_item_classes.item_class_id = ame_item_class_usages.item_class_id and
5064: ame_item_class_usages.application_id = applicationIdIn and
5065: engEffectiveRuleDate between
5066: ame_item_classes.start_date and
5067: nvl(ame_item_classes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
5068: engEffectiveRuleDate between
5069: ame_item_class_usages.start_date and
5070: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
5071: /*

Line 5070: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)

5066: ame_item_classes.start_date and
5067: nvl(ame_item_classes.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
5068: engEffectiveRuleDate between
5069: ame_item_class_usages.start_date and
5070: nvl(ame_item_class_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate)
5071: /*
5072: The order-by conditions are both critical. The second is to break
5073: item_class_order_number ties in a determinate order. Compare the
5074: attributeCursor cursor in the procedure fetchAttributeValues.

Line 5088: itemIdQuery ame_util.longestStringType;

5084: transaction_id = engTransactionId and
5085: item_class_id = itemClassIdIn
5086: order by item_id;
5087: dynamicCursor integer;
5088: itemIdQuery ame_util.longestStringType;
5089: itemIds dbms_sql.varchar2_table;
5090: lastEngItemIdIndex integer;
5091: rowsFound integer;
5092: tempIndex integer;

Line 5093: tempItemIdQueries ame_util.longestStringList;

5089: itemIds dbms_sql.varchar2_table;
5090: lastEngItemIdIndex integer;
5091: rowsFound integer;
5092: tempIndex integer;
5093: tempItemIdQueries ame_util.longestStringList;
5094: begin
5095: /* Fetch the item-class usages. */
5096: open itemClassUsageCursor(applicationIdIn => engAmeApplicationId);
5097: fetch itemClassUsageCursor bulk collect

Line 5112: if(engItemClassNames(i) = ame_util.headerItemClassName) then

5108: for i in 1 .. engItemClassIds.count loop
5109: engItemClassIndexes(engItemClassIds(i)) := i;
5110: itemIds.delete;
5111: /* Fetch the current item class' item IDs into itemIds. */
5112: if(engItemClassNames(i) = ame_util.headerItemClassName) then
5113: /*
5114: The header item class should always have just one item, with the ID
5115: engTransactionId. Note that the header item class may not be the
5116: first item class, as the item classes are ordered by item-class order

Line 5151: itemIdQuery := ame_util.removeReturns(stringIn => tempItemIdQueries(i),

5147: else
5148: engItemClassItemIdIndexes(i) := null;
5149: end if;
5150: else
5151: itemIdQuery := ame_util.removeReturns(stringIn => tempItemIdQueries(i),
5152: replaceWithSpaces => true);
5153: dynamicCursor := dbms_sql.open_cursor;
5154: dbms_sql.parse(dynamicCursor,
5155: itemIdQuery,

Line 5157: if(instrb(itemIdQuery, ame_util.transactionIdPlaceholder, 1, 1) > 0) then

5153: dynamicCursor := dbms_sql.open_cursor;
5154: dbms_sql.parse(dynamicCursor,
5155: itemIdQuery,
5156: dbms_sql.native);
5157: if(instrb(itemIdQuery, ame_util.transactionIdPlaceholder, 1, 1) > 0) then
5158: dbms_sql.bind_variable(dynamicCursor,
5159: ame_util.transactionIdPlaceholder,
5160: engTransactionId,
5161: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */

Line 5159: ame_util.transactionIdPlaceholder,

5155: itemIdQuery,
5156: dbms_sql.native);
5157: if(instrb(itemIdQuery, ame_util.transactionIdPlaceholder, 1, 1) > 0) then
5158: dbms_sql.bind_variable(dynamicCursor,
5159: ame_util.transactionIdPlaceholder,
5160: engTransactionId,
5161: 50); /* ame_temp_transactions.transaction_id%length doesn't work here. */
5162: end if;
5163: dbms_sql.define_array(dynamicCursor,

Line 5214: ame_util.runtimeException(packageNameIn => 'ame_engine',

5210: end if;
5211: if(testTransItemIdCursor%isopen) then
5212: close testTransItemIdCursor;
5213: end if;
5214: ame_util.runtimeException(packageNameIn => 'ame_engine',
5215: routineNameIn => 'fetchItemClassData',
5216: exceptionNumberIn => sqlcode,
5217: exceptionStringIn => sqlerrm);
5218: raise;

Line 5236: nvl(end_date - ame_util.oneSecond, sysdate) and

5232: application_id = applicationIdIn and
5233: /* Don't use engEffectiveRuleDate here. */
5234: sysdate between
5235: start_date and
5236: nvl(end_date - ame_util.oneSecond, sysdate) and
5237: rownum < 2; /* Avoids second fetch otherwise required by ANSI standard to check for too many rows. */
5238: exception
5239: when others then
5240: ame_util.runtimeException(packageNameIn => 'ame_engine',

Line 5240: ame_util.runtimeException(packageNameIn => 'ame_engine',

5236: nvl(end_date - ame_util.oneSecond, sysdate) and
5237: rownum < 2; /* Avoids second fetch otherwise required by ANSI standard to check for too many rows. */
5238: exception
5239: when others then
5240: ame_util.runtimeException(packageNameIn => 'ame_engine',
5241: routineNameIn => 'fetchFndApplicationId',
5242: exceptionNumberIn => sqlcode,
5243: exceptionStringIn => sqlerrm);
5244: fndApplicationIdOut := null;

Line 5267: actionTypeIds ame_util.idList;

5263: where
5264: application_id = applicationIdIn and
5265: transaction_id = transactionIdIn
5266: order by order_number;
5267: actionTypeIds ame_util.idList;
5268: approverApiInsertions ame_util.charList;
5269: approverAuthorities ame_util.charList;
5270: approverCategories ame_util.charList;
5271: approverNames ame_util.longStringList;

Line 5268: approverApiInsertions ame_util.charList;

5264: application_id = applicationIdIn and
5265: transaction_id = transactionIdIn
5266: order by order_number;
5267: actionTypeIds ame_util.idList;
5268: approverApiInsertions ame_util.charList;
5269: approverAuthorities ame_util.charList;
5270: approverCategories ame_util.charList;
5271: approverNames ame_util.longStringList;
5272: approverStatuses ame_util.stringList;

Line 5269: approverAuthorities ame_util.charList;

5265: transaction_id = transactionIdIn
5266: order by order_number;
5267: actionTypeIds ame_util.idList;
5268: approverApiInsertions ame_util.charList;
5269: approverAuthorities ame_util.charList;
5270: approverCategories ame_util.charList;
5271: approverNames ame_util.longStringList;
5272: approverStatuses ame_util.stringList;
5273: groupOrChainIds ame_util.idList;

Line 5270: approverCategories ame_util.charList;

5266: order by order_number;
5267: actionTypeIds ame_util.idList;
5268: approverApiInsertions ame_util.charList;
5269: approverAuthorities ame_util.charList;
5270: approverCategories ame_util.charList;
5271: approverNames ame_util.longStringList;
5272: approverStatuses ame_util.stringList;
5273: groupOrChainIds ame_util.idList;
5274: itemClasses ame_util.stringList;

Line 5271: approverNames ame_util.longStringList;

5267: actionTypeIds ame_util.idList;
5268: approverApiInsertions ame_util.charList;
5269: approverAuthorities ame_util.charList;
5270: approverCategories ame_util.charList;
5271: approverNames ame_util.longStringList;
5272: approverStatuses ame_util.stringList;
5273: groupOrChainIds ame_util.idList;
5274: itemClasses ame_util.stringList;
5275: itemIds ame_util.stringList;

Line 5272: approverStatuses ame_util.stringList;

5268: approverApiInsertions ame_util.charList;
5269: approverAuthorities ame_util.charList;
5270: approverCategories ame_util.charList;
5271: approverNames ame_util.longStringList;
5272: approverStatuses ame_util.stringList;
5273: groupOrChainIds ame_util.idList;
5274: itemClasses ame_util.stringList;
5275: itemIds ame_util.stringList;
5276: occurrences ame_util.idList;

Line 5273: groupOrChainIds ame_util.idList;

5269: approverAuthorities ame_util.charList;
5270: approverCategories ame_util.charList;
5271: approverNames ame_util.longStringList;
5272: approverStatuses ame_util.stringList;
5273: groupOrChainIds ame_util.idList;
5274: itemClasses ame_util.stringList;
5275: itemIds ame_util.stringList;
5276: occurrences ame_util.idList;
5277: upperLimit integer;

Line 5274: itemClasses ame_util.stringList;

5270: approverCategories ame_util.charList;
5271: approverNames ame_util.longStringList;
5272: approverStatuses ame_util.stringList;
5273: groupOrChainIds ame_util.idList;
5274: itemClasses ame_util.stringList;
5275: itemIds ame_util.stringList;
5276: occurrences ame_util.idList;
5277: upperLimit integer;
5278: begin

Line 5275: itemIds ame_util.stringList;

5271: approverNames ame_util.longStringList;
5272: approverStatuses ame_util.stringList;
5273: groupOrChainIds ame_util.idList;
5274: itemClasses ame_util.stringList;
5275: itemIds ame_util.stringList;
5276: occurrences ame_util.idList;
5277: upperLimit integer;
5278: begin
5279: open oldApproversCursor(applicationIdIn => engAmeApplicationId,

Line 5276: occurrences ame_util.idList;

5272: approverStatuses ame_util.stringList;
5273: groupOrChainIds ame_util.idList;
5274: itemClasses ame_util.stringList;
5275: itemIds ame_util.stringList;
5276: occurrences ame_util.idList;
5277: upperLimit integer;
5278: begin
5279: open oldApproversCursor(applicationIdIn => engAmeApplicationId,
5280: transactionIdIn => engTransactionId);

Line 5307: if approverStatuses(i) in (ame_util.suppressedStatus, ame_util.repeatedStatus) then

5303: engOldApproverList(i).group_or_chain_id := groupOrChainIds(i);
5304: engOldApproverList(i).occurrence := occurrences(i);
5305: engOldApproverList(i).source := null;
5306: /* Force recalculation of suppressed and repeated statuses with each engine cycle. */
5307: if approverStatuses(i) in (ame_util.suppressedStatus, ame_util.repeatedStatus) then
5308: engOldApproverList(i).approval_status := null;
5309: else
5310: engOldApproverList(i).approval_status := approverStatuses(i);
5311: end if;

Line 5318: ame_util.runtimeException(packageNameIn => 'ame_engine',

5314: when others then
5315: if(oldApproversCursor%isopen) then
5316: close oldApproversCursor;
5317: end if;
5318: ame_util.runtimeException(packageNameIn => 'ame_engine',
5319: routineNameIn => 'fetchOldApprovers',
5320: exceptionNumberIn => sqlcode,
5321: exceptionStringIn => sqlerrm);
5322: raise;

Line 5334: ame_util.approverOamGroupId, null,

5330: upper(parameter_name),
5331: query_string,
5332: order_number,
5333: decode(parameter_name,
5334: ame_util.approverOamGroupId, null,
5335: ame_approver_type_pkg.getWfRolesName(orig_system, orig_system_id)) name,
5336: decode(parameter_name,
5337: ame_util.approverOamGroupId, null,
5338: ame_approver_type_pkg.getApproverDisplayName2(orig_system, orig_system_id)) display_name

Line 5337: ame_util.approverOamGroupId, null,

5333: decode(parameter_name,
5334: ame_util.approverOamGroupId, null,
5335: ame_approver_type_pkg.getWfRolesName(orig_system, orig_system_id)) name,
5336: decode(parameter_name,
5337: ame_util.approverOamGroupId, null,
5338: ame_approver_type_pkg.getApproverDisplayName2(orig_system, orig_system_id)) display_name
5339: from ame_approval_group_members
5340: where
5341: approval_group_id = groupIdIn

Line 5347: displayNames ame_util.longStringList;

5343: badDynamicMemberException exception;
5344: dynamicCursor integer;
5345: colonLocation1 integer;
5346: colonLocation2 integer;
5347: displayNames ame_util.longStringList;
5348: errorCode integer;
5349: errorMessage ame_util.longestStringType;
5350: names ame_util.longStringList;
5351: orderNumbers ame_util.idList;

Line 5349: errorMessage ame_util.longestStringType;

5345: colonLocation1 integer;
5346: colonLocation2 integer;
5347: displayNames ame_util.longStringList;
5348: errorCode integer;
5349: errorMessage ame_util.longestStringType;
5350: names ame_util.longStringList;
5351: orderNumbers ame_util.idList;
5352: origSystemIds ame_util.idList;
5353: origSystems ame_util.stringList;

Line 5350: names ame_util.longStringList;

5346: colonLocation2 integer;
5347: displayNames ame_util.longStringList;
5348: errorCode integer;
5349: errorMessage ame_util.longestStringType;
5350: names ame_util.longStringList;
5351: orderNumbers ame_util.idList;
5352: origSystemIds ame_util.idList;
5353: origSystems ame_util.stringList;
5354: outputIndex integer;

Line 5351: orderNumbers ame_util.idList;

5347: displayNames ame_util.longStringList;
5348: errorCode integer;
5349: errorMessage ame_util.longestStringType;
5350: names ame_util.longStringList;
5351: orderNumbers ame_util.idList;
5352: origSystemIds ame_util.idList;
5353: origSystems ame_util.stringList;
5354: outputIndex integer;
5355: parameters ame_util.longStringList;

Line 5352: origSystemIds ame_util.idList;

5348: errorCode integer;
5349: errorMessage ame_util.longestStringType;
5350: names ame_util.longStringList;
5351: orderNumbers ame_util.idList;
5352: origSystemIds ame_util.idList;
5353: origSystems ame_util.stringList;
5354: outputIndex integer;
5355: parameters ame_util.longStringList;
5356: queryStrings ame_util.longestStringList;

Line 5353: origSystems ame_util.stringList;

5349: errorMessage ame_util.longestStringType;
5350: names ame_util.longStringList;
5351: orderNumbers ame_util.idList;
5352: origSystemIds ame_util.idList;
5353: origSystems ame_util.stringList;
5354: outputIndex integer;
5355: parameters ame_util.longStringList;
5356: queryStrings ame_util.longestStringList;
5357: rowsFound integer;

Line 5355: parameters ame_util.longStringList;

5351: orderNumbers ame_util.idList;
5352: origSystemIds ame_util.idList;
5353: origSystems ame_util.stringList;
5354: outputIndex integer;
5355: parameters ame_util.longStringList;
5356: queryStrings ame_util.longestStringList;
5357: rowsFound integer;
5358: tempGroupMembers dbms_sql.Varchar2_Table;
5359: upperParameterNames ame_util.stringList;

Line 5356: queryStrings ame_util.longestStringList;

5352: origSystemIds ame_util.idList;
5353: origSystems ame_util.stringList;
5354: outputIndex integer;
5355: parameters ame_util.longStringList;
5356: queryStrings ame_util.longestStringList;
5357: rowsFound integer;
5358: tempGroupMembers dbms_sql.Varchar2_Table;
5359: upperParameterNames ame_util.stringList;
5360: tempApproverType ame_util.stringType;

Line 5359: upperParameterNames ame_util.stringList;

5355: parameters ame_util.longStringList;
5356: queryStrings ame_util.longestStringList;
5357: rowsFound integer;
5358: tempGroupMembers dbms_sql.Varchar2_Table;
5359: upperParameterNames ame_util.stringList;
5360: tempApproverType ame_util.stringType;
5361: tempApproverId ame_util.stringType;
5362: tempname wf_roles.name%type;
5363: begin

Line 5360: tempApproverType ame_util.stringType;

5356: queryStrings ame_util.longestStringList;
5357: rowsFound integer;
5358: tempGroupMembers dbms_sql.Varchar2_Table;
5359: upperParameterNames ame_util.stringList;
5360: tempApproverType ame_util.stringType;
5361: tempApproverId ame_util.stringType;
5362: tempname wf_roles.name%type;
5363: begin
5364: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then

Line 5361: tempApproverId ame_util.stringType;

5357: rowsFound integer;
5358: tempGroupMembers dbms_sql.Varchar2_Table;
5359: upperParameterNames ame_util.stringList;
5360: tempApproverType ame_util.stringType;
5361: tempApproverId ame_util.stringType;
5362: tempname wf_roles.name%type;
5363: begin
5364: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then
5365: fnd_log.string

Line 5415: if(upperParameterNames(i) = upper(ame_util.approverOamGroupId)) then

5411: end if;
5412: outputIndex := engGroupMemberGroupIds.count; /* pre-increment */
5413: for i in 1 .. parameters.count loop
5414: tempGroupMembers.delete; -- for bug 4616570
5415: if(upperParameterNames(i) = upper(ame_util.approverOamGroupId)) then
5416: dynamicCursor := dbms_sql.open_cursor;
5417: dbms_sql.parse(dynamicCursor,
5418: ame_util.removeReturns(stringIn => queryStrings(i),
5419: replaceWithSpaces => true),

Line 5418: ame_util.removeReturns(stringIn => queryStrings(i),

5414: tempGroupMembers.delete; -- for bug 4616570
5415: if(upperParameterNames(i) = upper(ame_util.approverOamGroupId)) then
5416: dynamicCursor := dbms_sql.open_cursor;
5417: dbms_sql.parse(dynamicCursor,
5418: ame_util.removeReturns(stringIn => queryStrings(i),
5419: replaceWithSpaces => true),
5420: dbms_sql.native);
5421: engGroupUseItemBind(groupIdIn) := ame_util.booleanFalse;
5422: if(instrb(queryStrings(i),

Line 5421: engGroupUseItemBind(groupIdIn) := ame_util.booleanFalse;

5417: dbms_sql.parse(dynamicCursor,
5418: ame_util.removeReturns(stringIn => queryStrings(i),
5419: replaceWithSpaces => true),
5420: dbms_sql.native);
5421: engGroupUseItemBind(groupIdIn) := ame_util.booleanFalse;
5422: if(instrb(queryStrings(i),
5423: ame_util.transactionIdPlaceholder) > 0) then
5424: dbms_sql.bind_variable(dynamicCursor,
5425: ame_util.transactionIdPlaceholder,

Line 5423: ame_util.transactionIdPlaceholder) > 0) then

5419: replaceWithSpaces => true),
5420: dbms_sql.native);
5421: engGroupUseItemBind(groupIdIn) := ame_util.booleanFalse;
5422: if(instrb(queryStrings(i),
5423: ame_util.transactionIdPlaceholder) > 0) then
5424: dbms_sql.bind_variable(dynamicCursor,
5425: ame_util.transactionIdPlaceholder,
5426: engTransactionId,
5427: 50);

Line 5425: ame_util.transactionIdPlaceholder,

5421: engGroupUseItemBind(groupIdIn) := ame_util.booleanFalse;
5422: if(instrb(queryStrings(i),
5423: ame_util.transactionIdPlaceholder) > 0) then
5424: dbms_sql.bind_variable(dynamicCursor,
5425: ame_util.transactionIdPlaceholder,
5426: engTransactionId,
5427: 50);
5428: end if;
5429: if(instrb(queryStrings(i),

Line 5430: ame_util2.itemClassPlaceHolder) > 0) then

5426: engTransactionId,
5427: 50);
5428: end if;
5429: if(instrb(queryStrings(i),
5430: ame_util2.itemClassPlaceHolder) > 0) then
5431: dbms_sql.bind_variable(dynamicCursor,
5432: ame_util2.itemClassPlaceHolder,
5433: getItemClassName(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex)),
5434: 50);

Line 5432: ame_util2.itemClassPlaceHolder,

5428: end if;
5429: if(instrb(queryStrings(i),
5430: ame_util2.itemClassPlaceHolder) > 0) then
5431: dbms_sql.bind_variable(dynamicCursor,
5432: ame_util2.itemClassPlaceHolder,
5433: getItemClassName(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex)),
5434: 50);
5435: engGroupUseItemBind(groupIdIn) := ame_util.booleanTrue;
5436: end if;

Line 5435: engGroupUseItemBind(groupIdIn) := ame_util.booleanTrue;

5431: dbms_sql.bind_variable(dynamicCursor,
5432: ame_util2.itemClassPlaceHolder,
5433: getItemClassName(itemClassIdIn => engAppRuleItemClassIds(engAppHandlerFirstIndex)),
5434: 50);
5435: engGroupUseItemBind(groupIdIn) := ame_util.booleanTrue;
5436: end if;
5437: if(instrb(queryStrings(i),
5438: ame_util2.itemIdPlaceHolder) > 0) then
5439: dbms_sql.bind_variable(dynamicCursor,

Line 5438: ame_util2.itemIdPlaceHolder) > 0) then

5434: 50);
5435: engGroupUseItemBind(groupIdIn) := ame_util.booleanTrue;
5436: end if;
5437: if(instrb(queryStrings(i),
5438: ame_util2.itemIdPlaceHolder) > 0) then
5439: dbms_sql.bind_variable(dynamicCursor,
5440: ame_util2.itemIdPlaceHolder,
5441: engAppAppItemIds(engAppHandlerFirstIndex),
5442: 50);

Line 5440: ame_util2.itemIdPlaceHolder,

5436: end if;
5437: if(instrb(queryStrings(i),
5438: ame_util2.itemIdPlaceHolder) > 0) then
5439: dbms_sql.bind_variable(dynamicCursor,
5440: ame_util2.itemIdPlaceHolder,
5441: engAppAppItemIds(engAppHandlerFirstIndex),
5442: 50);
5443: engGroupUseItemBind(groupIdIn) := ame_util.booleanTrue;
5444: end if;

Line 5443: engGroupUseItemBind(groupIdIn) := ame_util.booleanTrue;

5439: dbms_sql.bind_variable(dynamicCursor,
5440: ame_util2.itemIdPlaceHolder,
5441: engAppAppItemIds(engAppHandlerFirstIndex),
5442: 50);
5443: engGroupUseItemBind(groupIdIn) := ame_util.booleanTrue;
5444: end if;
5445: dbms_sql.define_array(dynamicCursor,
5446: 1,
5447: tempGroupMembers,

Line 5478: if upper(tempApproverType) = upper(ame_util.approverPersonId) then /* old style */

5474: if tempApproverId is not null and lengthb(trim(tempApproverId)) > 0
5475: and tempApproverType is not null and lengthb(trim(tempApproverType)) > 0 then
5476: engGroupMemberGroupIds(outputIndex) := groupIdIn;
5477: engGroupMemberOrderNumbers(outputIndex) := j;
5478: if upper(tempApproverType) = upper(ame_util.approverPersonId) then /* old style */
5479: engGroupMemberOrigSystems(outputIndex) := ame_util.perOrigSystem;
5480: engGroupMemberOrigSystemIds(outputIndex) := tempApproverId;
5481: elsif upper(tempApproverType) = upper(ame_util.approverUserId) then /* old style */
5482: engGroupMemberOrigSystems(outputIndex) := ame_util.fndUserOrigSystem;

Line 5479: engGroupMemberOrigSystems(outputIndex) := ame_util.perOrigSystem;

5475: and tempApproverType is not null and lengthb(trim(tempApproverType)) > 0 then
5476: engGroupMemberGroupIds(outputIndex) := groupIdIn;
5477: engGroupMemberOrderNumbers(outputIndex) := j;
5478: if upper(tempApproverType) = upper(ame_util.approverPersonId) then /* old style */
5479: engGroupMemberOrigSystems(outputIndex) := ame_util.perOrigSystem;
5480: engGroupMemberOrigSystemIds(outputIndex) := tempApproverId;
5481: elsif upper(tempApproverType) = upper(ame_util.approverUserId) then /* old style */
5482: engGroupMemberOrigSystems(outputIndex) := ame_util.fndUserOrigSystem;
5483: engGroupMemberOrigSystemIds(outputIndex) := tempApproverId;

Line 5481: elsif upper(tempApproverType) = upper(ame_util.approverUserId) then /* old style */

5477: engGroupMemberOrderNumbers(outputIndex) := j;
5478: if upper(tempApproverType) = upper(ame_util.approverPersonId) then /* old style */
5479: engGroupMemberOrigSystems(outputIndex) := ame_util.perOrigSystem;
5480: engGroupMemberOrigSystemIds(outputIndex) := tempApproverId;
5481: elsif upper(tempApproverType) = upper(ame_util.approverUserId) then /* old style */
5482: engGroupMemberOrigSystems(outputIndex) := ame_util.fndUserOrigSystem;
5483: engGroupMemberOrigSystemIds(outputIndex) := tempApproverId;
5484: else /* 11i10 style */
5485: begin

Line 5482: engGroupMemberOrigSystems(outputIndex) := ame_util.fndUserOrigSystem;

5478: if upper(tempApproverType) = upper(ame_util.approverPersonId) then /* old style */
5479: engGroupMemberOrigSystems(outputIndex) := ame_util.perOrigSystem;
5480: engGroupMemberOrigSystemIds(outputIndex) := tempApproverId;
5481: elsif upper(tempApproverType) = upper(ame_util.approverUserId) then /* old style */
5482: engGroupMemberOrigSystems(outputIndex) := ame_util.fndUserOrigSystem;
5483: engGroupMemberOrigSystemIds(outputIndex) := tempApproverId;
5484: else /* 11i10 style */
5485: begin
5486: tempName := ame_approver_type_pkg.getWfRolesName(tempApproverType,tempApproverId);

Line 5503: engGroupUseItemBind(groupIdIn) := ame_util.booleanFalse;

5499: end if;
5500: end loop;
5501: else /* Copy the static group into the engGroup caches. */
5502: outputIndex := outputIndex + 1;
5503: engGroupUseItemBind(groupIdIn) := ame_util.booleanFalse;
5504: engGroupMemberGroupIds(outputIndex) := groupIdIn;
5505: engGroupMemberNames(outputIndex) := names(i);
5506: engGroupMemberOrderNumbers(outputIndex) := orderNumbers(i);
5507: engGroupMemberDisplayNames(outputIndex) := displayNames(i);

Line 5523: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

5519: end if;
5520: exception
5521: when badDynamicMemberException then
5522: errorCode := -20001;
5523: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
5524: messageNameIn => 'AME_400771_ENG_INVALID_DYN_GRP',
5525: tokenNameOneIn => 'GROUP_NAME',
5526: tokenValueOneIn => ame_approval_group_pkg.getName(approvalGroupIdIn => groupIdIn
5527: ,effectiveDateIn => engEffectiveRuleDate));

Line 5528: ame_util.runtimeException(packageNameIn => 'ame_engine',

5524: messageNameIn => 'AME_400771_ENG_INVALID_DYN_GRP',
5525: tokenNameOneIn => 'GROUP_NAME',
5526: tokenValueOneIn => ame_approval_group_pkg.getName(approvalGroupIdIn => groupIdIn
5527: ,effectiveDateIn => engEffectiveRuleDate));
5528: ame_util.runtimeException(packageNameIn => 'ame_engine',
5529: routineNameIn => 'fetchRuntimeGroup',
5530: exceptionNumberIn => errorCode,
5531: exceptionStringIn => errorMessage);
5532: raise_application_error(errorCode,

Line 5538: ame_util.runtimeException(packageNameIn => 'ame_engine',

5534: when others then
5535: if(groupMemberCursor%isopen) then
5536: close groupMemberCursor;
5537: end if;
5538: ame_util.runtimeException(packageNameIn => 'ame_engine',
5539: routineNameIn => 'fetchRuntimeGroup',
5540: exceptionNumberIn => sqlcode,
5541: exceptionStringIn => sqlerrm);
5542: raise;

Line 5564: approvalStatusOfChildren := ame_util.unknownStatus;

5560: hasRejectedChildren boolean;
5561: currentTreeNodeRejectionStatus boolean;
5562: begin
5563: if engStApproversTree.count > 0 then
5564: approvalStatusOfChildren := ame_util.unknownStatus;
5565: currentTreeNodeIndex := engStApproversTree(parentIndexIn).child_index;
5566: if currentTreeNodeIndex = ame_util.noChildIndex then
5567: /* This is an approver node */
5568: /* 1. For a approver node the maximum order number is same */

Line 5566: if currentTreeNodeIndex = ame_util.noChildIndex then

5562: begin
5563: if engStApproversTree.count > 0 then
5564: approvalStatusOfChildren := ame_util.unknownStatus;
5565: currentTreeNodeIndex := engStApproversTree(parentIndexIn).child_index;
5566: if currentTreeNodeIndex = ame_util.noChildIndex then
5567: /* This is an approver node */
5568: /* 1. For a approver node the maximum order number is same */
5569: /* as parents minimum order number */
5570: /* 2. The approvalStatus of the node is set based on */

Line 5572: /* 3. If the approvers approval status is ame_util.rejectStatus */

5568: /* 1. For a approver node the maximum order number is same */
5569: /* as parents minimum order number */
5570: /* 2. The approvalStatus of the node is set based on */
5571: /* approvers approval status */
5572: /* 3. If the approvers approval status is ame_util.rejectStatus */
5573: /* then the approvers item class and item id are populated */
5574: /* into the global list of rejected items */
5575: maximumOrderOut := engStApproversTree(parentIndexIn).min_order;
5576: currentApproverApprovalStatus :=

Line 5581: currentApproverApprovalStatus in (ame_util.repeatedStatus) then

5577: engStApprovers(engStApproversTree(parentIndexIn).approver_index).approval_status;
5578: currentApproverCategory :=
5579: engStApprovers(engStApproversTree(parentIndexIn).approver_index).approver_category;
5580: if currentApproverApprovalStatus is null or
5581: currentApproverApprovalStatus in (ame_util.repeatedStatus) then
5582: approvalStatusOut := ame_util.notStartedStatus;
5583: elsif currentApproverApprovalStatus in (ame_util.approvedStatus
5584: ,ame_util.rejectStatus
5585: ,ame_util.beatByFirstResponderStatus

Line 5582: approvalStatusOut := ame_util.notStartedStatus;

5578: currentApproverCategory :=
5579: engStApprovers(engStApproversTree(parentIndexIn).approver_index).approver_category;
5580: if currentApproverApprovalStatus is null or
5581: currentApproverApprovalStatus in (ame_util.repeatedStatus) then
5582: approvalStatusOut := ame_util.notStartedStatus;
5583: elsif currentApproverApprovalStatus in (ame_util.approvedStatus
5584: ,ame_util.rejectStatus
5585: ,ame_util.beatByFirstResponderStatus
5586: ,ame_util.approvedByRepeatedStatus

Line 5583: elsif currentApproverApprovalStatus in (ame_util.approvedStatus

5579: engStApprovers(engStApproversTree(parentIndexIn).approver_index).approver_category;
5580: if currentApproverApprovalStatus is null or
5581: currentApproverApprovalStatus in (ame_util.repeatedStatus) then
5582: approvalStatusOut := ame_util.notStartedStatus;
5583: elsif currentApproverApprovalStatus in (ame_util.approvedStatus
5584: ,ame_util.rejectStatus
5585: ,ame_util.beatByFirstResponderStatus
5586: ,ame_util.approvedByRepeatedStatus
5587: ,ame_util.rejectedByRepeatedStatus

Line 5584: ,ame_util.rejectStatus

5580: if currentApproverApprovalStatus is null or
5581: currentApproverApprovalStatus in (ame_util.repeatedStatus) then
5582: approvalStatusOut := ame_util.notStartedStatus;
5583: elsif currentApproverApprovalStatus in (ame_util.approvedStatus
5584: ,ame_util.rejectStatus
5585: ,ame_util.beatByFirstResponderStatus
5586: ,ame_util.approvedByRepeatedStatus
5587: ,ame_util.rejectedByRepeatedStatus
5588: ,ame_util.suppressedStatus

Line 5585: ,ame_util.beatByFirstResponderStatus

5581: currentApproverApprovalStatus in (ame_util.repeatedStatus) then
5582: approvalStatusOut := ame_util.notStartedStatus;
5583: elsif currentApproverApprovalStatus in (ame_util.approvedStatus
5584: ,ame_util.rejectStatus
5585: ,ame_util.beatByFirstResponderStatus
5586: ,ame_util.approvedByRepeatedStatus
5587: ,ame_util.rejectedByRepeatedStatus
5588: ,ame_util.suppressedStatus
5589: ,ame_util.noResponseStatus

Line 5586: ,ame_util.approvedByRepeatedStatus

5582: approvalStatusOut := ame_util.notStartedStatus;
5583: elsif currentApproverApprovalStatus in (ame_util.approvedStatus
5584: ,ame_util.rejectStatus
5585: ,ame_util.beatByFirstResponderStatus
5586: ,ame_util.approvedByRepeatedStatus
5587: ,ame_util.rejectedByRepeatedStatus
5588: ,ame_util.suppressedStatus
5589: ,ame_util.noResponseStatus
5590: ,ame_util.forwardStatus

Line 5587: ,ame_util.rejectedByRepeatedStatus

5583: elsif currentApproverApprovalStatus in (ame_util.approvedStatus
5584: ,ame_util.rejectStatus
5585: ,ame_util.beatByFirstResponderStatus
5586: ,ame_util.approvedByRepeatedStatus
5587: ,ame_util.rejectedByRepeatedStatus
5588: ,ame_util.suppressedStatus
5589: ,ame_util.noResponseStatus
5590: ,ame_util.forwardStatus
5591: ,ame_util.approveAndForwardStatus

Line 5588: ,ame_util.suppressedStatus

5584: ,ame_util.rejectStatus
5585: ,ame_util.beatByFirstResponderStatus
5586: ,ame_util.approvedByRepeatedStatus
5587: ,ame_util.rejectedByRepeatedStatus
5588: ,ame_util.suppressedStatus
5589: ,ame_util.noResponseStatus
5590: ,ame_util.forwardStatus
5591: ,ame_util.approveAndForwardStatus
5592: ,ame_util2.reassignStatus

Line 5589: ,ame_util.noResponseStatus

5585: ,ame_util.beatByFirstResponderStatus
5586: ,ame_util.approvedByRepeatedStatus
5587: ,ame_util.rejectedByRepeatedStatus
5588: ,ame_util.suppressedStatus
5589: ,ame_util.noResponseStatus
5590: ,ame_util.forwardStatus
5591: ,ame_util.approveAndForwardStatus
5592: ,ame_util2.reassignStatus
5593: ,ame_util2.noResponseByRepeatedStatus

Line 5590: ,ame_util.forwardStatus

5586: ,ame_util.approvedByRepeatedStatus
5587: ,ame_util.rejectedByRepeatedStatus
5588: ,ame_util.suppressedStatus
5589: ,ame_util.noResponseStatus
5590: ,ame_util.forwardStatus
5591: ,ame_util.approveAndForwardStatus
5592: ,ame_util2.reassignStatus
5593: ,ame_util2.noResponseByRepeatedStatus
5594: ,ame_util2.forwardByRepeatedStatus) or

Line 5591: ,ame_util.approveAndForwardStatus

5587: ,ame_util.rejectedByRepeatedStatus
5588: ,ame_util.suppressedStatus
5589: ,ame_util.noResponseStatus
5590: ,ame_util.forwardStatus
5591: ,ame_util.approveAndForwardStatus
5592: ,ame_util2.reassignStatus
5593: ,ame_util2.noResponseByRepeatedStatus
5594: ,ame_util2.forwardByRepeatedStatus) or
5595: (currentApproverCategory = ame_util.fyiApproverCategory and

Line 5592: ,ame_util2.reassignStatus

5588: ,ame_util.suppressedStatus
5589: ,ame_util.noResponseStatus
5590: ,ame_util.forwardStatus
5591: ,ame_util.approveAndForwardStatus
5592: ,ame_util2.reassignStatus
5593: ,ame_util2.noResponseByRepeatedStatus
5594: ,ame_util2.forwardByRepeatedStatus) or
5595: (currentApproverCategory = ame_util.fyiApproverCategory and
5596: (currentApproverApprovalStatus in (ame_util.notifiedStatus,

Line 5593: ,ame_util2.noResponseByRepeatedStatus

5589: ,ame_util.noResponseStatus
5590: ,ame_util.forwardStatus
5591: ,ame_util.approveAndForwardStatus
5592: ,ame_util2.reassignStatus
5593: ,ame_util2.noResponseByRepeatedStatus
5594: ,ame_util2.forwardByRepeatedStatus) or
5595: (currentApproverCategory = ame_util.fyiApproverCategory and
5596: (currentApproverApprovalStatus in (ame_util.notifiedStatus,
5597: ame_util.notifiedByRepeatedStatus))) then

Line 5594: ,ame_util2.forwardByRepeatedStatus) or

5590: ,ame_util.forwardStatus
5591: ,ame_util.approveAndForwardStatus
5592: ,ame_util2.reassignStatus
5593: ,ame_util2.noResponseByRepeatedStatus
5594: ,ame_util2.forwardByRepeatedStatus) or
5595: (currentApproverCategory = ame_util.fyiApproverCategory and
5596: (currentApproverApprovalStatus in (ame_util.notifiedStatus,
5597: ame_util.notifiedByRepeatedStatus))) then
5598: approvalStatusOut := ame_util.completedStatus;

Line 5595: (currentApproverCategory = ame_util.fyiApproverCategory and

5591: ,ame_util.approveAndForwardStatus
5592: ,ame_util2.reassignStatus
5593: ,ame_util2.noResponseByRepeatedStatus
5594: ,ame_util2.forwardByRepeatedStatus) or
5595: (currentApproverCategory = ame_util.fyiApproverCategory and
5596: (currentApproverApprovalStatus in (ame_util.notifiedStatus,
5597: ame_util.notifiedByRepeatedStatus))) then
5598: approvalStatusOut := ame_util.completedStatus;
5599: elsif currentApproverApprovalStatus not in (ame_util.approvedStatus

Line 5596: (currentApproverApprovalStatus in (ame_util.notifiedStatus,

5592: ,ame_util2.reassignStatus
5593: ,ame_util2.noResponseByRepeatedStatus
5594: ,ame_util2.forwardByRepeatedStatus) or
5595: (currentApproverCategory = ame_util.fyiApproverCategory and
5596: (currentApproverApprovalStatus in (ame_util.notifiedStatus,
5597: ame_util.notifiedByRepeatedStatus))) then
5598: approvalStatusOut := ame_util.completedStatus;
5599: elsif currentApproverApprovalStatus not in (ame_util.approvedStatus
5600: ,ame_util.rejectStatus

Line 5597: ame_util.notifiedByRepeatedStatus))) then

5593: ,ame_util2.noResponseByRepeatedStatus
5594: ,ame_util2.forwardByRepeatedStatus) or
5595: (currentApproverCategory = ame_util.fyiApproverCategory and
5596: (currentApproverApprovalStatus in (ame_util.notifiedStatus,
5597: ame_util.notifiedByRepeatedStatus))) then
5598: approvalStatusOut := ame_util.completedStatus;
5599: elsif currentApproverApprovalStatus not in (ame_util.approvedStatus
5600: ,ame_util.rejectStatus
5601: ,ame_util.beatByFirstResponderStatus

Line 5598: approvalStatusOut := ame_util.completedStatus;

5594: ,ame_util2.forwardByRepeatedStatus) or
5595: (currentApproverCategory = ame_util.fyiApproverCategory and
5596: (currentApproverApprovalStatus in (ame_util.notifiedStatus,
5597: ame_util.notifiedByRepeatedStatus))) then
5598: approvalStatusOut := ame_util.completedStatus;
5599: elsif currentApproverApprovalStatus not in (ame_util.approvedStatus
5600: ,ame_util.rejectStatus
5601: ,ame_util.beatByFirstResponderStatus
5602: ,ame_util.approvedByRepeatedStatus

Line 5599: elsif currentApproverApprovalStatus not in (ame_util.approvedStatus

5595: (currentApproverCategory = ame_util.fyiApproverCategory and
5596: (currentApproverApprovalStatus in (ame_util.notifiedStatus,
5597: ame_util.notifiedByRepeatedStatus))) then
5598: approvalStatusOut := ame_util.completedStatus;
5599: elsif currentApproverApprovalStatus not in (ame_util.approvedStatus
5600: ,ame_util.rejectStatus
5601: ,ame_util.beatByFirstResponderStatus
5602: ,ame_util.approvedByRepeatedStatus
5603: ,ame_util.rejectedByRepeatedStatus

Line 5600: ,ame_util.rejectStatus

5596: (currentApproverApprovalStatus in (ame_util.notifiedStatus,
5597: ame_util.notifiedByRepeatedStatus))) then
5598: approvalStatusOut := ame_util.completedStatus;
5599: elsif currentApproverApprovalStatus not in (ame_util.approvedStatus
5600: ,ame_util.rejectStatus
5601: ,ame_util.beatByFirstResponderStatus
5602: ,ame_util.approvedByRepeatedStatus
5603: ,ame_util.rejectedByRepeatedStatus
5604: ,ame_util.suppressedStatus) then

Line 5601: ,ame_util.beatByFirstResponderStatus

5597: ame_util.notifiedByRepeatedStatus))) then
5598: approvalStatusOut := ame_util.completedStatus;
5599: elsif currentApproverApprovalStatus not in (ame_util.approvedStatus
5600: ,ame_util.rejectStatus
5601: ,ame_util.beatByFirstResponderStatus
5602: ,ame_util.approvedByRepeatedStatus
5603: ,ame_util.rejectedByRepeatedStatus
5604: ,ame_util.suppressedStatus) then
5605: approvalStatusOut := ame_util.startedStatus;

Line 5602: ,ame_util.approvedByRepeatedStatus

5598: approvalStatusOut := ame_util.completedStatus;
5599: elsif currentApproverApprovalStatus not in (ame_util.approvedStatus
5600: ,ame_util.rejectStatus
5601: ,ame_util.beatByFirstResponderStatus
5602: ,ame_util.approvedByRepeatedStatus
5603: ,ame_util.rejectedByRepeatedStatus
5604: ,ame_util.suppressedStatus) then
5605: approvalStatusOut := ame_util.startedStatus;
5606: end if;

Line 5603: ,ame_util.rejectedByRepeatedStatus

5599: elsif currentApproverApprovalStatus not in (ame_util.approvedStatus
5600: ,ame_util.rejectStatus
5601: ,ame_util.beatByFirstResponderStatus
5602: ,ame_util.approvedByRepeatedStatus
5603: ,ame_util.rejectedByRepeatedStatus
5604: ,ame_util.suppressedStatus) then
5605: approvalStatusOut := ame_util.startedStatus;
5606: end if;
5607: if currentApproverApprovalStatus = ame_util.rejectStatus

Line 5604: ,ame_util.suppressedStatus) then

5600: ,ame_util.rejectStatus
5601: ,ame_util.beatByFirstResponderStatus
5602: ,ame_util.approvedByRepeatedStatus
5603: ,ame_util.rejectedByRepeatedStatus
5604: ,ame_util.suppressedStatus) then
5605: approvalStatusOut := ame_util.startedStatus;
5606: end if;
5607: if currentApproverApprovalStatus = ame_util.rejectStatus
5608: or currentApproverApprovalStatus = ame_util.rejectedByRepeatedStatus then

Line 5605: approvalStatusOut := ame_util.startedStatus;

5601: ,ame_util.beatByFirstResponderStatus
5602: ,ame_util.approvedByRepeatedStatus
5603: ,ame_util.rejectedByRepeatedStatus
5604: ,ame_util.suppressedStatus) then
5605: approvalStatusOut := ame_util.startedStatus;
5606: end if;
5607: if currentApproverApprovalStatus = ame_util.rejectStatus
5608: or currentApproverApprovalStatus = ame_util.rejectedByRepeatedStatus then
5609: rejectedItemsExistOut := true;

Line 5607: if currentApproverApprovalStatus = ame_util.rejectStatus

5603: ,ame_util.rejectedByRepeatedStatus
5604: ,ame_util.suppressedStatus) then
5605: approvalStatusOut := ame_util.startedStatus;
5606: end if;
5607: if currentApproverApprovalStatus = ame_util.rejectStatus
5608: or currentApproverApprovalStatus = ame_util.rejectedByRepeatedStatus then
5609: rejectedItemsExistOut := true;
5610: /* Populate the list of rejected items and item classes */
5611: nextSuspendedItemIndex := engStSuspendedItems.count + 1;

Line 5608: or currentApproverApprovalStatus = ame_util.rejectedByRepeatedStatus then

5604: ,ame_util.suppressedStatus) then
5605: approvalStatusOut := ame_util.startedStatus;
5606: end if;
5607: if currentApproverApprovalStatus = ame_util.rejectStatus
5608: or currentApproverApprovalStatus = ame_util.rejectedByRepeatedStatus then
5609: rejectedItemsExistOut := true;
5610: /* Populate the list of rejected items and item classes */
5611: nextSuspendedItemIndex := engStSuspendedItems.count + 1;
5612: engStSuspendedItems(nextSuspendedItemIndex)

Line 5628: previousTreeNodeIndex := ame_util.invalidTreeIndex;

5624: /* 2.The approvalStatus of the node is determined by finding */
5625: /* the aggregate status of all its child nodes */
5626: /* 3.The current node is flagged as rejected if any of its */
5627: /* children have a rejectedStatus */
5628: previousTreeNodeIndex := ame_util.invalidTreeIndex;
5629: currentTreeNodeRejectionStatus := false;
5630: maximumOrderOfChildren := engStApproversTree(parentIndexIn).min_order;
5631: loop
5632: if previousTreeNodeIndex = ame_util.invalidTreeIndex then

Line 5632: if previousTreeNodeIndex = ame_util.invalidTreeIndex then

5628: previousTreeNodeIndex := ame_util.invalidTreeIndex;
5629: currentTreeNodeRejectionStatus := false;
5630: maximumOrderOfChildren := engStApproversTree(parentIndexIn).min_order;
5631: loop
5632: if previousTreeNodeIndex = ame_util.invalidTreeIndex then
5633: engStApproversTree(currentTreeNodeIndex).min_order
5634: := engStApproversTree(parentIndexIn).min_order;
5635: elsif engStApproversTree(currentTreeNodeIndex).order_number
5636: = engStApproversTree(previousTreeNodeIndex).order_number then

Line 5656: <> ame_util.noApproverIndex then

5652: > maximumOrderOfChildren then
5653: maximumOrderOfChildren := engStApproversTree(currentTreeNodeIndex).max_order;
5654: end if;
5655: if engStApproversTree(currentTreeNodeIndex).approver_index
5656: <> ame_util.noApproverIndex then
5657: currentApproverIndex := engStApproversTree(currentTreeNodeIndex).approver_index;
5658: engStApprovers(currentApproverIndex).approver_order_number
5659: := engStApproversTree(currentTreeNodeIndex).max_order;
5660: end if;

Line 5661: if (engStApproversTree(currentTreeNodeIndex).status = ame_util.notStartedStatus

5657: currentApproverIndex := engStApproversTree(currentTreeNodeIndex).approver_index;
5658: engStApprovers(currentApproverIndex).approver_order_number
5659: := engStApproversTree(currentTreeNodeIndex).max_order;
5660: end if;
5661: if (engStApproversTree(currentTreeNodeIndex).status = ame_util.notStartedStatus
5662: and approvalStatusOfChildren = ame_util.completedStatus)
5663: or (engStApproversTree(currentTreeNodeIndex).status = ame_util.completedStatus
5664: and approvalStatusOfChildren = ame_util.notStartedStatus) then
5665: approvalStatusOfChildren := ame_util.startedStatus;

Line 5662: and approvalStatusOfChildren = ame_util.completedStatus)

5658: engStApprovers(currentApproverIndex).approver_order_number
5659: := engStApproversTree(currentTreeNodeIndex).max_order;
5660: end if;
5661: if (engStApproversTree(currentTreeNodeIndex).status = ame_util.notStartedStatus
5662: and approvalStatusOfChildren = ame_util.completedStatus)
5663: or (engStApproversTree(currentTreeNodeIndex).status = ame_util.completedStatus
5664: and approvalStatusOfChildren = ame_util.notStartedStatus) then
5665: approvalStatusOfChildren := ame_util.startedStatus;
5666: elsif engStApproversTree(currentTreeNodeIndex).status

Line 5663: or (engStApproversTree(currentTreeNodeIndex).status = ame_util.completedStatus

5659: := engStApproversTree(currentTreeNodeIndex).max_order;
5660: end if;
5661: if (engStApproversTree(currentTreeNodeIndex).status = ame_util.notStartedStatus
5662: and approvalStatusOfChildren = ame_util.completedStatus)
5663: or (engStApproversTree(currentTreeNodeIndex).status = ame_util.completedStatus
5664: and approvalStatusOfChildren = ame_util.notStartedStatus) then
5665: approvalStatusOfChildren := ame_util.startedStatus;
5666: elsif engStApproversTree(currentTreeNodeIndex).status
5667: > approvalStatusOfChildren then

Line 5664: and approvalStatusOfChildren = ame_util.notStartedStatus) then

5660: end if;
5661: if (engStApproversTree(currentTreeNodeIndex).status = ame_util.notStartedStatus
5662: and approvalStatusOfChildren = ame_util.completedStatus)
5663: or (engStApproversTree(currentTreeNodeIndex).status = ame_util.completedStatus
5664: and approvalStatusOfChildren = ame_util.notStartedStatus) then
5665: approvalStatusOfChildren := ame_util.startedStatus;
5666: elsif engStApproversTree(currentTreeNodeIndex).status
5667: > approvalStatusOfChildren then
5668: approvalStatusOfChildren := engStApproversTree(currentTreeNodeIndex).status;

Line 5665: approvalStatusOfChildren := ame_util.startedStatus;

5661: if (engStApproversTree(currentTreeNodeIndex).status = ame_util.notStartedStatus
5662: and approvalStatusOfChildren = ame_util.completedStatus)
5663: or (engStApproversTree(currentTreeNodeIndex).status = ame_util.completedStatus
5664: and approvalStatusOfChildren = ame_util.notStartedStatus) then
5665: approvalStatusOfChildren := ame_util.startedStatus;
5666: elsif engStApproversTree(currentTreeNodeIndex).status
5667: > approvalStatusOfChildren then
5668: approvalStatusOfChildren := engStApproversTree(currentTreeNodeIndex).status;
5669: end if;

Line 5672: exit when currentTreeNodeIndex = ame_util.noSiblingIndex;

5668: approvalStatusOfChildren := engStApproversTree(currentTreeNodeIndex).status;
5669: end if;
5670: previousTreeNodeIndex := currentTreeNodeIndex;
5671: currentTreeNodeIndex := engStApproversTree(currentTreeNodeIndex).sibling_index;
5672: exit when currentTreeNodeIndex = ame_util.noSiblingIndex;
5673: end loop;
5674: maximumOrderOut := maximumOrderOfChildren;
5675: /* If the node has supended children and the node is below the item level then */
5676: /* its status is set to completed as no more approvers are to be fetched from */

Line 5680: approvalStatusOut := ame_util.completedStatus;

5676: /* its status is set to completed as no more approvers are to be fetched from */
5677: /* below this node */
5678: if currentTreeNodeRejectionStatus and
5679: engStApproversTree(parentIndexIn).tree_level > 1 then
5680: approvalStatusOut := ame_util.completedStatus;
5681: elsif approvalStatusOfChildren = ame_util.unknownStatus then
5682: approvalStatusOut := ame_util.notStartedStatus;
5683: else
5684: approvalStatusOut := approvalStatusOfChildren;

Line 5681: elsif approvalStatusOfChildren = ame_util.unknownStatus then

5677: /* below this node */
5678: if currentTreeNodeRejectionStatus and
5679: engStApproversTree(parentIndexIn).tree_level > 1 then
5680: approvalStatusOut := ame_util.completedStatus;
5681: elsif approvalStatusOfChildren = ame_util.unknownStatus then
5682: approvalStatusOut := ame_util.notStartedStatus;
5683: else
5684: approvalStatusOut := approvalStatusOfChildren;
5685: end if;

Line 5682: approvalStatusOut := ame_util.notStartedStatus;

5678: if currentTreeNodeRejectionStatus and
5679: engStApproversTree(parentIndexIn).tree_level > 1 then
5680: approvalStatusOut := ame_util.completedStatus;
5681: elsif approvalStatusOfChildren = ame_util.unknownStatus then
5682: approvalStatusOut := ame_util.notStartedStatus;
5683: else
5684: approvalStatusOut := approvalStatusOfChildren;
5685: end if;
5686: rejectedItemsExistOut := currentTreeNodeRejectionStatus;

Line 5691: ame_util.runtimeException(packageNameIn => 'ame_engine',

5687: end if;
5688: end if;
5689: exception
5690: when others then
5691: ame_util.runtimeException(packageNameIn => 'ame_engine',
5692: routineNameIn => 'finalizeTree',
5693: exceptionNumberIn => sqlcode,
5694: exceptionStringIn => sqlerrm);
5695: raise;

Line 5698: procedure getAllApprovers(approversOut out nocopy ame_util.approversTable) as

5694: exceptionStringIn => sqlerrm);
5695: raise;
5696: end finalizeTree;
5697: /* getAllApprovers is for amem0013.sql backwards compatibility only. Do not use it elsewhere. */
5698: procedure getAllApprovers(approversOut out nocopy ame_util.approversTable) as
5699: begin
5700: ame_api.getAllApprovers(applicationIdIn => engAmeApplicationId,
5701: transactionIdIn => engTransactionId,
5702: transactionTypeIn => engTransactionTypeId,

Line 5706: ame_util.runtimeException(packageNameIn => 'ame_engine',

5702: transactionTypeIn => engTransactionTypeId,
5703: approversOut => approversOut);
5704: exception
5705: when others then
5706: ame_util.runtimeException(packageNameIn => 'ame_engine',
5707: routineNameIn => 'getAllApprovers',
5708: exceptionNumberIn => sqlcode,
5709: exceptionStringIn => sqlerrm);
5710: raise;

Line 5713: (ruleIdsOut out nocopy ame_util.idList

5709: exceptionStringIn => sqlerrm);
5710: raise;
5711: end getAllApprovers;
5712: procedure getApplicableRules
5713: (ruleIdsOut out nocopy ame_util.idList
5714: ,ruleDescriptionsOut out nocopy ame_util.stringList) as
5715: nextRuleIndex integer;
5716: ruleFound boolean;
5717: begin

Line 5714: ,ruleDescriptionsOut out nocopy ame_util.stringList) as

5710: raise;
5711: end getAllApprovers;
5712: procedure getApplicableRules
5713: (ruleIdsOut out nocopy ame_util.idList
5714: ,ruleDescriptionsOut out nocopy ame_util.stringList) as
5715: nextRuleIndex integer;
5716: ruleFound boolean;
5717: begin
5718: nextRuleIndex := 1;

Line 5720: if engRuleAppliedYN(i) = ame_util.booleanTrue then

5716: ruleFound boolean;
5717: begin
5718: nextRuleIndex := 1;
5719: for i in 1 .. engAppRuleIds.count loop
5720: if engRuleAppliedYN(i) = ame_util.booleanTrue then
5721: if nextRuleIndex = 1 then
5722: ruleFound := false;
5723: else
5724: ruleFound := false;

Line 5742: ame_util.runtimeException(packageNameIn => 'ame_engine',

5738: end if;
5739: end loop;
5740: exception
5741: when others then
5742: ame_util.runtimeException(packageNameIn => 'ame_engine',
5743: routineNameIn => 'getApplicableRules',
5744: exceptionNumberIn => sqlcode,
5745: exceptionStringIn => sqlerrm);
5746: raise;

Line 5749: procedure getApprovalGroupConfigs(groupIdsInOut in out nocopy ame_util.idList,

5745: exceptionStringIn => sqlerrm);
5746: raise;
5747: end getApplicableRules;
5748: /* BUG: 4491715 sort approver categories and sources along with group ids */
5749: procedure getApprovalGroupConfigs(groupIdsInOut in out nocopy ame_util.idList,
5750: sourcesInOut in out nocopy ame_util.longStringList,
5751: approverCategoriesInOut in out nocopy ame_util.charList,
5752: orderNumbersOut out nocopy ame_util.idList,
5753: votingRegimesOut out nocopy ame_util.charList) as

Line 5750: sourcesInOut in out nocopy ame_util.longStringList,

5746: raise;
5747: end getApplicableRules;
5748: /* BUG: 4491715 sort approver categories and sources along with group ids */
5749: procedure getApprovalGroupConfigs(groupIdsInOut in out nocopy ame_util.idList,
5750: sourcesInOut in out nocopy ame_util.longStringList,
5751: approverCategoriesInOut in out nocopy ame_util.charList,
5752: orderNumbersOut out nocopy ame_util.idList,
5753: votingRegimesOut out nocopy ame_util.charList) as
5754: cursor approvalGroupConfigCursor(groupIdIn in integer) is

Line 5751: approverCategoriesInOut in out nocopy ame_util.charList,

5747: end getApplicableRules;
5748: /* BUG: 4491715 sort approver categories and sources along with group ids */
5749: procedure getApprovalGroupConfigs(groupIdsInOut in out nocopy ame_util.idList,
5750: sourcesInOut in out nocopy ame_util.longStringList,
5751: approverCategoriesInOut in out nocopy ame_util.charList,
5752: orderNumbersOut out nocopy ame_util.idList,
5753: votingRegimesOut out nocopy ame_util.charList) as
5754: cursor approvalGroupConfigCursor(groupIdIn in integer) is
5755: select

Line 5752: orderNumbersOut out nocopy ame_util.idList,

5748: /* BUG: 4491715 sort approver categories and sources along with group ids */
5749: procedure getApprovalGroupConfigs(groupIdsInOut in out nocopy ame_util.idList,
5750: sourcesInOut in out nocopy ame_util.longStringList,
5751: approverCategoriesInOut in out nocopy ame_util.charList,
5752: orderNumbersOut out nocopy ame_util.idList,
5753: votingRegimesOut out nocopy ame_util.charList) as
5754: cursor approvalGroupConfigCursor(groupIdIn in integer) is
5755: select
5756: order_number,

Line 5753: votingRegimesOut out nocopy ame_util.charList) as

5749: procedure getApprovalGroupConfigs(groupIdsInOut in out nocopy ame_util.idList,
5750: sourcesInOut in out nocopy ame_util.longStringList,
5751: approverCategoriesInOut in out nocopy ame_util.charList,
5752: orderNumbersOut out nocopy ame_util.idList,
5753: votingRegimesOut out nocopy ame_util.charList) as
5754: cursor approvalGroupConfigCursor(groupIdIn in integer) is
5755: select
5756: order_number,
5757: voting_regime

Line 5764: nvl(end_date - ame_util.oneSecond, engEffectiveRuleDate);

5760: application_id = engAmeApplicationId and
5761: approval_group_id = groupIdIn and
5762: engEffectiveRuleDate between
5763: start_date and
5764: nvl(end_date - ame_util.oneSecond, engEffectiveRuleDate);
5765: tempGroupId integer;
5766: tempOrderNumber integer;
5767: tempVotingRegime ame_util.charType;
5768: tempSource ame_util.longStringType;

Line 5767: tempVotingRegime ame_util.charType;

5763: start_date and
5764: nvl(end_date - ame_util.oneSecond, engEffectiveRuleDate);
5765: tempGroupId integer;
5766: tempOrderNumber integer;
5767: tempVotingRegime ame_util.charType;
5768: tempSource ame_util.longStringType;
5769: tempApproverCategory ame_util.charType;
5770: upperLimit integer;
5771: begin

Line 5768: tempSource ame_util.longStringType;

5764: nvl(end_date - ame_util.oneSecond, engEffectiveRuleDate);
5765: tempGroupId integer;
5766: tempOrderNumber integer;
5767: tempVotingRegime ame_util.charType;
5768: tempSource ame_util.longStringType;
5769: tempApproverCategory ame_util.charType;
5770: upperLimit integer;
5771: begin
5772: /*

Line 5769: tempApproverCategory ame_util.charType;

5765: tempGroupId integer;
5766: tempOrderNumber integer;
5767: tempVotingRegime ame_util.charType;
5768: tempSource ame_util.longStringType;
5769: tempApproverCategory ame_util.charType;
5770: upperLimit integer;
5771: begin
5772: /*
5773: Evidently it's more efficient to fetch this way, than to do a single bulk fetch

Line 5817: ame_util.runtimeException(packageNameIn => 'ame_engine',

5813: when others then
5814: if(approvalGroupConfigCursor%isopen) then
5815: close approvalGroupConfigCursor;
5816: end if;
5817: ame_util.runtimeException(packageNameIn => 'ame_engine',
5818: routineNameIn => 'getApprovalGroupConfigs',
5819: exceptionNumberIn => sqlcode,
5820: exceptionStringIn => sqlerrm);
5821: raise;

Line 5823: procedure getApprovers(approversOut out nocopy ame_util.approversTable2) as

5819: exceptionNumberIn => sqlcode,
5820: exceptionStringIn => sqlerrm);
5821: raise;
5822: end getApprovalGroupConfigs;
5823: procedure getApprovers(approversOut out nocopy ame_util.approversTable2) as
5824: begin
5825: if (not engItemDataPrepared) and engPrepareItemData then
5826: prepareItemData(itemIndexesOut => engStItemIndexes
5827: ,itemItemClassesOut => engStItemClasses

Line 5862: ame_util.runtimeException(packageNameIn => 'ame_engine',

5858: approversOut(i).approver_order_number := engStApprovers(i).approver_order_number;
5859: end loop;
5860: exception
5861: when others then
5862: ame_util.runtimeException(packageNameIn => 'ame_engine',
5863: routineNameIn => 'getApprovers',
5864: exceptionNumberIn => sqlcode,
5865: exceptionStringIn => sqlerrm);
5866: raise;

Line 5869: procedure getApprovers2(approversOut out nocopy ame_util.approversTable2

5865: exceptionStringIn => sqlerrm);
5866: raise;
5867: end getApprovers;
5868: /* This procedure returns the approvers as well as approvers tree to the calling APIs */
5869: procedure getApprovers2(approversOut out nocopy ame_util.approversTable2
5870: ,approversTreeOut out nocopy ame_util.approversTreeTable) as
5871: loopIndex integer;
5872: begin
5873: for i in 1 .. engStApprovers.count loop

Line 5870: ,approversTreeOut out nocopy ame_util.approversTreeTable) as

5866: raise;
5867: end getApprovers;
5868: /* This procedure returns the approvers as well as approvers tree to the calling APIs */
5869: procedure getApprovers2(approversOut out nocopy ame_util.approversTable2
5870: ,approversTreeOut out nocopy ame_util.approversTreeTable) as
5871: loopIndex integer;
5872: begin
5873: for i in 1 .. engStApprovers.count loop
5874: approversOut(i).name := engStApprovers(i).name;

Line 5917: ame_util.runtimeException(packageNameIn => 'ame_engine',

5913: end loop;
5914: end if;
5915: exception
5916: when others then
5917: ame_util.runtimeException(packageNameIn => 'ame_engine',
5918: routineNameIn => 'getApprovers2',
5919: exceptionNumberIn => sqlcode,
5920: exceptionStringIn => sqlerrm);
5921: raise;

Line 5934: parameter := ame_util.firstAuthorityParameter ||

5930: displayNameOut out nocopy varchar2,
5931: sourceOut out nocopy varchar2) as
5932: parameter ame_temp_insertions.parameter%type;
5933: begin
5934: parameter := ame_util.firstAuthorityParameter ||
5935: ame_util.fieldDelimiter ||
5936: itemClassIn ||
5937: ame_util.fieldDelimiter ||
5938: itemIdIn ||

Line 5935: ame_util.fieldDelimiter ||

5931: sourceOut out nocopy varchar2) as
5932: parameter ame_temp_insertions.parameter%type;
5933: begin
5934: parameter := ame_util.firstAuthorityParameter ||
5935: ame_util.fieldDelimiter ||
5936: itemClassIn ||
5937: ame_util.fieldDelimiter ||
5938: itemIdIn ||
5939: ame_util.fieldDelimiter ||

Line 5937: ame_util.fieldDelimiter ||

5933: begin
5934: parameter := ame_util.firstAuthorityParameter ||
5935: ame_util.fieldDelimiter ||
5936: itemClassIn ||
5937: ame_util.fieldDelimiter ||
5938: itemIdIn ||
5939: ame_util.fieldDelimiter ||
5940: actionTypeIdIn ||
5941: ame_util.fieldDelimiter ||

Line 5939: ame_util.fieldDelimiter ||

5935: ame_util.fieldDelimiter ||
5936: itemClassIn ||
5937: ame_util.fieldDelimiter ||
5938: itemIdIn ||
5939: ame_util.fieldDelimiter ||
5940: actionTypeIdIn ||
5941: ame_util.fieldDelimiter ||
5942: groupOrChainIdIn;
5943: for i in 1 .. engInsertedApproverList.count loop

Line 5941: ame_util.fieldDelimiter ||

5937: ame_util.fieldDelimiter ||
5938: itemIdIn ||
5939: ame_util.fieldDelimiter ||
5940: actionTypeIdIn ||
5941: ame_util.fieldDelimiter ||
5942: groupOrChainIdIn;
5943: for i in 1 .. engInsertedApproverList.count loop
5944: if(engInsertionParameterList(i) = parameter) then
5945: nameOut := engInsertedApproverList(i).name;

Line 5950: sourceOut := ame_util.otherInsertion;

5946: ame_approver_type_pkg.getOrigSystemIdAndDisplayName(nameIn => engInsertedApproverList(i).name,
5947: origSystemOut => origSystemOut,
5948: origSystemIdOut => origSystemIdOut,
5949: displayNameOut => displayNameOut);
5950: sourceOut := ame_util.otherInsertion;
5951: setDeviationReasonDate(engInsertionReasonList(i),engInsertionDateList(i));
5952: return;
5953: end if;
5954: end loop;

Line 5957: ame_util.runtimeException(packageNameIn => 'ame_engine',

5953: end if;
5954: end loop;
5955: exception
5956: when others then
5957: ame_util.runtimeException(packageNameIn => 'ame_engine',
5958: routineNameIn => 'getHandlerCOAFirstApprover',
5959: exceptionNumberIn => sqlcode,
5960: exceptionStringIn => sqlerrm);
5961: raise;

Line 5978: ame_util.fieldDelimiter ||

5974: sourceOut out nocopy varchar2) as
5975: parameter ame_temp_insertions.parameter%type;
5976: begin
5977: parameter := nameIn ||
5978: ame_util.fieldDelimiter ||
5979: itemClassIn ||
5980: ame_util.fieldDelimiter ||
5981: itemIdIn ||
5982: ame_util.fieldDelimiter ||

Line 5980: ame_util.fieldDelimiter ||

5976: begin
5977: parameter := nameIn ||
5978: ame_util.fieldDelimiter ||
5979: itemClassIn ||
5980: ame_util.fieldDelimiter ||
5981: itemIdIn ||
5982: ame_util.fieldDelimiter ||
5983: actionTypeIdIn ||
5984: ame_util.fieldDelimiter ||

Line 5982: ame_util.fieldDelimiter ||

5978: ame_util.fieldDelimiter ||
5979: itemClassIn ||
5980: ame_util.fieldDelimiter ||
5981: itemIdIn ||
5982: ame_util.fieldDelimiter ||
5983: actionTypeIdIn ||
5984: ame_util.fieldDelimiter ||
5985: groupOrChainIdIn ||
5986: ame_util.fieldDelimiter ||

Line 5984: ame_util.fieldDelimiter ||

5980: ame_util.fieldDelimiter ||
5981: itemIdIn ||
5982: ame_util.fieldDelimiter ||
5983: actionTypeIdIn ||
5984: ame_util.fieldDelimiter ||
5985: groupOrChainIdIn ||
5986: ame_util.fieldDelimiter ||
5987: occurrenceIn;
5988: for i in 1 .. engInsertedApproverList.count loop

Line 5986: ame_util.fieldDelimiter ||

5982: ame_util.fieldDelimiter ||
5983: actionTypeIdIn ||
5984: ame_util.fieldDelimiter ||
5985: groupOrChainIdIn ||
5986: ame_util.fieldDelimiter ||
5987: occurrenceIn;
5988: for i in 1 .. engInsertedApproverList.count loop
5989: if(engInsertedApproverList(i).api_insertion = ame_util.apiAuthorityInsertion and
5990: engInsertionOrderTypeList(i) = ame_util.afterApprover and

Line 5989: if(engInsertedApproverList(i).api_insertion = ame_util.apiAuthorityInsertion and

5985: groupOrChainIdIn ||
5986: ame_util.fieldDelimiter ||
5987: occurrenceIn;
5988: for i in 1 .. engInsertedApproverList.count loop
5989: if(engInsertedApproverList(i).api_insertion = ame_util.apiAuthorityInsertion and
5990: engInsertionOrderTypeList(i) = ame_util.afterApprover and
5991: engInsertionParameterList(i) = parameter) then
5992: nameOut := engInsertedApproverList(i).name;
5993: ame_approver_type_pkg.getOrigSystemIdAndDisplayName(nameIn => engInsertedApproverList(i).name,

Line 5990: engInsertionOrderTypeList(i) = ame_util.afterApprover and

5986: ame_util.fieldDelimiter ||
5987: occurrenceIn;
5988: for i in 1 .. engInsertedApproverList.count loop
5989: if(engInsertedApproverList(i).api_insertion = ame_util.apiAuthorityInsertion and
5990: engInsertionOrderTypeList(i) = ame_util.afterApprover and
5991: engInsertionParameterList(i) = parameter) then
5992: nameOut := engInsertedApproverList(i).name;
5993: ame_approver_type_pkg.getOrigSystemIdAndDisplayName(nameIn => engInsertedApproverList(i).name,
5994: origSystemOut => origSystemOut,

Line 5997: if(engInsertionIsSpecialForwardee(i) = ame_util.booleanTrue) then

5993: ame_approver_type_pkg.getOrigSystemIdAndDisplayName(nameIn => engInsertedApproverList(i).name,
5994: origSystemOut => origSystemOut,
5995: origSystemIdOut => origSystemIdOut,
5996: displayNameOut => displayNameOut);
5997: if(engInsertionIsSpecialForwardee(i) = ame_util.booleanTrue) then
5998: sourceOut := ame_util.specialForwardInsertion;
5999: elsif(approvalStatusIn = ame_util.forwardStatus) then
6000: sourceOut := ame_util.forwardInsertion;
6001: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then

Line 5998: sourceOut := ame_util.specialForwardInsertion;

5994: origSystemOut => origSystemOut,
5995: origSystemIdOut => origSystemIdOut,
5996: displayNameOut => displayNameOut);
5997: if(engInsertionIsSpecialForwardee(i) = ame_util.booleanTrue) then
5998: sourceOut := ame_util.specialForwardInsertion;
5999: elsif(approvalStatusIn = ame_util.forwardStatus) then
6000: sourceOut := ame_util.forwardInsertion;
6001: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
6002: sourceOut := ame_util.approveAndForwardInsertion;

Line 5999: elsif(approvalStatusIn = ame_util.forwardStatus) then

5995: origSystemIdOut => origSystemIdOut,
5996: displayNameOut => displayNameOut);
5997: if(engInsertionIsSpecialForwardee(i) = ame_util.booleanTrue) then
5998: sourceOut := ame_util.specialForwardInsertion;
5999: elsif(approvalStatusIn = ame_util.forwardStatus) then
6000: sourceOut := ame_util.forwardInsertion;
6001: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
6002: sourceOut := ame_util.approveAndForwardInsertion;
6003: else

Line 6000: sourceOut := ame_util.forwardInsertion;

5996: displayNameOut => displayNameOut);
5997: if(engInsertionIsSpecialForwardee(i) = ame_util.booleanTrue) then
5998: sourceOut := ame_util.specialForwardInsertion;
5999: elsif(approvalStatusIn = ame_util.forwardStatus) then
6000: sourceOut := ame_util.forwardInsertion;
6001: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
6002: sourceOut := ame_util.approveAndForwardInsertion;
6003: else
6004: sourceOut := ame_util.otherInsertion;

Line 6001: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then

5997: if(engInsertionIsSpecialForwardee(i) = ame_util.booleanTrue) then
5998: sourceOut := ame_util.specialForwardInsertion;
5999: elsif(approvalStatusIn = ame_util.forwardStatus) then
6000: sourceOut := ame_util.forwardInsertion;
6001: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
6002: sourceOut := ame_util.approveAndForwardInsertion;
6003: else
6004: sourceOut := ame_util.otherInsertion;
6005: end if;

Line 6002: sourceOut := ame_util.approveAndForwardInsertion;

5998: sourceOut := ame_util.specialForwardInsertion;
5999: elsif(approvalStatusIn = ame_util.forwardStatus) then
6000: sourceOut := ame_util.forwardInsertion;
6001: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
6002: sourceOut := ame_util.approveAndForwardInsertion;
6003: else
6004: sourceOut := ame_util.otherInsertion;
6005: end if;
6006: setDeviationReasonDate(engInsertionReasonList(i),engInsertionDateList(i));

Line 6004: sourceOut := ame_util.otherInsertion;

6000: sourceOut := ame_util.forwardInsertion;
6001: elsif(approvalStatusIn = ame_util.approveAndForwardStatus) then
6002: sourceOut := ame_util.approveAndForwardInsertion;
6003: else
6004: sourceOut := ame_util.otherInsertion;
6005: end if;
6006: setDeviationReasonDate(engInsertionReasonList(i),engInsertionDateList(i));
6007: return;
6008: end if;

Line 6012: ame_util.runtimeException(packageNameIn => 'ame_engine',

6008: end if;
6009: end loop;
6010: exception
6011: when others then
6012: ame_util.runtimeException(packageNameIn => 'ame_engine',
6013: routineNameIn => 'getHandlerCOAInsertion',
6014: exceptionNumberIn => sqlcode,
6015: exceptionStringIn => sqlerrm);
6016: raise;

Line 6018: procedure getHandlerRules(ruleIdsOut out nocopy ame_util.idList,

6014: exceptionNumberIn => sqlcode,
6015: exceptionStringIn => sqlerrm);
6016: raise;
6017: end getHandlerCOAInsertion;
6018: procedure getHandlerRules(ruleIdsOut out nocopy ame_util.idList,
6019: approverCategoriesOut out nocopy ame_util.charList,
6020: parametersOut out nocopy ame_util.stringList,
6021: parameterTwosOut out nocopy ame_util.stringList) as
6022: outputIndex integer;

Line 6019: approverCategoriesOut out nocopy ame_util.charList,

6015: exceptionStringIn => sqlerrm);
6016: raise;
6017: end getHandlerCOAInsertion;
6018: procedure getHandlerRules(ruleIdsOut out nocopy ame_util.idList,
6019: approverCategoriesOut out nocopy ame_util.charList,
6020: parametersOut out nocopy ame_util.stringList,
6021: parameterTwosOut out nocopy ame_util.stringList) as
6022: outputIndex integer;
6023: begin

Line 6020: parametersOut out nocopy ame_util.stringList,

6016: raise;
6017: end getHandlerCOAInsertion;
6018: procedure getHandlerRules(ruleIdsOut out nocopy ame_util.idList,
6019: approverCategoriesOut out nocopy ame_util.charList,
6020: parametersOut out nocopy ame_util.stringList,
6021: parameterTwosOut out nocopy ame_util.stringList) as
6022: outputIndex integer;
6023: begin
6024: outputIndex := 0;

Line 6021: parameterTwosOut out nocopy ame_util.stringList) as

6017: end getHandlerCOAInsertion;
6018: procedure getHandlerRules(ruleIdsOut out nocopy ame_util.idList,
6019: approverCategoriesOut out nocopy ame_util.charList,
6020: parametersOut out nocopy ame_util.stringList,
6021: parameterTwosOut out nocopy ame_util.stringList) as
6022: outputIndex integer;
6023: begin
6024: outputIndex := 0;
6025: for i in engAppHandlerFirstIndex .. engAppHandlerLastIndex loop

Line 6034: ame_util.runtimeException(packageNameIn => 'ame_engine',

6030: parameterTwosOut(outputIndex) := engAppParameterTwos(i);
6031: end loop;
6032: exception
6033: when others then
6034: ame_util.runtimeException(packageNameIn => 'ame_engine',
6035: routineNameIn => 'getHandlerRules',
6036: exceptionNumberIn => sqlcode,
6037: exceptionStringIn => sqlerrm);
6038: raise;

Line 6040: procedure getHandlerRules2(ruleIdsOut out nocopy ame_util.idList,

6036: exceptionNumberIn => sqlcode,
6037: exceptionStringIn => sqlerrm);
6038: raise;
6039: end getHandlerRules;
6040: procedure getHandlerRules2(ruleIdsOut out nocopy ame_util.idList,
6041: approverCategoriesOut out nocopy ame_util.charList,
6042: parametersOut out nocopy ame_util.stringList) as
6043: outputIndex integer;
6044: begin

Line 6041: approverCategoriesOut out nocopy ame_util.charList,

6037: exceptionStringIn => sqlerrm);
6038: raise;
6039: end getHandlerRules;
6040: procedure getHandlerRules2(ruleIdsOut out nocopy ame_util.idList,
6041: approverCategoriesOut out nocopy ame_util.charList,
6042: parametersOut out nocopy ame_util.stringList) as
6043: outputIndex integer;
6044: begin
6045: outputIndex := 0;

Line 6042: parametersOut out nocopy ame_util.stringList) as

6038: raise;
6039: end getHandlerRules;
6040: procedure getHandlerRules2(ruleIdsOut out nocopy ame_util.idList,
6041: approverCategoriesOut out nocopy ame_util.charList,
6042: parametersOut out nocopy ame_util.stringList) as
6043: outputIndex integer;
6044: begin
6045: outputIndex := 0;
6046: for i in engAppHandlerFirstIndex .. engAppHandlerLastIndex loop

Line 6054: ame_util.runtimeException(packageNameIn => 'ame_engine',

6050: parametersOut(outputIndex) := engAppParameters(i);
6051: end loop;
6052: exception
6053: when others then
6054: ame_util.runtimeException(packageNameIn => 'ame_engine',
6055: routineNameIn => 'getHandlerRules2',
6056: exceptionNumberIn => sqlcode,
6057: exceptionStringIn => sqlerrm);
6058: raise;

Line 6060: procedure getHandlerRules3(ruleIdsOut out nocopy ame_util.idList,

6056: exceptionNumberIn => sqlcode,
6057: exceptionStringIn => sqlerrm);
6058: raise;
6059: end getHandlerRules2;
6060: procedure getHandlerRules3(ruleIdsOut out nocopy ame_util.idList,
6061: ruleIndexesOut out nocopy ame_util.idList,
6062: parametersOut out nocopy ame_util.stringList,
6063: listModParameterOnesOut out nocopy ame_util.stringList,
6064: listModParameterTwosOut out nocopy ame_util.longStringList) as

Line 6061: ruleIndexesOut out nocopy ame_util.idList,

6057: exceptionStringIn => sqlerrm);
6058: raise;
6059: end getHandlerRules2;
6060: procedure getHandlerRules3(ruleIdsOut out nocopy ame_util.idList,
6061: ruleIndexesOut out nocopy ame_util.idList,
6062: parametersOut out nocopy ame_util.stringList,
6063: listModParameterOnesOut out nocopy ame_util.stringList,
6064: listModParameterTwosOut out nocopy ame_util.longStringList) as
6065: outputIndex integer;

Line 6062: parametersOut out nocopy ame_util.stringList,

6058: raise;
6059: end getHandlerRules2;
6060: procedure getHandlerRules3(ruleIdsOut out nocopy ame_util.idList,
6061: ruleIndexesOut out nocopy ame_util.idList,
6062: parametersOut out nocopy ame_util.stringList,
6063: listModParameterOnesOut out nocopy ame_util.stringList,
6064: listModParameterTwosOut out nocopy ame_util.longStringList) as
6065: outputIndex integer;
6066: begin

Line 6063: listModParameterOnesOut out nocopy ame_util.stringList,

6059: end getHandlerRules2;
6060: procedure getHandlerRules3(ruleIdsOut out nocopy ame_util.idList,
6061: ruleIndexesOut out nocopy ame_util.idList,
6062: parametersOut out nocopy ame_util.stringList,
6063: listModParameterOnesOut out nocopy ame_util.stringList,
6064: listModParameterTwosOut out nocopy ame_util.longStringList) as
6065: outputIndex integer;
6066: begin
6067: outputIndex := 0;

Line 6064: listModParameterTwosOut out nocopy ame_util.longStringList) as

6060: procedure getHandlerRules3(ruleIdsOut out nocopy ame_util.idList,
6061: ruleIndexesOut out nocopy ame_util.idList,
6062: parametersOut out nocopy ame_util.stringList,
6063: listModParameterOnesOut out nocopy ame_util.stringList,
6064: listModParameterTwosOut out nocopy ame_util.longStringList) as
6065: outputIndex integer;
6066: begin
6067: outputIndex := 0;
6068: for i in engAppHandlerFirstIndex .. engAppHandlerLastIndex loop

Line 6079: ame_util.runtimeException(packageNameIn => 'ame_engine',

6075: parameterTwoOut => listModParameterTwosOut(outputIndex));
6076: end loop;
6077: exception
6078: when others then
6079: ame_util.runtimeException(packageNameIn => 'ame_engine',
6080: routineNameIn => 'getHandlerRules3',
6081: exceptionNumberIn => sqlcode,
6082: exceptionStringIn => sqlerrm);
6083: raise;

Line 6090: approverIndexesOut out nocopy ame_util.idList,

6086: listModParameterTwoIn in varchar2,
6087: includeFyiApproversIn in boolean,
6088: includeApprovalGroupsIn in boolean,
6089: returnForwardeesIn in boolean,
6090: approverIndexesOut out nocopy ame_util.idList,
6091: lastForwardeeIndexesOut out nocopy ame_util.idList) as
6092: currentActionTypeId integer;
6093: currentGroupOrChainId integer;
6094: currentIndex integer;

Line 6091: lastForwardeeIndexesOut out nocopy ame_util.idList) as

6087: includeFyiApproversIn in boolean,
6088: includeApprovalGroupsIn in boolean,
6089: returnForwardeesIn in boolean,
6090: approverIndexesOut out nocopy ame_util.idList,
6091: lastForwardeeIndexesOut out nocopy ame_util.idList) as
6092: currentActionTypeId integer;
6093: currentGroupOrChainId integer;
6094: currentIndex integer;
6095: currentTargetIndex integer;

Line 6106: if((engStApprovers(currentIndex).approver_category = ame_util.approvalApproverCategory or

6102: end if;
6103: outputIndex := 0; /* pre-increment */
6104: currentIndex := 1; /* post-increment */
6105: loop
6106: if((engStApprovers(currentIndex).approver_category = ame_util.approvalApproverCategory or
6107: includeFyiApproversIn) and
6108: (engStApprovers(currentIndex).authority = ame_util.authorityApprover or
6109: includeApprovalGroupsIn) and
6110: listModParameterTwoIn = engStApprovers(currentIndex).name) then

Line 6108: (engStApprovers(currentIndex).authority = ame_util.authorityApprover or

6104: currentIndex := 1; /* post-increment */
6105: loop
6106: if((engStApprovers(currentIndex).approver_category = ame_util.approvalApproverCategory or
6107: includeFyiApproversIn) and
6108: (engStApprovers(currentIndex).authority = ame_util.authorityApprover or
6109: includeApprovalGroupsIn) and
6110: listModParameterTwoIn = engStApprovers(currentIndex).name) then
6111: /* This approver matches the input approver, and satisfies the input boolean arguments. */
6112: currentTargetIndex := currentIndex;

Line 6122: if(engStApprovers(currentIndex).approval_status in (ame_util.forwardStatus,

6118: at the target to check whether the target forwards. (Note that we necessarily stay
6119: in the same approval group or chain of authority as long as we're forwarding.)
6120: */
6121: for i in currentTargetIndex .. engStApproversCount loop
6122: if(engStApprovers(currentIndex).approval_status in (ame_util.forwardStatus,
6123: ame_util.approveAndForwardStatus)) then
6124: currentIndex := i;
6125: else
6126: exit;

Line 6123: ame_util.approveAndForwardStatus)) then

6119: in the same approval group or chain of authority as long as we're forwarding.)
6120: */
6121: for i in currentTargetIndex .. engStApproversCount loop
6122: if(engStApprovers(currentIndex).approval_status in (ame_util.forwardStatus,
6123: ame_util.approveAndForwardStatus)) then
6124: currentIndex := i;
6125: else
6126: exit;
6127: end if;

Line 6142: are for the ame_util.finalApprover case.

6138: optionally the last forwardee.
6139: */
6140: /*
6141: All but the first of the conditions in the following if statement
6142: are for the ame_util.finalApprover case.
6143: */
6144: if(listModParameterOneIn = ame_util.anyApprover or
6145: currentIndex > engStApproversCount or
6146: engStApprovers(currentIndex).group_or_chain_id <> currentGroupOrChainId or

Line 6144: if(listModParameterOneIn = ame_util.anyApprover or

6140: /*
6141: All but the first of the conditions in the following if statement
6142: are for the ame_util.finalApprover case.
6143: */
6144: if(listModParameterOneIn = ame_util.anyApprover or
6145: currentIndex > engStApproversCount or
6146: engStApprovers(currentIndex).group_or_chain_id <> currentGroupOrChainId or
6147: engStApprovers(currentIndex).action_type_id <> currentActionTypeId or
6148: engStApprovers(currentIndex).item_id <> engStApprovers(currentTargetIndex).item_id or

Line 6167: ame_util.runtimeException(packageNameIn => 'ame_engine',

6163: end if;
6164: end loop;
6165: exception
6166: when others then
6167: ame_util.runtimeException(packageNameIn => 'ame_engine',
6168: routineNameIn => 'getHandlerLMApprovers',
6169: exceptionNumberIn => sqlcode,
6170: exceptionStringIn => sqlerrm);
6171: raise;

Line 6185: ame_util.runtimeException(packageNameIn => 'ame_engine',

6181: attributeValue2Out := engAttributeValues2(attributeValueIndex);
6182: attributeValue3Out := engAttributeValues3(attributeValueIndex);
6183: exception
6184: when others then
6185: ame_util.runtimeException(packageNameIn => 'ame_engine',
6186: routineNameIn => 'getHeaderAttValues1',
6187: exceptionNumberIn => sqlcode,
6188: exceptionStringIn => sqlerrm);
6189: raise;

Line 6212: ame_util.runtimeException(packageNameIn => 'ame_engine',

6208: attributeValue3Out := engAttributeValues3(attributeValueIndex);
6209: end if;
6210: exception
6211: when others then
6212: ame_util.runtimeException(packageNameIn => 'ame_engine',
6213: routineNameIn => 'getHeaderAttValues2',
6214: exceptionNumberIn => sqlcode,
6215: exceptionStringIn => sqlerrm);
6216: raise;

Line 6218: procedure getItemAppProcessCompleteYN(itemAppProcessCompleteYNOut out nocopy ame_util.charList) as

6214: exceptionNumberIn => sqlcode,
6215: exceptionStringIn => sqlerrm);
6216: raise;
6217: end getHeaderAttValues2;
6218: procedure getItemAppProcessCompleteYN(itemAppProcessCompleteYNOut out nocopy ame_util.charList) as
6219: begin
6220: for i in 1 .. engStItemAppProcessCompleteYN.count loop
6221: itemAppProcessCompleteYNOut(i) := engStItemAppProcessCompleteYN(i);
6222: end loop;

Line 6225: ame_util.runtimeException(packageNameIn => 'ame_engine',

6221: itemAppProcessCompleteYNOut(i) := engStItemAppProcessCompleteYN(i);
6222: end loop;
6223: exception
6224: when others then
6225: ame_util.runtimeException(packageNameIn => 'ame_engine',
6226: routineNameIn => 'getItemAppProcessCompleteYN',
6227: exceptionNumberIn => sqlcode,
6228: exceptionStringIn => sqlerrm);
6229: raise;

Line 6247: ame_util.runtimeException(packageNameIn => 'ame_engine',

6243: attributeValue2Out := engAttributeValues2(attributeValueIndex);
6244: attributeValue3Out := engAttributeValues3(attributeValueIndex);
6245: exception
6246: when others then
6247: ame_util.runtimeException(packageNameIn => 'ame_engine',
6248: routineNameIn => 'getItemAttValues1',
6249: exceptionNumberIn => sqlcode,
6250: exceptionStringIn => sqlerrm);
6251: raise;

Line 6271: ame_util.runtimeException(packageNameIn => 'ame_engine',

6267: attributeValue2Out := engAttributeValues2(attributeValueIndex);
6268: attributeValue3Out := engAttributeValues3(attributeValueIndex);
6269: exception
6270: when others then
6271: ame_util.runtimeException(packageNameIn => 'ame_engine',
6272: routineNameIn => 'getItemAttValues2',
6273: exceptionNumberIn => sqlcode,
6274: exceptionStringIn => sqlerrm);
6275: raise;

Line 6293: ame_util.runtimeException(packageNameIn => 'ame_engine',

6289: attributeValue2Out := engAttributeValues2(attributeValueIndex);
6290: attributeValue3Out := engAttributeValues3(attributeValueIndex);
6291: exception
6292: when others then
6293: ame_util.runtimeException(packageNameIn => 'ame_engine',
6294: routineNameIn => 'getItemAttValues3',
6295: exceptionNumberIn => sqlcode,
6296: exceptionStringIn => sqlerrm);
6297: raise;

Line 6300: attributeValuesOut out nocopy ame_util.attributeValueList) as

6296: exceptionStringIn => sqlerrm);
6297: raise;
6298: end getItemAttValues3;
6299: procedure getItemClassAttValues1(attributeIdIn in integer,
6300: attributeValuesOut out nocopy ame_util.attributeValueList) as
6301: outputIndex integer;
6302: begin
6303: outputIndex := 0; /* pre-increment */
6304: for i in

Line 6314: ame_util.runtimeException(packageNameIn => 'ame_engine',

6310: attributeValuesOut(outputIndex) := engAttributeValues1(i);
6311: end loop;
6312: exception
6313: when others then
6314: ame_util.runtimeException(packageNameIn => 'ame_engine',
6315: routineNameIn => 'getItemClassAttValues1',
6316: exceptionNumberIn => sqlcode,
6317: exceptionStringIn => sqlerrm);
6318: raise;

Line 6321: attributeValuesOut out nocopy ame_util.attributeValueList) as

6317: exceptionStringIn => sqlerrm);
6318: raise;
6319: end getItemClassAttValues1;
6320: procedure getItemClassAttValues2(attributeNameIn in varchar2,
6321: attributeValuesOut out nocopy ame_util.attributeValueList) as
6322: attributeId integer;
6323: outputIndex integer;
6324: begin
6325: attributeId := getAttributeIdByName(attributeNameIn => attributeNameIn);

Line 6337: ame_util.runtimeException(packageNameIn => 'ame_engine',

6333: attributeValuesOut(outputIndex) := engAttributeValues1(i);
6334: end loop;
6335: exception
6336: when others then
6337: ame_util.runtimeException(packageNameIn => 'ame_engine',
6338: routineNameIn => 'getItemClassAttValues2',
6339: exceptionNumberIn => sqlcode,
6340: exceptionStringIn => sqlerrm);
6341: raise;

Line 6344: attributeValues1Out out nocopy ame_util.attributeValueList,

6340: exceptionStringIn => sqlerrm);
6341: raise;
6342: end getItemClassAttValues2;
6343: procedure getItemClassAttValues3(attributeIdIn in integer,
6344: attributeValues1Out out nocopy ame_util.attributeValueList,
6345: attributeValues2Out out nocopy ame_util.attributeValueList,
6346: attributeValues3Out out nocopy ame_util.attributeValueList) as
6347: outputIndex integer;
6348: begin

Line 6345: attributeValues2Out out nocopy ame_util.attributeValueList,

6341: raise;
6342: end getItemClassAttValues2;
6343: procedure getItemClassAttValues3(attributeIdIn in integer,
6344: attributeValues1Out out nocopy ame_util.attributeValueList,
6345: attributeValues2Out out nocopy ame_util.attributeValueList,
6346: attributeValues3Out out nocopy ame_util.attributeValueList) as
6347: outputIndex integer;
6348: begin
6349: outputIndex := 0; /* pre-increment */

Line 6346: attributeValues3Out out nocopy ame_util.attributeValueList) as

6342: end getItemClassAttValues2;
6343: procedure getItemClassAttValues3(attributeIdIn in integer,
6344: attributeValues1Out out nocopy ame_util.attributeValueList,
6345: attributeValues2Out out nocopy ame_util.attributeValueList,
6346: attributeValues3Out out nocopy ame_util.attributeValueList) as
6347: outputIndex integer;
6348: begin
6349: outputIndex := 0; /* pre-increment */
6350: for i in

Line 6362: ame_util.runtimeException(packageNameIn => 'ame_engine',

6358: attributeValues3Out(outputIndex) := engAttributeValues3(i);
6359: end loop;
6360: exception
6361: when others then
6362: ame_util.runtimeException(packageNameIn => 'ame_engine',
6363: routineNameIn => 'getItemClassAttValues3',
6364: exceptionNumberIn => sqlcode,
6365: exceptionStringIn => sqlerrm);
6366: raise;

Line 6369: attributeValues1Out out nocopy ame_util.attributeValueList,

6365: exceptionStringIn => sqlerrm);
6366: raise;
6367: end getItemClassAttValues3;
6368: procedure getItemClassAttValues4(attributeNameIn in varchar2,
6369: attributeValues1Out out nocopy ame_util.attributeValueList,
6370: attributeValues2Out out nocopy ame_util.attributeValueList,
6371: attributeValues3Out out nocopy ame_util.attributeValueList) as
6372: attributeId integer;
6373: outputIndex integer;

Line 6370: attributeValues2Out out nocopy ame_util.attributeValueList,

6366: raise;
6367: end getItemClassAttValues3;
6368: procedure getItemClassAttValues4(attributeNameIn in varchar2,
6369: attributeValues1Out out nocopy ame_util.attributeValueList,
6370: attributeValues2Out out nocopy ame_util.attributeValueList,
6371: attributeValues3Out out nocopy ame_util.attributeValueList) as
6372: attributeId integer;
6373: outputIndex integer;
6374: begin

Line 6371: attributeValues3Out out nocopy ame_util.attributeValueList) as

6367: end getItemClassAttValues3;
6368: procedure getItemClassAttValues4(attributeNameIn in varchar2,
6369: attributeValues1Out out nocopy ame_util.attributeValueList,
6370: attributeValues2Out out nocopy ame_util.attributeValueList,
6371: attributeValues3Out out nocopy ame_util.attributeValueList) as
6372: attributeId integer;
6373: outputIndex integer;
6374: begin
6375: attributeId := getAttributeIdByName(attributeNameIn => attributeNameIn);

Line 6389: ame_util.runtimeException(packageNameIn => 'ame_engine',

6385: attributeValues3Out(outputIndex) := engAttributeValues3(i);
6386: end loop;
6387: exception
6388: when others then
6389: ame_util.runtimeException(packageNameIn => 'ame_engine',
6390: routineNameIn => 'getItemClassAttValues4',
6391: exceptionNumberIn => sqlcode,
6392: exceptionStringIn => sqlerrm);
6393: raise;

Line 6396: itemIdsOut out nocopy ame_util.stringList) as

6392: exceptionStringIn => sqlerrm);
6393: raise;
6394: end getItemClassAttValues4;
6395: procedure getItemClassItemIds(itemClassIdIn in integer,
6396: itemIdsOut out nocopy ame_util.stringList) as
6397: firstItemIndex integer;
6398: itemClassIndex integer;
6399: tempIndex integer;
6400: begin

Line 6415: ame_util.runtimeException(packageNameIn => 'ame_engine',

6411: end if;
6412: exception
6413: when others then
6414: itemIdsOut.delete;
6415: ame_util.runtimeException(packageNameIn => 'ame_engine',
6416: routineNameIn => 'getItemClassItemIds',
6417: exceptionNumberIn => sqlcode,
6418: exceptionStringIn => sqlerrm);
6419: raise;

Line 6421: procedure getItemClasses(itemClassesOut out nocopy ame_util.stringList) as

6417: exceptionNumberIn => sqlcode,
6418: exceptionStringIn => sqlerrm);
6419: raise;
6420: end getItemClassItemIds;
6421: procedure getItemClasses(itemClassesOut out nocopy ame_util.stringList) as
6422: begin
6423: for i in 1 .. engStItemClasses.count loop
6424: itemClassesOut(i) := engStItemClasses(i);
6425: end loop;

Line 6428: ame_util.runtimeException(packageNameIn => 'ame_engine',

6424: itemClassesOut(i) := engStItemClasses(i);
6425: end loop;
6426: exception
6427: when others then
6428: ame_util.runtimeException(packageNameIn => 'ame_engine',
6429: routineNameIn => 'getItemClasses',
6430: exceptionNumberIn => sqlcode,
6431: exceptionStringIn => sqlerrm);
6432: raise;

Line 6434: procedure getItemIds(itemIdsOut out nocopy ame_util.stringList) as

6430: exceptionNumberIn => sqlcode,
6431: exceptionStringIn => sqlerrm);
6432: raise;
6433: end getItemClasses;
6434: procedure getItemIds(itemIdsOut out nocopy ame_util.stringList) as
6435: begin
6436: for i in 1 .. engStItemIds.count loop
6437: itemIdsOut(i) := engStItemIds(i);
6438: end loop;

Line 6441: ame_util.runtimeException(packageNameIn => 'ame_engine',

6437: itemIdsOut(i) := engStItemIds(i);
6438: end loop;
6439: exception
6440: when others then
6441: ame_util.runtimeException(packageNameIn => 'ame_engine',
6442: routineNameIn => 'getItemIds',
6443: exceptionNumberIn => sqlcode,
6444: exceptionStringIn => sqlerrm);
6445: raise;

Line 6447: procedure getItemIndexes(itemIndexesOut out nocopy ame_util.idList) as

6443: exceptionNumberIn => sqlcode,
6444: exceptionStringIn => sqlerrm);
6445: raise;
6446: end getItemIds;
6447: procedure getItemIndexes(itemIndexesOut out nocopy ame_util.idList) as
6448: begin
6449: for i in 1 .. engStItemIndexes.count loop
6450: itemIndexesOut(i) := engStItemIndexes(i);
6451: end loop;

Line 6454: ame_util.runtimeException(packageNameIn => 'ame_engine',

6450: itemIndexesOut(i) := engStItemIndexes(i);
6451: end loop;
6452: exception
6453: when others then
6454: ame_util.runtimeException(packageNameIn => 'ame_engine',
6455: routineNameIn => 'getItemIndexes',
6456: exceptionNumberIn => sqlcode,
6457: exceptionStringIn => sqlerrm);
6458: raise;

Line 6460: procedure getItemSources(itemSourcesOut out nocopy ame_util.longStringList) as

6456: exceptionNumberIn => sqlcode,
6457: exceptionStringIn => sqlerrm);
6458: raise;
6459: end getItemIndexes;
6460: procedure getItemSources(itemSourcesOut out nocopy ame_util.longStringList) as
6461: begin
6462: for i in 1 .. engStItemSources.count loop
6463: itemSourcesOut(i) := engStItemSources(i);
6464: end loop;

Line 6467: ame_util.runtimeException(packageNameIn => 'ame_engine',

6463: itemSourcesOut(i) := engStItemSources(i);
6464: end loop;
6465: exception
6466: when others then
6467: ame_util.runtimeException(packageNameIn => 'ame_engine',
6468: routineNameIn => 'getItemSources',
6469: exceptionNumberIn => sqlcode,
6470: exceptionStringIn => sqlerrm);
6471: raise;

Line 6473: procedure getAllItemClasses(itemClassNamesOut out nocopy ame_util.stringList) as

6469: exceptionNumberIn => sqlcode,
6470: exceptionStringIn => sqlerrm);
6471: raise;
6472: end getItemSources;
6473: procedure getAllItemClasses(itemClassNamesOut out nocopy ame_util.stringList) as
6474: tempIndex integer;
6475: tempCount integer;
6476: begin
6477: tempIndex := 0;

Line 6488: ame_util.runtimeException(packageNameIn => 'ame_engine',

6484: end loop;
6485: end loop;
6486: exception
6487: when others then
6488: ame_util.runtimeException(packageNameIn => 'ame_engine',
6489: routineNameIn => 'getAllItemClasses',
6490: exceptionNumberIn => sqlcode,
6491: exceptionStringIn => sqlerrm);
6492: raise;

Line 6494: procedure getAllItemIds(itemIdsOut out nocopy ame_util.stringList) as

6490: exceptionNumberIn => sqlcode,
6491: exceptionStringIn => sqlerrm);
6492: raise;
6493: end getAllItemClasses;
6494: procedure getAllItemIds(itemIdsOut out nocopy ame_util.stringList) as
6495: begin
6496: for i in 1 .. engItemIds.count loop
6497: itemIdsOut(i) := engItemIds(i);
6498: end loop;

Line 6501: ame_util.runtimeException(packageNameIn => 'ame_engine',

6497: itemIdsOut(i) := engItemIds(i);
6498: end loop;
6499: exception
6500: when others then
6501: ame_util.runtimeException(packageNameIn => 'ame_engine',
6502: routineNameIn => 'getAllItemIds',
6503: exceptionNumberIn => sqlcode,
6504: exceptionStringIn => sqlerrm);
6505: raise;

Line 6510: ,coaInsertionsYNIn in varchar2 default ame_util.booleanTrue

6506: end getAllItemIds;
6507: procedure getInsertions
6508: (positionIn in number
6509: ,orderTypeIn in varchar2 default null
6510: ,coaInsertionsYNIn in varchar2 default ame_util.booleanTrue
6511: ,availableInsertionsOut out nocopy ame_util.insertionsTable2
6512: ) as
6513:
6514: engStApproversCount integer;

Line 6511: ,availableInsertionsOut out nocopy ame_util.insertionsTable2

6507: procedure getInsertions
6508: (positionIn in number
6509: ,orderTypeIn in varchar2 default null
6510: ,coaInsertionsYNIn in varchar2 default ame_util.booleanTrue
6511: ,availableInsertionsOut out nocopy ame_util.insertionsTable2
6512: ) as
6513:
6514: engStApproversCount integer;
6515: availableInsertionsIndex integer; /* pre-increment */

Line 6517: errorMessage ame_util.longestStringType;

6513:
6514: engStApproversCount integer;
6515: availableInsertionsIndex integer; /* pre-increment */
6516: errorCode integer;
6517: errorMessage ame_util.longestStringType;
6518: invalidPositionException exception;
6519: nextApproverDescription varchar2(100);
6520: prevApproverDescription varchar2(100);
6521: ruleIdList ame_util.idList;

Line 6521: ruleIdList ame_util.idList;

6517: errorMessage ame_util.longestStringType;
6518: invalidPositionException exception;
6519: nextApproverDescription varchar2(100);
6520: prevApproverDescription varchar2(100);
6521: ruleIdList ame_util.idList;
6522: sourceDescription ame_util.stringType;
6523: tempBoolean boolean;
6524: tempInsertionDoesNotExist boolean;
6525: tempParameter ame_temp_insertions.parameter%type;

Line 6522: sourceDescription ame_util.stringType;

6518: invalidPositionException exception;
6519: nextApproverDescription varchar2(100);
6520: prevApproverDescription varchar2(100);
6521: ruleIdList ame_util.idList;
6522: sourceDescription ame_util.stringType;
6523: tempBoolean boolean;
6524: tempInsertionDoesNotExist boolean;
6525: tempParameter ame_temp_insertions.parameter%type;
6526: begin

Line 6532: not ame_util.isANonNegativeInteger(stringIn => positionIn)) then

6528: engStApproversCount := engStApprovers.count;
6529:
6530: if(positionIn < 1 or
6531: positionIn > engStApproversCount + 1 or
6532: not ame_util.isANonNegativeInteger(stringIn => positionIn)) then
6533: raise invalidPositionException;
6534: end if;
6535:
6536: availableInsertionsIndex := 0;

Line 6539: orderTypeIn = ame_util.absoluteOrder) then

6535:
6536: availableInsertionsIndex := 0;
6537:
6538: if (orderTypeIn is null or
6539: orderTypeIn = ame_util.absoluteOrder) then
6540:
6541: tempParameter := positionIn;
6542: if (engStApproversCount = 0) then
6543:

Line 6546: (orderTypeIn => ame_util.absoluteOrder

6542: if (engStApproversCount = 0) then
6543:
6544: /* pre-approver */
6545: if (not ame_engine.insertionExists
6546: (orderTypeIn => ame_util.absoluteOrder
6547: ,parameterIn => tempParameter
6548: )) then
6549: availableInsertionsIndex := availableInsertionsIndex + 1;
6550: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

Line 6550: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

6546: (orderTypeIn => ame_util.absoluteOrder
6547: ,parameterIn => tempParameter
6548: )) then
6549: availableInsertionsIndex := availableInsertionsIndex + 1;
6550: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
6551: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
6552: availableInsertionsOut(availableInsertionsIndex).action_type_id := null;
6553: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := null;
6554: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;

Line 6554: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;

6550: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
6551: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
6552: availableInsertionsOut(availableInsertionsIndex).action_type_id := null;
6553: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := null;
6554: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6555: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6556: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6557: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
6558: availableInsertionsOut(availableInsertionsIndex).description :=

Line 6556: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

6552: availableInsertionsOut(availableInsertionsIndex).action_type_id := null;
6553: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := null;
6554: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6555: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6556: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6557: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
6558: availableInsertionsOut(availableInsertionsIndex).description :=
6559: ame_util.absoluteOrderDescription || positionIn || '. ';
6560: end if;

Line 6557: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

6553: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := null;
6554: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6555: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6556: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6557: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
6558: availableInsertionsOut(availableInsertionsIndex).description :=
6559: ame_util.absoluteOrderDescription || positionIn || '. ';
6560: end if;
6561:

Line 6559: ame_util.absoluteOrderDescription || positionIn || '. ';

6555: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6556: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6557: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
6558: availableInsertionsOut(availableInsertionsIndex).description :=
6559: ame_util.absoluteOrderDescription || positionIn || '. ';
6560: end if;
6561:
6562: /* authority approver */
6563: if (not ame_engine.insertionExists

Line 6564: (orderTypeIn => ame_util.absoluteOrder

6560: end if;
6561:
6562: /* authority approver */
6563: if (not ame_engine.insertionExists
6564: (orderTypeIn => ame_util.absoluteOrder
6565: ,parameterIn => tempParameter
6566: )) then
6567: availableInsertionsIndex := availableInsertionsIndex + 1;
6568: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

Line 6568: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

6564: (orderTypeIn => ame_util.absoluteOrder
6565: ,parameterIn => tempParameter
6566: )) then
6567: availableInsertionsIndex := availableInsertionsIndex + 1;
6568: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
6569: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
6570: availableInsertionsOut(availableInsertionsIndex).action_type_id := null;
6571: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := null;
6572: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;

Line 6572: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;

6568: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
6569: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
6570: availableInsertionsOut(availableInsertionsIndex).action_type_id := null;
6571: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := null;
6572: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6573: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6574: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6575: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.authorityApprover;
6576: availableInsertionsOut(availableInsertionsIndex).description :=

Line 6574: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

6570: availableInsertionsOut(availableInsertionsIndex).action_type_id := null;
6571: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := null;
6572: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6573: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6574: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6575: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.authorityApprover;
6576: availableInsertionsOut(availableInsertionsIndex).description :=
6577: ame_util.absoluteOrderDescription || positionIn || '. ';
6578: end if;

Line 6575: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.authorityApprover;

6571: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := null;
6572: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6573: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6574: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6575: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.authorityApprover;
6576: availableInsertionsOut(availableInsertionsIndex).description :=
6577: ame_util.absoluteOrderDescription || positionIn || '. ';
6578: end if;
6579:

Line 6577: ame_util.absoluteOrderDescription || positionIn || '. ';

6573: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6574: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6575: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.authorityApprover;
6576: availableInsertionsOut(availableInsertionsIndex).description :=
6577: ame_util.absoluteOrderDescription || positionIn || '. ';
6578: end if;
6579:
6580: /* post approver */
6581: if (not ame_engine.insertionExists

Line 6582: (orderTypeIn => ame_util.absoluteOrder

6578: end if;
6579:
6580: /* post approver */
6581: if (not ame_engine.insertionExists
6582: (orderTypeIn => ame_util.absoluteOrder
6583: ,parameterIn => tempParameter
6584: )) then
6585: availableInsertionsIndex := availableInsertionsIndex + 1;
6586: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

Line 6586: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

6582: (orderTypeIn => ame_util.absoluteOrder
6583: ,parameterIn => tempParameter
6584: )) then
6585: availableInsertionsIndex := availableInsertionsIndex + 1;
6586: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
6587: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
6588: availableInsertionsOut(availableInsertionsIndex).action_type_id := null;
6589: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := null;
6590: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;

Line 6590: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;

6586: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
6587: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
6588: availableInsertionsOut(availableInsertionsIndex).action_type_id := null;
6589: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := null;
6590: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6591: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6592: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6593: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6594: availableInsertionsOut(availableInsertionsIndex).description :=

Line 6592: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

6588: availableInsertionsOut(availableInsertionsIndex).action_type_id := null;
6589: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := null;
6590: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6591: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6592: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6593: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6594: availableInsertionsOut(availableInsertionsIndex).description :=
6595: ame_util.absoluteOrderDescription || positionIn || '. ';
6596: end if;

Line 6593: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

6589: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := null;
6590: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6591: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6592: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6593: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6594: availableInsertionsOut(availableInsertionsIndex).description :=
6595: ame_util.absoluteOrderDescription || positionIn || '. ';
6596: end if;
6597:

Line 6595: ame_util.absoluteOrderDescription || positionIn || '. ';

6591: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6592: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6593: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6594: availableInsertionsOut(availableInsertionsIndex).description :=
6595: ame_util.absoluteOrderDescription || positionIn || '. ';
6596: end if;
6597:
6598: else /* If approver count is more than zero */
6599:

Line 6604: (orderTypeIn => ame_util.absoluteOrder

6600: if (positionIn < engStApproversCount + 1) then
6601:
6602: /* Attribute to the insertee the relevant properties of the approver at positionIn. */
6603: if (not ame_engine.insertionExists
6604: (orderTypeIn => ame_util.absoluteOrder
6605: ,parameterIn => tempParameter
6606: )) then
6607: availableInsertionsIndex := availableInsertionsIndex + 1;
6608: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;

Line 6613: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;

6609: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
6610: availableInsertionsOut(availableInsertionsIndex).action_type_id := engStApprovers(positionIn).action_type_id;
6611: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6612: engStApprovers(positionIn).group_or_chain_id;
6613: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6614: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6615: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6616: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn).authority;
6617: availableInsertionsOut(availableInsertionsIndex).description :=

Line 6615: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

6611: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6612: engStApprovers(positionIn).group_or_chain_id;
6613: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6614: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6615: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6616: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn).authority;
6617: availableInsertionsOut(availableInsertionsIndex).description :=
6618: ame_util.absoluteOrderDescription || positionIn || '. ';
6619: end if;

Line 6618: ame_util.absoluteOrderDescription || positionIn || '. ';

6614: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6615: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6616: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn).authority;
6617: availableInsertionsOut(availableInsertionsIndex).description :=
6618: ame_util.absoluteOrderDescription || positionIn || '. ';
6619: end if;
6620:
6621: end if;
6622:

Line 6638: (orderTypeIn => ame_util.absoluteOrder

6634: ))) then
6635:
6636: /* Attribute to the insertee the relevant properties of the approver at positionIn - 1. */
6637: if (not ame_engine.insertionExists
6638: (orderTypeIn => ame_util.absoluteOrder
6639: ,parameterIn => tempParameter
6640: )) then
6641: availableInsertionsIndex := availableInsertionsIndex + 1;
6642: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn - 1).item_class;

Line 6648: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;

6644: availableInsertionsOut(availableInsertionsIndex).action_type_id :=
6645: engStApprovers(positionIn - 1).action_type_id;
6646: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6647: engStApprovers(positionIn - 1).group_or_chain_id;
6648: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6649: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6650: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6651: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn - 1).authority;
6652: availableInsertionsOut(availableInsertionsIndex).description :=

Line 6650: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

6646: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6647: engStApprovers(positionIn - 1).group_or_chain_id;
6648: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.absoluteOrder;
6649: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6650: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6651: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn - 1).authority;
6652: availableInsertionsOut(availableInsertionsIndex).description :=
6653: ame_util.absoluteOrderDescription || positionIn || '. ';
6654: end if;

Line 6653: ame_util.absoluteOrderDescription || positionIn || '. ';

6649: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6650: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6651: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn - 1).authority;
6652: availableInsertionsOut(availableInsertionsIndex).description :=
6653: ame_util.absoluteOrderDescription || positionIn || '. ';
6654: end if;
6655: end if;
6656: end if; /* End if approver count > 0 */
6657:

Line 6666: orderTypeIn = ame_util.afterApprover) then

6662: Ad-hoc afterApprover is available if positionIn > 1. COA afterApprover is available if also
6663: the approver at positionIn - 1 is a COA approvalApproverCategory approver.
6664: */
6665: if (orderTypeIn is null or
6666: orderTypeIn = ame_util.afterApprover) then
6667:
6668: if (positionIn = 1 or
6669: engStApproversCount = 0) then
6670: prevApproverDescription := null;

Line 6679: ame_util.fieldDelimiter ||

6675:
6676: if(positionIn > 1) then /* ad-hoc */
6677:
6678: tempParameter := engStApprovers(positionIn - 1).name ||
6679: ame_util.fieldDelimiter ||
6680: engStApprovers(positionIn - 1).item_class ||
6681: ame_util.fieldDelimiter ||
6682: engStApprovers(positionIn - 1).item_id ||
6683: ame_util.fieldDelimiter ||

Line 6681: ame_util.fieldDelimiter ||

6677:
6678: tempParameter := engStApprovers(positionIn - 1).name ||
6679: ame_util.fieldDelimiter ||
6680: engStApprovers(positionIn - 1).item_class ||
6681: ame_util.fieldDelimiter ||
6682: engStApprovers(positionIn - 1).item_id ||
6683: ame_util.fieldDelimiter ||
6684: engStApprovers(positionIn - 1).action_type_id ||
6685: ame_util.fieldDelimiter ||

Line 6683: ame_util.fieldDelimiter ||

6679: ame_util.fieldDelimiter ||
6680: engStApprovers(positionIn - 1).item_class ||
6681: ame_util.fieldDelimiter ||
6682: engStApprovers(positionIn - 1).item_id ||
6683: ame_util.fieldDelimiter ||
6684: engStApprovers(positionIn - 1).action_type_id ||
6685: ame_util.fieldDelimiter ||
6686: engStApprovers(positionIn - 1).group_or_chain_id ||
6687: ame_util.fieldDelimiter ||

Line 6685: ame_util.fieldDelimiter ||

6681: ame_util.fieldDelimiter ||
6682: engStApprovers(positionIn - 1).item_id ||
6683: ame_util.fieldDelimiter ||
6684: engStApprovers(positionIn - 1).action_type_id ||
6685: ame_util.fieldDelimiter ||
6686: engStApprovers(positionIn - 1).group_or_chain_id ||
6687: ame_util.fieldDelimiter ||
6688: engStApprovers(positionIn - 1).occurrence;
6689:

Line 6687: ame_util.fieldDelimiter ||

6683: ame_util.fieldDelimiter ||
6684: engStApprovers(positionIn - 1).action_type_id ||
6685: ame_util.fieldDelimiter ||
6686: engStApprovers(positionIn - 1).group_or_chain_id ||
6687: ame_util.fieldDelimiter ||
6688: engStApprovers(positionIn - 1).occurrence;
6689:
6690: if (not ame_engine.insertionExists
6691: (orderTypeIn => ame_util.afterApprover

Line 6691: (orderTypeIn => ame_util.afterApprover

6687: ame_util.fieldDelimiter ||
6688: engStApprovers(positionIn - 1).occurrence;
6689:
6690: if (not ame_engine.insertionExists
6691: (orderTypeIn => ame_util.afterApprover
6692: ,parameterIn => tempParameter
6693: )) then
6694: availableInsertionsIndex := availableInsertionsIndex + 1;
6695: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn - 1).item_class;

Line 6701: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.afterApprover;

6697: availableInsertionsOut(availableInsertionsIndex).action_type_id :=
6698: engStApprovers(positionIn - 1).action_type_id;
6699: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6700: engStApprovers(positionIn - 1).group_or_chain_id;
6701: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.afterApprover;
6702: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6703: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6704: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn - 1).authority;
6705: availableInsertionsOut(availableInsertionsIndex).description :=

Line 6703: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

6699: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6700: engStApprovers(positionIn - 1).group_or_chain_id;
6701: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.afterApprover;
6702: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6703: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6704: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn - 1).authority;
6705: availableInsertionsOut(availableInsertionsIndex).description :=
6706: ame_util.afterApproverDescription || prevApproverDescription;
6707: end if;

Line 6706: ame_util.afterApproverDescription || prevApproverDescription;

6702: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6703: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6704: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn - 1).authority;
6705: availableInsertionsOut(availableInsertionsIndex).description :=
6706: ame_util.afterApproverDescription || prevApproverDescription;
6707: end if;
6708:
6709: if positionIn <= engStApproversCount then
6710:

Line 6711: if (engStApprovers(positionIn).authority = ame_util.authorityApprover and

6707: end if;
6708:
6709: if positionIn <= engStApproversCount then
6710:
6711: if (engStApprovers(positionIn).authority = ame_util.authorityApprover and
6712: engStApprovers(positionIn).api_insertion <> ame_util.apiInsertion and
6713: engStApprovers(positionIn).approver_category = ame_util.approvalApproverCategory and
6714: coaInsertionsYNIn = ame_util.booleanTrue and
6715: (not ame_engine.insertionExists

Line 6712: engStApprovers(positionIn).api_insertion <> ame_util.apiInsertion and

6708:
6709: if positionIn <= engStApproversCount then
6710:
6711: if (engStApprovers(positionIn).authority = ame_util.authorityApprover and
6712: engStApprovers(positionIn).api_insertion <> ame_util.apiInsertion and
6713: engStApprovers(positionIn).approver_category = ame_util.approvalApproverCategory and
6714: coaInsertionsYNIn = ame_util.booleanTrue and
6715: (not ame_engine.insertionExists
6716: (orderTypeIn => ame_util.afterApprover

Line 6713: engStApprovers(positionIn).approver_category = ame_util.approvalApproverCategory and

6709: if positionIn <= engStApproversCount then
6710:
6711: if (engStApprovers(positionIn).authority = ame_util.authorityApprover and
6712: engStApprovers(positionIn).api_insertion <> ame_util.apiInsertion and
6713: engStApprovers(positionIn).approver_category = ame_util.approvalApproverCategory and
6714: coaInsertionsYNIn = ame_util.booleanTrue and
6715: (not ame_engine.insertionExists
6716: (orderTypeIn => ame_util.afterApprover
6717: ,parameterIn => tempParameter

Line 6714: coaInsertionsYNIn = ame_util.booleanTrue and

6710:
6711: if (engStApprovers(positionIn).authority = ame_util.authorityApprover and
6712: engStApprovers(positionIn).api_insertion <> ame_util.apiInsertion and
6713: engStApprovers(positionIn).approver_category = ame_util.approvalApproverCategory and
6714: coaInsertionsYNIn = ame_util.booleanTrue and
6715: (not ame_engine.insertionExists
6716: (orderTypeIn => ame_util.afterApprover
6717: ,parameterIn => tempParameter
6718: ))) then /* COA */

Line 6716: (orderTypeIn => ame_util.afterApprover

6712: engStApprovers(positionIn).api_insertion <> ame_util.apiInsertion and
6713: engStApprovers(positionIn).approver_category = ame_util.approvalApproverCategory and
6714: coaInsertionsYNIn = ame_util.booleanTrue and
6715: (not ame_engine.insertionExists
6716: (orderTypeIn => ame_util.afterApprover
6717: ,parameterIn => tempParameter
6718: ))) then /* COA */
6719: availableInsertionsIndex := availableInsertionsIndex + 1;
6720: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn - 1).item_class;

Line 6726: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.afterApprover;

6722: availableInsertionsOut(availableInsertionsIndex).action_type_id :=
6723: engStApprovers(positionIn - 1).action_type_id;
6724: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6725: engStApprovers(positionIn - 1).group_or_chain_id;
6726: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.afterApprover;
6727: /* We've already build the parameter field above, let's not repeat the work here. */
6728: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6729: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiAuthorityInsertion;
6730: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn - 1).authority;

Line 6729: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiAuthorityInsertion;

6725: engStApprovers(positionIn - 1).group_or_chain_id;
6726: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.afterApprover;
6727: /* We've already build the parameter field above, let's not repeat the work here. */
6728: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6729: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiAuthorityInsertion;
6730: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn - 1).authority;
6731: availableInsertionsOut(availableInsertionsIndex).description :=
6732: ame_util.afterApproverDescription || prevApproverDescription;
6733: end if;

Line 6732: ame_util.afterApproverDescription || prevApproverDescription;

6728: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6729: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiAuthorityInsertion;
6730: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn - 1).authority;
6731: availableInsertionsOut(availableInsertionsIndex).description :=
6732: ame_util.afterApproverDescription || prevApproverDescription;
6733: end if;
6734: end if;
6735: end if;
6736: end if;

Line 6743: orderTypeIn = ame_util.beforeApprover

6739: ORDER TYPE: beforeApprover
6740: beforeApprover is available if engStApproversCount > 0 and positionIn < engStApproversCount + 1.
6741: */
6742: if (orderTypeIn is null or
6743: orderTypeIn = ame_util.beforeApprover
6744: ) then
6745:
6746: if (positionIn = engStApproversCount + 1 or
6747: engStApproversCount = 0) then

Line 6758: ame_util.fieldDelimiter ||

6754: if (engStApproversCount > 0 and
6755: positionIn < engStApproversCount + 1) then
6756:
6757: tempParameter := engStApprovers(positionIn).name ||
6758: ame_util.fieldDelimiter ||
6759: engStApprovers(positionIn).item_class ||
6760: ame_util.fieldDelimiter ||
6761: engStApprovers(positionIn).item_id ||
6762: ame_util.fieldDelimiter ||

Line 6760: ame_util.fieldDelimiter ||

6756:
6757: tempParameter := engStApprovers(positionIn).name ||
6758: ame_util.fieldDelimiter ||
6759: engStApprovers(positionIn).item_class ||
6760: ame_util.fieldDelimiter ||
6761: engStApprovers(positionIn).item_id ||
6762: ame_util.fieldDelimiter ||
6763: engStApprovers(positionIn).action_type_id ||
6764: ame_util.fieldDelimiter ||

Line 6762: ame_util.fieldDelimiter ||

6758: ame_util.fieldDelimiter ||
6759: engStApprovers(positionIn).item_class ||
6760: ame_util.fieldDelimiter ||
6761: engStApprovers(positionIn).item_id ||
6762: ame_util.fieldDelimiter ||
6763: engStApprovers(positionIn).action_type_id ||
6764: ame_util.fieldDelimiter ||
6765: engStApprovers(positionIn).group_or_chain_id ||
6766: ame_util.fieldDelimiter ||

Line 6764: ame_util.fieldDelimiter ||

6760: ame_util.fieldDelimiter ||
6761: engStApprovers(positionIn).item_id ||
6762: ame_util.fieldDelimiter ||
6763: engStApprovers(positionIn).action_type_id ||
6764: ame_util.fieldDelimiter ||
6765: engStApprovers(positionIn).group_or_chain_id ||
6766: ame_util.fieldDelimiter ||
6767: engStApprovers(positionIn).occurrence;
6768:

Line 6766: ame_util.fieldDelimiter ||

6762: ame_util.fieldDelimiter ||
6763: engStApprovers(positionIn).action_type_id ||
6764: ame_util.fieldDelimiter ||
6765: engStApprovers(positionIn).group_or_chain_id ||
6766: ame_util.fieldDelimiter ||
6767: engStApprovers(positionIn).occurrence;
6768:
6769: if (not ame_engine.insertionExists
6770: (orderTypeIn => ame_util.beforeApprover

Line 6770: (orderTypeIn => ame_util.beforeApprover

6766: ame_util.fieldDelimiter ||
6767: engStApprovers(positionIn).occurrence;
6768:
6769: if (not ame_engine.insertionExists
6770: (orderTypeIn => ame_util.beforeApprover
6771: ,parameterIn => tempParameter
6772: )) then
6773: availableInsertionsIndex := availableInsertionsIndex + 1;
6774: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;

Line 6779: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.beforeApprover;

6775: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
6776: availableInsertionsOut(availableInsertionsIndex).action_type_id := engStApprovers(positionIn).action_type_id;
6777: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6778: engStApprovers(positionIn).group_or_chain_id;
6779: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.beforeApprover;
6780: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6781: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6782: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn).authority;
6783: availableInsertionsOut(availableInsertionsIndex).description :=

Line 6781: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

6777: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6778: engStApprovers(positionIn).group_or_chain_id;
6779: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.beforeApprover;
6780: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6781: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6782: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn).authority;
6783: availableInsertionsOut(availableInsertionsIndex).description :=
6784: ame_util.beforeApproverDescription || nextApproverDescription;
6785: end if;

Line 6784: ame_util.beforeApproverDescription || nextApproverDescription;

6780: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6781: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6782: availableInsertionsOut(availableInsertionsIndex).authority := engStApprovers(positionIn).authority;
6783: availableInsertionsOut(availableInsertionsIndex).description :=
6784: ame_util.beforeApproverDescription || nextApproverDescription;
6785: end if;
6786: end if;
6787: end if;
6788:

Line 6793: if (coaInsertionsYNIn = ame_util.booleanTrue and

6789: /*
6790: ORDER TYPE: firstAuthority
6791: firstAuthority is available if the approver you're at is the first COA approver in a chain.
6792: */
6793: if (coaInsertionsYNIn = ame_util.booleanTrue and
6794: (orderTypeIn is null or
6795: orderTypeIn = ame_util.firstAuthority)) then
6796:
6797: if (positionIn < engStApproversCount + 1 and

Line 6795: orderTypeIn = ame_util.firstAuthority)) then

6791: firstAuthority is available if the approver you're at is the first COA approver in a chain.
6792: */
6793: if (coaInsertionsYNIn = ame_util.booleanTrue and
6794: (orderTypeIn is null or
6795: orderTypeIn = ame_util.firstAuthority)) then
6796:
6797: if (positionIn < engStApproversCount + 1 and
6798: engStApprovers(positionIn).authority = ame_util.authorityApprover and
6799: engStApprovers(positionIn).api_insertion <> ame_util.apiInsertion) then

Line 6798: engStApprovers(positionIn).authority = ame_util.authorityApprover and

6794: (orderTypeIn is null or
6795: orderTypeIn = ame_util.firstAuthority)) then
6796:
6797: if (positionIn < engStApproversCount + 1 and
6798: engStApprovers(positionIn).authority = ame_util.authorityApprover and
6799: engStApprovers(positionIn).api_insertion <> ame_util.apiInsertion) then
6800: tempBoolean := true; /* tempBoolean remains true if no previous authority is found. */
6801: for i in reverse 1..positionIn - 1 loop
6802: if (engStApprovers(i).group_or_chain_id <> engStApprovers(positionIn).group_or_chain_id or

Line 6799: engStApprovers(positionIn).api_insertion <> ame_util.apiInsertion) then

6795: orderTypeIn = ame_util.firstAuthority)) then
6796:
6797: if (positionIn < engStApproversCount + 1 and
6798: engStApprovers(positionIn).authority = ame_util.authorityApprover and
6799: engStApprovers(positionIn).api_insertion <> ame_util.apiInsertion) then
6800: tempBoolean := true; /* tempBoolean remains true if no previous authority is found. */
6801: for i in reverse 1..positionIn - 1 loop
6802: if (engStApprovers(i).group_or_chain_id <> engStApprovers(positionIn).group_or_chain_id or
6803: engStApprovers(i).action_type_id <> engStApprovers(positionIn).action_type_id or

Line 6809: if (engStApprovers(i).authority = ame_util.authorityApprover and

6805: engStApprovers(i).item_class <> engStApprovers(positionIn).item_class) then
6806: exit;
6807: end if;
6808:
6809: if (engStApprovers(i).authority = ame_util.authorityApprover and
6810: engStApprovers(i).api_insertion <> ame_util.apiInsertion) then
6811: tempBoolean := false;
6812: exit;
6813: end if;

Line 6810: engStApprovers(i).api_insertion <> ame_util.apiInsertion) then

6806: exit;
6807: end if;
6808:
6809: if (engStApprovers(i).authority = ame_util.authorityApprover and
6810: engStApprovers(i).api_insertion <> ame_util.apiInsertion) then
6811: tempBoolean := false;
6812: exit;
6813: end if;
6814: end loop;

Line 6817: tempParameter := ame_util.firstAuthorityParameter ||

6813: end if;
6814: end loop;
6815:
6816: if (tempBoolean) then
6817: tempParameter := ame_util.firstAuthorityParameter ||
6818: ame_util.fieldDelimiter ||
6819: engStApprovers(positionIn).item_class ||
6820: ame_util.fieldDelimiter ||
6821: engStApprovers(positionIn).item_id ||

Line 6818: ame_util.fieldDelimiter ||

6814: end loop;
6815:
6816: if (tempBoolean) then
6817: tempParameter := ame_util.firstAuthorityParameter ||
6818: ame_util.fieldDelimiter ||
6819: engStApprovers(positionIn).item_class ||
6820: ame_util.fieldDelimiter ||
6821: engStApprovers(positionIn).item_id ||
6822: ame_util.fieldDelimiter ||

Line 6820: ame_util.fieldDelimiter ||

6816: if (tempBoolean) then
6817: tempParameter := ame_util.firstAuthorityParameter ||
6818: ame_util.fieldDelimiter ||
6819: engStApprovers(positionIn).item_class ||
6820: ame_util.fieldDelimiter ||
6821: engStApprovers(positionIn).item_id ||
6822: ame_util.fieldDelimiter ||
6823: engStApprovers(positionIn).action_type_id ||
6824: ame_util.fieldDelimiter ||

Line 6822: ame_util.fieldDelimiter ||

6818: ame_util.fieldDelimiter ||
6819: engStApprovers(positionIn).item_class ||
6820: ame_util.fieldDelimiter ||
6821: engStApprovers(positionIn).item_id ||
6822: ame_util.fieldDelimiter ||
6823: engStApprovers(positionIn).action_type_id ||
6824: ame_util.fieldDelimiter ||
6825: engStApprovers(positionIn).group_or_chain_id;
6826:

Line 6824: ame_util.fieldDelimiter ||

6820: ame_util.fieldDelimiter ||
6821: engStApprovers(positionIn).item_id ||
6822: ame_util.fieldDelimiter ||
6823: engStApprovers(positionIn).action_type_id ||
6824: ame_util.fieldDelimiter ||
6825: engStApprovers(positionIn).group_or_chain_id;
6826:
6827: if (not ame_engine.insertionExists
6828: (orderTypeIn => ame_util.firstAuthority

Line 6828: (orderTypeIn => ame_util.firstAuthority

6824: ame_util.fieldDelimiter ||
6825: engStApprovers(positionIn).group_or_chain_id;
6826:
6827: if (not ame_engine.insertionExists
6828: (orderTypeIn => ame_util.firstAuthority
6829: ,parameterIn => tempParameter
6830: )) then
6831: availableInsertionsIndex := availableInsertionsIndex + 1;
6832: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;

Line 6838: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstAuthority;

6834: availableInsertionsOut(availableInsertionsIndex).action_type_id :=
6835: engStApprovers(positionIn).action_type_id;
6836: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6837: engStApprovers(positionIn).group_or_chain_id;
6838: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstAuthority;
6839: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6840: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiAuthorityInsertion;
6841: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.authorityApprover;
6842: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstAuthorityDescription;

Line 6840: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiAuthorityInsertion;

6836: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6837: engStApprovers(positionIn).group_or_chain_id;
6838: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstAuthority;
6839: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6840: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiAuthorityInsertion;
6841: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.authorityApprover;
6842: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstAuthorityDescription;
6843: end if;
6844: end if;

Line 6841: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.authorityApprover;

6837: engStApprovers(positionIn).group_or_chain_id;
6838: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstAuthority;
6839: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6840: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiAuthorityInsertion;
6841: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.authorityApprover;
6842: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstAuthorityDescription;
6843: end if;
6844: end if;
6845: end if;

Line 6842: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstAuthorityDescription;

6838: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstAuthority;
6839: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6840: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiAuthorityInsertion;
6841: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.authorityApprover;
6842: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstAuthorityDescription;
6843: end if;
6844: end if;
6845: end if;
6846: end if;

Line 6880: orderTypeIn = ame_util.firstPostApprover) then

6876: end if
6877: end if
6878: */
6879: if (orderTypeIn is null or
6880: orderTypeIn = ame_util.firstPostApprover) then
6881:
6882: if (engStApproversCount = 0) then
6883: tempParameter := ame_util.firstPostParameter ||
6884: ame_util.fieldDelimiter ||

Line 6883: tempParameter := ame_util.firstPostParameter ||

6879: if (orderTypeIn is null or
6880: orderTypeIn = ame_util.firstPostApprover) then
6881:
6882: if (engStApproversCount = 0) then
6883: tempParameter := ame_util.firstPostParameter ||
6884: ame_util.fieldDelimiter ||
6885: ame_util.headerItemClassName ||
6886: ame_util.fieldDelimiter ||
6887: engTransactionId;

Line 6884: ame_util.fieldDelimiter ||

6880: orderTypeIn = ame_util.firstPostApprover) then
6881:
6882: if (engStApproversCount = 0) then
6883: tempParameter := ame_util.firstPostParameter ||
6884: ame_util.fieldDelimiter ||
6885: ame_util.headerItemClassName ||
6886: ame_util.fieldDelimiter ||
6887: engTransactionId;
6888:

Line 6885: ame_util.headerItemClassName ||

6881:
6882: if (engStApproversCount = 0) then
6883: tempParameter := ame_util.firstPostParameter ||
6884: ame_util.fieldDelimiter ||
6885: ame_util.headerItemClassName ||
6886: ame_util.fieldDelimiter ||
6887: engTransactionId;
6888:
6889: if (not ame_engine.insertionExists

Line 6886: ame_util.fieldDelimiter ||

6882: if (engStApproversCount = 0) then
6883: tempParameter := ame_util.firstPostParameter ||
6884: ame_util.fieldDelimiter ||
6885: ame_util.headerItemClassName ||
6886: ame_util.fieldDelimiter ||
6887: engTransactionId;
6888:
6889: if (not ame_engine.insertionExists
6890: (orderTypeIn => ame_util.firstPostApprover

Line 6890: (orderTypeIn => ame_util.firstPostApprover

6886: ame_util.fieldDelimiter ||
6887: engTransactionId;
6888:
6889: if (not ame_engine.insertionExists
6890: (orderTypeIn => ame_util.firstPostApprover
6891: ,parameterIn => tempParameter
6892: )) then
6893: availableInsertionsIndex := availableInsertionsIndex + 1;
6894: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

Line 6894: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

6890: (orderTypeIn => ame_util.firstPostApprover
6891: ,parameterIn => tempParameter
6892: )) then
6893: availableInsertionsIndex := availableInsertionsIndex + 1;
6894: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
6895: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
6896: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6897: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6898: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;

Line 6896: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

6892: )) then
6893: availableInsertionsIndex := availableInsertionsIndex + 1;
6894: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
6895: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
6896: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6897: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6898: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6899: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6900: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 6897: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

6893: availableInsertionsIndex := availableInsertionsIndex + 1;
6894: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
6895: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
6896: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6897: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6898: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6899: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6900: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6901: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

Line 6898: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;

6894: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
6895: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
6896: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6897: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6898: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6899: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6900: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6901: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6902: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;

Line 6900: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

6896: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6897: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6898: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6899: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6900: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6901: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6902: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6903: end if;
6904: elsif (positionIn = engStApproversCount + 1) then

Line 6901: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

6897: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6898: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6899: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6900: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6901: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6902: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6903: end if;
6904: elsif (positionIn = engStApproversCount + 1) then
6905: if (engStApprovers(engStApproversCount).authority <> ame_util.postApprover) then

Line 6902: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;

6898: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6899: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6900: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6901: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6902: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6903: end if;
6904: elsif (positionIn = engStApproversCount + 1) then
6905: if (engStApprovers(engStApproversCount).authority <> ame_util.postApprover) then
6906: tempParameter := ame_util.firstPostParameter ||

Line 6905: if (engStApprovers(engStApproversCount).authority <> ame_util.postApprover) then

6901: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6902: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6903: end if;
6904: elsif (positionIn = engStApproversCount + 1) then
6905: if (engStApprovers(engStApproversCount).authority <> ame_util.postApprover) then
6906: tempParameter := ame_util.firstPostParameter ||
6907: ame_util.fieldDelimiter ||
6908: engStApprovers(engStApproversCount).item_class ||
6909: ame_util.fieldDelimiter ||

Line 6906: tempParameter := ame_util.firstPostParameter ||

6902: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6903: end if;
6904: elsif (positionIn = engStApproversCount + 1) then
6905: if (engStApprovers(engStApproversCount).authority <> ame_util.postApprover) then
6906: tempParameter := ame_util.firstPostParameter ||
6907: ame_util.fieldDelimiter ||
6908: engStApprovers(engStApproversCount).item_class ||
6909: ame_util.fieldDelimiter ||
6910: engStApprovers(engStApproversCount).item_id;

Line 6907: ame_util.fieldDelimiter ||

6903: end if;
6904: elsif (positionIn = engStApproversCount + 1) then
6905: if (engStApprovers(engStApproversCount).authority <> ame_util.postApprover) then
6906: tempParameter := ame_util.firstPostParameter ||
6907: ame_util.fieldDelimiter ||
6908: engStApprovers(engStApproversCount).item_class ||
6909: ame_util.fieldDelimiter ||
6910: engStApprovers(engStApproversCount).item_id;
6911: if (not ame_engine.insertionExists

Line 6909: ame_util.fieldDelimiter ||

6905: if (engStApprovers(engStApproversCount).authority <> ame_util.postApprover) then
6906: tempParameter := ame_util.firstPostParameter ||
6907: ame_util.fieldDelimiter ||
6908: engStApprovers(engStApproversCount).item_class ||
6909: ame_util.fieldDelimiter ||
6910: engStApprovers(engStApproversCount).item_id;
6911: if (not ame_engine.insertionExists
6912: (orderTypeIn => ame_util.firstPostApprover
6913: ,parameterIn => tempParameter

Line 6912: (orderTypeIn => ame_util.firstPostApprover

6908: engStApprovers(engStApproversCount).item_class ||
6909: ame_util.fieldDelimiter ||
6910: engStApprovers(engStApproversCount).item_id;
6911: if (not ame_engine.insertionExists
6912: (orderTypeIn => ame_util.firstPostApprover
6913: ,parameterIn => tempParameter
6914: )) then
6915: availableInsertionsIndex := availableInsertionsIndex + 1;
6916: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(engStApproversCount).item_class;

Line 6919: ame_util.nullInsertionActionTypeId;

6915: availableInsertionsIndex := availableInsertionsIndex + 1;
6916: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(engStApproversCount).item_class;
6917: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(engStApproversCount).item_id;
6918: availableInsertionsOut(availableInsertionsIndex).action_type_id :=
6919: ame_util.nullInsertionActionTypeId;
6920: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6921: ame_util.nullInsertionGroupOrChainId;
6922: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6923: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;

Line 6921: ame_util.nullInsertionGroupOrChainId;

6917: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(engStApproversCount).item_id;
6918: availableInsertionsOut(availableInsertionsIndex).action_type_id :=
6919: ame_util.nullInsertionActionTypeId;
6920: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6921: ame_util.nullInsertionGroupOrChainId;
6922: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6923: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6924: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6925: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

Line 6922: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;

6918: availableInsertionsOut(availableInsertionsIndex).action_type_id :=
6919: ame_util.nullInsertionActionTypeId;
6920: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6921: ame_util.nullInsertionGroupOrChainId;
6922: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6923: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6924: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6925: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6926: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;

Line 6924: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

6920: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6921: ame_util.nullInsertionGroupOrChainId;
6922: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6923: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6924: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6925: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6926: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6927: end if;
6928: end if;

Line 6925: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

6921: ame_util.nullInsertionGroupOrChainId;
6922: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6923: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6924: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6925: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6926: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6927: end if;
6928: end if;
6929: elsif (positionIn = 1) then

Line 6926: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;

6922: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6923: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6924: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6925: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6926: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6927: end if;
6928: end if;
6929: elsif (positionIn = 1) then
6930: if (engStApprovers(1).authority = ame_util.postApprover) then

Line 6930: if (engStApprovers(1).authority = ame_util.postApprover) then

6926: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6927: end if;
6928: end if;
6929: elsif (positionIn = 1) then
6930: if (engStApprovers(1).authority = ame_util.postApprover) then
6931: tempParameter := ame_util.firstPostParameter ||
6932: ame_util.fieldDelimiter ||
6933: engStApprovers(1).item_class ||
6934: ame_util.fieldDelimiter ||

Line 6931: tempParameter := ame_util.firstPostParameter ||

6927: end if;
6928: end if;
6929: elsif (positionIn = 1) then
6930: if (engStApprovers(1).authority = ame_util.postApprover) then
6931: tempParameter := ame_util.firstPostParameter ||
6932: ame_util.fieldDelimiter ||
6933: engStApprovers(1).item_class ||
6934: ame_util.fieldDelimiter ||
6935: engStApprovers(1).item_id;

Line 6932: ame_util.fieldDelimiter ||

6928: end if;
6929: elsif (positionIn = 1) then
6930: if (engStApprovers(1).authority = ame_util.postApprover) then
6931: tempParameter := ame_util.firstPostParameter ||
6932: ame_util.fieldDelimiter ||
6933: engStApprovers(1).item_class ||
6934: ame_util.fieldDelimiter ||
6935: engStApprovers(1).item_id;
6936: if (not ame_engine.insertionExists

Line 6934: ame_util.fieldDelimiter ||

6930: if (engStApprovers(1).authority = ame_util.postApprover) then
6931: tempParameter := ame_util.firstPostParameter ||
6932: ame_util.fieldDelimiter ||
6933: engStApprovers(1).item_class ||
6934: ame_util.fieldDelimiter ||
6935: engStApprovers(1).item_id;
6936: if (not ame_engine.insertionExists
6937: (orderTypeIn => ame_util.firstPostApprover
6938: ,parameterIn => tempParameter

Line 6937: (orderTypeIn => ame_util.firstPostApprover

6933: engStApprovers(1).item_class ||
6934: ame_util.fieldDelimiter ||
6935: engStApprovers(1).item_id;
6936: if (not ame_engine.insertionExists
6937: (orderTypeIn => ame_util.firstPostApprover
6938: ,parameterIn => tempParameter
6939: )) then
6940: availableInsertionsIndex := availableInsertionsIndex + 1;
6941: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(1).item_class;

Line 6943: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

6939: )) then
6940: availableInsertionsIndex := availableInsertionsIndex + 1;
6941: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(1).item_class;
6942: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(1).item_id;
6943: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6944: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6945: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6946: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6947: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 6944: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

6940: availableInsertionsIndex := availableInsertionsIndex + 1;
6941: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(1).item_class;
6942: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(1).item_id;
6943: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6944: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6945: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6946: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6947: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6948: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

Line 6945: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;

6941: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(1).item_class;
6942: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(1).item_id;
6943: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6944: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6945: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6946: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6947: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6948: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6949: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;

Line 6947: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

6943: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6944: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6945: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6946: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6947: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6948: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6949: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6950: end if;
6951: end if;

Line 6948: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

6944: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6945: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6946: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6947: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6948: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6949: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6950: end if;
6951: end if;
6952: else

Line 6949: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;

6945: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6946: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6947: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6948: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6949: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6950: end if;
6951: end if;
6952: else
6953: if (engStApprovers(positionIn - 1).item_id = engStApprovers(positionIn).item_id and

Line 6955: if (engStApprovers(positionIn - 1).authority <> ame_util.postApprover and

6951: end if;
6952: else
6953: if (engStApprovers(positionIn - 1).item_id = engStApprovers(positionIn).item_id and
6954: engStApprovers(positionIn - 1).item_class = engStApprovers(positionIn).item_class) then
6955: if (engStApprovers(positionIn - 1).authority <> ame_util.postApprover and
6956: engStApprovers(positionIn).authority = ame_util.postApprover) then
6957: tempParameter := ame_util.firstPostParameter ||
6958: ame_util.fieldDelimiter ||
6959: engStApprovers(positionIn).item_class ||

Line 6956: engStApprovers(positionIn).authority = ame_util.postApprover) then

6952: else
6953: if (engStApprovers(positionIn - 1).item_id = engStApprovers(positionIn).item_id and
6954: engStApprovers(positionIn - 1).item_class = engStApprovers(positionIn).item_class) then
6955: if (engStApprovers(positionIn - 1).authority <> ame_util.postApprover and
6956: engStApprovers(positionIn).authority = ame_util.postApprover) then
6957: tempParameter := ame_util.firstPostParameter ||
6958: ame_util.fieldDelimiter ||
6959: engStApprovers(positionIn).item_class ||
6960: ame_util.fieldDelimiter ||

Line 6957: tempParameter := ame_util.firstPostParameter ||

6953: if (engStApprovers(positionIn - 1).item_id = engStApprovers(positionIn).item_id and
6954: engStApprovers(positionIn - 1).item_class = engStApprovers(positionIn).item_class) then
6955: if (engStApprovers(positionIn - 1).authority <> ame_util.postApprover and
6956: engStApprovers(positionIn).authority = ame_util.postApprover) then
6957: tempParameter := ame_util.firstPostParameter ||
6958: ame_util.fieldDelimiter ||
6959: engStApprovers(positionIn).item_class ||
6960: ame_util.fieldDelimiter ||
6961: engStApprovers(positionIn).item_id;

Line 6958: ame_util.fieldDelimiter ||

6954: engStApprovers(positionIn - 1).item_class = engStApprovers(positionIn).item_class) then
6955: if (engStApprovers(positionIn - 1).authority <> ame_util.postApprover and
6956: engStApprovers(positionIn).authority = ame_util.postApprover) then
6957: tempParameter := ame_util.firstPostParameter ||
6958: ame_util.fieldDelimiter ||
6959: engStApprovers(positionIn).item_class ||
6960: ame_util.fieldDelimiter ||
6961: engStApprovers(positionIn).item_id;
6962: if (not ame_engine.insertionExists

Line 6960: ame_util.fieldDelimiter ||

6956: engStApprovers(positionIn).authority = ame_util.postApprover) then
6957: tempParameter := ame_util.firstPostParameter ||
6958: ame_util.fieldDelimiter ||
6959: engStApprovers(positionIn).item_class ||
6960: ame_util.fieldDelimiter ||
6961: engStApprovers(positionIn).item_id;
6962: if (not ame_engine.insertionExists
6963: (orderTypeIn => ame_util.firstPostApprover
6964: ,parameterIn => tempParameter

Line 6963: (orderTypeIn => ame_util.firstPostApprover

6959: engStApprovers(positionIn).item_class ||
6960: ame_util.fieldDelimiter ||
6961: engStApprovers(positionIn).item_id;
6962: if (not ame_engine.insertionExists
6963: (orderTypeIn => ame_util.firstPostApprover
6964: ,parameterIn => tempParameter
6965: )) then
6966: availableInsertionsIndex := availableInsertionsIndex + 1;
6967: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;

Line 6969: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

6965: )) then
6966: availableInsertionsIndex := availableInsertionsIndex + 1;
6967: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
6968: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
6969: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6970: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6971: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6972: engStApprovers(positionIn).group_or_chain_id;
6973: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;

Line 6970: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

6966: availableInsertionsIndex := availableInsertionsIndex + 1;
6967: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
6968: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
6969: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6970: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6971: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6972: engStApprovers(positionIn).group_or_chain_id;
6973: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6974: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;

Line 6973: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;

6969: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6970: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6971: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6972: engStApprovers(positionIn).group_or_chain_id;
6973: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6974: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6975: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6976: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6977: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;

Line 6975: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

6971: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id :=
6972: engStApprovers(positionIn).group_or_chain_id;
6973: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6974: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6975: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6976: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6977: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6978: end if;
6979: end if;

Line 6976: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

6972: engStApprovers(positionIn).group_or_chain_id;
6973: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6974: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6975: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6976: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6977: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6978: end if;
6979: end if;
6980: else

Line 6977: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;

6973: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6974: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6975: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6976: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
6977: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6978: end if;
6979: end if;
6980: else
6981: if (engStApprovers(positionIn).authority = ame_util.postApprover) then

Line 6981: if (engStApprovers(positionIn).authority = ame_util.postApprover) then

6977: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
6978: end if;
6979: end if;
6980: else
6981: if (engStApprovers(positionIn).authority = ame_util.postApprover) then
6982: tempParameter := ame_util.firstPostParameter ||
6983: ame_util.fieldDelimiter ||
6984: engStApprovers(positionIn).item_class ||
6985: ame_util.fieldDelimiter ||

Line 6982: tempParameter := ame_util.firstPostParameter ||

6978: end if;
6979: end if;
6980: else
6981: if (engStApprovers(positionIn).authority = ame_util.postApprover) then
6982: tempParameter := ame_util.firstPostParameter ||
6983: ame_util.fieldDelimiter ||
6984: engStApprovers(positionIn).item_class ||
6985: ame_util.fieldDelimiter ||
6986: engStApprovers(positionIn).item_id;

Line 6983: ame_util.fieldDelimiter ||

6979: end if;
6980: else
6981: if (engStApprovers(positionIn).authority = ame_util.postApprover) then
6982: tempParameter := ame_util.firstPostParameter ||
6983: ame_util.fieldDelimiter ||
6984: engStApprovers(positionIn).item_class ||
6985: ame_util.fieldDelimiter ||
6986: engStApprovers(positionIn).item_id;
6987: if (not ame_engine.insertionExists

Line 6985: ame_util.fieldDelimiter ||

6981: if (engStApprovers(positionIn).authority = ame_util.postApprover) then
6982: tempParameter := ame_util.firstPostParameter ||
6983: ame_util.fieldDelimiter ||
6984: engStApprovers(positionIn).item_class ||
6985: ame_util.fieldDelimiter ||
6986: engStApprovers(positionIn).item_id;
6987: if (not ame_engine.insertionExists
6988: (orderTypeIn => ame_util.firstPostApprover
6989: ,parameterIn => tempParameter

Line 6988: (orderTypeIn => ame_util.firstPostApprover

6984: engStApprovers(positionIn).item_class ||
6985: ame_util.fieldDelimiter ||
6986: engStApprovers(positionIn).item_id;
6987: if (not ame_engine.insertionExists
6988: (orderTypeIn => ame_util.firstPostApprover
6989: ,parameterIn => tempParameter
6990: )) then
6991: availableInsertionsIndex := availableInsertionsIndex + 1;
6992: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;

Line 6994: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

6990: )) then
6991: availableInsertionsIndex := availableInsertionsIndex + 1;
6992: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
6993: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
6994: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6995: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6996: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6997: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6998: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 6995: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

6991: availableInsertionsIndex := availableInsertionsIndex + 1;
6992: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
6993: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
6994: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6995: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6996: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6997: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6998: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6999: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

Line 6996: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;

6992: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
6993: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
6994: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6995: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6996: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6997: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6998: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6999: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7000: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;

Line 6998: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

6994: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
6995: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6996: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6997: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6998: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6999: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7000: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
7001: end if;
7002: end if;

Line 6999: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

6995: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
6996: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6997: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6998: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6999: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7000: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
7001: end if;
7002: end if;
7003:

Line 7000: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;

6996: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
6997: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
6998: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
6999: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7000: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
7001: end if;
7002: end if;
7003:
7004: if (engStApprovers(positionIn - 1).authority <> ame_util.postApprover) then

Line 7004: if (engStApprovers(positionIn - 1).authority <> ame_util.postApprover) then

7000: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
7001: end if;
7002: end if;
7003:
7004: if (engStApprovers(positionIn - 1).authority <> ame_util.postApprover) then
7005: tempParameter := ame_util.firstPostParameter ||
7006: ame_util.fieldDelimiter ||
7007: engStApprovers(positionIn - 1).item_class ||
7008: ame_util.fieldDelimiter ||

Line 7005: tempParameter := ame_util.firstPostParameter ||

7001: end if;
7002: end if;
7003:
7004: if (engStApprovers(positionIn - 1).authority <> ame_util.postApprover) then
7005: tempParameter := ame_util.firstPostParameter ||
7006: ame_util.fieldDelimiter ||
7007: engStApprovers(positionIn - 1).item_class ||
7008: ame_util.fieldDelimiter ||
7009: engStApprovers(positionIn - 1).item_id;

Line 7006: ame_util.fieldDelimiter ||

7002: end if;
7003:
7004: if (engStApprovers(positionIn - 1).authority <> ame_util.postApprover) then
7005: tempParameter := ame_util.firstPostParameter ||
7006: ame_util.fieldDelimiter ||
7007: engStApprovers(positionIn - 1).item_class ||
7008: ame_util.fieldDelimiter ||
7009: engStApprovers(positionIn - 1).item_id;
7010: if (not ame_engine.insertionExists

Line 7008: ame_util.fieldDelimiter ||

7004: if (engStApprovers(positionIn - 1).authority <> ame_util.postApprover) then
7005: tempParameter := ame_util.firstPostParameter ||
7006: ame_util.fieldDelimiter ||
7007: engStApprovers(positionIn - 1).item_class ||
7008: ame_util.fieldDelimiter ||
7009: engStApprovers(positionIn - 1).item_id;
7010: if (not ame_engine.insertionExists
7011: (orderTypeIn => ame_util.firstPostApprover
7012: ,parameterIn => tempParameter

Line 7011: (orderTypeIn => ame_util.firstPostApprover

7007: engStApprovers(positionIn - 1).item_class ||
7008: ame_util.fieldDelimiter ||
7009: engStApprovers(positionIn - 1).item_id;
7010: if (not ame_engine.insertionExists
7011: (orderTypeIn => ame_util.firstPostApprover
7012: ,parameterIn => tempParameter
7013: )) then
7014: availableInsertionsIndex := availableInsertionsIndex + 1;
7015: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn - 1).item_class;

Line 7017: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

7013: )) then
7014: availableInsertionsIndex := availableInsertionsIndex + 1;
7015: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn - 1).item_class;
7016: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn - 1).item_id;
7017: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7018: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7019: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
7020: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7021: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 7018: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

7014: availableInsertionsIndex := availableInsertionsIndex + 1;
7015: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn - 1).item_class;
7016: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn - 1).item_id;
7017: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7018: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7019: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
7020: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7021: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7022: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

Line 7019: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;

7015: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn - 1).item_class;
7016: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn - 1).item_id;
7017: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7018: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7019: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
7020: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7021: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7022: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7023: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;

Line 7021: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

7017: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7018: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7019: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
7020: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7021: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7022: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7023: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
7024: end if;
7025: end if;

Line 7022: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

7018: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7019: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
7020: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7021: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7022: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7023: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
7024: end if;
7025: end if;
7026: end if;

Line 7023: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;

7019: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPostApprover;
7020: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7021: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7022: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7023: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPostApproverDescription;
7024: end if;
7025: end if;
7026: end if;
7027: end if;

Line 7046: orderTypeIn = ame_util.firstPreApprover) then

7042: end if
7043: end if
7044: */
7045: if (orderTypeIn is null or
7046: orderTypeIn = ame_util.firstPreApprover) then
7047:
7048: if (engStApproversCount = 0) then
7049: tempParameter := ame_util.firstPreApprover ||
7050: ame_util.fieldDelimiter ||

Line 7049: tempParameter := ame_util.firstPreApprover ||

7045: if (orderTypeIn is null or
7046: orderTypeIn = ame_util.firstPreApprover) then
7047:
7048: if (engStApproversCount = 0) then
7049: tempParameter := ame_util.firstPreApprover ||
7050: ame_util.fieldDelimiter ||
7051: ame_util.headerItemClassName ||
7052: ame_util.fieldDelimiter ||
7053: engTransactionId;

Line 7050: ame_util.fieldDelimiter ||

7046: orderTypeIn = ame_util.firstPreApprover) then
7047:
7048: if (engStApproversCount = 0) then
7049: tempParameter := ame_util.firstPreApprover ||
7050: ame_util.fieldDelimiter ||
7051: ame_util.headerItemClassName ||
7052: ame_util.fieldDelimiter ||
7053: engTransactionId;
7054: if (not ame_engine.insertionExists

Line 7051: ame_util.headerItemClassName ||

7047:
7048: if (engStApproversCount = 0) then
7049: tempParameter := ame_util.firstPreApprover ||
7050: ame_util.fieldDelimiter ||
7051: ame_util.headerItemClassName ||
7052: ame_util.fieldDelimiter ||
7053: engTransactionId;
7054: if (not ame_engine.insertionExists
7055: (orderTypeIn => ame_util.firstPreApprover

Line 7052: ame_util.fieldDelimiter ||

7048: if (engStApproversCount = 0) then
7049: tempParameter := ame_util.firstPreApprover ||
7050: ame_util.fieldDelimiter ||
7051: ame_util.headerItemClassName ||
7052: ame_util.fieldDelimiter ||
7053: engTransactionId;
7054: if (not ame_engine.insertionExists
7055: (orderTypeIn => ame_util.firstPreApprover
7056: ,parameterIn => tempParameter

Line 7055: (orderTypeIn => ame_util.firstPreApprover

7051: ame_util.headerItemClassName ||
7052: ame_util.fieldDelimiter ||
7053: engTransactionId;
7054: if (not ame_engine.insertionExists
7055: (orderTypeIn => ame_util.firstPreApprover
7056: ,parameterIn => tempParameter
7057: )) then
7058: availableInsertionsIndex := availableInsertionsIndex + 1;
7059: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

Line 7059: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

7055: (orderTypeIn => ame_util.firstPreApprover
7056: ,parameterIn => tempParameter
7057: )) then
7058: availableInsertionsIndex := availableInsertionsIndex + 1;
7059: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7060: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
7061: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7062: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7063: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;

Line 7061: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

7057: )) then
7058: availableInsertionsIndex := availableInsertionsIndex + 1;
7059: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7060: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
7061: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7062: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7063: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7064: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7065: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 7062: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

7058: availableInsertionsIndex := availableInsertionsIndex + 1;
7059: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7060: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
7061: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7062: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7063: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7064: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7065: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7066: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

Line 7063: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;

7059: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7060: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
7061: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7062: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7063: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7064: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7065: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7066: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7067: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;

Line 7065: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

7061: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7062: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7063: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7064: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7065: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7066: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7067: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;
7068: end if;
7069: elsif (positionIn = 1) then

Line 7066: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

7062: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7063: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7064: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7065: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7066: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7067: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;
7068: end if;
7069: elsif (positionIn = 1) then
7070: tempParameter := ame_util.firstPreApprover ||

Line 7067: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;

7063: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7064: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7065: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7066: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7067: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;
7068: end if;
7069: elsif (positionIn = 1) then
7070: tempParameter := ame_util.firstPreApprover ||
7071: ame_util.fieldDelimiter ||

Line 7070: tempParameter := ame_util.firstPreApprover ||

7066: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7067: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;
7068: end if;
7069: elsif (positionIn = 1) then
7070: tempParameter := ame_util.firstPreApprover ||
7071: ame_util.fieldDelimiter ||
7072: engStApprovers(1).item_class ||
7073: ame_util.fieldDelimiter ||
7074: engStApprovers(1).item_id;

Line 7071: ame_util.fieldDelimiter ||

7067: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;
7068: end if;
7069: elsif (positionIn = 1) then
7070: tempParameter := ame_util.firstPreApprover ||
7071: ame_util.fieldDelimiter ||
7072: engStApprovers(1).item_class ||
7073: ame_util.fieldDelimiter ||
7074: engStApprovers(1).item_id;
7075: if (not ame_engine.insertionExists

Line 7073: ame_util.fieldDelimiter ||

7069: elsif (positionIn = 1) then
7070: tempParameter := ame_util.firstPreApprover ||
7071: ame_util.fieldDelimiter ||
7072: engStApprovers(1).item_class ||
7073: ame_util.fieldDelimiter ||
7074: engStApprovers(1).item_id;
7075: if (not ame_engine.insertionExists
7076: (orderTypeIn => ame_util.firstPreApprover
7077: ,parameterIn => tempParameter

Line 7076: (orderTypeIn => ame_util.firstPreApprover

7072: engStApprovers(1).item_class ||
7073: ame_util.fieldDelimiter ||
7074: engStApprovers(1).item_id;
7075: if (not ame_engine.insertionExists
7076: (orderTypeIn => ame_util.firstPreApprover
7077: ,parameterIn => tempParameter
7078: )) then
7079: availableInsertionsIndex := availableInsertionsIndex + 1;
7080: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(1).item_class;

Line 7082: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

7078: )) then
7079: availableInsertionsIndex := availableInsertionsIndex + 1;
7080: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(1).item_class;
7081: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(1).item_id;
7082: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7083: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7084: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7085: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7086: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 7083: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

7079: availableInsertionsIndex := availableInsertionsIndex + 1;
7080: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(1).item_class;
7081: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(1).item_id;
7082: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7083: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7084: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7085: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7086: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7087: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

Line 7084: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;

7080: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(1).item_class;
7081: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(1).item_id;
7082: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7083: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7084: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7085: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7086: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7087: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7088: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;

Line 7086: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

7082: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7083: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7084: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7085: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7086: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7087: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7088: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;
7089: end if;
7090: elsif (positionIn < engStApproversCount + 1) then

Line 7087: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

7083: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7084: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7085: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7086: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7087: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7088: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;
7089: end if;
7090: elsif (positionIn < engStApproversCount + 1) then
7091: if (engStApprovers(positionIn - 1).item_id <> engStApprovers(positionIn).item_id or

Line 7088: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;

7084: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7085: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7086: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7087: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7088: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;
7089: end if;
7090: elsif (positionIn < engStApproversCount + 1) then
7091: if (engStApprovers(positionIn - 1).item_id <> engStApprovers(positionIn).item_id or
7092: engStApprovers(positionIn - 1).item_class <> engStApprovers(positionIn).item_class) then

Line 7093: tempParameter := ame_util.firstPreApprover ||

7089: end if;
7090: elsif (positionIn < engStApproversCount + 1) then
7091: if (engStApprovers(positionIn - 1).item_id <> engStApprovers(positionIn).item_id or
7092: engStApprovers(positionIn - 1).item_class <> engStApprovers(positionIn).item_class) then
7093: tempParameter := ame_util.firstPreApprover ||
7094: ame_util.fieldDelimiter ||
7095: engStApprovers(positionIn).item_class ||
7096: ame_util.fieldDelimiter ||
7097: engStApprovers(positionIn).item_id;

Line 7094: ame_util.fieldDelimiter ||

7090: elsif (positionIn < engStApproversCount + 1) then
7091: if (engStApprovers(positionIn - 1).item_id <> engStApprovers(positionIn).item_id or
7092: engStApprovers(positionIn - 1).item_class <> engStApprovers(positionIn).item_class) then
7093: tempParameter := ame_util.firstPreApprover ||
7094: ame_util.fieldDelimiter ||
7095: engStApprovers(positionIn).item_class ||
7096: ame_util.fieldDelimiter ||
7097: engStApprovers(positionIn).item_id;
7098: if (not ame_engine.insertionExists

Line 7096: ame_util.fieldDelimiter ||

7092: engStApprovers(positionIn - 1).item_class <> engStApprovers(positionIn).item_class) then
7093: tempParameter := ame_util.firstPreApprover ||
7094: ame_util.fieldDelimiter ||
7095: engStApprovers(positionIn).item_class ||
7096: ame_util.fieldDelimiter ||
7097: engStApprovers(positionIn).item_id;
7098: if (not ame_engine.insertionExists
7099: (orderTypeIn => ame_util.firstPreApprover
7100: ,parameterIn => tempParameter

Line 7099: (orderTypeIn => ame_util.firstPreApprover

7095: engStApprovers(positionIn).item_class ||
7096: ame_util.fieldDelimiter ||
7097: engStApprovers(positionIn).item_id;
7098: if (not ame_engine.insertionExists
7099: (orderTypeIn => ame_util.firstPreApprover
7100: ,parameterIn => tempParameter
7101: )) then
7102: availableInsertionsIndex := availableInsertionsIndex + 1;
7103: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;

Line 7105: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

7101: )) then
7102: availableInsertionsIndex := availableInsertionsIndex + 1;
7103: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
7104: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
7105: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7106: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7107: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7108: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7109: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 7106: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

7102: availableInsertionsIndex := availableInsertionsIndex + 1;
7103: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
7104: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
7105: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7106: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7107: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7108: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7109: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7110: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

Line 7107: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;

7103: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
7104: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
7105: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7106: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7107: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7108: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7109: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7110: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7111: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;

Line 7109: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

7105: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7106: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7107: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7108: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7109: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7110: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7111: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;
7112: end if;
7113: end if;

Line 7110: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

7106: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7107: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7108: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7109: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7110: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7111: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;
7112: end if;
7113: end if;
7114: end if;

Line 7111: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;

7107: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.firstPreApprover;
7108: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7109: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7110: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7111: availableInsertionsOut(availableInsertionsIndex).description := ame_util.firstPreApproverDescription;
7112: end if;
7113: end if;
7114: end if;
7115: end if;

Line 7133: orderTypeIn = ame_util.lastPostApprover) then

7129: end if
7130: end if
7131: */
7132: if (orderTypeIn is null or
7133: orderTypeIn = ame_util.lastPostApprover) then
7134: if (engStApproversCount = 0) then
7135: tempParameter := ame_util.lastPostApprover ||
7136: ame_util.fieldDelimiter ||
7137: ame_util.headerItemClassName ||

Line 7135: tempParameter := ame_util.lastPostApprover ||

7131: */
7132: if (orderTypeIn is null or
7133: orderTypeIn = ame_util.lastPostApprover) then
7134: if (engStApproversCount = 0) then
7135: tempParameter := ame_util.lastPostApprover ||
7136: ame_util.fieldDelimiter ||
7137: ame_util.headerItemClassName ||
7138: ame_util.fieldDelimiter ||
7139: engTransactionId;

Line 7136: ame_util.fieldDelimiter ||

7132: if (orderTypeIn is null or
7133: orderTypeIn = ame_util.lastPostApprover) then
7134: if (engStApproversCount = 0) then
7135: tempParameter := ame_util.lastPostApprover ||
7136: ame_util.fieldDelimiter ||
7137: ame_util.headerItemClassName ||
7138: ame_util.fieldDelimiter ||
7139: engTransactionId;
7140: if (not ame_engine.insertionExists

Line 7137: ame_util.headerItemClassName ||

7133: orderTypeIn = ame_util.lastPostApprover) then
7134: if (engStApproversCount = 0) then
7135: tempParameter := ame_util.lastPostApprover ||
7136: ame_util.fieldDelimiter ||
7137: ame_util.headerItemClassName ||
7138: ame_util.fieldDelimiter ||
7139: engTransactionId;
7140: if (not ame_engine.insertionExists
7141: (orderTypeIn => ame_util.lastPostApprover

Line 7138: ame_util.fieldDelimiter ||

7134: if (engStApproversCount = 0) then
7135: tempParameter := ame_util.lastPostApprover ||
7136: ame_util.fieldDelimiter ||
7137: ame_util.headerItemClassName ||
7138: ame_util.fieldDelimiter ||
7139: engTransactionId;
7140: if (not ame_engine.insertionExists
7141: (orderTypeIn => ame_util.lastPostApprover
7142: ,parameterIn => tempParameter

Line 7141: (orderTypeIn => ame_util.lastPostApprover

7137: ame_util.headerItemClassName ||
7138: ame_util.fieldDelimiter ||
7139: engTransactionId;
7140: if (not ame_engine.insertionExists
7141: (orderTypeIn => ame_util.lastPostApprover
7142: ,parameterIn => tempParameter
7143: )) then
7144: availableInsertionsIndex := availableInsertionsIndex + 1;
7145: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

Line 7145: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

7141: (orderTypeIn => ame_util.lastPostApprover
7142: ,parameterIn => tempParameter
7143: )) then
7144: availableInsertionsIndex := availableInsertionsIndex + 1;
7145: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7146: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
7147: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7148: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7149: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;

Line 7147: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

7143: )) then
7144: availableInsertionsIndex := availableInsertionsIndex + 1;
7145: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7146: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
7147: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7148: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7149: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7150: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7151: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 7148: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

7144: availableInsertionsIndex := availableInsertionsIndex + 1;
7145: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7146: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
7147: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7148: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7149: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7150: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7151: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7152: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

Line 7149: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;

7145: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7146: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
7147: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7148: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7149: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7150: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7151: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7152: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7153: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;

Line 7151: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

7147: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7148: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7149: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7150: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7151: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7152: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7153: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;
7154: end if;
7155: elsif (positionIn = engStApproversCount + 1) then

Line 7152: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

7148: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7149: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7150: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7151: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7152: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7153: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;
7154: end if;
7155: elsif (positionIn = engStApproversCount + 1) then
7156: tempParameter := ame_util.lastPostApprover ||

Line 7153: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;

7149: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7150: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7151: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7152: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7153: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;
7154: end if;
7155: elsif (positionIn = engStApproversCount + 1) then
7156: tempParameter := ame_util.lastPostApprover ||
7157: ame_util.fieldDelimiter ||

Line 7156: tempParameter := ame_util.lastPostApprover ||

7152: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7153: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;
7154: end if;
7155: elsif (positionIn = engStApproversCount + 1) then
7156: tempParameter := ame_util.lastPostApprover ||
7157: ame_util.fieldDelimiter ||
7158: engStApprovers(engStApproversCount).item_class ||
7159: ame_util.fieldDelimiter ||
7160: engStApprovers(engStApproversCount).item_id;

Line 7157: ame_util.fieldDelimiter ||

7153: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;
7154: end if;
7155: elsif (positionIn = engStApproversCount + 1) then
7156: tempParameter := ame_util.lastPostApprover ||
7157: ame_util.fieldDelimiter ||
7158: engStApprovers(engStApproversCount).item_class ||
7159: ame_util.fieldDelimiter ||
7160: engStApprovers(engStApproversCount).item_id;
7161: if (not ame_engine.insertionExists

Line 7159: ame_util.fieldDelimiter ||

7155: elsif (positionIn = engStApproversCount + 1) then
7156: tempParameter := ame_util.lastPostApprover ||
7157: ame_util.fieldDelimiter ||
7158: engStApprovers(engStApproversCount).item_class ||
7159: ame_util.fieldDelimiter ||
7160: engStApprovers(engStApproversCount).item_id;
7161: if (not ame_engine.insertionExists
7162: (orderTypeIn => ame_util.lastPostApprover
7163: ,parameterIn => tempParameter

Line 7162: (orderTypeIn => ame_util.lastPostApprover

7158: engStApprovers(engStApproversCount).item_class ||
7159: ame_util.fieldDelimiter ||
7160: engStApprovers(engStApproversCount).item_id;
7161: if (not ame_engine.insertionExists
7162: (orderTypeIn => ame_util.lastPostApprover
7163: ,parameterIn => tempParameter
7164: )) then
7165: availableInsertionsIndex := availableInsertionsIndex + 1;
7166: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(engStApproversCount).item_class;

Line 7168: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

7164: )) then
7165: availableInsertionsIndex := availableInsertionsIndex + 1;
7166: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(engStApproversCount).item_class;
7167: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(engStApproversCount).item_id;
7168: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7169: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7170: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7171: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7172: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 7169: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

7165: availableInsertionsIndex := availableInsertionsIndex + 1;
7166: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(engStApproversCount).item_class;
7167: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(engStApproversCount).item_id;
7168: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7169: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7170: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7171: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7172: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7173: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

Line 7170: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;

7166: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(engStApproversCount).item_class;
7167: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(engStApproversCount).item_id;
7168: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7169: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7170: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7171: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7172: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7173: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7174: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;

Line 7172: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

7168: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7169: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7170: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7171: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7172: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7173: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7174: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;
7175: end if;
7176: elsif (positionIn > 1) then

Line 7173: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

7169: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7170: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7171: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7172: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7173: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7174: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;
7175: end if;
7176: elsif (positionIn > 1) then
7177: if (engStApprovers(positionIn - 1).item_id <> engStApprovers(positionIn).item_id or

Line 7174: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;

7170: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7171: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7172: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7173: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7174: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;
7175: end if;
7176: elsif (positionIn > 1) then
7177: if (engStApprovers(positionIn - 1).item_id <> engStApprovers(positionIn).item_id or
7178: engStApprovers(positionIn - 1).item_class <> engStApprovers(positionIn).item_class) then

Line 7179: tempParameter := ame_util.lastPostApprover ||

7175: end if;
7176: elsif (positionIn > 1) then
7177: if (engStApprovers(positionIn - 1).item_id <> engStApprovers(positionIn).item_id or
7178: engStApprovers(positionIn - 1).item_class <> engStApprovers(positionIn).item_class) then
7179: tempParameter := ame_util.lastPostApprover ||
7180: ame_util.fieldDelimiter ||
7181: engStApprovers(positionIn - 1).item_class ||
7182: ame_util.fieldDelimiter ||
7183: engStApprovers(positionIn - 1).item_id;

Line 7180: ame_util.fieldDelimiter ||

7176: elsif (positionIn > 1) then
7177: if (engStApprovers(positionIn - 1).item_id <> engStApprovers(positionIn).item_id or
7178: engStApprovers(positionIn - 1).item_class <> engStApprovers(positionIn).item_class) then
7179: tempParameter := ame_util.lastPostApprover ||
7180: ame_util.fieldDelimiter ||
7181: engStApprovers(positionIn - 1).item_class ||
7182: ame_util.fieldDelimiter ||
7183: engStApprovers(positionIn - 1).item_id;
7184: if (not ame_engine.insertionExists

Line 7182: ame_util.fieldDelimiter ||

7178: engStApprovers(positionIn - 1).item_class <> engStApprovers(positionIn).item_class) then
7179: tempParameter := ame_util.lastPostApprover ||
7180: ame_util.fieldDelimiter ||
7181: engStApprovers(positionIn - 1).item_class ||
7182: ame_util.fieldDelimiter ||
7183: engStApprovers(positionIn - 1).item_id;
7184: if (not ame_engine.insertionExists
7185: (orderTypeIn => ame_util.lastPostApprover
7186: ,parameterIn => tempParameter

Line 7185: (orderTypeIn => ame_util.lastPostApprover

7181: engStApprovers(positionIn - 1).item_class ||
7182: ame_util.fieldDelimiter ||
7183: engStApprovers(positionIn - 1).item_id;
7184: if (not ame_engine.insertionExists
7185: (orderTypeIn => ame_util.lastPostApprover
7186: ,parameterIn => tempParameter
7187: )) then
7188: availableInsertionsIndex := availableInsertionsIndex + 1;
7189: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn - 1).item_class;

Line 7191: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

7187: )) then
7188: availableInsertionsIndex := availableInsertionsIndex + 1;
7189: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn - 1).item_class;
7190: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn - 1).item_id;
7191: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7192: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7193: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7194: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7195: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 7192: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

7188: availableInsertionsIndex := availableInsertionsIndex + 1;
7189: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn - 1).item_class;
7190: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn - 1).item_id;
7191: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7192: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7193: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7194: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7195: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7196: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

Line 7193: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;

7189: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn - 1).item_class;
7190: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn - 1).item_id;
7191: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7192: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7193: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7194: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7195: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7196: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7197: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;

Line 7195: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

7191: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7192: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7193: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7194: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7195: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7196: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7197: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;
7198: end if;
7199: end if;

Line 7196: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;

7192: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7193: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7194: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7195: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7196: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7197: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;
7198: end if;
7199: end if;
7200: end if;

Line 7197: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;

7193: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPostApprover;
7194: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7195: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7196: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.postApprover;
7197: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPostApproverDescription;
7198: end if;
7199: end if;
7200: end if;
7201: end if;

Line 7228: orderTypeIn = ame_util.lastPreApprover) then

7224: end if
7225: end if
7226: */
7227: if (orderTypeIn is null or
7228: orderTypeIn = ame_util.lastPreApprover) then
7229: if (engStApproversCount = 0) then
7230: tempParameter := ame_util.lastPreApprover ||
7231: ame_util.fieldDelimiter ||
7232: ame_util.headerItemClassName ||

Line 7230: tempParameter := ame_util.lastPreApprover ||

7226: */
7227: if (orderTypeIn is null or
7228: orderTypeIn = ame_util.lastPreApprover) then
7229: if (engStApproversCount = 0) then
7230: tempParameter := ame_util.lastPreApprover ||
7231: ame_util.fieldDelimiter ||
7232: ame_util.headerItemClassName ||
7233: ame_util.fieldDelimiter ||
7234: engTransactionId;

Line 7231: ame_util.fieldDelimiter ||

7227: if (orderTypeIn is null or
7228: orderTypeIn = ame_util.lastPreApprover) then
7229: if (engStApproversCount = 0) then
7230: tempParameter := ame_util.lastPreApprover ||
7231: ame_util.fieldDelimiter ||
7232: ame_util.headerItemClassName ||
7233: ame_util.fieldDelimiter ||
7234: engTransactionId;
7235: if (not ame_engine.insertionExists

Line 7232: ame_util.headerItemClassName ||

7228: orderTypeIn = ame_util.lastPreApprover) then
7229: if (engStApproversCount = 0) then
7230: tempParameter := ame_util.lastPreApprover ||
7231: ame_util.fieldDelimiter ||
7232: ame_util.headerItemClassName ||
7233: ame_util.fieldDelimiter ||
7234: engTransactionId;
7235: if (not ame_engine.insertionExists
7236: (orderTypeIn => ame_util.lastPreApprover

Line 7233: ame_util.fieldDelimiter ||

7229: if (engStApproversCount = 0) then
7230: tempParameter := ame_util.lastPreApprover ||
7231: ame_util.fieldDelimiter ||
7232: ame_util.headerItemClassName ||
7233: ame_util.fieldDelimiter ||
7234: engTransactionId;
7235: if (not ame_engine.insertionExists
7236: (orderTypeIn => ame_util.lastPreApprover
7237: ,parameterIn => tempParameter)) then

Line 7236: (orderTypeIn => ame_util.lastPreApprover

7232: ame_util.headerItemClassName ||
7233: ame_util.fieldDelimiter ||
7234: engTransactionId;
7235: if (not ame_engine.insertionExists
7236: (orderTypeIn => ame_util.lastPreApprover
7237: ,parameterIn => tempParameter)) then
7238: availableInsertionsIndex := availableInsertionsIndex + 1;
7239: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7240: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;

Line 7239: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;

7235: if (not ame_engine.insertionExists
7236: (orderTypeIn => ame_util.lastPreApprover
7237: ,parameterIn => tempParameter)) then
7238: availableInsertionsIndex := availableInsertionsIndex + 1;
7239: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7240: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
7241: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7242: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7243: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;

Line 7241: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

7237: ,parameterIn => tempParameter)) then
7238: availableInsertionsIndex := availableInsertionsIndex + 1;
7239: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7240: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
7241: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7242: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7243: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7244: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7245: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 7242: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

7238: availableInsertionsIndex := availableInsertionsIndex + 1;
7239: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7240: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
7241: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7242: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7243: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7244: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7245: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7246: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

Line 7243: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;

7239: availableInsertionsOut(availableInsertionsIndex).item_class := ame_util.headerItemClassName;
7240: availableInsertionsOut(availableInsertionsIndex).item_id := engTransactionId;
7241: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7242: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7243: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7244: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7245: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7246: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7247: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;

Line 7245: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

7241: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7242: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7243: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7244: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7245: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7246: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7247: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7248: end if;
7249: elsif (positionIn = 1) then

Line 7246: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

7242: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7243: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7244: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7245: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7246: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7247: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7248: end if;
7249: elsif (positionIn = 1) then
7250: if (engStApprovers(1).authority <> ame_util.preApprover) then

Line 7247: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;

7243: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7244: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7245: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7246: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7247: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7248: end if;
7249: elsif (positionIn = 1) then
7250: if (engStApprovers(1).authority <> ame_util.preApprover) then
7251: tempParameter := ame_util.lastPreApprover ||

Line 7250: if (engStApprovers(1).authority <> ame_util.preApprover) then

7246: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7247: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7248: end if;
7249: elsif (positionIn = 1) then
7250: if (engStApprovers(1).authority <> ame_util.preApprover) then
7251: tempParameter := ame_util.lastPreApprover ||
7252: ame_util.fieldDelimiter ||
7253: engStApprovers(1).item_class ||
7254: ame_util.fieldDelimiter ||

Line 7251: tempParameter := ame_util.lastPreApprover ||

7247: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7248: end if;
7249: elsif (positionIn = 1) then
7250: if (engStApprovers(1).authority <> ame_util.preApprover) then
7251: tempParameter := ame_util.lastPreApprover ||
7252: ame_util.fieldDelimiter ||
7253: engStApprovers(1).item_class ||
7254: ame_util.fieldDelimiter ||
7255: engStApprovers(1).item_id;

Line 7252: ame_util.fieldDelimiter ||

7248: end if;
7249: elsif (positionIn = 1) then
7250: if (engStApprovers(1).authority <> ame_util.preApprover) then
7251: tempParameter := ame_util.lastPreApprover ||
7252: ame_util.fieldDelimiter ||
7253: engStApprovers(1).item_class ||
7254: ame_util.fieldDelimiter ||
7255: engStApprovers(1).item_id;
7256: if (not ame_engine.insertionExists

Line 7254: ame_util.fieldDelimiter ||

7250: if (engStApprovers(1).authority <> ame_util.preApprover) then
7251: tempParameter := ame_util.lastPreApprover ||
7252: ame_util.fieldDelimiter ||
7253: engStApprovers(1).item_class ||
7254: ame_util.fieldDelimiter ||
7255: engStApprovers(1).item_id;
7256: if (not ame_engine.insertionExists
7257: (orderTypeIn => ame_util.lastPreApprover
7258: ,parameterIn => tempParameter

Line 7257: (orderTypeIn => ame_util.lastPreApprover

7253: engStApprovers(1).item_class ||
7254: ame_util.fieldDelimiter ||
7255: engStApprovers(1).item_id;
7256: if (not ame_engine.insertionExists
7257: (orderTypeIn => ame_util.lastPreApprover
7258: ,parameterIn => tempParameter
7259: )) then
7260: availableInsertionsIndex := availableInsertionsIndex + 1;
7261: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(1).item_class;

Line 7263: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

7259: )) then
7260: availableInsertionsIndex := availableInsertionsIndex + 1;
7261: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(1).item_class;
7262: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(1).item_id;
7263: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7264: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7265: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7266: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7267: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 7264: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

7260: availableInsertionsIndex := availableInsertionsIndex + 1;
7261: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(1).item_class;
7262: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(1).item_id;
7263: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7264: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7265: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7266: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7267: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7268: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

Line 7265: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;

7261: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(1).item_class;
7262: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(1).item_id;
7263: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7264: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7265: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7266: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7267: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7268: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7269: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;

Line 7267: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

7263: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7264: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7265: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7266: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7267: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7268: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7269: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7270: end if;
7271: end if;

Line 7268: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

7264: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7265: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7266: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7267: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7268: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7269: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7270: end if;
7271: end if;
7272: elsif (positionIn <= engStApproversCount) then

Line 7269: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;

7265: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7266: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7267: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7268: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7269: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7270: end if;
7271: end if;
7272: elsif (positionIn <= engStApproversCount) then
7273: if (engStApprovers(positionIn - 1).item_id = engStApprovers(positionIn).item_id and

Line 7275: if (engStApprovers(positionIn - 1).authority = ame_util.preApprover and

7271: end if;
7272: elsif (positionIn <= engStApproversCount) then
7273: if (engStApprovers(positionIn - 1).item_id = engStApprovers(positionIn).item_id and
7274: engStApprovers(positionIn - 1).item_class = engStApprovers(positionIn).item_class) then
7275: if (engStApprovers(positionIn - 1).authority = ame_util.preApprover and
7276: engStApprovers(positionIn).authority <> ame_util.preApprover) then
7277: tempParameter := ame_util.lastPreApprover ||
7278: ame_util.fieldDelimiter ||
7279: engStApprovers(positionIn).item_class ||

Line 7276: engStApprovers(positionIn).authority <> ame_util.preApprover) then

7272: elsif (positionIn <= engStApproversCount) then
7273: if (engStApprovers(positionIn - 1).item_id = engStApprovers(positionIn).item_id and
7274: engStApprovers(positionIn - 1).item_class = engStApprovers(positionIn).item_class) then
7275: if (engStApprovers(positionIn - 1).authority = ame_util.preApprover and
7276: engStApprovers(positionIn).authority <> ame_util.preApprover) then
7277: tempParameter := ame_util.lastPreApprover ||
7278: ame_util.fieldDelimiter ||
7279: engStApprovers(positionIn).item_class ||
7280: ame_util.fieldDelimiter ||

Line 7277: tempParameter := ame_util.lastPreApprover ||

7273: if (engStApprovers(positionIn - 1).item_id = engStApprovers(positionIn).item_id and
7274: engStApprovers(positionIn - 1).item_class = engStApprovers(positionIn).item_class) then
7275: if (engStApprovers(positionIn - 1).authority = ame_util.preApprover and
7276: engStApprovers(positionIn).authority <> ame_util.preApprover) then
7277: tempParameter := ame_util.lastPreApprover ||
7278: ame_util.fieldDelimiter ||
7279: engStApprovers(positionIn).item_class ||
7280: ame_util.fieldDelimiter ||
7281: engStApprovers(positionIn).item_id;

Line 7278: ame_util.fieldDelimiter ||

7274: engStApprovers(positionIn - 1).item_class = engStApprovers(positionIn).item_class) then
7275: if (engStApprovers(positionIn - 1).authority = ame_util.preApprover and
7276: engStApprovers(positionIn).authority <> ame_util.preApprover) then
7277: tempParameter := ame_util.lastPreApprover ||
7278: ame_util.fieldDelimiter ||
7279: engStApprovers(positionIn).item_class ||
7280: ame_util.fieldDelimiter ||
7281: engStApprovers(positionIn).item_id;
7282: if (not ame_engine.insertionExists

Line 7280: ame_util.fieldDelimiter ||

7276: engStApprovers(positionIn).authority <> ame_util.preApprover) then
7277: tempParameter := ame_util.lastPreApprover ||
7278: ame_util.fieldDelimiter ||
7279: engStApprovers(positionIn).item_class ||
7280: ame_util.fieldDelimiter ||
7281: engStApprovers(positionIn).item_id;
7282: if (not ame_engine.insertionExists
7283: (orderTypeIn => ame_util.lastPreApprover
7284: ,parameterIn => tempParameter

Line 7283: (orderTypeIn => ame_util.lastPreApprover

7279: engStApprovers(positionIn).item_class ||
7280: ame_util.fieldDelimiter ||
7281: engStApprovers(positionIn).item_id;
7282: if (not ame_engine.insertionExists
7283: (orderTypeIn => ame_util.lastPreApprover
7284: ,parameterIn => tempParameter
7285: )) then
7286: availableInsertionsIndex := availableInsertionsIndex + 1;
7287: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;

Line 7289: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

7285: )) then
7286: availableInsertionsIndex := availableInsertionsIndex + 1;
7287: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
7288: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
7289: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7290: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7291: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7292: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7293: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 7290: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

7286: availableInsertionsIndex := availableInsertionsIndex + 1;
7287: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
7288: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
7289: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7290: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7291: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7292: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7293: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7294: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

Line 7291: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;

7287: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
7288: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
7289: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7290: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7291: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7292: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7293: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7294: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7295: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;

Line 7293: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

7289: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7290: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7291: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7292: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7293: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7294: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7295: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7296: end if;
7297: end if;

Line 7294: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

7290: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7291: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7292: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7293: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7294: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7295: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7296: end if;
7297: end if;
7298: else

Line 7295: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;

7291: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7292: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7293: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7294: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7295: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7296: end if;
7297: end if;
7298: else
7299: if (engStApprovers(positionIn).authority <> ame_util.preApprover) then

Line 7299: if (engStApprovers(positionIn).authority <> ame_util.preApprover) then

7295: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7296: end if;
7297: end if;
7298: else
7299: if (engStApprovers(positionIn).authority <> ame_util.preApprover) then
7300: tempParameter := ame_util.lastPreApprover ||
7301: ame_util.fieldDelimiter ||
7302: engStApprovers(positionIn).item_class ||
7303: ame_util.fieldDelimiter ||

Line 7300: tempParameter := ame_util.lastPreApprover ||

7296: end if;
7297: end if;
7298: else
7299: if (engStApprovers(positionIn).authority <> ame_util.preApprover) then
7300: tempParameter := ame_util.lastPreApprover ||
7301: ame_util.fieldDelimiter ||
7302: engStApprovers(positionIn).item_class ||
7303: ame_util.fieldDelimiter ||
7304: engStApprovers(positionIn).item_id;

Line 7301: ame_util.fieldDelimiter ||

7297: end if;
7298: else
7299: if (engStApprovers(positionIn).authority <> ame_util.preApprover) then
7300: tempParameter := ame_util.lastPreApprover ||
7301: ame_util.fieldDelimiter ||
7302: engStApprovers(positionIn).item_class ||
7303: ame_util.fieldDelimiter ||
7304: engStApprovers(positionIn).item_id;
7305: if (not ame_engine.insertionExists

Line 7303: ame_util.fieldDelimiter ||

7299: if (engStApprovers(positionIn).authority <> ame_util.preApprover) then
7300: tempParameter := ame_util.lastPreApprover ||
7301: ame_util.fieldDelimiter ||
7302: engStApprovers(positionIn).item_class ||
7303: ame_util.fieldDelimiter ||
7304: engStApprovers(positionIn).item_id;
7305: if (not ame_engine.insertionExists
7306: (orderTypeIn => ame_util.lastPreApprover
7307: ,parameterIn => tempParameter

Line 7306: (orderTypeIn => ame_util.lastPreApprover

7302: engStApprovers(positionIn).item_class ||
7303: ame_util.fieldDelimiter ||
7304: engStApprovers(positionIn).item_id;
7305: if (not ame_engine.insertionExists
7306: (orderTypeIn => ame_util.lastPreApprover
7307: ,parameterIn => tempParameter
7308: )) then
7309: availableInsertionsIndex := availableInsertionsIndex + 1;
7310: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;

Line 7312: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;

7308: )) then
7309: availableInsertionsIndex := availableInsertionsIndex + 1;
7310: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
7311: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
7312: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7313: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7314: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7315: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7316: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

Line 7313: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

7309: availableInsertionsIndex := availableInsertionsIndex + 1;
7310: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
7311: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
7312: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7313: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7314: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7315: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7316: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7317: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

Line 7314: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;

7310: availableInsertionsOut(availableInsertionsIndex).item_class := engStApprovers(positionIn).item_class;
7311: availableInsertionsOut(availableInsertionsIndex).item_id := engStApprovers(positionIn).item_id;
7312: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7313: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7314: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7315: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7316: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7317: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7318: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;

Line 7316: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;

7312: availableInsertionsOut(availableInsertionsIndex).action_type_id := ame_util.nullInsertionActionTypeId;
7313: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7314: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7315: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7316: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7317: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7318: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7319: end if;
7320: end if;

Line 7317: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;

7313: availableInsertionsOut(availableInsertionsIndex).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
7314: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7315: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7316: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7317: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7318: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7319: end if;
7320: end if;
7321: end if;

Line 7318: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;

7314: availableInsertionsOut(availableInsertionsIndex).order_type := ame_util.lastPreApprover;
7315: availableInsertionsOut(availableInsertionsIndex).parameter := tempParameter;
7316: availableInsertionsOut(availableInsertionsIndex).api_insertion := ame_util.apiInsertion;
7317: availableInsertionsOut(availableInsertionsIndex).authority := ame_util.preApprover;
7318: availableInsertionsOut(availableInsertionsIndex).description := ame_util.lastPreApproverDescription;
7319: end if;
7320: end if;
7321: end if;
7322: end if;

Line 7328: errorMessage := ame_util.getMessage

7324:
7325: exception
7326: when invalidPositionException then
7327: errorCode := -20001;
7328: errorMessage := ame_util.getMessage
7329: (applicationShortNameIn =>'PER'
7330: ,messageNameIn => 'AME_400418_INVALID_INSERTION'
7331: );
7332: ame_util.runtimeException

Line 7332: ame_util.runtimeException

7328: errorMessage := ame_util.getMessage
7329: (applicationShortNameIn =>'PER'
7330: ,messageNameIn => 'AME_400418_INVALID_INSERTION'
7331: );
7332: ame_util.runtimeException
7333: (packageNameIn => 'ame_engine'
7334: ,routineNameIn => 'getInsertions'
7335: ,exceptionNumberIn => errorCode
7336: ,exceptionStringIn => errorMessage

Line 7341: ame_util.runtimeException

7337: );
7338: raise_application_error(errorCode,errorMessage);
7339:
7340: when others then
7341: ame_util.runtimeException
7342: (packageNameIn => 'ame_engine'
7343: ,routineNameIn => 'getInsertions'
7344: ,exceptionNumberIn => sqlcode
7345: ,exceptionStringIn => sqlerrm

Line 7353: errorMessage ame_util.longestStringType;

7349: procedure getLMCondition(ruleIdIn in integer,
7350: parameterOneOut out nocopy varchar2,
7351: parameterTwoOut out nocopy varchar2) as
7352: errorCode integer;
7353: errorMessage ame_util.longestStringType;
7354: invalidNameException exception;
7355: tempRuleKey ame_rules.rule_key%type;
7356: parameterOne ame_conditions.parameter_one%type;
7357: parameterTwo ame_conditions.parameter_two%type;

Line 7374: ame_conditions.condition_type = ame_util.listModConditionType and

7370: ame_condition_usages
7371: where
7372: ame_condition_usages.rule_id = ruleIdIn and
7373: ame_condition_usages.condition_id = ame_conditions.condition_id and
7374: ame_conditions.condition_type = ame_util.listModConditionType and
7375: engEffectiveRuleDate between
7376: ame_conditions.start_date and
7377: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
7378: engEffectiveRuleDate between

Line 7377: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

7373: ame_condition_usages.condition_id = ame_conditions.condition_id and
7374: ame_conditions.condition_type = ame_util.listModConditionType and
7375: engEffectiveRuleDate between
7376: ame_conditions.start_date and
7377: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
7378: engEffectiveRuleDate between
7379: ame_condition_usages.start_date and
7380: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
7381: rownum < 2; /* Avoids second fetch otherwise required by ANSI standard to check for too many rows. */

Line 7380: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and

7376: ame_conditions.start_date and
7377: nvl(ame_conditions.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
7378: engEffectiveRuleDate between
7379: ame_condition_usages.start_date and
7380: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
7381: rownum < 2; /* Avoids second fetch otherwise required by ANSI standard to check for too many rows. */
7382: /* Check for an invalid wf_roles.name value in parameter_two. */
7383: if(parameterTwo = ame_util.invalidApproverWfRolesName) then
7384: raise invalidNameException;

Line 7383: if(parameterTwo = ame_util.invalidApproverWfRolesName) then

7379: ame_condition_usages.start_date and
7380: nvl(ame_condition_usages.end_date - ame_util.oneSecond, engEffectiveRuleDate) and
7381: rownum < 2; /* Avoids second fetch otherwise required by ANSI standard to check for too many rows. */
7382: /* Check for an invalid wf_roles.name value in parameter_two. */
7383: if(parameterTwo = ame_util.invalidApproverWfRolesName) then
7384: raise invalidNameException;
7385: end if;
7386: /* Cache the values. */
7387: engLMParameterOnes(ruleIdIn) := parameterOne;

Line 7397: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

7393: exception
7394: when invalidNameException then
7395: tempRuleKey := ame_rule_pkg.getRuleKey(ruleIdIn => ruleIdIn);
7396: errorCode := -20001;
7397: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
7398: messageNameIn => 'AME_400685_INV_LM_RULE',
7399: tokenNameOneIn => 'RULE_KEY',
7400: tokenValueOneIn => tempRuleKey);
7401: ame_util.runtimeException(packageNameIn => 'ame_engine',

Line 7401: ame_util.runtimeException(packageNameIn => 'ame_engine',

7397: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
7398: messageNameIn => 'AME_400685_INV_LM_RULE',
7399: tokenNameOneIn => 'RULE_KEY',
7400: tokenValueOneIn => tempRuleKey);
7401: ame_util.runtimeException(packageNameIn => 'ame_engine',
7402: routineNameIn => 'getLMCondition',
7403: exceptionNumberIn => errorCode,
7404: exceptionStringIn => errorMessage);
7405: raise_application_error(errorCode,

Line 7408: ame_util.runtimeException(packageNameIn => 'ame_engine',

7404: exceptionStringIn => errorMessage);
7405: raise_application_error(errorCode,
7406: errorMessage);
7407: when others then
7408: ame_util.runtimeException(packageNameIn => 'ame_engine',
7409: routineNameIn => 'getLMCondition',
7410: exceptionNumberIn => sqlcode,
7411: exceptionStringIn => sqlerrm);
7412: raise;

Line 7419: ,flagApproversAsNotifiedIn in varchar2 default ame_util.booleanTrue

7415: applicationIdIn in number
7416: ,transactionTypeIn in varchar2
7417: ,transactionIdIn in varchar2
7418: ,nextApproversType in number
7419: ,flagApproversAsNotifiedIn in varchar2 default ame_util.booleanTrue
7420: ,approvalProcessCompleteYNOut out nocopy varchar2
7421: ,nextApproversOut out nocopy ame_util.approversTable2
7422: ,itemIndexesOut out nocopy ame_util.idList
7423: ,itemClassesOut out nocopy ame_util.stringList

Line 7421: ,nextApproversOut out nocopy ame_util.approversTable2

7417: ,transactionIdIn in varchar2
7418: ,nextApproversType in number
7419: ,flagApproversAsNotifiedIn in varchar2 default ame_util.booleanTrue
7420: ,approvalProcessCompleteYNOut out nocopy varchar2
7421: ,nextApproversOut out nocopy ame_util.approversTable2
7422: ,itemIndexesOut out nocopy ame_util.idList
7423: ,itemClassesOut out nocopy ame_util.stringList
7424: ,itemIdsOut out nocopy ame_util.stringList
7425: ,itemSourcesOut out nocopy ame_util.longStringList

Line 7422: ,itemIndexesOut out nocopy ame_util.idList

7418: ,nextApproversType in number
7419: ,flagApproversAsNotifiedIn in varchar2 default ame_util.booleanTrue
7420: ,approvalProcessCompleteYNOut out nocopy varchar2
7421: ,nextApproversOut out nocopy ame_util.approversTable2
7422: ,itemIndexesOut out nocopy ame_util.idList
7423: ,itemClassesOut out nocopy ame_util.stringList
7424: ,itemIdsOut out nocopy ame_util.stringList
7425: ,itemSourcesOut out nocopy ame_util.longStringList
7426: ,productionIndexesOut out nocopy ame_util.idList

Line 7423: ,itemClassesOut out nocopy ame_util.stringList

7419: ,flagApproversAsNotifiedIn in varchar2 default ame_util.booleanTrue
7420: ,approvalProcessCompleteYNOut out nocopy varchar2
7421: ,nextApproversOut out nocopy ame_util.approversTable2
7422: ,itemIndexesOut out nocopy ame_util.idList
7423: ,itemClassesOut out nocopy ame_util.stringList
7424: ,itemIdsOut out nocopy ame_util.stringList
7425: ,itemSourcesOut out nocopy ame_util.longStringList
7426: ,productionIndexesOut out nocopy ame_util.idList
7427: ,variableNamesOut out nocopy ame_util.stringList

Line 7424: ,itemIdsOut out nocopy ame_util.stringList

7420: ,approvalProcessCompleteYNOut out nocopy varchar2
7421: ,nextApproversOut out nocopy ame_util.approversTable2
7422: ,itemIndexesOut out nocopy ame_util.idList
7423: ,itemClassesOut out nocopy ame_util.stringList
7424: ,itemIdsOut out nocopy ame_util.stringList
7425: ,itemSourcesOut out nocopy ame_util.longStringList
7426: ,productionIndexesOut out nocopy ame_util.idList
7427: ,variableNamesOut out nocopy ame_util.stringList
7428: ,variableValuesOut out nocopy ame_util.stringList

Line 7425: ,itemSourcesOut out nocopy ame_util.longStringList

7421: ,nextApproversOut out nocopy ame_util.approversTable2
7422: ,itemIndexesOut out nocopy ame_util.idList
7423: ,itemClassesOut out nocopy ame_util.stringList
7424: ,itemIdsOut out nocopy ame_util.stringList
7425: ,itemSourcesOut out nocopy ame_util.longStringList
7426: ,productionIndexesOut out nocopy ame_util.idList
7427: ,variableNamesOut out nocopy ame_util.stringList
7428: ,variableValuesOut out nocopy ame_util.stringList
7429: ,transVariableNamesOut out nocopy ame_util.stringList

Line 7426: ,productionIndexesOut out nocopy ame_util.idList

7422: ,itemIndexesOut out nocopy ame_util.idList
7423: ,itemClassesOut out nocopy ame_util.stringList
7424: ,itemIdsOut out nocopy ame_util.stringList
7425: ,itemSourcesOut out nocopy ame_util.longStringList
7426: ,productionIndexesOut out nocopy ame_util.idList
7427: ,variableNamesOut out nocopy ame_util.stringList
7428: ,variableValuesOut out nocopy ame_util.stringList
7429: ,transVariableNamesOut out nocopy ame_util.stringList
7430: ,transVariableValuesOut out nocopy ame_util.stringList) as

Line 7427: ,variableNamesOut out nocopy ame_util.stringList

7423: ,itemClassesOut out nocopy ame_util.stringList
7424: ,itemIdsOut out nocopy ame_util.stringList
7425: ,itemSourcesOut out nocopy ame_util.longStringList
7426: ,productionIndexesOut out nocopy ame_util.idList
7427: ,variableNamesOut out nocopy ame_util.stringList
7428: ,variableValuesOut out nocopy ame_util.stringList
7429: ,transVariableNamesOut out nocopy ame_util.stringList
7430: ,transVariableValuesOut out nocopy ame_util.stringList) as
7431: allItemsNotSuspended boolean;

Line 7428: ,variableValuesOut out nocopy ame_util.stringList

7424: ,itemIdsOut out nocopy ame_util.stringList
7425: ,itemSourcesOut out nocopy ame_util.longStringList
7426: ,productionIndexesOut out nocopy ame_util.idList
7427: ,variableNamesOut out nocopy ame_util.stringList
7428: ,variableValuesOut out nocopy ame_util.stringList
7429: ,transVariableNamesOut out nocopy ame_util.stringList
7430: ,transVariableValuesOut out nocopy ame_util.stringList) as
7431: allItemsNotSuspended boolean;
7432: ameApplicationId integer;

Line 7429: ,transVariableNamesOut out nocopy ame_util.stringList

7425: ,itemSourcesOut out nocopy ame_util.longStringList
7426: ,productionIndexesOut out nocopy ame_util.idList
7427: ,variableNamesOut out nocopy ame_util.stringList
7428: ,variableValuesOut out nocopy ame_util.stringList
7429: ,transVariableNamesOut out nocopy ame_util.stringList
7430: ,transVariableValuesOut out nocopy ame_util.stringList) as
7431: allItemsNotSuspended boolean;
7432: ameApplicationId integer;
7433: copyAncillaryData boolean;

Line 7430: ,transVariableValuesOut out nocopy ame_util.stringList) as

7426: ,productionIndexesOut out nocopy ame_util.idList
7427: ,variableNamesOut out nocopy ame_util.stringList
7428: ,variableValuesOut out nocopy ame_util.stringList
7429: ,transVariableNamesOut out nocopy ame_util.stringList
7430: ,transVariableValuesOut out nocopy ame_util.stringList) as
7431: allItemsNotSuspended boolean;
7432: ameApplicationId integer;
7433: copyAncillaryData boolean;
7434: nextApproverCount integer;

Line 7439: currentTreeNode ame_util.approverTreeRecord;

7435: nextTreeNodeIndex integer;
7436: tempTreeNodeIndex integer;
7437: approverItemCount integer;
7438: approverProdCount integer;
7439: currentTreeNode ame_util.approverTreeRecord;
7440: evaluateNextNode boolean;
7441: currentOrderNumber integer;
7442: nextApproverTreeIndexList ame_util.idList;
7443: currentApproverIndex integer;

Line 7442: nextApproverTreeIndexList ame_util.idList;

7438: approverProdCount integer;
7439: currentTreeNode ame_util.approverTreeRecord;
7440: evaluateNextNode boolean;
7441: currentOrderNumber integer;
7442: nextApproverTreeIndexList ame_util.idList;
7443: currentApproverIndex integer;
7444: tempApproverIndexes ame_util.idList;
7445: -- tempItemClass ame_util.stringType;
7446: -- tempItemId ame_util.stringType;

Line 7444: tempApproverIndexes ame_util.idList;

7440: evaluateNextNode boolean;
7441: currentOrderNumber integer;
7442: nextApproverTreeIndexList ame_util.idList;
7443: currentApproverIndex integer;
7444: tempApproverIndexes ame_util.idList;
7445: -- tempItemClass ame_util.stringType;
7446: -- tempItemId ame_util.stringType;
7447: processSibling boolean;
7448: tempTreeNode ame_util.approverTreeRecord;

Line 7445: -- tempItemClass ame_util.stringType;

7441: currentOrderNumber integer;
7442: nextApproverTreeIndexList ame_util.idList;
7443: currentApproverIndex integer;
7444: tempApproverIndexes ame_util.idList;
7445: -- tempItemClass ame_util.stringType;
7446: -- tempItemId ame_util.stringType;
7447: processSibling boolean;
7448: tempTreeNode ame_util.approverTreeRecord;
7449: -- following two variables added - to use incase of item_class is null

Line 7446: -- tempItemId ame_util.stringType;

7442: nextApproverTreeIndexList ame_util.idList;
7443: currentApproverIndex integer;
7444: tempApproverIndexes ame_util.idList;
7445: -- tempItemClass ame_util.stringType;
7446: -- tempItemId ame_util.stringType;
7447: processSibling boolean;
7448: tempTreeNode ame_util.approverTreeRecord;
7449: -- following two variables added - to use incase of item_class is null
7450: tempItemClass ame_util.stringType;

Line 7448: tempTreeNode ame_util.approverTreeRecord;

7444: tempApproverIndexes ame_util.idList;
7445: -- tempItemClass ame_util.stringType;
7446: -- tempItemId ame_util.stringType;
7447: processSibling boolean;
7448: tempTreeNode ame_util.approverTreeRecord;
7449: -- following two variables added - to use incase of item_class is null
7450: tempItemClass ame_util.stringType;
7451: tempItemId ame_util.stringType;
7452: -- repeated

Line 7450: tempItemClass ame_util.stringType;

7446: -- tempItemId ame_util.stringType;
7447: processSibling boolean;
7448: tempTreeNode ame_util.approverTreeRecord;
7449: -- following two variables added - to use incase of item_class is null
7450: tempItemClass ame_util.stringType;
7451: tempItemId ame_util.stringType;
7452: -- repeated
7453: tempRepeatedCount integer;
7454: tempRepeatedCount2 integer;

Line 7451: tempItemId ame_util.stringType;

7447: processSibling boolean;
7448: tempTreeNode ame_util.approverTreeRecord;
7449: -- following two variables added - to use incase of item_class is null
7450: tempItemClass ame_util.stringType;
7451: tempItemId ame_util.stringType;
7452: -- repeated
7453: tempRepeatedCount integer;
7454: tempRepeatedCount2 integer;
7455: tempPrepareItemData boolean := true;

Line 7506: if approvalProcessCompleteYNOut = ame_util2.completeFullyApproved or

7502: approvalProcessCompleteYNOut := ame_engine.getApprovalProcessCompleteYN;
7503: ameApplicationId := ame_engine.getAmeApplicationId;
7504: /* If approvalProcessCompleteYNOut is 'Y', there should be no nextApprovers. Hence
7505: return with an empty nextApproversOut table */
7506: if approvalProcessCompleteYNOut = ame_util2.completeFullyApproved or
7507: approvalProcessCompleteYNOut = ame_util2.completeFullyRejected or
7508: approvalProcessCompleteYNOut = ame_util2.completePartiallyApproved or
7509: approvalProcessCompleteYNOut = ame_util2.completeNoApprovers then
7510: ame_engine.unlockTransaction(fndApplicationIdIn => applicationIdIn,

Line 7507: approvalProcessCompleteYNOut = ame_util2.completeFullyRejected or

7503: ameApplicationId := ame_engine.getAmeApplicationId;
7504: /* If approvalProcessCompleteYNOut is 'Y', there should be no nextApprovers. Hence
7505: return with an empty nextApproversOut table */
7506: if approvalProcessCompleteYNOut = ame_util2.completeFullyApproved or
7507: approvalProcessCompleteYNOut = ame_util2.completeFullyRejected or
7508: approvalProcessCompleteYNOut = ame_util2.completePartiallyApproved or
7509: approvalProcessCompleteYNOut = ame_util2.completeNoApprovers then
7510: ame_engine.unlockTransaction(fndApplicationIdIn => applicationIdIn,
7511: transactionIdIn => transactionIdIn,

Line 7508: approvalProcessCompleteYNOut = ame_util2.completePartiallyApproved or

7504: /* If approvalProcessCompleteYNOut is 'Y', there should be no nextApprovers. Hence
7505: return with an empty nextApproversOut table */
7506: if approvalProcessCompleteYNOut = ame_util2.completeFullyApproved or
7507: approvalProcessCompleteYNOut = ame_util2.completeFullyRejected or
7508: approvalProcessCompleteYNOut = ame_util2.completePartiallyApproved or
7509: approvalProcessCompleteYNOut = ame_util2.completeNoApprovers then
7510: ame_engine.unlockTransaction(fndApplicationIdIn => applicationIdIn,
7511: transactionIdIn => transactionIdIn,
7512: transactionTypeIdIn => transactionTypeIn);

Line 7509: approvalProcessCompleteYNOut = ame_util2.completeNoApprovers then

7505: return with an empty nextApproversOut table */
7506: if approvalProcessCompleteYNOut = ame_util2.completeFullyApproved or
7507: approvalProcessCompleteYNOut = ame_util2.completeFullyRejected or
7508: approvalProcessCompleteYNOut = ame_util2.completePartiallyApproved or
7509: approvalProcessCompleteYNOut = ame_util2.completeNoApprovers then
7510: ame_engine.unlockTransaction(fndApplicationIdIn => applicationIdIn,
7511: transactionIdIn => transactionIdIn,
7512: transactionTypeIdIn => transactionTypeIn);
7513: return;

Line 7526: currentTreeNode.is_suspended = ame_util.booleanFalse then

7522: processSibling := true;
7523: loop
7524: currentTreeNode := engStApproversTree(nextTreeNodeIndex);
7525: if currentTreeNode.is_suspended is null or
7526: currentTreeNode.is_suspended = ame_util.booleanFalse then
7527: if currentTreeNode.tree_level = 6 and
7528: (currentTreeNode.status = ame_util.startedStatus
7529: and engStApprovers(currentTreeNode.approver_index).approval_status
7530: <> ame_util.notifiedByRepeatedStatus)and

Line 7528: (currentTreeNode.status = ame_util.startedStatus

7524: currentTreeNode := engStApproversTree(nextTreeNodeIndex);
7525: if currentTreeNode.is_suspended is null or
7526: currentTreeNode.is_suspended = ame_util.booleanFalse then
7527: if currentTreeNode.tree_level = 6 and
7528: (currentTreeNode.status = ame_util.startedStatus
7529: and engStApprovers(currentTreeNode.approver_index).approval_status
7530: <> ame_util.notifiedByRepeatedStatus)and
7531: (currentTreeNode.sibling_index <> ame_util.noSiblingIndex
7532: and currentTreeNode.min_order <> engStApproversTree(currentTreeNode.sibling_index).min_order ) then

Line 7530: <> ame_util.notifiedByRepeatedStatus)and

7526: currentTreeNode.is_suspended = ame_util.booleanFalse then
7527: if currentTreeNode.tree_level = 6 and
7528: (currentTreeNode.status = ame_util.startedStatus
7529: and engStApprovers(currentTreeNode.approver_index).approval_status
7530: <> ame_util.notifiedByRepeatedStatus)and
7531: (currentTreeNode.sibling_index <> ame_util.noSiblingIndex
7532: and currentTreeNode.min_order <> engStApproversTree(currentTreeNode.sibling_index).min_order ) then
7533: evaluateNextNode := false;
7534: end if;

Line 7531: (currentTreeNode.sibling_index <> ame_util.noSiblingIndex

7527: if currentTreeNode.tree_level = 6 and
7528: (currentTreeNode.status = ame_util.startedStatus
7529: and engStApprovers(currentTreeNode.approver_index).approval_status
7530: <> ame_util.notifiedByRepeatedStatus)and
7531: (currentTreeNode.sibling_index <> ame_util.noSiblingIndex
7532: and currentTreeNode.min_order <> engStApproversTree(currentTreeNode.sibling_index).min_order ) then
7533: evaluateNextNode := false;
7534: end if;
7535: if evaluateNextNode then

Line 7536: if currentTreeNode.status <> ame_util.completedStatus then

7532: and currentTreeNode.min_order <> engStApproversTree(currentTreeNode.sibling_index).min_order ) then
7533: evaluateNextNode := false;
7534: end if;
7535: if evaluateNextNode then
7536: if currentTreeNode.status <> ame_util.completedStatus then
7537: if currentTreeNode.approver_index = ame_util.noApproverIndex and
7538: evaluateNextNode then
7539: currentOrderNumber := currentTreeNode.min_order;
7540: end if;

Line 7537: if currentTreeNode.approver_index = ame_util.noApproverIndex and

7533: evaluateNextNode := false;
7534: end if;
7535: if evaluateNextNode then
7536: if currentTreeNode.status <> ame_util.completedStatus then
7537: if currentTreeNode.approver_index = ame_util.noApproverIndex and
7538: evaluateNextNode then
7539: currentOrderNumber := currentTreeNode.min_order;
7540: end if;
7541: else

Line 7544: if currentTreeNode.approver_index <> ame_util.noApproverIndex

7540: end if;
7541: else
7542: currentOrderNumber := null;
7543: end if;
7544: if currentTreeNode.approver_index <> ame_util.noApproverIndex
7545: and currentOrderNumber is not null
7546: and currentTreeNode.status = ame_util.notStartedStatus
7547: and currentTreeNode.min_order = currentOrderNumber
7548: and (engStApprovers(currentTreeNode.approver_index).approval_status is null

Line 7546: and currentTreeNode.status = ame_util.notStartedStatus

7542: currentOrderNumber := null;
7543: end if;
7544: if currentTreeNode.approver_index <> ame_util.noApproverIndex
7545: and currentOrderNumber is not null
7546: and currentTreeNode.status = ame_util.notStartedStatus
7547: and currentTreeNode.min_order = currentOrderNumber
7548: and (engStApprovers(currentTreeNode.approver_index).approval_status is null
7549: or engStApprovers(currentTreeNode.approver_index).approval_status
7550: <> ame_util.notifiedByRepeatedStatus)

Line 7550: <> ame_util.notifiedByRepeatedStatus)

7546: and currentTreeNode.status = ame_util.notStartedStatus
7547: and currentTreeNode.min_order = currentOrderNumber
7548: and (engStApprovers(currentTreeNode.approver_index).approval_status is null
7549: or engStApprovers(currentTreeNode.approver_index).approval_status
7550: <> ame_util.notifiedByRepeatedStatus)
7551: then
7552: nextApproverCount := nextApproverCount + 1;
7553: ame_util.copyApproverRecord2
7554: (approverRecord2In => engStApprovers(currentTreeNode.approver_index)

Line 7553: ame_util.copyApproverRecord2

7549: or engStApprovers(currentTreeNode.approver_index).approval_status
7550: <> ame_util.notifiedByRepeatedStatus)
7551: then
7552: nextApproverCount := nextApproverCount + 1;
7553: ame_util.copyApproverRecord2
7554: (approverRecord2In => engStApprovers(currentTreeNode.approver_index)
7555: ,approverRecord2Out => nextApproversOut(nextApproverCount));
7556: if flagApproversAsNotifiedIn = ame_util.booleanTrue then
7557: setInsertedApprovalStatus(currentApproverIndexIn => currentTreeNode.approver_index

Line 7556: if flagApproversAsNotifiedIn = ame_util.booleanTrue then

7552: nextApproverCount := nextApproverCount + 1;
7553: ame_util.copyApproverRecord2
7554: (approverRecord2In => engStApprovers(currentTreeNode.approver_index)
7555: ,approverRecord2Out => nextApproversOut(nextApproverCount));
7556: if flagApproversAsNotifiedIn = ame_util.booleanTrue then
7557: setInsertedApprovalStatus(currentApproverIndexIn => currentTreeNode.approver_index
7558: ,approvalStatusIn => ame_util.notifiedStatus );
7559: end if;
7560: currentApproverIndex := currentTreeNode.approver_index;

Line 7558: ,approvalStatusIn => ame_util.notifiedStatus );

7554: (approverRecord2In => engStApprovers(currentTreeNode.approver_index)
7555: ,approverRecord2Out => nextApproversOut(nextApproverCount));
7556: if flagApproversAsNotifiedIn = ame_util.booleanTrue then
7557: setInsertedApprovalStatus(currentApproverIndexIn => currentTreeNode.approver_index
7558: ,approvalStatusIn => ame_util.notifiedStatus );
7559: end if;
7560: currentApproverIndex := currentTreeNode.approver_index;
7561: copyAncillaryData := true;
7562: nextApproverTreeIndexList(nextApproverCount) := nextTreeNodeIndex;

Line 7575: set approval_status = ame_util.notifiedByRepeatedStatus

7571: if engStRepeatedIndexes(x) = currentTreeNode.approver_index
7572: and engStRepeatedAppIndexes(x) <> currentTreeNode.approver_index then
7573: --+
7574: update ame_temp_old_approver_lists
7575: set approval_status = ame_util.notifiedByRepeatedStatus
7576: where application_id = ameApplicationId
7577: and transaction_id = transactionIdIn
7578: and name = engStApprovers(engStRepeatedAppIndexes(x)).name --nextApproversOut(i).name
7579: and item_class = engStApprovers(engStRepeatedAppIndexes(x)).item_class

Line 7584: and (approval_status is null or approval_status = ame_util.repeatedStatus);

7580: and item_id = engStApprovers(engStRepeatedAppIndexes(x)).item_id
7581: and action_type_id = engStApprovers(engStRepeatedAppIndexes(x)).action_type_id
7582: and group_or_chain_id = engStApprovers(engStRepeatedAppIndexes(x)).group_or_chain_id
7583: and occurrence = engStApprovers(engStRepeatedAppIndexes(x)).occurrence
7584: and (approval_status is null or approval_status = ame_util.repeatedStatus);
7585: engStApprovers(engStRepeatedAppIndexes(x)).approval_status := ame_util.notifiedByRepeatedStatus;
7586: setInsertedApprovalStatus(currentApproverIndexIn => engStRepeatedAppIndexes(x)
7587: ,approvalStatusIn => ame_util.notifiedByRepeatedStatus);
7588: --+

Line 7585: engStApprovers(engStRepeatedAppIndexes(x)).approval_status := ame_util.notifiedByRepeatedStatus;

7581: and action_type_id = engStApprovers(engStRepeatedAppIndexes(x)).action_type_id
7582: and group_or_chain_id = engStApprovers(engStRepeatedAppIndexes(x)).group_or_chain_id
7583: and occurrence = engStApprovers(engStRepeatedAppIndexes(x)).occurrence
7584: and (approval_status is null or approval_status = ame_util.repeatedStatus);
7585: engStApprovers(engStRepeatedAppIndexes(x)).approval_status := ame_util.notifiedByRepeatedStatus;
7586: setInsertedApprovalStatus(currentApproverIndexIn => engStRepeatedAppIndexes(x)
7587: ,approvalStatusIn => ame_util.notifiedByRepeatedStatus);
7588: --+
7589: end if;

Line 7587: ,approvalStatusIn => ame_util.notifiedByRepeatedStatus);

7583: and occurrence = engStApprovers(engStRepeatedAppIndexes(x)).occurrence
7584: and (approval_status is null or approval_status = ame_util.repeatedStatus);
7585: engStApprovers(engStRepeatedAppIndexes(x)).approval_status := ame_util.notifiedByRepeatedStatus;
7586: setInsertedApprovalStatus(currentApproverIndexIn => engStRepeatedAppIndexes(x)
7587: ,approvalStatusIn => ame_util.notifiedByRepeatedStatus);
7588: --+
7589: end if;
7590: end loop;
7591: end if;

Line 7593: if currentTreeNode.approver_index <> ame_util.noApproverIndex and

7589: end if;
7590: end loop;
7591: end if;
7592: if currentOrderNumber is null and currentTreeNode.tree_level = 6 then
7593: if currentTreeNode.approver_index <> ame_util.noApproverIndex and
7594: (currentTreeNode.status = ame_util.completedStatus or
7595: (
7596: currentTreeNode.status = ame_util.startedStatus
7597: and engStApprovers(currentTreeNode.approver_index).approval_status <> ame_util.notifiedByRepeatedStatus

Line 7594: (currentTreeNode.status = ame_util.completedStatus or

7590: end loop;
7591: end if;
7592: if currentOrderNumber is null and currentTreeNode.tree_level = 6 then
7593: if currentTreeNode.approver_index <> ame_util.noApproverIndex and
7594: (currentTreeNode.status = ame_util.completedStatus or
7595: (
7596: currentTreeNode.status = ame_util.startedStatus
7597: and engStApprovers(currentTreeNode.approver_index).approval_status <> ame_util.notifiedByRepeatedStatus
7598: and processSibling

Line 7596: currentTreeNode.status = ame_util.startedStatus

7592: if currentOrderNumber is null and currentTreeNode.tree_level = 6 then
7593: if currentTreeNode.approver_index <> ame_util.noApproverIndex and
7594: (currentTreeNode.status = ame_util.completedStatus or
7595: (
7596: currentTreeNode.status = ame_util.startedStatus
7597: and engStApprovers(currentTreeNode.approver_index).approval_status <> ame_util.notifiedByRepeatedStatus
7598: and processSibling
7599: )or
7600: (

Line 7597: and engStApprovers(currentTreeNode.approver_index).approval_status <> ame_util.notifiedByRepeatedStatus

7593: if currentTreeNode.approver_index <> ame_util.noApproverIndex and
7594: (currentTreeNode.status = ame_util.completedStatus or
7595: (
7596: currentTreeNode.status = ame_util.startedStatus
7597: and engStApprovers(currentTreeNode.approver_index).approval_status <> ame_util.notifiedByRepeatedStatus
7598: and processSibling
7599: )or
7600: (
7601: currentTreeNode.status = ame_util.notStartedStatus and

Line 7601: currentTreeNode.status = ame_util.notStartedStatus and

7597: and engStApprovers(currentTreeNode.approver_index).approval_status <> ame_util.notifiedByRepeatedStatus
7598: and processSibling
7599: )or
7600: (
7601: currentTreeNode.status = ame_util.notStartedStatus and
7602: currentTreeNode.sibling_index <> ame_util.noSiblingIndex
7603: and currentTreeNode.min_order = engStApproversTree(currentTreeNode.sibling_index).min_order
7604: )
7605: )and

Line 7602: currentTreeNode.sibling_index <> ame_util.noSiblingIndex

7598: and processSibling
7599: )or
7600: (
7601: currentTreeNode.status = ame_util.notStartedStatus and
7602: currentTreeNode.sibling_index <> ame_util.noSiblingIndex
7603: and currentTreeNode.min_order = engStApproversTree(currentTreeNode.sibling_index).min_order
7604: )
7605: )and
7606: processSibling and --evaluateNextNode and

Line 7607: (currentTreeNode.sibling_index <> ame_util.noSiblingIndex

7603: and currentTreeNode.min_order = engStApproversTree(currentTreeNode.sibling_index).min_order
7604: )
7605: )and
7606: processSibling and --evaluateNextNode and
7607: (currentTreeNode.sibling_index <> ame_util.noSiblingIndex
7608: and engStApproversTree(currentTreeNode.sibling_index).status = ame_util.notStartedStatus
7609: and ( engStApprovers(engStApproversTree(currentTreeNode.sibling_index).approver_index).approval_status is null
7610: or engStApprovers(engStApproversTree(currentTreeNode.sibling_index).approver_index).approval_status
7611: <> ame_util.notifiedByRepeatedStatus)

Line 7608: and engStApproversTree(currentTreeNode.sibling_index).status = ame_util.notStartedStatus

7604: )
7605: )and
7606: processSibling and --evaluateNextNode and
7607: (currentTreeNode.sibling_index <> ame_util.noSiblingIndex
7608: and engStApproversTree(currentTreeNode.sibling_index).status = ame_util.notStartedStatus
7609: and ( engStApprovers(engStApproversTree(currentTreeNode.sibling_index).approver_index).approval_status is null
7610: or engStApprovers(engStApproversTree(currentTreeNode.sibling_index).approver_index).approval_status
7611: <> ame_util.notifiedByRepeatedStatus)
7612: ) then

Line 7611: <> ame_util.notifiedByRepeatedStatus)

7607: (currentTreeNode.sibling_index <> ame_util.noSiblingIndex
7608: and engStApproversTree(currentTreeNode.sibling_index).status = ame_util.notStartedStatus
7609: and ( engStApprovers(engStApproversTree(currentTreeNode.sibling_index).approver_index).approval_status is null
7610: or engStApprovers(engStApproversTree(currentTreeNode.sibling_index).approver_index).approval_status
7611: <> ame_util.notifiedByRepeatedStatus)
7612: ) then
7613: --+
7614: if prevApproverOrderNumber is null or
7615: (prevApproverOrderNumber < engStApproversTree(currentTreeNode.sibling_index).min_order

Line 7616: and prevApproverStatus = ame_util.completedStatus) or

7612: ) then
7613: --+
7614: if prevApproverOrderNumber is null or
7615: (prevApproverOrderNumber < engStApproversTree(currentTreeNode.sibling_index).min_order
7616: and prevApproverStatus = ame_util.completedStatus) or
7617: (prevApproverOrderNumber = engStApproversTree(currentTreeNode.sibling_index).min_order )
7618: then
7619:
7620: nextApproverCount := nextApproverCount + 1;

Line 7621: ame_util.copyApproverRecord2

7617: (prevApproverOrderNumber = engStApproversTree(currentTreeNode.sibling_index).min_order )
7618: then
7619:
7620: nextApproverCount := nextApproverCount + 1;
7621: ame_util.copyApproverRecord2
7622: (approverRecord2In => engStApprovers(engStApproversTree(currentTreeNode.sibling_index).approver_index)
7623: ,approverRecord2Out => nextApproversOut(nextApproverCount));
7624: if flagApproversAsNotifiedIn = ame_util.booleanTrue then
7625: setInsertedApprovalStatus(currentApproverIndexIn => engStApproversTree(currentTreeNode.sibling_index).approver_index

Line 7624: if flagApproversAsNotifiedIn = ame_util.booleanTrue then

7620: nextApproverCount := nextApproverCount + 1;
7621: ame_util.copyApproverRecord2
7622: (approverRecord2In => engStApprovers(engStApproversTree(currentTreeNode.sibling_index).approver_index)
7623: ,approverRecord2Out => nextApproversOut(nextApproverCount));
7624: if flagApproversAsNotifiedIn = ame_util.booleanTrue then
7625: setInsertedApprovalStatus(currentApproverIndexIn => engStApproversTree(currentTreeNode.sibling_index).approver_index
7626: ,approvalStatusIn =>ame_util.notifiedStatus );
7627: end if;
7628: nextApproverTreeIndexList(nextApproverCount) := currentTreeNode.sibling_index;

Line 7626: ,approvalStatusIn =>ame_util.notifiedStatus );

7622: (approverRecord2In => engStApprovers(engStApproversTree(currentTreeNode.sibling_index).approver_index)
7623: ,approverRecord2Out => nextApproversOut(nextApproverCount));
7624: if flagApproversAsNotifiedIn = ame_util.booleanTrue then
7625: setInsertedApprovalStatus(currentApproverIndexIn => engStApproversTree(currentTreeNode.sibling_index).approver_index
7626: ,approvalStatusIn =>ame_util.notifiedStatus );
7627: end if;
7628: nextApproverTreeIndexList(nextApproverCount) := currentTreeNode.sibling_index;
7629: tempApproverIndexes(nextApproverCount) := engStApproversTree(currentTreeNode.sibling_index).approver_index;
7630: currentApproverIndex := engStApproversTree(currentTreeNode.sibling_index).approver_index;

Line 7644: set approval_status = ame_util.notifiedByRepeatedStatus

7640: if engStRepeatedIndexes(x) = engStApproversTree(currentTreeNode.sibling_index).approver_index
7641: and engStRepeatedAppIndexes(x) <> engStApproversTree(currentTreeNode.sibling_index).approver_index then
7642: --+
7643: update ame_temp_old_approver_lists
7644: set approval_status = ame_util.notifiedByRepeatedStatus
7645: where application_id = ameApplicationId
7646: and transaction_id = transactionIdIn
7647: and name = engStApprovers(engStRepeatedAppIndexes(x)).name --nextApproversOut(i).name
7648: and item_class = engStApprovers(engStRepeatedAppIndexes(x)).item_class

Line 7653: and (approval_status is null or approval_status = ame_util.repeatedStatus);

7649: and item_id = engStApprovers(engStRepeatedAppIndexes(x)).item_id
7650: and action_type_id = engStApprovers(engStRepeatedAppIndexes(x)).action_type_id
7651: and group_or_chain_id = engStApprovers(engStRepeatedAppIndexes(x)).group_or_chain_id
7652: and occurrence = engStApprovers(engStRepeatedAppIndexes(x)).occurrence
7653: and (approval_status is null or approval_status = ame_util.repeatedStatus);
7654: engStApprovers(engStRepeatedAppIndexes(x)).approval_status := ame_util.notifiedByRepeatedStatus;
7655: setInsertedApprovalStatus(currentApproverIndexIn => engStRepeatedAppIndexes(x)
7656: ,approvalStatusIn => ame_util.notifiedByRepeatedStatus);
7657:

Line 7654: engStApprovers(engStRepeatedAppIndexes(x)).approval_status := ame_util.notifiedByRepeatedStatus;

7650: and action_type_id = engStApprovers(engStRepeatedAppIndexes(x)).action_type_id
7651: and group_or_chain_id = engStApprovers(engStRepeatedAppIndexes(x)).group_or_chain_id
7652: and occurrence = engStApprovers(engStRepeatedAppIndexes(x)).occurrence
7653: and (approval_status is null or approval_status = ame_util.repeatedStatus);
7654: engStApprovers(engStRepeatedAppIndexes(x)).approval_status := ame_util.notifiedByRepeatedStatus;
7655: setInsertedApprovalStatus(currentApproverIndexIn => engStRepeatedAppIndexes(x)
7656: ,approvalStatusIn => ame_util.notifiedByRepeatedStatus);
7657:
7658: --+

Line 7656: ,approvalStatusIn => ame_util.notifiedByRepeatedStatus);

7652: and occurrence = engStApprovers(engStRepeatedAppIndexes(x)).occurrence
7653: and (approval_status is null or approval_status = ame_util.repeatedStatus);
7654: engStApprovers(engStRepeatedAppIndexes(x)).approval_status := ame_util.notifiedByRepeatedStatus;
7655: setInsertedApprovalStatus(currentApproverIndexIn => engStRepeatedAppIndexes(x)
7656: ,approvalStatusIn => ame_util.notifiedByRepeatedStatus);
7657:
7658: --+
7659: end if;
7660: end loop;

Line 7673: if currentTreeNode.status <> ame_util.completedStatus then

7669: --+
7670: if currentTreeNode.tree_level = 6 and (prevApproverOrderNumber is null or
7671: prevApproverOrderNumber = currentTreeNode.min_order)
7672: then
7673: if currentTreeNode.status <> ame_util.completedStatus then
7674: prevApproverStatus := currentTreeNode.status;
7675: prevApproverOrderNumber := currentTreeNode.min_order;
7676: prevApproverName := currentTreeNode.tree_level_id;
7677: end if;

Line 7680: if currentTreeNode.child_index <> ame_util.noChildIndex and evaluateNextNode then

7676: prevApproverName := currentTreeNode.tree_level_id;
7677: end if;
7678: end if;
7679: --+
7680: if currentTreeNode.child_index <> ame_util.noChildIndex and evaluateNextNode then
7681: nextTreeNodeIndex := currentTreeNode.child_index;
7682: else
7683: if evaluateNextNode then
7684: nextTreeNodeIndex := currentTreeNode.sibling_index;

Line 7685: if nextTreeNodeIndex <> ame_util.invalidTreeIndex

7681: nextTreeNodeIndex := currentTreeNode.child_index;
7682: else
7683: if evaluateNextNode then
7684: nextTreeNodeIndex := currentTreeNode.sibling_index;
7685: if nextTreeNodeIndex <> ame_util.invalidTreeIndex
7686: and (currentTreeNode.min_order = engStApproversTree(nextTreeNodeIndex).min_order
7687: or currentTreeNode.status = ame_util.completedStatus) then
7688: evaluateNextNode := true;
7689: else

Line 7687: or currentTreeNode.status = ame_util.completedStatus) then

7683: if evaluateNextNode then
7684: nextTreeNodeIndex := currentTreeNode.sibling_index;
7685: if nextTreeNodeIndex <> ame_util.invalidTreeIndex
7686: and (currentTreeNode.min_order = engStApproversTree(nextTreeNodeIndex).min_order
7687: or currentTreeNode.status = ame_util.completedStatus) then
7688: evaluateNextNode := true;
7689: else
7690: evaluateNextNode := false;
7691: end if;

Line 7693: nextTreeNodeIndex := ame_util.noSiblingIndex;

7689: else
7690: evaluateNextNode := false;
7691: end if;
7692: else
7693: nextTreeNodeIndex := ame_util.noSiblingIndex;
7694: end if;
7695: end if;
7696: else
7697: nextTreeNodeIndex := currentTreeNode.sibling_index;

Line 7700: if nextTreeNodeIndex = ame_util.invalidTreeIndex then

7696: else
7697: nextTreeNodeIndex := currentTreeNode.sibling_index;
7698: prevApproverOrderNumber := null;
7699: end if;
7700: if nextTreeNodeIndex = ame_util.invalidTreeIndex then
7701: /* There are no more siblings or child nodes for the current node */
7702: /* So try moving to the parent's sibling node */
7703: /* If the parent's sibling is not found then move to its parent */
7704: /* and so on ... */

Line 7707: tempTreeNodeIndex := ame_util.invalidTreeIndex;

7703: /* If the parent's sibling is not found then move to its parent */
7704: /* and so on ... */
7705: prevApproverOrderNumber := null;
7706: if currentTreeNode.tree_level = 0 then
7707: tempTreeNodeIndex := ame_util.invalidTreeIndex;
7708: else
7709: tempTreeNodeIndex := currentTreeNode.parent_index;
7710: end if;
7711: if tempTreeNodeIndex <> ame_util.invalidTreeIndex then

Line 7711: if tempTreeNodeIndex <> ame_util.invalidTreeIndex then

7707: tempTreeNodeIndex := ame_util.invalidTreeIndex;
7708: else
7709: tempTreeNodeIndex := currentTreeNode.parent_index;
7710: end if;
7711: if tempTreeNodeIndex <> ame_util.invalidTreeIndex then
7712: processSibling := true;
7713: evaluateNextNode := false;
7714: loop
7715: if engStApproversTree(tempTreeNodeIndex).sibling_index

Line 7716: = ame_util.noSiblingIndex then

7712: processSibling := true;
7713: evaluateNextNode := false;
7714: loop
7715: if engStApproversTree(tempTreeNodeIndex).sibling_index
7716: = ame_util.noSiblingIndex then
7717: tempTreeNodeIndex := engStApproversTree(tempTreeNodeIndex).parent_index;
7718: else
7719: nextTreeNodeIndex := engStApproversTree(tempTreeNodeIndex).sibling_index;
7720: evaluateNextNode := false;

Line 7725: = ame_util.completedStatus )

7721: if (engStApproversTree(tempTreeNodeIndex).min_order
7722: = engStApproversTree(nextTreeNodeIndex).min_order
7723: ) or
7724: (engStApproversTree(tempTreeNodeIndex).status
7725: = ame_util.completedStatus )
7726: and
7727: (previousNodeOrderNumber is null or engStApproversTree(tempTreeNodeIndex).min_order = previousNodeOrderNumber
7728: and previousNodeStatus = ame_util.completedStatus
7729: ) then

Line 7728: and previousNodeStatus = ame_util.completedStatus

7724: (engStApproversTree(tempTreeNodeIndex).status
7725: = ame_util.completedStatus )
7726: and
7727: (previousNodeOrderNumber is null or engStApproversTree(tempTreeNodeIndex).min_order = previousNodeOrderNumber
7728: and previousNodeStatus = ame_util.completedStatus
7729: ) then
7730: evaluateNextNode := true;
7731: else
7732: evaluateNextNode := false;

Line 7740: if engStApproversTree(tempTreeNodeIndex).status <> ame_util.completedStatus then

7736: previousTreeLevelId := engStApproversTree(tempTreeNodeIndex).tree_level_id;
7737: --previousNodeStatus := engStApproversTree(tempTreeNodeIndex).status;
7738: if previousNodeOrderNumber is null or previousNodeOrderNumber = engStApproversTree(tempTreeNodeIndex).min_order
7739: then
7740: if engStApproversTree(tempTreeNodeIndex).status <> ame_util.completedStatus then
7741: previousNodeStatus := engStApproversTree(tempTreeNodeIndex).status;
7742: previousNodeOrderNumber := engStApproversTree(tempTreeNodeIndex).min_order;
7743: end if;
7744: end if;

Line 7748: if tempTreeNodeIndex = 1 or tempTreeNodeIndex = ame_util.invalidTreeIndex then

7744: end if;
7745: --+
7746: exit;
7747: end if;
7748: if tempTreeNodeIndex = 1 or tempTreeNodeIndex = ame_util.invalidTreeIndex then
7749: nextTreeNodeIndex := ame_util.invalidTreeIndex;
7750: exit;
7751: end if;
7752: end loop;

Line 7749: nextTreeNodeIndex := ame_util.invalidTreeIndex;

7745: --+
7746: exit;
7747: end if;
7748: if tempTreeNodeIndex = 1 or tempTreeNodeIndex = ame_util.invalidTreeIndex then
7749: nextTreeNodeIndex := ame_util.invalidTreeIndex;
7750: exit;
7751: end if;
7752: end loop;
7753: end if;

Line 7759: exit when nextTreeNodeIndex = ame_util.invalidTreeIndex;

7755: /* When ever we reach this point we come with a valid node which needs */
7756: /* be processed by the next pass of the loop. If no valid node is present */
7757: /* this indicates that the entire tree is traversed and there are no more */
7758: /* approvers to find */
7759: exit when nextTreeNodeIndex = ame_util.invalidTreeIndex;
7760: end loop;
7761: if copyAncillaryData and nextApproversType < 4 then
7762: ame_engine.prepareItemData(approverIndexesIn => tempApproverIndexes
7763: ,itemIndexesOut => itemIndexesOut

Line 7781: if flagApproversAsNotifiedIn = ame_util.booleanTrue then

7777: if nextApproversType = 3 then
7778: getTransVariableNames(transVariableNamesOut => transVariableNamesOut);
7779: getTransVariableValues(transVariableValuesOut => transVariableValuesOut);
7780: end if;
7781: if flagApproversAsNotifiedIn = ame_util.booleanTrue then
7782: ameApplicationId := ame_engine.getAmeApplicationId;
7783: for i in 1 .. nextApproversOut.count loop
7784: update ame_temp_old_approver_lists
7785: set approval_status = ame_util.notifiedStatus

Line 7785: set approval_status = ame_util.notifiedStatus

7781: if flagApproversAsNotifiedIn = ame_util.booleanTrue then
7782: ameApplicationId := ame_engine.getAmeApplicationId;
7783: for i in 1 .. nextApproversOut.count loop
7784: update ame_temp_old_approver_lists
7785: set approval_status = ame_util.notifiedStatus
7786: where item_class = nextApproversOut(i).item_class
7787: and item_id = nextApproversOut(i).item_id
7788: and name = nextApproversOut(i).name
7789: and action_type_id = nextApproversOut(i).action_type_id

Line 7805: ,statusIn => ame_util.notifiedStatus

7801: ,itemClassIn => nextApproversOut(i).item_class
7802: ,itemIdIn => nextApproversOut(i).item_id
7803: ,actionTypeIdIn => nextApproversOut(i).action_type_id
7804: ,authorityIn => nextApproversOut(i).authority
7805: ,statusIn => ame_util.notifiedStatus
7806: ,grpOrChainIdIn => nextApproversOut(i).group_or_chain_id
7807: ,occurrenceIn => nextApproversOut(i).occurrence
7808: ,apiInsertionIn => nextApproversOut(i).api_insertion
7809: ,memberOrderNumberIn => nextApproversOut(i).member_order_number

Line 7826: if nextApproversOut(x).approval_status = ame_util.repeatedStatus then

7822: end if;
7823: end loop;
7824: end if;
7825: for x in 1 .. nextApproversOut.count loop
7826: if nextApproversOut(x).approval_status = ame_util.repeatedStatus then
7827: nextApproversOut(x).approval_status := null;
7828: end if;
7829: end loop;
7830: ame_engine.unlockTransaction(fndApplicationIdIn => applicationIdIn,

Line 7838: ame_util.runtimeException(packageNameIn => 'ame_engine',

7834: when others then
7835: ame_engine.unlockTransaction(fndApplicationIdIn => applicationIdIn,
7836: transactionIdIn => transactionIdIn,
7837: transactionTypeIdIn => transactionTypeIn);
7838: ame_util.runtimeException(packageNameIn => 'ame_engine',
7839: routineNameIn => 'getNextApprovers',
7840: exceptionNumberIn => sqlcode,
7841: exceptionStringIn => sqlerrm);
7842: approvalProcessCompleteYNOut:= null;

Line 7846: procedure prepareItemData(approverIndexesIn in ame_util.idList default ame_util.emptyIdList

7842: approvalProcessCompleteYNOut:= null;
7843: nextApproversOut.delete;
7844: raise;
7845: end getNextApprovers;
7846: procedure prepareItemData(approverIndexesIn in ame_util.idList default ame_util.emptyIdList
7847: ,itemIndexesOut out nocopy ame_util.idList
7848: ,itemItemClassesOut out nocopy ame_util.stringList
7849: ,itemIdsOut out nocopy ame_util.stringList
7850: ,itemSourcesOut out nocopy ame_util.longStringList) as

Line 7847: ,itemIndexesOut out nocopy ame_util.idList

7843: nextApproversOut.delete;
7844: raise;
7845: end getNextApprovers;
7846: procedure prepareItemData(approverIndexesIn in ame_util.idList default ame_util.emptyIdList
7847: ,itemIndexesOut out nocopy ame_util.idList
7848: ,itemItemClassesOut out nocopy ame_util.stringList
7849: ,itemIdsOut out nocopy ame_util.stringList
7850: ,itemSourcesOut out nocopy ame_util.longStringList) as
7851: tempItemCount integer;

Line 7848: ,itemItemClassesOut out nocopy ame_util.stringList

7844: raise;
7845: end getNextApprovers;
7846: procedure prepareItemData(approverIndexesIn in ame_util.idList default ame_util.emptyIdList
7847: ,itemIndexesOut out nocopy ame_util.idList
7848: ,itemItemClassesOut out nocopy ame_util.stringList
7849: ,itemIdsOut out nocopy ame_util.stringList
7850: ,itemSourcesOut out nocopy ame_util.longStringList) as
7851: tempItemCount integer;
7852: tempItemClass ame_util.stringType;

Line 7849: ,itemIdsOut out nocopy ame_util.stringList

7845: end getNextApprovers;
7846: procedure prepareItemData(approverIndexesIn in ame_util.idList default ame_util.emptyIdList
7847: ,itemIndexesOut out nocopy ame_util.idList
7848: ,itemItemClassesOut out nocopy ame_util.stringList
7849: ,itemIdsOut out nocopy ame_util.stringList
7850: ,itemSourcesOut out nocopy ame_util.longStringList) as
7851: tempItemCount integer;
7852: tempItemClass ame_util.stringType;
7853: tempItemId ame_util.stringType;

Line 7850: ,itemSourcesOut out nocopy ame_util.longStringList) as

7846: procedure prepareItemData(approverIndexesIn in ame_util.idList default ame_util.emptyIdList
7847: ,itemIndexesOut out nocopy ame_util.idList
7848: ,itemItemClassesOut out nocopy ame_util.stringList
7849: ,itemIdsOut out nocopy ame_util.stringList
7850: ,itemSourcesOut out nocopy ame_util.longStringList) as
7851: tempItemCount integer;
7852: tempItemClass ame_util.stringType;
7853: tempItemId ame_util.stringType;
7854: tempRuleIdList ame_util.idList;

Line 7852: tempItemClass ame_util.stringType;

7848: ,itemItemClassesOut out nocopy ame_util.stringList
7849: ,itemIdsOut out nocopy ame_util.stringList
7850: ,itemSourcesOut out nocopy ame_util.longStringList) as
7851: tempItemCount integer;
7852: tempItemClass ame_util.stringType;
7853: tempItemId ame_util.stringType;
7854: tempRuleIdList ame_util.idList;
7855: prevIndex integer;
7856: currentIndex integer;

Line 7853: tempItemId ame_util.stringType;

7849: ,itemIdsOut out nocopy ame_util.stringList
7850: ,itemSourcesOut out nocopy ame_util.longStringList) as
7851: tempItemCount integer;
7852: tempItemClass ame_util.stringType;
7853: tempItemId ame_util.stringType;
7854: tempRuleIdList ame_util.idList;
7855: prevIndex integer;
7856: currentIndex integer;
7857: currentApproverIndex integer;

Line 7854: tempRuleIdList ame_util.idList;

7850: ,itemSourcesOut out nocopy ame_util.longStringList) as
7851: tempItemCount integer;
7852: tempItemClass ame_util.stringType;
7853: tempItemId ame_util.stringType;
7854: tempRuleIdList ame_util.idList;
7855: prevIndex integer;
7856: currentIndex integer;
7857: currentApproverIndex integer;
7858: tempIndex integer;

Line 7859: tempSourceDescription ame_util.longStringType;

7855: prevIndex integer;
7856: currentIndex integer;
7857: currentApproverIndex integer;
7858: tempIndex integer;
7859: tempSourceDescription ame_util.longStringType;
7860: tempLength integer;
7861: tempFlag boolean;
7862: tempCount integer;
7863: tempFlag2 boolean;

Line 7889: not in (ame_util.notifiedByRepeatedStatus

7885: tempProcessApprover := true;
7886: else
7887: if ( engStApprovers(currentApproverIndex).approval_status is null
7888: or engStApprovers(currentApproverIndex).approval_status
7889: not in (ame_util.notifiedByRepeatedStatus
7890: ,ame_util.approvedByRepeatedStatus
7891: ,ame_util.rejectedByRepeatedStatus
7892: ,ame_util.suppressedStatus
7893: ,ame_util.repeatedStatus) ) then

Line 7890: ,ame_util.approvedByRepeatedStatus

7886: else
7887: if ( engStApprovers(currentApproverIndex).approval_status is null
7888: or engStApprovers(currentApproverIndex).approval_status
7889: not in (ame_util.notifiedByRepeatedStatus
7890: ,ame_util.approvedByRepeatedStatus
7891: ,ame_util.rejectedByRepeatedStatus
7892: ,ame_util.suppressedStatus
7893: ,ame_util.repeatedStatus) ) then
7894: tempProcessApprover := true;

Line 7891: ,ame_util.rejectedByRepeatedStatus

7887: if ( engStApprovers(currentApproverIndex).approval_status is null
7888: or engStApprovers(currentApproverIndex).approval_status
7889: not in (ame_util.notifiedByRepeatedStatus
7890: ,ame_util.approvedByRepeatedStatus
7891: ,ame_util.rejectedByRepeatedStatus
7892: ,ame_util.suppressedStatus
7893: ,ame_util.repeatedStatus) ) then
7894: tempProcessApprover := true;
7895: end if;

Line 7892: ,ame_util.suppressedStatus

7888: or engStApprovers(currentApproverIndex).approval_status
7889: not in (ame_util.notifiedByRepeatedStatus
7890: ,ame_util.approvedByRepeatedStatus
7891: ,ame_util.rejectedByRepeatedStatus
7892: ,ame_util.suppressedStatus
7893: ,ame_util.repeatedStatus) ) then
7894: tempProcessApprover := true;
7895: end if;
7896: end if;

Line 7893: ,ame_util.repeatedStatus) ) then

7889: not in (ame_util.notifiedByRepeatedStatus
7890: ,ame_util.approvedByRepeatedStatus
7891: ,ame_util.rejectedByRepeatedStatus
7892: ,ame_util.suppressedStatus
7893: ,ame_util.repeatedStatus) ) then
7894: tempProcessApprover := true;
7895: end if;
7896: end if;
7897: if tempProcessApprover then

Line 7933: ame_util.parseSourceValue(sourceValueIn => engStApprovers(currentIndex).source

7929: prevIndex := tempItemCount;
7930: end if;
7931: tempSourceDescription := null;
7932: tempRuleIdList.delete;
7933: ame_util.parseSourceValue(sourceValueIn => engStApprovers(currentIndex).source
7934: ,sourceDescriptionOut => tempSourceDescription
7935: ,ruleIdListOut => tempRuleIdList);
7936: for z in 1 .. tempRuleIdList.count loop
7937: if itemSourcesOut.count >= tempItemCount then

Line 7944: ame_util.appendRuleIdToSource(ruleIdIn => tempRuleIdList(z)

7940: itemSourcesOut(tempItemCount) := null;
7941: tempIndex := -1;
7942: end if;
7943: if tempIndex = -1 then
7944: ame_util.appendRuleIdToSource(ruleIdIn => tempRuleIdList(z)
7945: ,sourceInOut => itemSourcesOut(tempItemCount));
7946: end if;
7947: end loop;
7948: end if;

Line 7960: ame_util.runtimeException(packageNameIn => 'ame_engine',

7956: end if;
7957: end loop;
7958: exception
7959: when others then
7960: ame_util.runtimeException(packageNameIn => 'ame_engine',
7961: routineNameIn => 'prepareItemData',
7962: exceptionNumberIn => sqlcode,
7963: exceptionStringIn => sqlerrm);
7964: itemIndexesOut.delete;

Line 7971: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList

7967: itemSourcesOut.delete;
7968: raise;
7969: end prepareItemData;
7970: procedure preparePerApproverProductions
7971: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList
7972: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
7973: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
7974: ,prodIndexesOut out nocopy ame_util.idList
7975: ,productionNamesOut out nocopy ame_util.stringList

Line 7972: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList

7968: raise;
7969: end prepareItemData;
7970: procedure preparePerApproverProductions
7971: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList
7972: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
7973: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
7974: ,prodIndexesOut out nocopy ame_util.idList
7975: ,productionNamesOut out nocopy ame_util.stringList
7976: ,productionValuesOut out nocopy ame_util.stringList) as

Line 7973: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList

7969: end prepareItemData;
7970: procedure preparePerApproverProductions
7971: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList
7972: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
7973: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
7974: ,prodIndexesOut out nocopy ame_util.idList
7975: ,productionNamesOut out nocopy ame_util.stringList
7976: ,productionValuesOut out nocopy ame_util.stringList) as
7977: tempRuleIdList ame_util.idList;

Line 7974: ,prodIndexesOut out nocopy ame_util.idList

7970: procedure preparePerApproverProductions
7971: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList
7972: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
7973: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
7974: ,prodIndexesOut out nocopy ame_util.idList
7975: ,productionNamesOut out nocopy ame_util.stringList
7976: ,productionValuesOut out nocopy ame_util.stringList) as
7977: tempRuleIdList ame_util.idList;
7978: tempSourceDescription ame_util.stringType;

Line 7975: ,productionNamesOut out nocopy ame_util.stringList

7971: (approverIndexesIn in ame_util.idList default ame_util.emptyIdList
7972: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
7973: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
7974: ,prodIndexesOut out nocopy ame_util.idList
7975: ,productionNamesOut out nocopy ame_util.stringList
7976: ,productionValuesOut out nocopy ame_util.stringList) as
7977: tempRuleIdList ame_util.idList;
7978: tempSourceDescription ame_util.stringType;
7979: hasRepeatedOccurrences boolean;

Line 7976: ,productionValuesOut out nocopy ame_util.stringList) as

7972: ,itemIndexesIn in ame_util.idList default ame_util.emptyIdList
7973: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
7974: ,prodIndexesOut out nocopy ame_util.idList
7975: ,productionNamesOut out nocopy ame_util.stringList
7976: ,productionValuesOut out nocopy ame_util.stringList) as
7977: tempRuleIdList ame_util.idList;
7978: tempSourceDescription ame_util.stringType;
7979: hasRepeatedOccurrences boolean;
7980: currentRepeatedFirstIndex integer;

Line 7977: tempRuleIdList ame_util.idList;

7973: ,itemSourcesIn in ame_util.longStringList default ame_util.emptyLongStringList
7974: ,prodIndexesOut out nocopy ame_util.idList
7975: ,productionNamesOut out nocopy ame_util.stringList
7976: ,productionValuesOut out nocopy ame_util.stringList) as
7977: tempRuleIdList ame_util.idList;
7978: tempSourceDescription ame_util.stringType;
7979: hasRepeatedOccurrences boolean;
7980: currentRepeatedFirstIndex integer;
7981: currentIndex integer;

Line 7978: tempSourceDescription ame_util.stringType;

7974: ,prodIndexesOut out nocopy ame_util.idList
7975: ,productionNamesOut out nocopy ame_util.stringList
7976: ,productionValuesOut out nocopy ame_util.stringList) as
7977: tempRuleIdList ame_util.idList;
7978: tempSourceDescription ame_util.stringType;
7979: hasRepeatedOccurrences boolean;
7980: currentRepeatedFirstIndex integer;
7981: currentIndex integer;
7982: tempCount integer;

Line 8054: ame_util.parseSourceValue(sourceValueIn => engStItemSources(currentIndex),

8050: tempSourceDescription := null;
8051: tempRuleIdList.delete;
8052: if hasRepeatedOccurrences then
8053: if tempFlag2 then
8054: ame_util.parseSourceValue(sourceValueIn => engStItemSources(currentIndex),
8055: sourceDescriptionOut => tempSourceDescription,
8056: ruleIdListOut => tempRuleIdList);
8057: else
8058: ame_util.parseSourceValue(sourceValueIn => itemSourcesIn(currentIndex),

Line 8058: ame_util.parseSourceValue(sourceValueIn => itemSourcesIn(currentIndex),

8054: ame_util.parseSourceValue(sourceValueIn => engStItemSources(currentIndex),
8055: sourceDescriptionOut => tempSourceDescription,
8056: ruleIdListOut => tempRuleIdList);
8057: else
8058: ame_util.parseSourceValue(sourceValueIn => itemSourcesIn(currentIndex),
8059: sourceDescriptionOut => tempSourceDescription,
8060: ruleIdListOut => tempRuleIdList);
8061: end if;
8062: else

Line 8063: ame_util.parseSourceValue(sourceValueIn => engStApprovers(currentIndex).source,

8059: sourceDescriptionOut => tempSourceDescription,
8060: ruleIdListOut => tempRuleIdList);
8061: end if;
8062: else
8063: ame_util.parseSourceValue(sourceValueIn => engStApprovers(currentIndex).source,
8064: sourceDescriptionOut => tempSourceDescription,
8065: ruleIdListOut => tempRuleIdList);
8066: end if;
8067: for k in 1 .. tempRuleIdList.count loop

Line 8087: ame_util.runtimeException(packageNameIn => 'ame_engine',

8083: end loop;
8084: end loop;
8085: exception
8086: when others then
8087: ame_util.runtimeException(packageNameIn => 'ame_engine',
8088: routineNameIn => 'preparePerApproverProductions',
8089: exceptionNumberIn => sqlcode,
8090: exceptionStringIn => sqlerrm);
8091: prodIndexesOut.delete;

Line 8097: tempRuleIdList ame_util.idList;

8093: productionValuesOut.delete;
8094: raise;
8095: end preparePerApproverProductions;
8096: procedure prepareRuleData as
8097: tempRuleIdList ame_util.idList;
8098: tempEngStRuleIndex integer;
8099: tempSourceDescription ame_util.stringType;
8100: hasRepeatedOccurrences boolean;
8101: currentRepeatedFirstIndex integer;

Line 8099: tempSourceDescription ame_util.stringType;

8095: end preparePerApproverProductions;
8096: procedure prepareRuleData as
8097: tempRuleIdList ame_util.idList;
8098: tempEngStRuleIndex integer;
8099: tempSourceDescription ame_util.stringType;
8100: hasRepeatedOccurrences boolean;
8101: currentRepeatedFirstIndex integer;
8102: currentIndex integer;
8103: tempCount integer;

Line 8140: ame_util.parseSourceValue(sourceValueIn => engStItemSources(currentIndex),

8136: end if;
8137: tempSourceDescription := null;
8138: tempRuleIdList.delete;
8139: if hasRepeatedOccurrences then
8140: ame_util.parseSourceValue(sourceValueIn => engStItemSources(currentIndex),
8141: sourceDescriptionOut => tempSourceDescription,
8142: ruleIdListOut => tempRuleIdList);
8143: else
8144: ame_util.parseSourceValue(sourceValueIn => engStApprovers(currentIndex).source,

Line 8144: ame_util.parseSourceValue(sourceValueIn => engStApprovers(currentIndex).source,

8140: ame_util.parseSourceValue(sourceValueIn => engStItemSources(currentIndex),
8141: sourceDescriptionOut => tempSourceDescription,
8142: ruleIdListOut => tempRuleIdList);
8143: else
8144: ame_util.parseSourceValue(sourceValueIn => engStApprovers(currentIndex).source,
8145: sourceDescriptionOut => tempSourceDescription,
8146: ruleIdListOut => tempRuleIdList);
8147: end if;
8148: if(tempRuleIdList.count = 0) then

Line 8177: ame_util.runtimeException(packageNameIn => 'ame_engine',

8173: end loop;
8174: end loop;
8175: exception
8176: when others then
8177: ame_util.runtimeException(packageNameIn => 'ame_engine',
8178: routineNameIn => 'prepareRuleData',
8179: exceptionNumberIn => sqlcode,
8180: exceptionStringIn => sqlerrm);
8181: engStRuleDescriptions.delete;

Line 8186: procedure getProductionIndexes(productionIndexesOut out nocopy ame_util.idList) as

8182: engStRuleIds.delete;
8183: engStRuleIndexes.delete;
8184: raise;
8185: end prepareRuleData;
8186: procedure getProductionIndexes(productionIndexesOut out nocopy ame_util.idList) as
8187: begin
8188: for i in 1 .. engStProductionIndexes.count loop
8189: productionIndexesOut(i) := engStProductionIndexes(i);
8190: end loop;

Line 8193: ame_util.runtimeException(packageNameIn => 'ame_engine',

8189: productionIndexesOut(i) := engStProductionIndexes(i);
8190: end loop;
8191: exception
8192: when others then
8193: ame_util.runtimeException(packageNameIn => 'ame_engine',
8194: routineNameIn => 'getProductionIndexes',
8195: exceptionNumberIn => sqlcode,
8196: exceptionStringIn => sqlerrm);
8197: raise;

Line 8199: procedure getRepeatedIndexes(repeatedIndexesOut out nocopy ame_util.idList

8195: exceptionNumberIn => sqlcode,
8196: exceptionStringIn => sqlerrm);
8197: raise;
8198: end getProductionIndexes;
8199: procedure getRepeatedIndexes(repeatedIndexesOut out nocopy ame_util.idList
8200: ,repeatedAppIndexesOut out nocopy ame_util.idList) as
8201: begin
8202: for i in 1 .. engStRepeatedIndexes.count loop
8203: repeatedIndexesOut(i) := engStRepeatedIndexes(i);

Line 8200: ,repeatedAppIndexesOut out nocopy ame_util.idList) as

8196: exceptionStringIn => sqlerrm);
8197: raise;
8198: end getProductionIndexes;
8199: procedure getRepeatedIndexes(repeatedIndexesOut out nocopy ame_util.idList
8200: ,repeatedAppIndexesOut out nocopy ame_util.idList) as
8201: begin
8202: for i in 1 .. engStRepeatedIndexes.count loop
8203: repeatedIndexesOut(i) := engStRepeatedIndexes(i);
8204: end loop;

Line 8210: ame_util.runtimeException(packageNameIn => 'ame_engine',

8206: repeatedAppIndexesOut(i) := engStRepeatedAppIndexes(i);
8207: end loop;
8208: exception
8209: when others then
8210: ame_util.runtimeException(packageNameIn => 'ame_engine',
8211: routineNameIn => 'getRepeatedIndexes',
8212: exceptionNumberIn => sqlcode,
8213: exceptionStringIn => sqlerrm);
8214: raise;

Line 8216: procedure getRuleDescriptions(ruleDescriptionsOut out nocopy ame_util.stringList) as

8212: exceptionNumberIn => sqlcode,
8213: exceptionStringIn => sqlerrm);
8214: raise;
8215: end getRepeatedIndexes;
8216: procedure getRuleDescriptions(ruleDescriptionsOut out nocopy ame_util.stringList) as
8217: begin
8218: for i in 1 .. engStRuleDescriptions.count loop
8219: ruleDescriptionsOut(i) := engStRuleDescriptions(i);
8220: end loop;

Line 8223: ame_util.runtimeException(packageNameIn => 'ame_engine',

8219: ruleDescriptionsOut(i) := engStRuleDescriptions(i);
8220: end loop;
8221: exception
8222: when others then
8223: ame_util.runtimeException(packageNameIn => 'ame_engine',
8224: routineNameIn => 'getRuleDescriptions',
8225: exceptionNumberIn => sqlcode,
8226: exceptionStringIn => sqlerrm);
8227: raise;

Line 8229: procedure getRuleIds(ruleIdsOut out nocopy ame_util.idList) as

8225: exceptionNumberIn => sqlcode,
8226: exceptionStringIn => sqlerrm);
8227: raise;
8228: end getRuleDescriptions;
8229: procedure getRuleIds(ruleIdsOut out nocopy ame_util.idList) as
8230: begin
8231: for i in 1 .. engStRuleIds.count loop
8232: ruleIdsOut(i) := engStRuleIds(i);
8233: end loop;

Line 8236: ame_util.runtimeException(packageNameIn => 'ame_engine',

8232: ruleIdsOut(i) := engStRuleIds(i);
8233: end loop;
8234: exception
8235: when others then
8236: ame_util.runtimeException(packageNameIn => 'ame_engine',
8237: routineNameIn => 'getRuleIds',
8238: exceptionNumberIn => sqlcode,
8239: exceptionStringIn => sqlerrm);
8240: raise;

Line 8242: procedure getRuleIndexes(ruleIndexesOut out nocopy ame_util.idList) as

8238: exceptionNumberIn => sqlcode,
8239: exceptionStringIn => sqlerrm);
8240: raise;
8241: end getRuleIds;
8242: procedure getRuleIndexes(ruleIndexesOut out nocopy ame_util.idList) as
8243: begin
8244: for i in 1 .. engStRuleIndexes.count loop
8245: ruleIndexesOut(i) := engStRuleIndexes(i);
8246: end loop;

Line 8249: ame_util.runtimeException(packageNameIn => 'ame_engine',

8245: ruleIndexesOut(i) := engStRuleIndexes(i);
8246: end loop;
8247: exception
8248: when others then
8249: ame_util.runtimeException(packageNameIn => 'ame_engine',
8250: routineNameIn => 'getRuleIndexes',
8251: exceptionNumberIn => sqlcode,
8252: exceptionStringIn => sqlerrm);
8253: raise;

Line 8256: approverNamesOut out nocopy ame_util.longStringList,

8252: exceptionStringIn => sqlerrm);
8253: raise;
8254: end getRuleIndexes;
8255: procedure getRuntimeGroupMembers(groupIdIn in integer,
8256: approverNamesOut out nocopy ame_util.longStringList,
8257: approverOrderNumbersOut out nocopy ame_util.idList,
8258: approverDisplayNamesOut out nocopy ame_util.longStringList,
8259: origSystemIdsOut out nocopy ame_util.idList,
8260: origSystemsOut out nocopy ame_util.stringList) as

Line 8257: approverOrderNumbersOut out nocopy ame_util.idList,

8253: raise;
8254: end getRuleIndexes;
8255: procedure getRuntimeGroupMembers(groupIdIn in integer,
8256: approverNamesOut out nocopy ame_util.longStringList,
8257: approverOrderNumbersOut out nocopy ame_util.idList,
8258: approverDisplayNamesOut out nocopy ame_util.longStringList,
8259: origSystemIdsOut out nocopy ame_util.idList,
8260: origSystemsOut out nocopy ame_util.stringList) as
8261: firstNewIndex integer;

Line 8258: approverDisplayNamesOut out nocopy ame_util.longStringList,

8254: end getRuleIndexes;
8255: procedure getRuntimeGroupMembers(groupIdIn in integer,
8256: approverNamesOut out nocopy ame_util.longStringList,
8257: approverOrderNumbersOut out nocopy ame_util.idList,
8258: approverDisplayNamesOut out nocopy ame_util.longStringList,
8259: origSystemIdsOut out nocopy ame_util.idList,
8260: origSystemsOut out nocopy ame_util.stringList) as
8261: firstNewIndex integer;
8262: tempIndex integer;

Line 8259: origSystemIdsOut out nocopy ame_util.idList,

8255: procedure getRuntimeGroupMembers(groupIdIn in integer,
8256: approverNamesOut out nocopy ame_util.longStringList,
8257: approverOrderNumbersOut out nocopy ame_util.idList,
8258: approverDisplayNamesOut out nocopy ame_util.longStringList,
8259: origSystemIdsOut out nocopy ame_util.idList,
8260: origSystemsOut out nocopy ame_util.stringList) as
8261: firstNewIndex integer;
8262: tempIndex integer;
8263: begin

Line 8260: origSystemsOut out nocopy ame_util.stringList) as

8256: approverNamesOut out nocopy ame_util.longStringList,
8257: approverOrderNumbersOut out nocopy ame_util.idList,
8258: approverDisplayNamesOut out nocopy ame_util.longStringList,
8259: origSystemIdsOut out nocopy ame_util.idList,
8260: origSystemsOut out nocopy ame_util.stringList) as
8261: firstNewIndex integer;
8262: tempIndex integer;
8263: begin
8264: tempIndex := 0; /* pre-increment */

Line 8268: elsif (engGroupUseItemBind(groupIdIn) = ame_util.booleanTrue) then

8264: tempIndex := 0; /* pre-increment */
8265: -- Check if group is defined or has to be re run for every item class/item ID
8266: if(not engGroupUseItemBind.exists(groupIdIn)) then
8267: fetchRuntimeGroup(groupIdIn => groupIdIn);
8268: elsif (engGroupUseItemBind(groupIdIn) = ame_util.booleanTrue) then
8269: fetchRuntimeGroup(groupIdIn => groupIdIn);
8270: end if;
8271: for i in 1 .. engGroupMemberGroupIds.count loop
8272: if(engGroupMemberGroupIds(i) = groupIdIn) then

Line 8293: ame_util.runtimeException(packageNameIn => 'ame_engine',

8289: return;
8290: end if;
8291: exception
8292: when others then
8293: ame_util.runtimeException(packageNameIn => 'ame_engine',
8294: routineNameIn => 'getRuntimeGroupMembers',
8295: exceptionNumberIn => sqlcode,
8296: exceptionStringIn => sqlerrm);
8297: raise;

Line 8299: procedure getSourceTypes(sourceTypesOut out nocopy ame_util.stringList) as

8295: exceptionNumberIn => sqlcode,
8296: exceptionStringIn => sqlerrm);
8297: raise;
8298: end getRuntimeGroupMembers;
8299: procedure getSourceTypes(sourceTypesOut out nocopy ame_util.stringList) as
8300: begin
8301: for i in 1 .. engStSourceTypes.count loop
8302: sourceTypesOut(i) := engStSourceTypes(i);
8303: end loop;

Line 8306: ame_util.runtimeException(packageNameIn => 'ame_engine',

8302: sourceTypesOut(i) := engStSourceTypes(i);
8303: end loop;
8304: exception
8305: when others then
8306: ame_util.runtimeException(packageNameIn => 'ame_engine',
8307: routineNameIn => 'getSourceTypes',
8308: exceptionNumberIn => sqlcode,
8309: exceptionStringIn => sqlerrm);
8310: raise;

Line 8312: procedure getTestTransApplicableRules(ruleItemClassIdsOut out nocopy ame_util.idList,

8308: exceptionNumberIn => sqlcode,
8309: exceptionStringIn => sqlerrm);
8310: raise;
8311: end getSourceTypes;
8312: procedure getTestTransApplicableRules(ruleItemClassIdsOut out nocopy ame_util.idList,
8313: itemClassIdsOut out nocopy ame_util.idList,
8314: itemIdsOut out nocopy ame_util.stringList,
8315: ruleIdsOut out nocopy ame_util.idList,
8316: ruleTypesOut out nocopy ame_util.idList,

Line 8313: itemClassIdsOut out nocopy ame_util.idList,

8309: exceptionStringIn => sqlerrm);
8310: raise;
8311: end getSourceTypes;
8312: procedure getTestTransApplicableRules(ruleItemClassIdsOut out nocopy ame_util.idList,
8313: itemClassIdsOut out nocopy ame_util.idList,
8314: itemIdsOut out nocopy ame_util.stringList,
8315: ruleIdsOut out nocopy ame_util.idList,
8316: ruleTypesOut out nocopy ame_util.idList,
8317: ruleDescriptionsOut out nocopy ame_util.stringList) as

Line 8314: itemIdsOut out nocopy ame_util.stringList,

8310: raise;
8311: end getSourceTypes;
8312: procedure getTestTransApplicableRules(ruleItemClassIdsOut out nocopy ame_util.idList,
8313: itemClassIdsOut out nocopy ame_util.idList,
8314: itemIdsOut out nocopy ame_util.stringList,
8315: ruleIdsOut out nocopy ame_util.idList,
8316: ruleTypesOut out nocopy ame_util.idList,
8317: ruleDescriptionsOut out nocopy ame_util.stringList) as
8318: headerItemClassId integer;

Line 8315: ruleIdsOut out nocopy ame_util.idList,

8311: end getSourceTypes;
8312: procedure getTestTransApplicableRules(ruleItemClassIdsOut out nocopy ame_util.idList,
8313: itemClassIdsOut out nocopy ame_util.idList,
8314: itemIdsOut out nocopy ame_util.stringList,
8315: ruleIdsOut out nocopy ame_util.idList,
8316: ruleTypesOut out nocopy ame_util.idList,
8317: ruleDescriptionsOut out nocopy ame_util.stringList) as
8318: headerItemClassId integer;
8319: switchRows boolean;

Line 8316: ruleTypesOut out nocopy ame_util.idList,

8312: procedure getTestTransApplicableRules(ruleItemClassIdsOut out nocopy ame_util.idList,
8313: itemClassIdsOut out nocopy ame_util.idList,
8314: itemIdsOut out nocopy ame_util.stringList,
8315: ruleIdsOut out nocopy ame_util.idList,
8316: ruleTypesOut out nocopy ame_util.idList,
8317: ruleDescriptionsOut out nocopy ame_util.stringList) as
8318: headerItemClassId integer;
8319: switchRows boolean;
8320: tempIndex integer;

Line 8317: ruleDescriptionsOut out nocopy ame_util.stringList) as

8313: itemClassIdsOut out nocopy ame_util.idList,
8314: itemIdsOut out nocopy ame_util.stringList,
8315: ruleIdsOut out nocopy ame_util.idList,
8316: ruleTypesOut out nocopy ame_util.idList,
8317: ruleDescriptionsOut out nocopy ame_util.stringList) as
8318: headerItemClassId integer;
8319: switchRows boolean;
8320: tempIndex integer;
8321: tempItemClassId integer;

Line 8322: tempItemId ame_util.stringType;

8318: headerItemClassId integer;
8319: switchRows boolean;
8320: tempIndex integer;
8321: tempItemClassId integer;
8322: tempItemId ame_util.stringType;
8323: tempRuleDescription ame_util.stringType;
8324: tempRuleId integer;
8325: tempRuleItemClassId integer;
8326: tempRuleNotFound boolean;

Line 8323: tempRuleDescription ame_util.stringType;

8319: switchRows boolean;
8320: tempIndex integer;
8321: tempItemClassId integer;
8322: tempItemId ame_util.stringType;
8323: tempRuleDescription ame_util.stringType;
8324: tempRuleId integer;
8325: tempRuleItemClassId integer;
8326: tempRuleNotFound boolean;
8327: tempRuleType integer;

Line 8329: headerItemClassId := ame_admin_pkg.getItemClassIdByName(itemClassNameIn => ame_util.headerItemClassName);

8325: tempRuleItemClassId integer;
8326: tempRuleNotFound boolean;
8327: tempRuleType integer;
8328: begin
8329: headerItemClassId := ame_admin_pkg.getItemClassIdByName(itemClassNameIn => ame_util.headerItemClassName);
8330: /* First populate the output lists, eliminating duplicate rules. */
8331: tempIndex := 0; /* pre-increment */
8332: for i in 1 .. engAppRuleIds.count loop
8333: tempRuleNotFound := true;

Line 8443: ame_util.runtimeException(packageNameIn => 'ame_engine',

8439: end loop;
8440: end loop;
8441: exception
8442: when others then
8443: ame_util.runtimeException(packageNameIn => 'ame_engine',
8444: routineNameIn => 'getTestTransApplicableRules',
8445: exceptionNumberIn => sqlcode,
8446: exceptionStringIn => sqlerrm);
8447: raise;

Line 8453: approversOut out nocopy ame_util.approversTable2,

8449: procedure getTestTransApprovers(isTestTransactionIn in boolean,
8450: transactionIdIn in varchar2,
8451: ameApplicationIdIn in integer,
8452: approverListStageIn in integer,
8453: approversOut out nocopy ame_util.approversTable2,
8454: productionIndexesOut out nocopy ame_util.idList,
8455: variableNamesOut out nocopy ame_util.stringList,
8456: variableValuesOut out nocopy ame_util.stringList) as
8457: tempCount integer;

Line 8454: productionIndexesOut out nocopy ame_util.idList,

8450: transactionIdIn in varchar2,
8451: ameApplicationIdIn in integer,
8452: approverListStageIn in integer,
8453: approversOut out nocopy ame_util.approversTable2,
8454: productionIndexesOut out nocopy ame_util.idList,
8455: variableNamesOut out nocopy ame_util.stringList,
8456: variableValuesOut out nocopy ame_util.stringList) as
8457: tempCount integer;
8458: begin

Line 8455: variableNamesOut out nocopy ame_util.stringList,

8451: ameApplicationIdIn in integer,
8452: approverListStageIn in integer,
8453: approversOut out nocopy ame_util.approversTable2,
8454: productionIndexesOut out nocopy ame_util.idList,
8455: variableNamesOut out nocopy ame_util.stringList,
8456: variableValuesOut out nocopy ame_util.stringList) as
8457: tempCount integer;
8458: begin
8459: if(not isTestTransactionIn) then

Line 8456: variableValuesOut out nocopy ame_util.stringList) as

8452: approverListStageIn in integer,
8453: approversOut out nocopy ame_util.approversTable2,
8454: productionIndexesOut out nocopy ame_util.idList,
8455: variableNamesOut out nocopy ame_util.stringList,
8456: variableValuesOut out nocopy ame_util.stringList) as
8457: tempCount integer;
8458: begin
8459: if(not isTestTransactionIn) then
8460: /*

Line 8549: ame_util.runtimeException(packageNameIn => 'ame_engine',

8545: getVariableValues(variableValuesOut => variableValuesOut);
8546: exception
8547: when others then
8548: rollback;
8549: ame_util.runtimeException(packageNameIn => 'ame_engine',
8550: routineNameIn => 'getTestTransApprovers',
8551: exceptionNumberIn => sqlcode,
8552: exceptionStringIn => sqlerrm);
8553: raise;

Line 8555: procedure getTransVariableNames(transVariableNamesOut out nocopy ame_util.stringList) as

8551: exceptionNumberIn => sqlcode,
8552: exceptionStringIn => sqlerrm);
8553: raise;
8554: end getTestTransApprovers;
8555: procedure getTransVariableNames(transVariableNamesOut out nocopy ame_util.stringList) as
8556: tempIndex integer;
8557: begin
8558: tempIndex := 1;
8559: for i in 1 .. engStProductionsTable.count loop

Line 8560: if engStProductionsTable(i).item_class = ame_util.headerItemClassName and

8556: tempIndex integer;
8557: begin
8558: tempIndex := 1;
8559: for i in 1 .. engStProductionsTable.count loop
8560: if engStProductionsTable(i).item_class = ame_util.headerItemClassName and
8561: engStProductionsTable(i).item_id = engTransactionId then
8562: transVariableNamesOut(tempIndex) := engStProductionsTable(i).variable_name;
8563: tempIndex := tempIndex + 1;
8564: end if;

Line 8568: ame_util.runtimeException(packageNameIn => 'ame_engine',

8564: end if;
8565: end loop;
8566: exception
8567: when others then
8568: ame_util.runtimeException(packageNameIn => 'ame_engine',
8569: routineNameIn => 'getTransVariableNames',
8570: exceptionNumberIn => sqlcode,
8571: exceptionStringIn => sqlerrm);
8572: raise;

Line 8574: procedure getTransVariableValues(transVariableValuesOut out nocopy ame_util.stringList) as

8570: exceptionNumberIn => sqlcode,
8571: exceptionStringIn => sqlerrm);
8572: raise;
8573: end getTransVariableNames;
8574: procedure getTransVariableValues(transVariableValuesOut out nocopy ame_util.stringList) as
8575: tempIndex integer;
8576: begin
8577: tempIndex := 1;
8578: for i in 1 .. engStProductionsTable.count loop

Line 8579: if engStProductionsTable(i).item_class = ame_util.headerItemClassName and

8575: tempIndex integer;
8576: begin
8577: tempIndex := 1;
8578: for i in 1 .. engStProductionsTable.count loop
8579: if engStProductionsTable(i).item_class = ame_util.headerItemClassName and
8580: engStProductionsTable(i).item_id = engTransactionId then
8581: transVariableValuesOut(tempIndex) := engStProductionsTable(i).variable_value;
8582: tempIndex := tempIndex + 1;
8583: end if;

Line 8587: ame_util.runtimeException(packageNameIn => 'ame_engine',

8583: end if;
8584: end loop;
8585: exception
8586: when others then
8587: ame_util.runtimeException(packageNameIn => 'ame_engine',
8588: routineNameIn => 'getTransVariableValues',
8589: exceptionNumberIn => sqlcode,
8590: exceptionStringIn => sqlerrm);
8591: raise;

Line 8593: procedure getVariableNames(variableNamesOut out nocopy ame_util.stringList) as

8589: exceptionNumberIn => sqlcode,
8590: exceptionStringIn => sqlerrm);
8591: raise;
8592: end getTransVariableValues;
8593: procedure getVariableNames(variableNamesOut out nocopy ame_util.stringList) as
8594: begin
8595: for i in 1 .. engStVariableNames.count loop
8596: variableNamesOut(i) := engStVariableNames(i);
8597: end loop;

Line 8600: ame_util.runtimeException(packageNameIn => 'ame_engine',

8596: variableNamesOut(i) := engStVariableNames(i);
8597: end loop;
8598: exception
8599: when others then
8600: ame_util.runtimeException(packageNameIn => 'ame_engine',
8601: routineNameIn => 'getVariableNames',
8602: exceptionNumberIn => sqlcode,
8603: exceptionStringIn => sqlerrm);
8604: raise;

Line 8606: procedure getVariableValues(variableValuesOut out nocopy ame_util.stringList) as

8602: exceptionNumberIn => sqlcode,
8603: exceptionStringIn => sqlerrm);
8604: raise;
8605: end getVariableNames;
8606: procedure getVariableValues(variableValuesOut out nocopy ame_util.stringList) as
8607: begin
8608: for i in 1 .. engStVariableValues.count loop
8609: variableValuesOut(i) := engStVariableValues(i);
8610: end loop;

Line 8613: ame_util.runtimeException(packageNameIn => 'ame_engine',

8609: variableValuesOut(i) := engStVariableValues(i);
8610: end loop;
8611: exception
8612: when others then
8613: ame_util.runtimeException(packageNameIn => 'ame_engine',
8614: routineNameIn => 'getVariableValues',
8615: exceptionNumberIn => sqlcode,
8616: exceptionStringIn => sqlerrm);
8617: raise;

Line 8654: ame_util.runtimeException(packageNameIn => 'ame_engine',

8650: fndApplicationIdIn => null,
8651: transactionTypeIdIn => transactionTypeIdIn);
8652: exception
8653: when others then
8654: ame_util.runtimeException(packageNameIn => 'ame_engine',
8655: routineNameIn => 'initializePlsqlContext',
8656: exceptionNumberIn => sqlcode,
8657: exceptionStringIn => sqlerrm);
8658: raise;

Line 8671: ame_util.runtimeException(packageNameIn => 'ame_engine',

8667: return;
8668: end if;
8669: exception
8670: when others then
8671: ame_util.runtimeException(packageNameIn => 'ame_engine',
8672: routineNameIn => 'updateDeviationList',
8673: exceptionNumberIn => sqlcode,
8674: exceptionStringIn => sqlerrm);
8675: end updateDeviationList;

Line 8677: approverIn in ame_util.approverRecord2,

8673: exceptionNumberIn => sqlcode,
8674: exceptionStringIn => sqlerrm);
8675: end updateDeviationList;
8676: procedure insertApprover(indexIn in integer,
8677: approverIn in ame_util.approverRecord2,
8678: adjustMemberOrderNumbersIn in boolean default false,
8679: approverLocationIn in boolean default ame_util.lastAmongEquals,
8680: inserteeIndexIn in number default null,
8681: currentInsIndex in integer default null) as

Line 8679: approverLocationIn in boolean default ame_util.lastAmongEquals,

8675: end updateDeviationList;
8676: procedure insertApprover(indexIn in integer,
8677: approverIn in ame_util.approverRecord2,
8678: adjustMemberOrderNumbersIn in boolean default false,
8679: approverLocationIn in boolean default ame_util.lastAmongEquals,
8680: inserteeIndexIn in number default null,
8681: currentInsIndex in integer default null) as
8682: engStApproversCount integer;
8683: errorCode integer;

Line 8684: errorMessage ame_util.longestStringType;

8680: inserteeIndexIn in number default null,
8681: currentInsIndex in integer default null) as
8682: engStApproversCount integer;
8683: errorCode integer;
8684: errorMessage ame_util.longestStringType;
8685: indexException exception;
8686: lastIndex integer;
8687: nextIndex integer;
8688: nextIndexInChain boolean;

Line 8710: for ame_util.copyApproverRecord2 to work in the loop below.

8706: end if;
8707: /* Move any existing approvers at and above the target index. */
8708: /*
8709: It's necessary to initialize a new record at the end of engStApprovers,
8710: for ame_util.copyApproverRecord2 to work in the loop below.
8711: */
8712: engStApprovers(engStApproversCount + 1) := ame_util.emptyApproverRecord2;
8713: for i in reverse indexIn .. engStApproversCount loop
8714: ame_util.copyApproverRecord2(approverRecord2In => engStApprovers(i),

Line 8712: engStApprovers(engStApproversCount + 1) := ame_util.emptyApproverRecord2;

8708: /*
8709: It's necessary to initialize a new record at the end of engStApprovers,
8710: for ame_util.copyApproverRecord2 to work in the loop below.
8711: */
8712: engStApprovers(engStApproversCount + 1) := ame_util.emptyApproverRecord2;
8713: for i in reverse indexIn .. engStApproversCount loop
8714: ame_util.copyApproverRecord2(approverRecord2In => engStApprovers(i),
8715: approverRecord2Out => engStApprovers(i + 1));
8716: for j in 1..engInsApproverIndex.count loop

Line 8714: ame_util.copyApproverRecord2(approverRecord2In => engStApprovers(i),

8710: for ame_util.copyApproverRecord2 to work in the loop below.
8711: */
8712: engStApprovers(engStApproversCount + 1) := ame_util.emptyApproverRecord2;
8713: for i in reverse indexIn .. engStApproversCount loop
8714: ame_util.copyApproverRecord2(approverRecord2In => engStApprovers(i),
8715: approverRecord2Out => engStApprovers(i + 1));
8716: for j in 1..engInsApproverIndex.count loop
8717: if engInsApproverIndex(j) = i then
8718: engInsApproverIndex(j) := null;

Line 8724: ame_util.copyApproverRecord2(approverRecord2In => approverIn,

8720: end if;
8721: end loop;
8722: end loop;
8723: /* Copy the input approver to the target index. */
8724: ame_util.copyApproverRecord2(approverRecord2In => approverIn,
8725: approverRecord2Out => engStApprovers(indexIn));
8726: /*
8727: If the status is not available in ame_temp_insertions get it from
8728: ame_temp_old_approver_lists

Line 8773: (ame_util.approveAndForwardStatus, ame_util.forwardStatus)) then

8769: end loop;
8770: end if;
8771: else
8772: if(engStApprovers(previousIndex).approval_status in
8773: (ame_util.approveAndForwardStatus, ame_util.forwardStatus)) then
8774: if(engActionTypeNames(engStApprovers(previousIndex).action_type_id) in
8775: (ame_util.groupChainApprovalTypeName
8776: ,ame_util.preApprovalTypeName
8777: ,ame_util.postApprovalTypeName )) then

Line 8775: (ame_util.groupChainApprovalTypeName

8771: else
8772: if(engStApprovers(previousIndex).approval_status in
8773: (ame_util.approveAndForwardStatus, ame_util.forwardStatus)) then
8774: if(engActionTypeNames(engStApprovers(previousIndex).action_type_id) in
8775: (ame_util.groupChainApprovalTypeName
8776: ,ame_util.preApprovalTypeName
8777: ,ame_util.postApprovalTypeName )) then
8778: select voting_regime
8779: into tempVotingRegime

Line 8776: ,ame_util.preApprovalTypeName

8772: if(engStApprovers(previousIndex).approval_status in
8773: (ame_util.approveAndForwardStatus, ame_util.forwardStatus)) then
8774: if(engActionTypeNames(engStApprovers(previousIndex).action_type_id) in
8775: (ame_util.groupChainApprovalTypeName
8776: ,ame_util.preApprovalTypeName
8777: ,ame_util.postApprovalTypeName )) then
8778: select voting_regime
8779: into tempVotingRegime
8780: from ame_approval_group_config

Line 8777: ,ame_util.postApprovalTypeName )) then

8773: (ame_util.approveAndForwardStatus, ame_util.forwardStatus)) then
8774: if(engActionTypeNames(engStApprovers(previousIndex).action_type_id) in
8775: (ame_util.groupChainApprovalTypeName
8776: ,ame_util.preApprovalTypeName
8777: ,ame_util.postApprovalTypeName )) then
8778: select voting_regime
8779: into tempVotingRegime
8780: from ame_approval_group_config
8781: where approval_group_id = engStApprovers(previousIndex).group_or_chain_id

Line 8784: if(tempVotingRegime not in (ame_util.serializedVoting

8780: from ame_approval_group_config
8781: where approval_group_id = engStApprovers(previousIndex).group_or_chain_id
8782: and application_id = engAmeApplicationId
8783: and sysdate between start_date and nvl(end_Date - (1/86400), sysdate);
8784: if(tempVotingRegime not in (ame_util.serializedVoting
8785: ,ame_util.orderNumberVoting)) then
8786: engStApprovers(indexIn).member_order_number := 1;
8787: else
8788: engStApprovers(indexIn).member_order_number := engStApprovers(previousIndex).member_order_number + 1;

Line 8785: ,ame_util.orderNumberVoting)) then

8781: where approval_group_id = engStApprovers(previousIndex).group_or_chain_id
8782: and application_id = engAmeApplicationId
8783: and sysdate between start_date and nvl(end_Date - (1/86400), sysdate);
8784: if(tempVotingRegime not in (ame_util.serializedVoting
8785: ,ame_util.orderNumberVoting)) then
8786: engStApprovers(indexIn).member_order_number := 1;
8787: else
8788: engStApprovers(indexIn).member_order_number := engStApprovers(previousIndex).member_order_number + 1;
8789: end if;

Line 8792: ame_util.serializedVoting) then

8788: engStApprovers(indexIn).member_order_number := engStApprovers(previousIndex).member_order_number + 1;
8789: end if;
8790: else
8791: if(engActionTypeVotingRegimes(engStApprovers(previousIndex).action_type_id) <>
8792: ame_util.serializedVoting) then
8793: engStApprovers(indexIn).member_order_number := 1;
8794: else
8795: engStApprovers(indexIn).member_order_number := engStApprovers(previousIndex).member_order_number + 1;
8796: end if;

Line 8820: ,approverLocationIn => ame_util.lastAmongEquals);

8816: end if;
8817: addApproverToTree
8818: (approverRecordIn => engStApprovers(indexIn)
8819: ,approverIndexIn => indexIn
8820: ,approverLocationIn => ame_util.lastAmongEquals);
8821: if currentInsIndex is not null then
8822: engInsApproverIndex(currentInsIndex) := indexIn;
8823: end if;
8824: else

Line 8863: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

8859: end if;
8860: exception
8861: when indexException then
8862: errorCode := -20001;
8863: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
8864: messageNameIn => 'AME_400686_ENG_IDX_OUT_OF_BOU');
8865: ame_util.runtimeException(packageNameIn => 'ame_engine',
8866: routineNameIn => 'insertApprover',
8867: exceptionNumberIn => errorCode,

Line 8865: ame_util.runtimeException(packageNameIn => 'ame_engine',

8861: when indexException then
8862: errorCode := -20001;
8863: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
8864: messageNameIn => 'AME_400686_ENG_IDX_OUT_OF_BOU');
8865: ame_util.runtimeException(packageNameIn => 'ame_engine',
8866: routineNameIn => 'insertApprover',
8867: exceptionNumberIn => errorCode,
8868: exceptionStringIn => errorMessage);
8869: raise_application_error(errorCode,

Line 8872: ame_util.runtimeException(packageNameIn => 'ame_engine',

8868: exceptionStringIn => errorMessage);
8869: raise_application_error(errorCode,
8870: errorMessage);
8871: when others then
8872: ame_util.runtimeException(packageNameIn => 'ame_engine',
8873: routineNameIn => 'insertApprover',
8874: exceptionNumberIn => sqlcode,
8875: exceptionStringIn => sqlerrm);
8876: raise;

Line 8879: approversIn in ame_util.approversTable2) as

8875: exceptionStringIn => sqlerrm);
8876: raise;
8877: end insertApprover;
8878: procedure insertApprovers(firstIndexIn in integer,
8879: approversIn in ame_util.approversTable2) as
8880: approversInCount integer;
8881: engStApproversCount integer;
8882: errorCode integer;
8883: errorMessage ame_util.longestStringType;

Line 8883: errorMessage ame_util.longestStringType;

8879: approversIn in ame_util.approversTable2) as
8880: approversInCount integer;
8881: engStApproversCount integer;
8882: errorCode integer;
8883: errorMessage ame_util.longestStringType;
8884: indexException exception;
8885: lastIndex integer;
8886: newTreeNode ame_util.approverTreeRecord;
8887: newTreeNodeIndex integer;

Line 8886: newTreeNode ame_util.approverTreeRecord;

8882: errorCode integer;
8883: errorMessage ame_util.longestStringType;
8884: indexException exception;
8885: lastIndex integer;
8886: newTreeNode ame_util.approverTreeRecord;
8887: newTreeNodeIndex integer;
8888: siblingTreeNodeIndex integer;
8889: tempIndex integer;
8890: loopIndex integer;

Line 8904: ame_util.copyApproverRecord2(approverRecord2In => engStApprovers(i),

8900: /* asynchronous parallel approver functionality */
8901: lastIndex := engStApproversCount;
8902: /* Move any existing approvers at and above firstIndexIn. */
8903: for i in reverse firstIndexIn .. lastIndex loop
8904: ame_util.copyApproverRecord2(approverRecord2In => engStApprovers(i),
8905: approverRecord2Out => engStApprovers(i + approversInCount));
8906: end loop;
8907: /* Copy the input approvers to the target indexes. */
8908: tempIndex := firstIndexIn; /* post-increment */

Line 8910: ame_util.copyApproverRecord2(approverRecord2In => approversIn(i),

8906: end loop;
8907: /* Copy the input approvers to the target indexes. */
8908: tempIndex := firstIndexIn; /* post-increment */
8909: for i in 1 .. approversInCount loop
8910: ame_util.copyApproverRecord2(approverRecord2In => approversIn(i),
8911: approverRecord2Out => engStApprovers(tempIndex));
8912: tempIndex := tempIndex + 1;
8913: end loop;
8914: /* Insert the new approvers to the tree */

Line 8927: newTreeNode.child_index := ame_util.noChildIndex;

8923: siblingTreeNodeIndex := engStApproversTree(loopIndex).sibling_index;
8924: for j in reverse 1 .. approversIn.count loop
8925: newTreeNode.parent_index := engStApproversTree(loopIndex).parent_index;
8926: newTreeNode.sibling_index := siblingTreeNodeIndex;
8927: newTreeNode.child_index := ame_util.noChildIndex;
8928: newTreeNode.order_number := approversIn(j).member_order_number;
8929: newTreeNode.approver_index := engStApproversTree(loopIndex).approver_index + j ;
8930: newTreeNode.tree_level_id := approversIn(j).name;
8931: newTreeNode.is_suspended := ame_util.booleanFalse;

Line 8931: newTreeNode.is_suspended := ame_util.booleanFalse;

8927: newTreeNode.child_index := ame_util.noChildIndex;
8928: newTreeNode.order_number := approversIn(j).member_order_number;
8929: newTreeNode.approver_index := engStApproversTree(loopIndex).approver_index + j ;
8930: newTreeNode.tree_level_id := approversIn(j).name;
8931: newTreeNode.is_suspended := ame_util.booleanFalse;
8932: newTreeNode.tree_level := 6;
8933: newTreeNodeIndex := engStApproversTree.last + 1;
8934: engStApproversTree(newTreeNodeIndex) := newTreeNode;
8935: siblingTreeNodeIndex := newTreeNodeIndex;

Line 8946: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

8942: end if;
8943: exception
8944: when indexException then
8945: errorCode := -20001;
8946: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
8947: messageNameIn => 'AME_400687_ENG_FIDX_OUT_OF_BOU');
8948: ame_util.runtimeException(packageNameIn => 'ame_engine',
8949: routineNameIn => 'insertApprovers',
8950: exceptionNumberIn => errorCode,

Line 8948: ame_util.runtimeException(packageNameIn => 'ame_engine',

8944: when indexException then
8945: errorCode := -20001;
8946: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
8947: messageNameIn => 'AME_400687_ENG_FIDX_OUT_OF_BOU');
8948: ame_util.runtimeException(packageNameIn => 'ame_engine',
8949: routineNameIn => 'insertApprovers',
8950: exceptionNumberIn => errorCode,
8951: exceptionStringIn => errorMessage);
8952: raise_application_error(errorCode,

Line 8955: ame_util.runtimeException(packageNameIn => 'ame_engine',

8951: exceptionStringIn => errorMessage);
8952: raise_application_error(errorCode,
8953: errorMessage);
8954: when others then
8955: ame_util.runtimeException(packageNameIn => 'ame_engine',
8956: routineNameIn => 'insertApprovers',
8957: exceptionNumberIn => sqlcode,
8958: exceptionStringIn => sqlerrm);
8959: raise;

Line 8991: approvers ame_util.approversTable2;

8987: tempOccurrence ame_trans_approval_history.occurrence%type;
8988: tempApiInsertion ame_trans_approval_history.api_insertion%type;
8989: tempMemberOrderNumber ame_trans_approval_history.member_order_number%type;
8990: tempName ame_trans_approval_history.name%type;
8991: approvers ame_util.approversTable2;
8992: begin
8993: tempName := nameIn;
8994: if historyTypeIn = 'BEATBYFIRSTRESPONDER' then
8995: ame_engine.getApprovers(approversOut => approvers);

Line 9002: and approvers(i).approver_category = ame_util.approvalApproverCategory

8998: and approvers(i).item_class = itemClassIn
8999: and approvers(i).item_id = itemIdIn
9000: and approvers(i).action_type_id = actionTypeIdIn
9001: and approvers(i).group_or_chain_id = grpOrChainIdIn
9002: and approvers(i).approver_category = ame_util.approvalApproverCategory
9003: and approvers(i).approval_status = ame_util.notifiedStatus
9004: then
9005: select ame_trans_approval_history_s.nextval
9006: into tempTransHistoryId

Line 9003: and approvers(i).approval_status = ame_util.notifiedStatus

8999: and approvers(i).item_id = itemIdIn
9000: and approvers(i).action_type_id = actionTypeIdIn
9001: and approvers(i).group_or_chain_id = grpOrChainIdIn
9002: and approvers(i).approver_category = ame_util.approvalApproverCategory
9003: and approvers(i).approval_status = ame_util.notifiedStatus
9004: then
9005: select ame_trans_approval_history_s.nextval
9006: into tempTransHistoryId
9007: from dual;

Line 9039: ,ame_util.beatByFirstResponderStatus

9035: ,approvers(i).item_class
9036: ,approvers(i).item_id
9037: ,approvers(i).action_type_id
9038: ,approvers(i).authority
9039: ,ame_util.beatByFirstResponderStatus
9040: ,approvers(i).group_or_chain_id
9041: ,approvers(i).occurrence
9042: ,approvers(i).api_insertion
9043: ,approvers(i).member_order_number

Line 9150: tempActionTypeId := ame_util.nullHistoryActionTypeId;

9146: tempItemClass := '$AME_INVALID_ITEM_CLASS$';
9147: tempItemId := '$AME_INVALID_ITEM$';
9148: tempOrderNumber := 0;
9149: tempAuthority := 'Y';
9150: tempActionTypeId := ame_util.nullHistoryActionTypeId;
9151: tempGroupOrChainId := ame_util.nullHistoryGroupOrChainId;
9152: tempOccurrence := ame_util.nullHistoryOccurrence;
9153: tempApiInsertion := null;
9154: tempMemberOrderNumber := null;

Line 9151: tempGroupOrChainId := ame_util.nullHistoryGroupOrChainId;

9147: tempItemId := '$AME_INVALID_ITEM$';
9148: tempOrderNumber := 0;
9149: tempAuthority := 'Y';
9150: tempActionTypeId := ame_util.nullHistoryActionTypeId;
9151: tempGroupOrChainId := ame_util.nullHistoryGroupOrChainId;
9152: tempOccurrence := ame_util.nullHistoryOccurrence;
9153: tempApiInsertion := null;
9154: tempMemberOrderNumber := null;
9155: end;

Line 9152: tempOccurrence := ame_util.nullHistoryOccurrence;

9148: tempOrderNumber := 0;
9149: tempAuthority := 'Y';
9150: tempActionTypeId := ame_util.nullHistoryActionTypeId;
9151: tempGroupOrChainId := ame_util.nullHistoryGroupOrChainId;
9152: tempOccurrence := ame_util.nullHistoryOccurrence;
9153: tempApiInsertion := null;
9154: tempMemberOrderNumber := null;
9155: end;
9156: if orderNumberIn is not null then

Line 9227: ame_util.runtimeException(packageNameIn => 'ame_engine',

9223: );
9224: end if;
9225: exception
9226: when others then
9227: ame_util.runtimeException(packageNameIn => 'ame_engine',
9228: routineNameIn => 'insertIntoTransApprovalHistory',
9229: exceptionNumberIn => sqlcode,
9230: exceptionStringIn => sqlerrm);
9231:

Line 9271: ame_util.runtimeException(packageNameIn => 'ame_engine',

9267: sysdate);
9268: engTransactionIsLocked := true;
9269: exception
9270: when others then
9271: ame_util.runtimeException(packageNameIn => 'ame_engine',
9272: routineNameIn => 'lockTransaction',
9273: exceptionNumberIn => sqlcode,
9274: exceptionStringIn => sqlerrm);
9275: raise;

Line 9304: ame_util.runtimeException(packageNameIn => 'ame_engine',

9300: tempTransSeqId); /* Don't use engEffectiveRuleDate here. */
9301: end if;
9302: exception
9303: when others then
9304: ame_util.runtimeException(packageNameIn => 'ame_engine',
9305: routineNameIn => 'logTransaction',
9306: exceptionNumberIn => sqlcode,
9307: exceptionStringIn => sqlerrm);
9308: raise;

Line 9311: fieldsOut out nocopy ame_util.longStringList) as

9307: exceptionStringIn => sqlerrm);
9308: raise;
9309: end logTransaction;
9310: procedure parseFields(stringIn in varchar2,
9311: fieldsOut out nocopy ame_util.longStringList) as
9312: fieldEnd integer;
9313: fieldIndex integer;
9314: fieldStart integer;
9315: stringLength integer;

Line 9321: fieldEnd := instrb(stringIn, ame_util.fieldDelimiter, fieldStart, 1);

9317: stringLength := lengthb(stringIn);
9318: fieldStart := 1;
9319: fieldIndex := 1; /* post-increment */
9320: loop
9321: fieldEnd := instrb(stringIn, ame_util.fieldDelimiter, fieldStart, 1);
9322: if(fieldEnd = 0) then
9323: fieldsOut(fieldIndex) := substrb(stringIn, fieldStart);
9324: exit;
9325: end if;

Line 9332: ame_util.runtimeException(packageNameIn => 'ame_engine',

9328: fieldStart := fieldEnd + 1;
9329: end loop;
9330: exception
9331: when others then
9332: ame_util.runtimeException(packageNameIn => 'ame_engine',
9333: routineNameIn => 'parseFields',
9334: exceptionNumberIn => sqlcode,
9335: exceptionStringIn => sqlerrm);
9336: raise;

Line 9354: ame_util.runtimeException(packageNameIn => 'ame_engine',

9350: startPosition := startPosition + valueLength + 1;
9351: end loop;
9352: exception
9353: when others then
9354: ame_util.runtimeException(packageNameIn => 'ame_engine',
9355: routineNameIn => 'parseForwardingBehaviors',
9356: exceptionNumberIn => sqlcode,
9357: exceptionStringIn => sqlerrm);
9358: raise;

Line 9361: currentValue ame_util.stringType;

9357: exceptionStringIn => sqlerrm);
9358: raise;
9359: end parseForwardingBehaviors;
9360: procedure parsePriorityModes(priorityModesIn in varchar2) as
9361: currentValue ame_util.stringType;
9362: endPosition integer;
9363: startPosition integer;
9364: underscorePosition integer;
9365: begin

Line 9380: engPriorityModes(i - 1) := ame_util.disabledRulePriority;

9376: end if;
9377: currentValue := substrb(priorityModesIn, startPosition, endPosition - startPosition + 1);
9378: underscorePosition := instrb(currentValue, '_', 1, 1);
9379: if(underscorePosition = 0) then
9380: engPriorityModes(i - 1) := ame_util.disabledRulePriority;
9381: engPriorityThresholds(i - 1) := null;
9382: else
9383: engPriorityThresholds(i - 1) := to_number(substrb(currentValue, underscorePosition + 1));
9384: if(instrb(currentValue, ame_util.absoluteRulePriority, 1, 1) > 0) then

Line 9384: if(instrb(currentValue, ame_util.absoluteRulePriority, 1, 1) > 0) then

9380: engPriorityModes(i - 1) := ame_util.disabledRulePriority;
9381: engPriorityThresholds(i - 1) := null;
9382: else
9383: engPriorityThresholds(i - 1) := to_number(substrb(currentValue, underscorePosition + 1));
9384: if(instrb(currentValue, ame_util.absoluteRulePriority, 1, 1) > 0) then
9385: engPriorityModes(i - 1) := ame_util.absoluteRulePriority;
9386: else
9387: engPriorityModes(i - 1) := ame_util.relativeRulePriority;
9388: end if;

Line 9385: engPriorityModes(i - 1) := ame_util.absoluteRulePriority;

9381: engPriorityThresholds(i - 1) := null;
9382: else
9383: engPriorityThresholds(i - 1) := to_number(substrb(currentValue, underscorePosition + 1));
9384: if(instrb(currentValue, ame_util.absoluteRulePriority, 1, 1) > 0) then
9385: engPriorityModes(i - 1) := ame_util.absoluteRulePriority;
9386: else
9387: engPriorityModes(i - 1) := ame_util.relativeRulePriority;
9388: end if;
9389: end if;

Line 9387: engPriorityModes(i - 1) := ame_util.relativeRulePriority;

9383: engPriorityThresholds(i - 1) := to_number(substrb(currentValue, underscorePosition + 1));
9384: if(instrb(currentValue, ame_util.absoluteRulePriority, 1, 1) > 0) then
9385: engPriorityModes(i - 1) := ame_util.absoluteRulePriority;
9386: else
9387: engPriorityModes(i - 1) := ame_util.relativeRulePriority;
9388: end if;
9389: end if;
9390: startPosition := endPosition + 2;
9391: end loop;

Line 9394: ame_util.runtimeException(packageNameIn => 'ame_engine',

9390: startPosition := endPosition + 2;
9391: end loop;
9392: exception
9393: when others then
9394: ame_util.runtimeException(packageNameIn => 'ame_engine',
9395: routineNameIn => 'parsePriorityModes',
9396: exceptionNumberIn => sqlcode,
9397: exceptionStringIn => sqlerrm);
9398: raise;

Line 9402: itemIds ame_util.stringList;

9398: raise;
9399: end parsePriorityModes;
9400: procedure populateEngStVariables as
9401: headerItemRejected boolean;
9402: itemIds ame_util.stringList;
9403: itemClasses ame_util.stringList;
9404: tempItemClass ame_util.stringType;
9405: tempItemId ame_util.stringType;
9406: tempItemIndex integer;

Line 9403: itemClasses ame_util.stringList;

9399: end parsePriorityModes;
9400: procedure populateEngStVariables as
9401: headerItemRejected boolean;
9402: itemIds ame_util.stringList;
9403: itemClasses ame_util.stringList;
9404: tempItemClass ame_util.stringType;
9405: tempItemId ame_util.stringType;
9406: tempItemIndex integer;
9407: tempPseudoBoolean ame_util.charType;

Line 9404: tempItemClass ame_util.stringType;

9400: procedure populateEngStVariables as
9401: headerItemRejected boolean;
9402: itemIds ame_util.stringList;
9403: itemClasses ame_util.stringList;
9404: tempItemClass ame_util.stringType;
9405: tempItemId ame_util.stringType;
9406: tempItemIndex integer;
9407: tempPseudoBoolean ame_util.charType;
9408: stoppingRule ame_util.stringType;

Line 9405: tempItemId ame_util.stringType;

9401: headerItemRejected boolean;
9402: itemIds ame_util.stringList;
9403: itemClasses ame_util.stringList;
9404: tempItemClass ame_util.stringType;
9405: tempItemId ame_util.stringType;
9406: tempItemIndex integer;
9407: tempPseudoBoolean ame_util.charType;
9408: stoppingRule ame_util.stringType;
9409: itemRejected boolean;

Line 9407: tempPseudoBoolean ame_util.charType;

9403: itemClasses ame_util.stringList;
9404: tempItemClass ame_util.stringType;
9405: tempItemId ame_util.stringType;
9406: tempItemIndex integer;
9407: tempPseudoBoolean ame_util.charType;
9408: stoppingRule ame_util.stringType;
9409: itemRejected boolean;
9410: tempCount integer;
9411: begin

Line 9408: stoppingRule ame_util.stringType;

9404: tempItemClass ame_util.stringType;
9405: tempItemId ame_util.stringType;
9406: tempItemIndex integer;
9407: tempPseudoBoolean ame_util.charType;
9408: stoppingRule ame_util.stringType;
9409: itemRejected boolean;
9410: tempCount integer;
9411: begin
9412: /*

Line 9422: engStApprovalProcessCompleteYN := ame_util2.completeNoApprovers;

9418: calculation of the approval-process-complete values.
9419: */
9420: /* Initialize various values. */
9421: itemRejected := false;
9422: engStApprovalProcessCompleteYN := ame_util2.completeNoApprovers;
9423: for i in 1 .. engItemIds.count loop
9424: engStItemAppProcessCompleteYN(i) := ame_util2.completeNoApprovers;
9425: end loop;
9426: /* Handle the empty-approver-list case first. */

Line 9424: engStItemAppProcessCompleteYN(i) := ame_util2.completeNoApprovers;

9420: /* Initialize various values. */
9421: itemRejected := false;
9422: engStApprovalProcessCompleteYN := ame_util2.completeNoApprovers;
9423: for i in 1 .. engItemIds.count loop
9424: engStItemAppProcessCompleteYN(i) := ame_util2.completeNoApprovers;
9425: end loop;
9426: /* Handle the empty-approver-list case first. */
9427: if(engStApprovers.count = 0) then
9428: return;

Line 9444: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.completeFullyApproved;

9440: tempItemClass := engStApprovers(1).item_class;
9441: for i in 1 .. itemIds.count loop
9442: if(itemIds(i) = tempItemId and itemClasses(i) = tempItemClass) then
9443: tempItemIndex := i;
9444: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.completeFullyApproved;
9445: if engStApprovalProcessCompleteYN = ame_util2.completeNoApprovers then
9446: engStApprovalProcessCompleteYN := ame_util2.completeFullyApproved;
9447: end if;
9448: exit;

Line 9445: if engStApprovalProcessCompleteYN = ame_util2.completeNoApprovers then

9441: for i in 1 .. itemIds.count loop
9442: if(itemIds(i) = tempItemId and itemClasses(i) = tempItemClass) then
9443: tempItemIndex := i;
9444: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.completeFullyApproved;
9445: if engStApprovalProcessCompleteYN = ame_util2.completeNoApprovers then
9446: engStApprovalProcessCompleteYN := ame_util2.completeFullyApproved;
9447: end if;
9448: exit;
9449: end if;

Line 9446: engStApprovalProcessCompleteYN := ame_util2.completeFullyApproved;

9442: if(itemIds(i) = tempItemId and itemClasses(i) = tempItemClass) then
9443: tempItemIndex := i;
9444: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.completeFullyApproved;
9445: if engStApprovalProcessCompleteYN = ame_util2.completeNoApprovers then
9446: engStApprovalProcessCompleteYN := ame_util2.completeFullyApproved;
9447: end if;
9448: exit;
9449: end if;
9450: end loop;

Line 9451: tempPseudoBoolean := ame_util.booleanTrue;

9447: end if;
9448: exit;
9449: end if;
9450: end loop;
9451: tempPseudoBoolean := ame_util.booleanTrue;
9452: /* Loop through the approvers. */
9453: for i in 1 .. engStApprovers.count loop
9454: /* Update the temp variables when the item changes. */
9455: if(engStApprovers(i).item_id <> tempItemId or

Line 9459: tempPseudoBoolean := ame_util.booleanTrue;

9455: if(engStApprovers(i).item_id <> tempItemId or
9456: engStApprovers(i).item_class <> tempItemClass) then
9457: tempItemId := engStApprovers(i).item_id;
9458: tempItemClass := engStApprovers(i).item_class;
9459: tempPseudoBoolean := ame_util.booleanTrue;
9460: for j in (tempItemIndex + 1) .. itemIds.count loop
9461: if(itemIds(j) = tempItemId and itemClasses(j) = tempItemClass) then
9462: tempItemIndex := j;
9463: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.completeFullyApproved;

Line 9463: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.completeFullyApproved;

9459: tempPseudoBoolean := ame_util.booleanTrue;
9460: for j in (tempItemIndex + 1) .. itemIds.count loop
9461: if(itemIds(j) = tempItemId and itemClasses(j) = tempItemClass) then
9462: tempItemIndex := j;
9463: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.completeFullyApproved;
9464: if engStApprovalProcessCompleteYN = ame_util2.completeNoApprovers then
9465: engStApprovalProcessCompleteYN := ame_util2.completeFullyApproved;
9466: end if;
9467: exit;

Line 9464: if engStApprovalProcessCompleteYN = ame_util2.completeNoApprovers then

9460: for j in (tempItemIndex + 1) .. itemIds.count loop
9461: if(itemIds(j) = tempItemId and itemClasses(j) = tempItemClass) then
9462: tempItemIndex := j;
9463: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.completeFullyApproved;
9464: if engStApprovalProcessCompleteYN = ame_util2.completeNoApprovers then
9465: engStApprovalProcessCompleteYN := ame_util2.completeFullyApproved;
9466: end if;
9467: exit;
9468: end if;

Line 9465: engStApprovalProcessCompleteYN := ame_util2.completeFullyApproved;

9461: if(itemIds(j) = tempItemId and itemClasses(j) = tempItemClass) then
9462: tempItemIndex := j;
9463: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.completeFullyApproved;
9464: if engStApprovalProcessCompleteYN = ame_util2.completeNoApprovers then
9465: engStApprovalProcessCompleteYN := ame_util2.completeFullyApproved;
9466: end if;
9467: exit;
9468: end if;
9469: end loop;

Line 9473: if(engStItemAppProcessCompleteYN(tempItemIndex) <> ame_util2.completeFullyRejected and

9469: end loop;
9470: end if;
9471: /* Update the process-complete engSt variables as appropriate. */
9472: -- check for pending/yet to be notified approvers
9473: if(engStItemAppProcessCompleteYN(tempItemIndex) <> ame_util2.completeFullyRejected and
9474: ((engStApprovers(i).approver_category = ame_util.approvalApproverCategory and
9475: (engStApprovers(i).approval_status is null or
9476: engStApprovers(i).approval_status in (ame_util.nullStatus
9477: ,ame_util.notifiedStatus

Line 9474: ((engStApprovers(i).approver_category = ame_util.approvalApproverCategory and

9470: end if;
9471: /* Update the process-complete engSt variables as appropriate. */
9472: -- check for pending/yet to be notified approvers
9473: if(engStItemAppProcessCompleteYN(tempItemIndex) <> ame_util2.completeFullyRejected and
9474: ((engStApprovers(i).approver_category = ame_util.approvalApproverCategory and
9475: (engStApprovers(i).approval_status is null or
9476: engStApprovers(i).approval_status in (ame_util.nullStatus
9477: ,ame_util.notifiedStatus
9478: ,ame_util.repeatedStatus

Line 9476: engStApprovers(i).approval_status in (ame_util.nullStatus

9472: -- check for pending/yet to be notified approvers
9473: if(engStItemAppProcessCompleteYN(tempItemIndex) <> ame_util2.completeFullyRejected and
9474: ((engStApprovers(i).approver_category = ame_util.approvalApproverCategory and
9475: (engStApprovers(i).approval_status is null or
9476: engStApprovers(i).approval_status in (ame_util.nullStatus
9477: ,ame_util.notifiedStatus
9478: ,ame_util.repeatedStatus
9479: ,ame_util.notifiedByRepeatedStatus))) or
9480: (engStApprovers(i).approver_category = ame_util.fyiApproverCategory and

Line 9477: ,ame_util.notifiedStatus

9473: if(engStItemAppProcessCompleteYN(tempItemIndex) <> ame_util2.completeFullyRejected and
9474: ((engStApprovers(i).approver_category = ame_util.approvalApproverCategory and
9475: (engStApprovers(i).approval_status is null or
9476: engStApprovers(i).approval_status in (ame_util.nullStatus
9477: ,ame_util.notifiedStatus
9478: ,ame_util.repeatedStatus
9479: ,ame_util.notifiedByRepeatedStatus))) or
9480: (engStApprovers(i).approver_category = ame_util.fyiApproverCategory and
9481: (engStApprovers(i).approval_status is null or

Line 9478: ,ame_util.repeatedStatus

9474: ((engStApprovers(i).approver_category = ame_util.approvalApproverCategory and
9475: (engStApprovers(i).approval_status is null or
9476: engStApprovers(i).approval_status in (ame_util.nullStatus
9477: ,ame_util.notifiedStatus
9478: ,ame_util.repeatedStatus
9479: ,ame_util.notifiedByRepeatedStatus))) or
9480: (engStApprovers(i).approver_category = ame_util.fyiApproverCategory and
9481: (engStApprovers(i).approval_status is null or
9482: engStApprovers(i).approval_status = ame_util.nullStatus)))) then

Line 9479: ,ame_util.notifiedByRepeatedStatus))) or

9475: (engStApprovers(i).approval_status is null or
9476: engStApprovers(i).approval_status in (ame_util.nullStatus
9477: ,ame_util.notifiedStatus
9478: ,ame_util.repeatedStatus
9479: ,ame_util.notifiedByRepeatedStatus))) or
9480: (engStApprovers(i).approver_category = ame_util.fyiApproverCategory and
9481: (engStApprovers(i).approval_status is null or
9482: engStApprovers(i).approval_status = ame_util.nullStatus)))) then
9483: if engStItemAppProcessCompleteYN(tempItemIndex) in (ame_util2.completeNoApprovers

Line 9480: (engStApprovers(i).approver_category = ame_util.fyiApproverCategory and

9476: engStApprovers(i).approval_status in (ame_util.nullStatus
9477: ,ame_util.notifiedStatus
9478: ,ame_util.repeatedStatus
9479: ,ame_util.notifiedByRepeatedStatus))) or
9480: (engStApprovers(i).approver_category = ame_util.fyiApproverCategory and
9481: (engStApprovers(i).approval_status is null or
9482: engStApprovers(i).approval_status = ame_util.nullStatus)))) then
9483: if engStItemAppProcessCompleteYN(tempItemIndex) in (ame_util2.completeNoApprovers
9484: ,ame_util2.completeFullyApproved) then

Line 9482: engStApprovers(i).approval_status = ame_util.nullStatus)))) then

9478: ,ame_util.repeatedStatus
9479: ,ame_util.notifiedByRepeatedStatus))) or
9480: (engStApprovers(i).approver_category = ame_util.fyiApproverCategory and
9481: (engStApprovers(i).approval_status is null or
9482: engStApprovers(i).approval_status = ame_util.nullStatus)))) then
9483: if engStItemAppProcessCompleteYN(tempItemIndex) in (ame_util2.completeNoApprovers
9484: ,ame_util2.completeFullyApproved) then
9485: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.notCompleted;
9486: if engStApprovalProcessCompleteYN in (ame_util2.completeNoApprovers

Line 9483: if engStItemAppProcessCompleteYN(tempItemIndex) in (ame_util2.completeNoApprovers

9479: ,ame_util.notifiedByRepeatedStatus))) or
9480: (engStApprovers(i).approver_category = ame_util.fyiApproverCategory and
9481: (engStApprovers(i).approval_status is null or
9482: engStApprovers(i).approval_status = ame_util.nullStatus)))) then
9483: if engStItemAppProcessCompleteYN(tempItemIndex) in (ame_util2.completeNoApprovers
9484: ,ame_util2.completeFullyApproved) then
9485: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.notCompleted;
9486: if engStApprovalProcessCompleteYN in (ame_util2.completeNoApprovers
9487: ,ame_util2.completeFullyApproved) then

Line 9484: ,ame_util2.completeFullyApproved) then

9480: (engStApprovers(i).approver_category = ame_util.fyiApproverCategory and
9481: (engStApprovers(i).approval_status is null or
9482: engStApprovers(i).approval_status = ame_util.nullStatus)))) then
9483: if engStItemAppProcessCompleteYN(tempItemIndex) in (ame_util2.completeNoApprovers
9484: ,ame_util2.completeFullyApproved) then
9485: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.notCompleted;
9486: if engStApprovalProcessCompleteYN in (ame_util2.completeNoApprovers
9487: ,ame_util2.completeFullyApproved) then
9488: engStApprovalProcessCompleteYN := ame_util2.notCompleted;

Line 9485: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.notCompleted;

9481: (engStApprovers(i).approval_status is null or
9482: engStApprovers(i).approval_status = ame_util.nullStatus)))) then
9483: if engStItemAppProcessCompleteYN(tempItemIndex) in (ame_util2.completeNoApprovers
9484: ,ame_util2.completeFullyApproved) then
9485: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.notCompleted;
9486: if engStApprovalProcessCompleteYN in (ame_util2.completeNoApprovers
9487: ,ame_util2.completeFullyApproved) then
9488: engStApprovalProcessCompleteYN := ame_util2.notCompleted;
9489: end if;

Line 9486: if engStApprovalProcessCompleteYN in (ame_util2.completeNoApprovers

9482: engStApprovers(i).approval_status = ame_util.nullStatus)))) then
9483: if engStItemAppProcessCompleteYN(tempItemIndex) in (ame_util2.completeNoApprovers
9484: ,ame_util2.completeFullyApproved) then
9485: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.notCompleted;
9486: if engStApprovalProcessCompleteYN in (ame_util2.completeNoApprovers
9487: ,ame_util2.completeFullyApproved) then
9488: engStApprovalProcessCompleteYN := ame_util2.notCompleted;
9489: end if;
9490: end if;

Line 9487: ,ame_util2.completeFullyApproved) then

9483: if engStItemAppProcessCompleteYN(tempItemIndex) in (ame_util2.completeNoApprovers
9484: ,ame_util2.completeFullyApproved) then
9485: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.notCompleted;
9486: if engStApprovalProcessCompleteYN in (ame_util2.completeNoApprovers
9487: ,ame_util2.completeFullyApproved) then
9488: engStApprovalProcessCompleteYN := ame_util2.notCompleted;
9489: end if;
9490: end if;
9491: end if;

Line 9488: engStApprovalProcessCompleteYN := ame_util2.notCompleted;

9484: ,ame_util2.completeFullyApproved) then
9485: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.notCompleted;
9486: if engStApprovalProcessCompleteYN in (ame_util2.completeNoApprovers
9487: ,ame_util2.completeFullyApproved) then
9488: engStApprovalProcessCompleteYN := ame_util2.notCompleted;
9489: end if;
9490: end if;
9491: end if;
9492: -- check for rejections

Line 9493: if(engStApprovers(i).approver_category = ame_util.approvalApproverCategory and

9489: end if;
9490: end if;
9491: end if;
9492: -- check for rejections
9493: if(engStApprovers(i).approver_category = ame_util.approvalApproverCategory and
9494: engStApprovers(i).approval_status in (ame_util.rejectStatus,ame_util.rejectedByRepeatedStatus)) then
9495: itemRejected := true;
9496: if tempItemClass = ame_util.headerItemClassName then
9497: headerItemRejected := true;

Line 9494: engStApprovers(i).approval_status in (ame_util.rejectStatus,ame_util.rejectedByRepeatedStatus)) then

9490: end if;
9491: end if;
9492: -- check for rejections
9493: if(engStApprovers(i).approver_category = ame_util.approvalApproverCategory and
9494: engStApprovers(i).approval_status in (ame_util.rejectStatus,ame_util.rejectedByRepeatedStatus)) then
9495: itemRejected := true;
9496: if tempItemClass = ame_util.headerItemClassName then
9497: headerItemRejected := true;
9498: end if;

Line 9496: if tempItemClass = ame_util.headerItemClassName then

9492: -- check for rejections
9493: if(engStApprovers(i).approver_category = ame_util.approvalApproverCategory and
9494: engStApprovers(i).approval_status in (ame_util.rejectStatus,ame_util.rejectedByRepeatedStatus)) then
9495: itemRejected := true;
9496: if tempItemClass = ame_util.headerItemClassName then
9497: headerItemRejected := true;
9498: end if;
9499: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.completeFullyRejected;
9500: end if;

Line 9499: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.completeFullyRejected;

9495: itemRejected := true;
9496: if tempItemClass = ame_util.headerItemClassName then
9497: headerItemRejected := true;
9498: end if;
9499: engStItemAppProcessCompleteYN(tempItemIndex) := ame_util2.completeFullyRejected;
9500: end if;
9501: end loop;
9502:
9503: if itemRejected then

Line 9505: (attributeNameIn => ame_util.rejectionResponseAttribute);

9501: end loop;
9502:
9503: if itemRejected then
9504: stoppingRule := ame_engine.getHeaderAttValue2
9505: (attributeNameIn => ame_util.rejectionResponseAttribute);
9506: if stoppingRule is null or stoppingRule not in (ame_util.stopAllItems,ame_util.continueOtherSubItems,
9507: ame_util.continueAllOtherItems) then
9508: stoppingRule := ame_util.stopAllItems;
9509: end if;

Line 9506: if stoppingRule is null or stoppingRule not in (ame_util.stopAllItems,ame_util.continueOtherSubItems,

9502:
9503: if itemRejected then
9504: stoppingRule := ame_engine.getHeaderAttValue2
9505: (attributeNameIn => ame_util.rejectionResponseAttribute);
9506: if stoppingRule is null or stoppingRule not in (ame_util.stopAllItems,ame_util.continueOtherSubItems,
9507: ame_util.continueAllOtherItems) then
9508: stoppingRule := ame_util.stopAllItems;
9509: end if;
9510: -- When the stoppingRule is STOP_ALL_ITEMS or a header item got rejected then

Line 9507: ame_util.continueAllOtherItems) then

9503: if itemRejected then
9504: stoppingRule := ame_engine.getHeaderAttValue2
9505: (attributeNameIn => ame_util.rejectionResponseAttribute);
9506: if stoppingRule is null or stoppingRule not in (ame_util.stopAllItems,ame_util.continueOtherSubItems,
9507: ame_util.continueAllOtherItems) then
9508: stoppingRule := ame_util.stopAllItems;
9509: end if;
9510: -- When the stoppingRule is STOP_ALL_ITEMS or a header item got rejected then
9511: -- 1. The transaction as a whole is rejected.

Line 9508: stoppingRule := ame_util.stopAllItems;

9504: stoppingRule := ame_engine.getHeaderAttValue2
9505: (attributeNameIn => ame_util.rejectionResponseAttribute);
9506: if stoppingRule is null or stoppingRule not in (ame_util.stopAllItems,ame_util.continueOtherSubItems,
9507: ame_util.continueAllOtherItems) then
9508: stoppingRule := ame_util.stopAllItems;
9509: end if;
9510: -- When the stoppingRule is STOP_ALL_ITEMS or a header item got rejected then
9511: -- 1. The transaction as a whole is rejected.
9512: -- 2. Make all pending items approval status rejected.

Line 9513: if stoppingRule = ame_util.stopAllItems or headerItemRejected then

9509: end if;
9510: -- When the stoppingRule is STOP_ALL_ITEMS or a header item got rejected then
9511: -- 1. The transaction as a whole is rejected.
9512: -- 2. Make all pending items approval status rejected.
9513: if stoppingRule = ame_util.stopAllItems or headerItemRejected then
9514: engStApprovalProcessCompleteYN := ame_util2.completeFullyRejected;
9515: --+
9516: for x in 1 .. itemIds.count loop
9517: if engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then

Line 9514: engStApprovalProcessCompleteYN := ame_util2.completeFullyRejected;

9510: -- When the stoppingRule is STOP_ALL_ITEMS or a header item got rejected then
9511: -- 1. The transaction as a whole is rejected.
9512: -- 2. Make all pending items approval status rejected.
9513: if stoppingRule = ame_util.stopAllItems or headerItemRejected then
9514: engStApprovalProcessCompleteYN := ame_util2.completeFullyRejected;
9515: --+
9516: for x in 1 .. itemIds.count loop
9517: if engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then
9518: engStItemAppProcessCompleteYN(x) := ame_util2.completeFullyRejected;

Line 9517: if engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then

9513: if stoppingRule = ame_util.stopAllItems or headerItemRejected then
9514: engStApprovalProcessCompleteYN := ame_util2.completeFullyRejected;
9515: --+
9516: for x in 1 .. itemIds.count loop
9517: if engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then
9518: engStItemAppProcessCompleteYN(x) := ame_util2.completeFullyRejected;
9519: end if;
9520: end loop;
9521: --+

Line 9518: engStItemAppProcessCompleteYN(x) := ame_util2.completeFullyRejected;

9514: engStApprovalProcessCompleteYN := ame_util2.completeFullyRejected;
9515: --+
9516: for x in 1 .. itemIds.count loop
9517: if engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then
9518: engStItemAppProcessCompleteYN(x) := ame_util2.completeFullyRejected;
9519: end if;
9520: end loop;
9521: --+
9522: end if;

Line 9533: if stoppingRule = ame_util.continueOtherSubItems or

9529: -- transaction to pending status.
9530: -- 4. If the transaction level status is still partially rejected then
9531: -- check for complete rejection. Complete rejection will happen if all items
9532: -- are rejected or have no approvers.
9533: if stoppingRule = ame_util.continueOtherSubItems or
9534: stoppingRule = ame_util.continueAllOtherItems then
9535: if stoppingRule = ame_util.continueOtherSubItems then
9536: for x in 1 .. itemIds.count loop
9537: if itemClasses(x) = ame_util.headerItemClassName and

Line 9534: stoppingRule = ame_util.continueAllOtherItems then

9530: -- 4. If the transaction level status is still partially rejected then
9531: -- check for complete rejection. Complete rejection will happen if all items
9532: -- are rejected or have no approvers.
9533: if stoppingRule = ame_util.continueOtherSubItems or
9534: stoppingRule = ame_util.continueAllOtherItems then
9535: if stoppingRule = ame_util.continueOtherSubItems then
9536: for x in 1 .. itemIds.count loop
9537: if itemClasses(x) = ame_util.headerItemClassName and
9538: engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then

Line 9535: if stoppingRule = ame_util.continueOtherSubItems then

9531: -- check for complete rejection. Complete rejection will happen if all items
9532: -- are rejected or have no approvers.
9533: if stoppingRule = ame_util.continueOtherSubItems or
9534: stoppingRule = ame_util.continueAllOtherItems then
9535: if stoppingRule = ame_util.continueOtherSubItems then
9536: for x in 1 .. itemIds.count loop
9537: if itemClasses(x) = ame_util.headerItemClassName and
9538: engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then
9539: engStItemAppProcessCompleteYN(x) := ame_util2.completeFullyRejected;

Line 9537: if itemClasses(x) = ame_util.headerItemClassName and

9533: if stoppingRule = ame_util.continueOtherSubItems or
9534: stoppingRule = ame_util.continueAllOtherItems then
9535: if stoppingRule = ame_util.continueOtherSubItems then
9536: for x in 1 .. itemIds.count loop
9537: if itemClasses(x) = ame_util.headerItemClassName and
9538: engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then
9539: engStItemAppProcessCompleteYN(x) := ame_util2.completeFullyRejected;
9540: exit;
9541: end if;

Line 9538: engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then

9534: stoppingRule = ame_util.continueAllOtherItems then
9535: if stoppingRule = ame_util.continueOtherSubItems then
9536: for x in 1 .. itemIds.count loop
9537: if itemClasses(x) = ame_util.headerItemClassName and
9538: engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then
9539: engStItemAppProcessCompleteYN(x) := ame_util2.completeFullyRejected;
9540: exit;
9541: end if;
9542: end loop;

Line 9539: engStItemAppProcessCompleteYN(x) := ame_util2.completeFullyRejected;

9535: if stoppingRule = ame_util.continueOtherSubItems then
9536: for x in 1 .. itemIds.count loop
9537: if itemClasses(x) = ame_util.headerItemClassName and
9538: engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then
9539: engStItemAppProcessCompleteYN(x) := ame_util2.completeFullyRejected;
9540: exit;
9541: end if;
9542: end loop;
9543: end if;

Line 9544: engStApprovalProcessCompleteYN := ame_util2.completePartiallyApproved;

9540: exit;
9541: end if;
9542: end loop;
9543: end if;
9544: engStApprovalProcessCompleteYN := ame_util2.completePartiallyApproved;
9545: for x in 1 .. itemIds.count loop
9546: if engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then
9547: engStApprovalProcessCompleteYN := ame_util2.notCompleted;
9548: exit;

Line 9546: if engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then

9542: end loop;
9543: end if;
9544: engStApprovalProcessCompleteYN := ame_util2.completePartiallyApproved;
9545: for x in 1 .. itemIds.count loop
9546: if engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then
9547: engStApprovalProcessCompleteYN := ame_util2.notCompleted;
9548: exit;
9549: end if;
9550: end loop;

Line 9547: engStApprovalProcessCompleteYN := ame_util2.notCompleted;

9543: end if;
9544: engStApprovalProcessCompleteYN := ame_util2.completePartiallyApproved;
9545: for x in 1 .. itemIds.count loop
9546: if engStItemAppProcessCompleteYN(x) = ame_util2.notCompleted then
9547: engStApprovalProcessCompleteYN := ame_util2.notCompleted;
9548: exit;
9549: end if;
9550: end loop;
9551: tempCount := 0;

Line 9552: if engStApprovalProcessCompleteYN = ame_util2.completePartiallyApproved then

9548: exit;
9549: end if;
9550: end loop;
9551: tempCount := 0;
9552: if engStApprovalProcessCompleteYN = ame_util2.completePartiallyApproved then
9553: for x in 1 .. itemIds.count loop
9554: if engStItemAppProcessCompleteYN(x) <> ame_util2.completeFullyRejected and
9555: engStItemAppProcessCompleteYN(x) <> ame_util2.completeNoApprovers then
9556: exit;

Line 9554: if engStItemAppProcessCompleteYN(x) <> ame_util2.completeFullyRejected and

9550: end loop;
9551: tempCount := 0;
9552: if engStApprovalProcessCompleteYN = ame_util2.completePartiallyApproved then
9553: for x in 1 .. itemIds.count loop
9554: if engStItemAppProcessCompleteYN(x) <> ame_util2.completeFullyRejected and
9555: engStItemAppProcessCompleteYN(x) <> ame_util2.completeNoApprovers then
9556: exit;
9557: end if;
9558: tempCount := tempCount + 1;

Line 9555: engStItemAppProcessCompleteYN(x) <> ame_util2.completeNoApprovers then

9551: tempCount := 0;
9552: if engStApprovalProcessCompleteYN = ame_util2.completePartiallyApproved then
9553: for x in 1 .. itemIds.count loop
9554: if engStItemAppProcessCompleteYN(x) <> ame_util2.completeFullyRejected and
9555: engStItemAppProcessCompleteYN(x) <> ame_util2.completeNoApprovers then
9556: exit;
9557: end if;
9558: tempCount := tempCount + 1;
9559: end loop;

Line 9561: engStApprovalProcessCompleteYN := ame_util2.completeFullyRejected;

9557: end if;
9558: tempCount := tempCount + 1;
9559: end loop;
9560: if tempCount = itemIds.count then
9561: engStApprovalProcessCompleteYN := ame_util2.completeFullyRejected;
9562: end if;
9563: end if;
9564: end if;
9565: end if;

Line 9568: ame_util.runtimeException(packageNameIn => 'ame_engine',

9564: end if;
9565: end if;
9566: exception
9567: when others then
9568: ame_util.runtimeException(packageNameIn => 'ame_engine',
9569: routineNameIn => 'populateEngStVariables',
9570: exceptionNumberIn => sqlcode,
9571: exceptionStringIn => sqlerrm);
9572: raise;

Line 9575: displacedInserteeIndexes ame_util.idList;

9571: exceptionStringIn => sqlerrm);
9572: raise;
9573: end populateEngStVariables;
9574: procedure processAdHocInsertions as
9575: displacedInserteeIndexes ame_util.idList;
9576: engStApproversCount integer;
9577: parameterFields ame_util.longStringList;
9578: tempAnchorIndex integer;
9579: tempBoolean boolean;

Line 9577: parameterFields ame_util.longStringList;

9573: end populateEngStVariables;
9574: procedure processAdHocInsertions as
9575: displacedInserteeIndexes ame_util.idList;
9576: engStApproversCount integer;
9577: parameterFields ame_util.longStringList;
9578: tempAnchorIndex integer;
9579: tempBoolean boolean;
9580: tempIndex integer;
9581: tempIndex2 integer;

Line 9587: This procedure generally must populate the following ame_util.approverRecord2 fields,

9583: tempItemId ame_temp_insertions.item_id%type;
9584: tempOrderType ame_temp_insertions.order_type%type;
9585: begin
9586: /*
9587: This procedure generally must populate the following ame_util.approverRecord2 fields,
9588: for each inserted approver:
9589: orig_system
9590: orig_system_id
9591: display_name

Line 9612: if(engInsertedApproverList(i).authority <> ame_util.authorityApprover or

9608: See the comments near specific insertApprover calls below.
9609: */
9610: engStApproversCount := engStApprovers.count;
9611: for i in 1 .. engInsertedApproverList.count loop
9612: if(engInsertedApproverList(i).authority <> ame_util.authorityApprover or
9613: engInsertedApproverList(i).api_insertion = ame_util.apiInsertion) then
9614: ame_approver_type_pkg.getOrigSystemIdAndDisplayName(nameIn => engInsertedApproverList(i).name,
9615: origSystemOut => engInsertedApproverList(i).orig_system,
9616: origSystemIdOut => engInsertedApproverList(i).orig_system_id,

Line 9613: engInsertedApproverList(i).api_insertion = ame_util.apiInsertion) then

9609: */
9610: engStApproversCount := engStApprovers.count;
9611: for i in 1 .. engInsertedApproverList.count loop
9612: if(engInsertedApproverList(i).authority <> ame_util.authorityApprover or
9613: engInsertedApproverList(i).api_insertion = ame_util.apiInsertion) then
9614: ame_approver_type_pkg.getOrigSystemIdAndDisplayName(nameIn => engInsertedApproverList(i).name,
9615: origSystemOut => engInsertedApproverList(i).orig_system,
9616: origSystemIdOut => engInsertedApproverList(i).orig_system_id,
9617: displayNameOut => engInsertedApproverList(i).display_name);

Line 9622: if(engInsertionOrderTypeList(i) = ame_util.absoluteOrder) then

9618: parameterFields.delete;
9619: parseFields(stringIn => engInsertionParameterList(i),
9620: fieldsOut => parameterFields);
9621: /* absoluteOrder */
9622: if(engInsertionOrderTypeList(i) = ame_util.absoluteOrder) then
9623: tempIndex := engInsertionParameterList(i);
9624: if(tempIndex > engStApprovers.count + 1) then
9625: tempIndex := engStApprovers.count + 1;
9626: end if;

Line 9627: engInsertedApproverList(i).source := ame_util.otherInsertion;

9623: tempIndex := engInsertionParameterList(i);
9624: if(tempIndex > engStApprovers.count + 1) then
9625: tempIndex := engStApprovers.count + 1;
9626: end if;
9627: engInsertedApproverList(i).source := ame_util.otherInsertion;
9628: if(engStApprovers.exists(tempIndex - 1) and
9629: engStApprovers(tempIndex - 1).authority = engInsertedApproverList(i).authority and
9630: engStApprovers(tempIndex - 1).item_class = engInsertedApproverList(i).item_class and
9631: engStApprovers(tempIndex - 1).item_id = engInsertedApproverList(i).item_id

Line 9669: engInsertedApproverList(i).action_type_id := ame_util.nullInsertionActionTypeId;

9665: engInsertedApproverList(i).group_or_chain_order_number :=
9666: engStApprovers(tempIndex).group_or_chain_order_number;
9667: else
9668: /* engStApprovers must be empty. */
9669: engInsertedApproverList(i).action_type_id := ame_util.nullInsertionActionTypeId;
9670: engInsertedApproverList(i).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
9671: engInsertedApproverList(i).occurrence := 1;
9672: engInsertedApproverList(i).item_class_order_number :=
9673: getItemClassOrderNumber(itemClassIdIn =>

Line 9670: engInsertedApproverList(i).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

9666: engStApprovers(tempIndex).group_or_chain_order_number;
9667: else
9668: /* engStApprovers must be empty. */
9669: engInsertedApproverList(i).action_type_id := ame_util.nullInsertionActionTypeId;
9670: engInsertedApproverList(i).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
9671: engInsertedApproverList(i).occurrence := 1;
9672: engInsertedApproverList(i).item_class_order_number :=
9673: getItemClassOrderNumber(itemClassIdIn =>
9674: getItemClassId(itemClassNameIn => engInsertedApproverList(i).item_class));

Line 9679: getSublistOrderNum(itemClassNameIn => ame_util.headerItemClassName,

9675: engInsertedApproverList(i).item_order_number :=
9676: getItemOrderNumber(itemClassNameIn => engInsertedApproverList(i).item_class,
9677: itemIdIn => engInsertedApproverList(i).item_id);
9678: engInsertedApproverList(i).sub_list_order_number :=
9679: getSublistOrderNum(itemClassNameIn => ame_util.headerItemClassName,
9680: authorityIn => ame_util.postApprover);
9681: engInsertedApproverList(i).action_type_order_number := getNullActionTypeOrderNumber;
9682: engInsertedApproverList(i).group_or_chain_order_number := 1;
9683: end if;

Line 9680: authorityIn => ame_util.postApprover);

9676: getItemOrderNumber(itemClassNameIn => engInsertedApproverList(i).item_class,
9677: itemIdIn => engInsertedApproverList(i).item_id);
9678: engInsertedApproverList(i).sub_list_order_number :=
9679: getSublistOrderNum(itemClassNameIn => ame_util.headerItemClassName,
9680: authorityIn => ame_util.postApprover);
9681: engInsertedApproverList(i).action_type_order_number := getNullActionTypeOrderNumber;
9682: engInsertedApproverList(i).group_or_chain_order_number := 1;
9683: end if;
9684: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then

Line 9700: elsif(engInsertionOrderTypeList(i) in (ame_util.afterApprover,

9696: populateInsertionIndexes(indexIn => tempIndex
9697: ,insertionOrderIn => engInsertionOrderList(i));
9698: engStApproversCount := engStApproversCount + 1;
9699: /* afterApprover, beforeApprover */
9700: elsif(engInsertionOrderTypeList(i) in (ame_util.afterApprover,
9701: ame_util.beforeApprover)) then
9702: tempIndex := 1; /* post-increment */
9703: loop
9704: tempBoolean := false;

Line 9701: ame_util.beforeApprover)) then

9697: ,insertionOrderIn => engInsertionOrderList(i));
9698: engStApproversCount := engStApproversCount + 1;
9699: /* afterApprover, beforeApprover */
9700: elsif(engInsertionOrderTypeList(i) in (ame_util.afterApprover,
9701: ame_util.beforeApprover)) then
9702: tempIndex := 1; /* post-increment */
9703: loop
9704: tempBoolean := false;
9705: /*

Line 9716: if(engInsertionOrderTypeList(i) = ame_util.afterApprover) then

9712: engStApprovers(tempIndex).action_type_id = parameterFields(4) and
9713: engStApprovers(tempIndex).item_id = parameterFields(3) and
9714: engStApprovers(tempIndex).item_class = parameterFields(2)) then
9715: tempBoolean := true;
9716: if(engInsertionOrderTypeList(i) = ame_util.afterApprover) then
9717: tempIndex2 := tempIndex + 1;
9718: else
9719: tempIndex2 := tempIndex;
9720: end if;

Line 9729: if(engInsertionIsSpecialForwardee(i) = ame_util.booleanTrue) then

9725: itemClassIn => engInsertedApproverList(i).item_class,
9726: itemIdIn => engInsertedApproverList(i).item_id,
9727: actionTypeIdIn => engInsertedApproverList(i).action_type_id,
9728: groupOrChainIdIn => engInsertedApproverList(i).group_or_chain_id);
9729: if(engInsertionIsSpecialForwardee(i) = ame_util.booleanTrue) then
9730: engInsertedApproverList(i).source := ame_util.specialForwardInsertion;
9731: else
9732: if(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9733: engStApprovers(tempIndex).approval_status = ame_util.forwardStatus) then

Line 9730: engInsertedApproverList(i).source := ame_util.specialForwardInsertion;

9726: itemIdIn => engInsertedApproverList(i).item_id,
9727: actionTypeIdIn => engInsertedApproverList(i).action_type_id,
9728: groupOrChainIdIn => engInsertedApproverList(i).group_or_chain_id);
9729: if(engInsertionIsSpecialForwardee(i) = ame_util.booleanTrue) then
9730: engInsertedApproverList(i).source := ame_util.specialForwardInsertion;
9731: else
9732: if(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9733: engStApprovers(tempIndex).approval_status = ame_util.forwardStatus) then
9734: engInsertedApproverList(i).source := ame_util.forwardInsertion;

Line 9732: if(engInsertionOrderTypeList(i) = ame_util.afterApprover and

9728: groupOrChainIdIn => engInsertedApproverList(i).group_or_chain_id);
9729: if(engInsertionIsSpecialForwardee(i) = ame_util.booleanTrue) then
9730: engInsertedApproverList(i).source := ame_util.specialForwardInsertion;
9731: else
9732: if(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9733: engStApprovers(tempIndex).approval_status = ame_util.forwardStatus) then
9734: engInsertedApproverList(i).source := ame_util.forwardInsertion;
9735: elsif(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9736: engStApprovers(tempIndex).approval_status = ame_util.approveAndForwardStatus) then

Line 9733: engStApprovers(tempIndex).approval_status = ame_util.forwardStatus) then

9729: if(engInsertionIsSpecialForwardee(i) = ame_util.booleanTrue) then
9730: engInsertedApproverList(i).source := ame_util.specialForwardInsertion;
9731: else
9732: if(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9733: engStApprovers(tempIndex).approval_status = ame_util.forwardStatus) then
9734: engInsertedApproverList(i).source := ame_util.forwardInsertion;
9735: elsif(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9736: engStApprovers(tempIndex).approval_status = ame_util.approveAndForwardStatus) then
9737: engInsertedApproverList(i).source := ame_util.approveAndForwardInsertion;

Line 9734: engInsertedApproverList(i).source := ame_util.forwardInsertion;

9730: engInsertedApproverList(i).source := ame_util.specialForwardInsertion;
9731: else
9732: if(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9733: engStApprovers(tempIndex).approval_status = ame_util.forwardStatus) then
9734: engInsertedApproverList(i).source := ame_util.forwardInsertion;
9735: elsif(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9736: engStApprovers(tempIndex).approval_status = ame_util.approveAndForwardStatus) then
9737: engInsertedApproverList(i).source := ame_util.approveAndForwardInsertion;
9738: else

Line 9735: elsif(engInsertionOrderTypeList(i) = ame_util.afterApprover and

9731: else
9732: if(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9733: engStApprovers(tempIndex).approval_status = ame_util.forwardStatus) then
9734: engInsertedApproverList(i).source := ame_util.forwardInsertion;
9735: elsif(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9736: engStApprovers(tempIndex).approval_status = ame_util.approveAndForwardStatus) then
9737: engInsertedApproverList(i).source := ame_util.approveAndForwardInsertion;
9738: else
9739: engInsertedApproverList(i).source := ame_util.otherInsertion;

Line 9736: engStApprovers(tempIndex).approval_status = ame_util.approveAndForwardStatus) then

9732: if(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9733: engStApprovers(tempIndex).approval_status = ame_util.forwardStatus) then
9734: engInsertedApproverList(i).source := ame_util.forwardInsertion;
9735: elsif(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9736: engStApprovers(tempIndex).approval_status = ame_util.approveAndForwardStatus) then
9737: engInsertedApproverList(i).source := ame_util.approveAndForwardInsertion;
9738: else
9739: engInsertedApproverList(i).source := ame_util.otherInsertion;
9740: end if;

Line 9737: engInsertedApproverList(i).source := ame_util.approveAndForwardInsertion;

9733: engStApprovers(tempIndex).approval_status = ame_util.forwardStatus) then
9734: engInsertedApproverList(i).source := ame_util.forwardInsertion;
9735: elsif(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9736: engStApprovers(tempIndex).approval_status = ame_util.approveAndForwardStatus) then
9737: engInsertedApproverList(i).source := ame_util.approveAndForwardInsertion;
9738: else
9739: engInsertedApproverList(i).source := ame_util.otherInsertion;
9740: end if;
9741: end if;

Line 9739: engInsertedApproverList(i).source := ame_util.otherInsertion;

9735: elsif(engInsertionOrderTypeList(i) = ame_util.afterApprover and
9736: engStApprovers(tempIndex).approval_status = ame_util.approveAndForwardStatus) then
9737: engInsertedApproverList(i).source := ame_util.approveAndForwardInsertion;
9738: else
9739: engInsertedApproverList(i).source := ame_util.otherInsertion;
9740: end if;
9741: end if;
9742: engInsertedApproverList(i).item_class_order_number := engStApprovers(tempIndex).item_class_order_number;
9743: engInsertedApproverList(i).item_order_number := engStApprovers(tempIndex).item_order_number;

Line 9781: if(parameterFields(3) = ame_util.headerItemClassName and

9777: The four first/last pre/post order types can only occur in an empty list if the insertion
9778: is for the header item. Treat any other case of these order types as displaced, here.
9779: In the code blocks below for these four order types, require that engStApproversCount > 0.
9780: */
9781: if(parameterFields(3) = ame_util.headerItemClassName and
9782: parameterFields(2) = engTransactionId) then
9783: engInsertedApproverList(i).occurrence := 1;
9784: engInsertedApproverList(i).item_class_order_number :=
9785: getItemClassOrderNumber(itemClassIdIn =>

Line 9786: getItemClassId(itemClassNameIn => ame_util.headerItemClassName));

9782: parameterFields(2) = engTransactionId) then
9783: engInsertedApproverList(i).occurrence := 1;
9784: engInsertedApproverList(i).item_class_order_number :=
9785: getItemClassOrderNumber(itemClassIdIn =>
9786: getItemClassId(itemClassNameIn => ame_util.headerItemClassName));
9787: engInsertedApproverList(i).item_order_number := 1;
9788: engInsertedApproverList(i).sub_list_order_number :=
9789: getSublistOrderNum(itemClassNameIn => ame_util.headerItemClassName,
9790: authorityIn => engInsertedApproverList(i).authority);

Line 9789: getSublistOrderNum(itemClassNameIn => ame_util.headerItemClassName,

9785: getItemClassOrderNumber(itemClassIdIn =>
9786: getItemClassId(itemClassNameIn => ame_util.headerItemClassName));
9787: engInsertedApproverList(i).item_order_number := 1;
9788: engInsertedApproverList(i).sub_list_order_number :=
9789: getSublistOrderNum(itemClassNameIn => ame_util.headerItemClassName,
9790: authorityIn => engInsertedApproverList(i).authority);
9791: engInsertedApproverList(i).action_type_order_number := getNullActionTypeOrderNumber;
9792: engInsertedApproverList(i).group_or_chain_order_number := 1;
9793: engInsertedApproverList(i).member_order_number := 1;

Line 9820: if(engInsertionOrderTypeList(i) = ame_util.firstPostApprover) then

9816: else
9817: tempIndex := null;
9818: tempAnchorIndex := null;
9819: /* firstPostApprover */
9820: if(engInsertionOrderTypeList(i) = ame_util.firstPostApprover) then
9821: /*
9822: Insert at tempIndex if it's non-null, after checking the possible cases.
9823: Recall that the case where engStApproversCount = 0 is handled at the
9824: start of the procedure, that the item id is in parameterFields(3), and

Line 9852: if(engStApprovers(tempIndex2).authority = ame_util.postApprover and

9848: /* The zero lower limit is intentional. */
9849: for j in 0 .. engStApproversCount loop
9850: tempIndex2 := j + 1;
9851: if(j = 0) then /* case 1 */
9852: if(engStApprovers(tempIndex2).authority = ame_util.postApprover and
9853: engStApprovers(tempIndex2).item_id = parameterFields(3) and
9854: engStApprovers(tempIndex2).item_class = parameterFields(2)) then
9855: tempIndex := tempIndex2;
9856: tempAnchorIndex := tempIndex2;

Line 9865: if(engStApprovers(j).authority <> ame_util.postApprover and

9861: non-post-approver for the right item at j: cases 2-4
9862: Case 4 comes before the others to prevent indexing into a non-existent
9863: engStApprovers(tempIndex2) when j = engStApproversCount.
9864: */
9865: if(engStApprovers(j).authority <> ame_util.postApprover and
9866: engStApprovers(j).item_id = parameterFields(3) and
9867: engStApprovers(j).item_class = parameterFields(2)) then
9868: if(j = engStApproversCount) then /* case 4 */
9869: tempIndex := tempIndex2;

Line 9872: if(engStApprovers(tempIndex2).authority = ame_util.postApprover and

9868: if(j = engStApproversCount) then /* case 4 */
9869: tempIndex := tempIndex2;
9870: exit;
9871: end if;
9872: if(engStApprovers(tempIndex2).authority = ame_util.postApprover and
9873: engStApprovers(tempIndex2).item_id = parameterFields(3) and
9874: engStApprovers(tempIndex2).item_class = parameterFields(2)) then /* case 2 */
9875: tempIndex := tempIndex2;
9876: tempAnchorIndex := tempIndex2;

Line 9886: engStApprovers(tempIndex2).authority = ame_util.postApprover and

9882: exit;
9883: end if;
9884: if((engStApprovers(j).item_id <> parameterFields(3) or
9885: engStApprovers(j).item_class <> parameterFields(2)) and
9886: engStApprovers(tempIndex2).authority = ame_util.postApprover and
9887: engStApprovers(tempIndex2).item_id = parameterFields(3) and
9888: engStApprovers(tempIndex2).item_class = parameterFields(2)) then /* case 5 */
9889: tempIndex := tempIndex2;
9890: tempAnchorIndex := tempIndex2;

Line 9897: elsif(engInsertionOrderTypeList(i) = ame_util.firstPreApprover) then

9893: end if;
9894: end if;
9895: end loop;
9896: /* firstPreApprover */
9897: elsif(engInsertionOrderTypeList(i) = ame_util.firstPreApprover) then
9898: /*
9899: Insert at tempIndex if it's non-null, after checking the possible cases.
9900: Recall that the case where engStApproversCount = 0 is handled at the
9901: start of the procedure. Here are the cases requiring insertion (always

Line 9914: if(engStApprovers(1).authority = ame_util.preApprover) then

9910: if(j = 1) then
9911: if(engStApprovers(1).item_id = parameterFields(3) and
9912: engStApprovers(1).item_class = parameterFields(2)) then /* case 1 */
9913: tempIndex := 1;
9914: if(engStApprovers(1).authority = ame_util.preApprover) then
9915: tempAnchorIndex := 1;
9916: end if;
9917: exit;
9918: end if;

Line 9924: if(engStApprovers(j).authority = ame_util.preApprover) then

9920: engStApprovers(j - 1).item_class <> parameterFields(2)) and
9921: engStApprovers(j).item_id = parameterFields(3) and
9922: engStApprovers(j).item_class = parameterFields(2)) then /* case 2 */
9923: tempIndex := j;
9924: if(engStApprovers(j).authority = ame_util.preApprover) then
9925: tempAnchorIndex := j;
9926: end if;
9927: exit;
9928: end if;

Line 9931: elsif(engInsertionOrderTypeList(i) = ame_util.lastPostApprover) then

9927: exit;
9928: end if;
9929: end loop;
9930: /* lastPostApprover */
9931: elsif(engInsertionOrderTypeList(i) = ame_util.lastPostApprover) then
9932: /*
9933: Insert at tempIndex if it's non-null, after checking the possible cases.
9934: Recall that the case where engStApproversCount = 0 is handled at the
9935: start of the procedure. Here are the cases requiring insertion (always

Line 9948: if(engStApprovers(j).authority = ame_util.postApprover) then

9944: if(j = engStApproversCount) then
9945: if(engStApprovers(j).item_id = parameterFields(3) and
9946: engStApprovers(j).item_class = parameterFields(2)) then
9947: tempIndex := engStApproversCount + 1;
9948: if(engStApprovers(j).authority = ame_util.postApprover) then
9949: tempAnchorIndex := j;
9950: end if;
9951: exit;
9952: end if;

Line 9959: if(engStApprovers(j).authority = ame_util.postApprover) then

9955: engStApprovers(j).item_class = parameterFields(2) and
9956: (engStApprovers(j + 1).item_id <> parameterFields(3) or
9957: engStApprovers(j + 1).item_class <> parameterFields(2))) then
9958: tempIndex := j + 1;
9959: if(engStApprovers(j).authority = ame_util.postApprover) then
9960: tempAnchorIndex := j;
9961: end if;
9962: exit;
9963: end if;

Line 9967: else /* engInsertionOrderTypeList(i) = ame_util.lastPreApprover */

9963: end if;
9964: end if;
9965: end loop;
9966: /* lastPreApprover */
9967: else /* engInsertionOrderTypeList(i) = ame_util.lastPreApprover */
9968: /*
9969: Insert at tempIndex if it's non-null, after checking the possible cases.
9970: Recall that the case where engStApproversCount = 0 is handled at the
9971: start of the procedure. Here are the cases (always inserting at j):

Line 9990: engStApprovers(1).authority <> ame_util.preApprover) then /* case 1 */

9986: for j in 1 .. engStApproversCount loop
9987: if(j = 1) then
9988: if(engStApprovers(1).item_id = parameterFields(3) and
9989: engStApprovers(1).item_class = parameterFields(2) and
9990: engStApprovers(1).authority <> ame_util.preApprover) then /* case 1 */
9991: tempIndex := 1;
9992: exit;
9993: end if;
9994: else

Line 9997: engStApprovers(j).authority <> ame_util.preApprover) then

9993: end if;
9994: else
9995: if(engStApprovers(j).item_id = parameterFields(3) and
9996: engStApprovers(j).item_class = parameterFields(2) and
9997: engStApprovers(j).authority <> ame_util.preApprover) then
9998: if(engStApprovers(j - 1).item_id = parameterFields(3) and
9999: engStApprovers(j - 1).item_class = parameterFields(2)) then
10000: if(engStApprovers(j - 1).authority = ame_util.preApprover) then /* case 2 */
10001: tempIndex := j;

Line 10000: if(engStApprovers(j - 1).authority = ame_util.preApprover) then /* case 2 */

9996: engStApprovers(j).item_class = parameterFields(2) and
9997: engStApprovers(j).authority <> ame_util.preApprover) then
9998: if(engStApprovers(j - 1).item_id = parameterFields(3) and
9999: engStApprovers(j - 1).item_class = parameterFields(2)) then
10000: if(engStApprovers(j - 1).authority = ame_util.preApprover) then /* case 2 */
10001: tempIndex := j;
10002: tempAnchorIndex := j - 1;
10003: exit;
10004: end if;

Line 10014: engInsertedApproverList(i).source := ame_util.otherInsertion;

10010: end if;
10011: end loop;
10012: end if;
10013: /* Set the remaining fields in the insertee's approverRecord2. */
10014: engInsertedApproverList(i).source := ame_util.otherInsertion;
10015: if(tempAnchorIndex is null) then
10016: engInsertedApproverList(i).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
10017: /* This code was commented out to fix BUG (4095846) */
10018: /* Issue 9 in the list of bugs identified during implementation of */

Line 10016: engInsertedApproverList(i).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

10012: end if;
10013: /* Set the remaining fields in the insertee's approverRecord2. */
10014: engInsertedApproverList(i).source := ame_util.otherInsertion;
10015: if(tempAnchorIndex is null) then
10016: engInsertedApproverList(i).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
10017: /* This code was commented out to fix BUG (4095846) */
10018: /* Issue 9 in the list of bugs identified during implementation of */
10019: /* asynchronous parallel approver functionality */
10020: /* engInsertedApproverList(i).action_type_id := ame_util.nullInsertionActionTypeId; */

Line 10020: /* engInsertedApproverList(i).action_type_id := ame_util.nullInsertionActionTypeId; */

10016: engInsertedApproverList(i).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
10017: /* This code was commented out to fix BUG (4095846) */
10018: /* Issue 9 in the list of bugs identified during implementation of */
10019: /* asynchronous parallel approver functionality */
10020: /* engInsertedApproverList(i).action_type_id := ame_util.nullInsertionActionTypeId; */
10021: engInsertedApproverList(i).occurrence :=
10022: getHandlerOccurrence(nameIn => engInsertedApproverList(i).name,
10023: itemClassIn => engInsertedApproverList(i).item_class,
10024: itemIdIn => engInsertedApproverList(i).item_id,

Line 10036: if engInsertionOrderTypeList(i) = ame_util.firstPreApprover or

10032: itemIdIn => engInsertedApproverList(i).item_id);
10033: /* Code Modified to fix BUG (4095825) */
10034: /* Issue 2 in the list of bugs identified during implementation of */
10035: /* asynchronous parallel approver functionality */
10036: if engInsertionOrderTypeList(i) = ame_util.firstPreApprover or
10037: engInsertionOrderTypeList(i) = ame_util.lastPreApprover then
10038: engInsertedApproverList(i).sub_list_order_number :=
10039: getSublistOrderNum(itemClassNameIn => engInsertedApproverList(i).item_class,
10040: authorityIn => ame_util.preApprover);

Line 10037: engInsertionOrderTypeList(i) = ame_util.lastPreApprover then

10033: /* Code Modified to fix BUG (4095825) */
10034: /* Issue 2 in the list of bugs identified during implementation of */
10035: /* asynchronous parallel approver functionality */
10036: if engInsertionOrderTypeList(i) = ame_util.firstPreApprover or
10037: engInsertionOrderTypeList(i) = ame_util.lastPreApprover then
10038: engInsertedApproverList(i).sub_list_order_number :=
10039: getSublistOrderNum(itemClassNameIn => engInsertedApproverList(i).item_class,
10040: authorityIn => ame_util.preApprover);
10041: elsif engInsertionOrderTypeList(i) = ame_util.firstPostApprover or

Line 10040: authorityIn => ame_util.preApprover);

10036: if engInsertionOrderTypeList(i) = ame_util.firstPreApprover or
10037: engInsertionOrderTypeList(i) = ame_util.lastPreApprover then
10038: engInsertedApproverList(i).sub_list_order_number :=
10039: getSublistOrderNum(itemClassNameIn => engInsertedApproverList(i).item_class,
10040: authorityIn => ame_util.preApprover);
10041: elsif engInsertionOrderTypeList(i) = ame_util.firstPostApprover or
10042: engInsertionOrderTypeList(i) = ame_util.lastPostApprover then
10043: engInsertedApproverList(i).sub_list_order_number :=
10044: getSublistOrderNum(itemClassNameIn => engInsertedApproverList(i).item_class,

Line 10041: elsif engInsertionOrderTypeList(i) = ame_util.firstPostApprover or

10037: engInsertionOrderTypeList(i) = ame_util.lastPreApprover then
10038: engInsertedApproverList(i).sub_list_order_number :=
10039: getSublistOrderNum(itemClassNameIn => engInsertedApproverList(i).item_class,
10040: authorityIn => ame_util.preApprover);
10041: elsif engInsertionOrderTypeList(i) = ame_util.firstPostApprover or
10042: engInsertionOrderTypeList(i) = ame_util.lastPostApprover then
10043: engInsertedApproverList(i).sub_list_order_number :=
10044: getSublistOrderNum(itemClassNameIn => engInsertedApproverList(i).item_class,
10045: authorityIn => ame_util.postApprover);

Line 10042: engInsertionOrderTypeList(i) = ame_util.lastPostApprover then

10038: engInsertedApproverList(i).sub_list_order_number :=
10039: getSublistOrderNum(itemClassNameIn => engInsertedApproverList(i).item_class,
10040: authorityIn => ame_util.preApprover);
10041: elsif engInsertionOrderTypeList(i) = ame_util.firstPostApprover or
10042: engInsertionOrderTypeList(i) = ame_util.lastPostApprover then
10043: engInsertedApproverList(i).sub_list_order_number :=
10044: getSublistOrderNum(itemClassNameIn => engInsertedApproverList(i).item_class,
10045: authorityIn => ame_util.postApprover);
10046: end if;

Line 10045: authorityIn => ame_util.postApprover);

10041: elsif engInsertionOrderTypeList(i) = ame_util.firstPostApprover or
10042: engInsertionOrderTypeList(i) = ame_util.lastPostApprover then
10043: engInsertedApproverList(i).sub_list_order_number :=
10044: getSublistOrderNum(itemClassNameIn => engInsertedApproverList(i).item_class,
10045: authorityIn => ame_util.postApprover);
10046: end if;
10047: /* Code Modified to fix BUG (4095846) */
10048: /* Issue 9 in the list of bugs identified during implementation of */
10049: /* asynchronous parallel approver functionality */

Line 10054: engInsertedApproverList(i).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;

10050: /* engInsertedApproverList(i).action_type_order_number := getNullActionTypeOrderNumber; */
10051: engInsertedApproverList(i).action_type_order_number := 1;
10052: engInsertedApproverList(i).group_or_chain_order_number := 1;
10053: else
10054: engInsertedApproverList(i).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
10055: /* Code Modified to fix BUG (4095846) */
10056: /* Issue 9 in the list of bugs identified during implementation of */
10057: /* asynchronous parallel approver functionality */
10058: /* engInsertedApproverList(i).action_type_id := ame_util.nullInsertionActionTypeId;*/

Line 10058: /* engInsertedApproverList(i).action_type_id := ame_util.nullInsertionActionTypeId;*/

10054: engInsertedApproverList(i).group_or_chain_id := ame_util.nullInsertionGroupOrChainId;
10055: /* Code Modified to fix BUG (4095846) */
10056: /* Issue 9 in the list of bugs identified during implementation of */
10057: /* asynchronous parallel approver functionality */
10058: /* engInsertedApproverList(i).action_type_id := ame_util.nullInsertionActionTypeId;*/
10059: engInsertedApproverList(i).occurrence :=
10060: getHandlerOccurrence(nameIn => engInsertedApproverList(i).name,
10061: itemClassIn => engInsertedApproverList(i).item_class,
10062: itemIdIn => engInsertedApproverList(i).item_id,

Line 10076: if engInsertionOrderTypeList(i) = ame_util.firstPreApprover or

10072: /* Issue 9 in the list of bugs identified during implementation of */
10073: /* asynchronous parallel approver functionality */
10074: /*engInsertedApproverList(i).action_type_order_number := */
10075: /* engStApprovers(tempAnchorIndex).action_type_order_number; */
10076: if engInsertionOrderTypeList(i) = ame_util.firstPreApprover or
10077: engInsertionOrderTypeList(i) = ame_util.firstPostApprover then
10078: engInsertedApproverList(i).action_type_order_number :=
10079: engStApprovers(tempAnchorIndex).action_type_order_number - 1;
10080: elsif engInsertionOrderTypeList(i) = ame_util.lastPreApprover or

Line 10077: engInsertionOrderTypeList(i) = ame_util.firstPostApprover then

10073: /* asynchronous parallel approver functionality */
10074: /*engInsertedApproverList(i).action_type_order_number := */
10075: /* engStApprovers(tempAnchorIndex).action_type_order_number; */
10076: if engInsertionOrderTypeList(i) = ame_util.firstPreApprover or
10077: engInsertionOrderTypeList(i) = ame_util.firstPostApprover then
10078: engInsertedApproverList(i).action_type_order_number :=
10079: engStApprovers(tempAnchorIndex).action_type_order_number - 1;
10080: elsif engInsertionOrderTypeList(i) = ame_util.lastPreApprover or
10081: engInsertionOrderTypeList(i) = ame_util.lastPostApprover then

Line 10080: elsif engInsertionOrderTypeList(i) = ame_util.lastPreApprover or

10076: if engInsertionOrderTypeList(i) = ame_util.firstPreApprover or
10077: engInsertionOrderTypeList(i) = ame_util.firstPostApprover then
10078: engInsertedApproverList(i).action_type_order_number :=
10079: engStApprovers(tempAnchorIndex).action_type_order_number - 1;
10080: elsif engInsertionOrderTypeList(i) = ame_util.lastPreApprover or
10081: engInsertionOrderTypeList(i) = ame_util.lastPostApprover then
10082: engInsertedApproverList(i).action_type_order_number :=
10083: engStApprovers(tempAnchorIndex).action_type_order_number + 1;
10084: end if;

Line 10081: engInsertionOrderTypeList(i) = ame_util.lastPostApprover then

10077: engInsertionOrderTypeList(i) = ame_util.firstPostApprover then
10078: engInsertedApproverList(i).action_type_order_number :=
10079: engStApprovers(tempAnchorIndex).action_type_order_number - 1;
10080: elsif engInsertionOrderTypeList(i) = ame_util.lastPreApprover or
10081: engInsertionOrderTypeList(i) = ame_util.lastPostApprover then
10082: engInsertedApproverList(i).action_type_order_number :=
10083: engStApprovers(tempAnchorIndex).action_type_order_number + 1;
10084: end if;
10085: engInsertedApproverList(i).group_or_chain_order_number :=

Line 10095: if engInsertionOrderTypeList(i) = ame_util.firstPreApprover or

10091: else
10092: /* Code Modified to fix BUG (4095846) */
10093: /* Issue 9 in the list of bugs identified during implementation of */
10094: /* asynchronous parallel approver functionality */
10095: if engInsertionOrderTypeList(i) = ame_util.firstPreApprover or
10096: engInsertionOrderTypeList(i) = ame_util.firstPostApprover then
10097: engInsertedApproverList(i).action_type_id := -1;
10098: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then
10099: fnd_log.string

Line 10096: engInsertionOrderTypeList(i) = ame_util.firstPostApprover then

10092: /* Code Modified to fix BUG (4095846) */
10093: /* Issue 9 in the list of bugs identified during implementation of */
10094: /* asynchronous parallel approver functionality */
10095: if engInsertionOrderTypeList(i) = ame_util.firstPreApprover or
10096: engInsertionOrderTypeList(i) = ame_util.firstPostApprover then
10097: engInsertedApproverList(i).action_type_id := -1;
10098: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then
10099: fnd_log.string
10100: (fnd_log.level_statement

Line 10108: approverLocationIn => ame_util.firstAmongEquals,

10104: end if;
10105: insertApprover(indexIn => tempIndex,
10106: approverIn => engInsertedApproverList(i),
10107: adjustMemberOrderNumbersIn => true,
10108: approverLocationIn => ame_util.firstAmongEquals,
10109: inserteeIndexIn => i,
10110: currentInsIndex => i);
10111: populateInsertionIndexes(indexIn => tempIndex
10112: ,insertionOrderIn => engInsertionOrderList(i));

Line 10113: elsif engInsertionOrderTypeList(i) = ame_util.lastPreApprover or

10109: inserteeIndexIn => i,
10110: currentInsIndex => i);
10111: populateInsertionIndexes(indexIn => tempIndex
10112: ,insertionOrderIn => engInsertionOrderList(i));
10113: elsif engInsertionOrderTypeList(i) = ame_util.lastPreApprover or
10114: engInsertionOrderTypeList(i) = ame_util.lastPostApprover then
10115: engInsertedApproverList(i).action_type_id := -2;
10116: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then
10117: fnd_log.string

Line 10114: engInsertionOrderTypeList(i) = ame_util.lastPostApprover then

10110: currentInsIndex => i);
10111: populateInsertionIndexes(indexIn => tempIndex
10112: ,insertionOrderIn => engInsertionOrderList(i));
10113: elsif engInsertionOrderTypeList(i) = ame_util.lastPreApprover or
10114: engInsertionOrderTypeList(i) = ame_util.lastPostApprover then
10115: engInsertedApproverList(i).action_type_id := -2;
10116: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then
10117: fnd_log.string
10118: (fnd_log.level_statement

Line 10126: approverLocationIn => ame_util.lastAmongEquals,

10122: end if;
10123: insertApprover(indexIn => tempIndex,
10124: approverIn => engInsertedApproverList(i),
10125: adjustMemberOrderNumbersIn => true,
10126: approverLocationIn => ame_util.lastAmongEquals,
10127: inserteeIndexIn => i,
10128: currentInsIndex => i);
10129: populateInsertionIndexes(indexIn => tempIndex
10130: ,insertionOrderIn => engInsertionOrderList(i));

Line 10193: ame_util.runtimeException(packageNameIn => 'ame_engine',

10189: engStApproversCount := engStApproversCount + 1;
10190: end loop;
10191: exception
10192: when others then
10193: ame_util.runtimeException(packageNameIn => 'ame_engine',
10194: routineNameIn => 'processAdHocInsertions',
10195: exceptionNumberIn => sqlcode,
10196: exceptionStringIn => sqlerrm);
10197: raise;

Line 10202: procedure getAllProductions(productionsOut out nocopy ame_util2.productionsTable) is

10198: end processAdHocInsertions;
10199: --+
10200: --
10201: --+
10202: procedure getAllProductions(productionsOut out nocopy ame_util2.productionsTable) is
10203: begin
10204: for i in 1 .. engStProductionsTable.count loop
10205: productionsOut(i).variable_name := engStProductionsTable(i).variable_name;
10206: productionsOut(i).variable_value := engStProductionsTable(i).variable_value;

Line 10213: ,productionsOut out nocopy ame_util2.productionsTable) is

10209: end loop;
10210: end getAllProductions;
10211: procedure getProductions(itemClassIn in varchar2
10212: ,itemIdIn in varchar2
10213: ,productionsOut out nocopy ame_util2.productionsTable) is
10214: tempIndex integer;
10215: begin
10216: tempIndex := 1;
10217: for i in 1 .. engStProductionsTable.count loop

Line 10231: if(engAppRuleTypes(engAppHandlerFirstIndex) = ame_util.productionRuleType) then

10227: end getProductions;
10228: procedure processActionType as
10229: tempIndex integer;
10230: begin
10231: if(engAppRuleTypes(engAppHandlerFirstIndex) = ame_util.productionRuleType) then
10232: /*
10233: Copy item-level productions to the appropriate engStProductionsTable. Note that we
10234: have to initialize tempIndex as below to account for the possibility of multiple
10235: production action types.

Line 10257: ame_util.productionRuleType) then

10253: This elsif is necessary to avoid processing production actions of approver-generating rules.
10254: (The engine processes these after constructing the approver list.)
10255: */
10256: elsif(engActionTypeUsages(engAppActionTypeIds(engAppHandlerFirstIndex)) <>
10257: ame_util.productionRuleType) then
10258: /*
10259: Call the handler for action types other than the production-rule action type.
10260: (Per-approver productions get handled later.)
10261: */

Line 10283: ame_util.runtimeException(packageNameIn => 'ame_engine',

10279: );
10280: end if;
10281: exception
10282: when others then
10283: ame_util.runtimeException(packageNameIn => 'ame_engine',
10284: routineNameIn => 'processActionType',
10285: exceptionNumberIn => sqlcode,
10286: exceptionStringIn => sqlerrm);
10287: raise;

Line 10316: ame_util.runtimeException(packageNameIn => 'ame_engine',

10312: engDeviationResultList(approverIndexIn).effectiveDate := engSuppressionDateList(suppressApproverIndex);
10313: engDeviationResultList(approverIndexIn).reason := engSupperssionReasonList(suppressApproverIndex);
10314: exception
10315: when others then
10316: ame_util.runtimeException(packageNameIn => 'ame_engine',
10317: routineNameIn => 'processSuppressDeviation',
10318: exceptionNumberIn => sqlcode,
10319: exceptionStringIn => sqlerrm);
10320: end processSuppressDeviation;

Line 10331: engStApprovers(j).approval_status := ame_util.suppressedStatus;

10327: engStApprovers(j).group_or_chain_id = engDeletedApproverList(i).group_or_chain_id and
10328: engStApprovers(j).action_type_id = engDeletedApproverList(i).action_type_id and
10329: engStApprovers(j).item_id = engDeletedApproverList(i).item_id and
10330: engStApprovers(j).item_class = engDeletedApproverList(i).item_class) then
10331: engStApprovers(j).approval_status := ame_util.suppressedStatus;
10332: engStApprovers(j).source := ame_util.apiSuppression;
10333: processSuppressDeviation(j,i);
10334: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then
10335: fnd_log.string

Line 10332: engStApprovers(j).source := ame_util.apiSuppression;

10328: engStApprovers(j).action_type_id = engDeletedApproverList(i).action_type_id and
10329: engStApprovers(j).item_id = engDeletedApproverList(i).item_id and
10330: engStApprovers(j).item_class = engDeletedApproverList(i).item_class) then
10331: engStApprovers(j).approval_status := ame_util.suppressedStatus;
10332: engStApprovers(j).source := ame_util.apiSuppression;
10333: processSuppressDeviation(j,i);
10334: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then
10335: fnd_log.string
10336: (fnd_log.level_statement

Line 10346: ame_util.runtimeException(packageNameIn => 'ame_engine',

10342: end loop;
10343: end loop;
10344: exception
10345: when others then
10346: ame_util.runtimeException(packageNameIn => 'ame_engine',
10347: routineNameIn => 'processSuppressions',
10348: exceptionNumberIn => sqlcode,
10349: exceptionStringIn => sqlerrm);
10350: raise;

Line 10361: currentItemId ame_util.stringType;

10357: currentLastAuthorityIndex integer;
10358: currentLastExceptionIndex integer;
10359: currentLastItemIndex integer;
10360: currentItemClassId integer;
10361: currentItemId ame_util.stringType;
10362: ruleCount integer;
10363: tempAttributeId integer;
10364: tempAttributeIdsToMatch ame_util.idList;
10365: tempExcOrdCondAttributeIds ame_util.idList;

Line 10364: tempAttributeIdsToMatch ame_util.idList;

10360: currentItemClassId integer;
10361: currentItemId ame_util.stringType;
10362: ruleCount integer;
10363: tempAttributeId integer;
10364: tempAttributeIdsToMatch ame_util.idList;
10365: tempExcOrdCondAttributeIds ame_util.idList;
10366: tempBoolean boolean;
10367: tempBoolean2 boolean;
10368: begin

Line 10365: tempExcOrdCondAttributeIds ame_util.idList;

10361: currentItemId ame_util.stringType;
10362: ruleCount integer;
10363: tempAttributeId integer;
10364: tempAttributeIdsToMatch ame_util.idList;
10365: tempExcOrdCondAttributeIds ame_util.idList;
10366: tempBoolean boolean;
10367: tempBoolean2 boolean;
10368: begin
10369: /* Handle the empty-rule-list case first. */

Line 10378: if(engAppRuleTypes(i) = ame_util.exceptionRuleType) then

10374: /* Check for exception rules. */
10375: ruleCount := engAppRuleIds.count; /* This value gets used later in the code too. */
10376: tempBoolean := true;
10377: for i in 1 .. ruleCount loop
10378: if(engAppRuleTypes(i) = ame_util.exceptionRuleType) then
10379: tempBoolean := false;
10380: exit;
10381: end if;
10382: end loop;

Line 10407: if(engAppRuleTypes(i) = ame_util.authorityRuleType) then

10403: exit;
10404: elsif(i = ruleCount) then
10405: currentLastItemIndex := i;
10406: end if;
10407: if(engAppRuleTypes(i) = ame_util.authorityRuleType) then
10408: if(currentFirstAuthorityIndex is null) then
10409: currentFirstAuthorityIndex := i;
10410: end if;
10411: currentLastAuthorityIndex := i;

Line 10412: elsif(engAppRuleTypes(i) = ame_util.exceptionRuleType) then

10408: if(currentFirstAuthorityIndex is null) then
10409: currentFirstAuthorityIndex := i;
10410: end if;
10411: currentLastAuthorityIndex := i;
10412: elsif(engAppRuleTypes(i) = ame_util.exceptionRuleType) then
10413: if(currentFirstExceptionIndex is null) then
10414: currentFirstExceptionIndex := i;
10415: end if;
10416: currentLastExceptionIndex := i;

Line 10435: if(engACConditionTypes(engACUsageConditionIds(j)) = ame_util.ordinaryConditionType) then

10431: tempExcOrdCondAttributeIds.delete;
10432: for j in 1 .. engACUsageRuleIds.count loop
10433: if(engACUsageRuleIds(j) = engAppRuleIds(i)) then
10434: tempBoolean := true;
10435: if(engACConditionTypes(engACUsageConditionIds(j)) = ame_util.ordinaryConditionType) then
10436: tempExcOrdCondAttributeIds(engACAttributeIds(engACUsageConditionIds(j))) := 1;
10437: end if;
10438: elsif(tempBoolean) then
10439: exit;

Line 10453: ame_util.copyIdList(idListIn => tempExcOrdCondAttributeIds,

10449: copy it at each iteration, so we can freely delete entries in the
10450: copy.
10451: */
10452: tempAttributeIdsToMatch.delete;
10453: ame_util.copyIdList(idListIn => tempExcOrdCondAttributeIds,
10454: idListOut => tempAttributeIdsToMatch);
10455: /*
10456: For an applicable exception to override an otherwise applicable authority rule,
10457: both rules' ordinary conditions must be defined on the same attributes. (If

Line 10509: engAppRuleTypes(i) := ame_util.authorityRuleType;

10505: /*
10506: Convert the exception rule to an authority rule, so it gets processed with
10507: the remaining authority rules.
10508: */
10509: engAppRuleTypes(i) := ame_util.authorityRuleType;
10510: end loop;
10511: end if;
10512: /* Exit the outer loop if no more item rule lists exist. */
10513: if(currentLastItemIndex = ruleCount) then

Line 10525: ame_util.runtimeException(packageNameIn => 'ame_engine',

10521: compactParametersIn => true);
10522: end if;
10523: exception
10524: when others then
10525: ame_util.runtimeException(packageNameIn => 'ame_engine',
10526: routineNameIn => 'processExceptions',
10527: exceptionNumberIn => sqlcode,
10528: exceptionStringIn => sqlerrm);
10529: raise;

Line 10535: repeatedApproversMode ame_util.attributeValueType;

10531: procedure processRepeatedApprovers as
10532: engAppRuleIdsCount integer;
10533: engStApproversCount integer;
10534: productionActionTypeId integer;
10535: repeatedApproversMode ame_util.attributeValueType;
10536: repeatedByApproverIndex integer;
10537: repeatedIndexesList ame_util.idList;
10538: tempAuthority ame_util.charType;
10539: tempActionTypeId integer;

Line 10537: repeatedIndexesList ame_util.idList;

10533: engStApproversCount integer;
10534: productionActionTypeId integer;
10535: repeatedApproversMode ame_util.attributeValueType;
10536: repeatedByApproverIndex integer;
10537: repeatedIndexesList ame_util.idList;
10538: tempAuthority ame_util.charType;
10539: tempActionTypeId integer;
10540: tempCount integer;
10541: tempEngStItemIndex integer;

Line 10538: tempAuthority ame_util.charType;

10534: productionActionTypeId integer;
10535: repeatedApproversMode ame_util.attributeValueType;
10536: repeatedByApproverIndex integer;
10537: repeatedIndexesList ame_util.idList;
10538: tempAuthority ame_util.charType;
10539: tempActionTypeId integer;
10540: tempCount integer;
10541: tempEngStItemIndex integer;
10542: tempEngStProductionIndex integer;

Line 10547: tempItemClass ame_util.stringType;

10543: tempEngStRuleIndex integer;
10544: tempFirstIndexOfLastItem integer;
10545: tempFirstOccurrenceCurGrouping integer;
10546: tempGroupOrChainId integer;
10547: tempItemClass ame_util.stringType;
10548: tempItemId ame_util.stringType;
10549: tempApproverCategory ame_util.charType;
10550: tempProcessApprover boolean;
10551: tempRuleNotFound boolean;

Line 10548: tempItemId ame_util.stringType;

10544: tempFirstIndexOfLastItem integer;
10545: tempFirstOccurrenceCurGrouping integer;
10546: tempGroupOrChainId integer;
10547: tempItemClass ame_util.stringType;
10548: tempItemId ame_util.stringType;
10549: tempApproverCategory ame_util.charType;
10550: tempProcessApprover boolean;
10551: tempRuleNotFound boolean;
10552: tempRuleIdList ame_util.idList;

Line 10549: tempApproverCategory ame_util.charType;

10545: tempFirstOccurrenceCurGrouping integer;
10546: tempGroupOrChainId integer;
10547: tempItemClass ame_util.stringType;
10548: tempItemId ame_util.stringType;
10549: tempApproverCategory ame_util.charType;
10550: tempProcessApprover boolean;
10551: tempRuleNotFound boolean;
10552: tempRuleIdList ame_util.idList;
10553: tempRuleIdList2 ame_util.idList;

Line 10552: tempRuleIdList ame_util.idList;

10548: tempItemId ame_util.stringType;
10549: tempApproverCategory ame_util.charType;
10550: tempProcessApprover boolean;
10551: tempRuleNotFound boolean;
10552: tempRuleIdList ame_util.idList;
10553: tempRuleIdList2 ame_util.idList;
10554: tempSourceDescription ame_util.longStringType;
10555: treeLevel integer;
10556: tempRepeatedAprCount number;

Line 10553: tempRuleIdList2 ame_util.idList;

10549: tempApproverCategory ame_util.charType;
10550: tempProcessApprover boolean;
10551: tempRuleNotFound boolean;
10552: tempRuleIdList ame_util.idList;
10553: tempRuleIdList2 ame_util.idList;
10554: tempSourceDescription ame_util.longStringType;
10555: treeLevel integer;
10556: tempRepeatedAprCount number;
10557: tempChangeStatus boolean;

Line 10554: tempSourceDescription ame_util.longStringType;

10550: tempProcessApprover boolean;
10551: tempRuleNotFound boolean;
10552: tempRuleIdList ame_util.idList;
10553: tempRuleIdList2 ame_util.idList;
10554: tempSourceDescription ame_util.longStringType;
10555: treeLevel integer;
10556: tempRepeatedAprCount number;
10557: tempChangeStatus boolean;
10558: begin

Line 10569: repeatedApproversMode := getConfigVarValue(configVarNameIn => ame_util.repeatedApproverConfigVar);

10565: */
10566: tempEngStItemIndex := 0; /* pre-increment */
10567: tempEngStProductionIndex := 0; /* pre-increment */
10568: tempEngStRuleIndex := 0; /* pre-increment */
10569: repeatedApproversMode := getConfigVarValue(configVarNameIn => ame_util.repeatedApproverConfigVar);
10570: /* Set treeLevel for efficiency in the inner loop. */
10571: if(repeatedApproversMode = ame_util.oncePerTransaction) then
10572: treeLevel := 0;
10573: elsif(repeatedApproversMode = ame_util.oncePerItemClass) then

Line 10571: if(repeatedApproversMode = ame_util.oncePerTransaction) then

10567: tempEngStProductionIndex := 0; /* pre-increment */
10568: tempEngStRuleIndex := 0; /* pre-increment */
10569: repeatedApproversMode := getConfigVarValue(configVarNameIn => ame_util.repeatedApproverConfigVar);
10570: /* Set treeLevel for efficiency in the inner loop. */
10571: if(repeatedApproversMode = ame_util.oncePerTransaction) then
10572: treeLevel := 0;
10573: elsif(repeatedApproversMode = ame_util.oncePerItemClass) then
10574: treeLevel := 1;
10575: elsif(repeatedApproversMode = ame_util.oncePerItem) then

Line 10573: elsif(repeatedApproversMode = ame_util.oncePerItemClass) then

10569: repeatedApproversMode := getConfigVarValue(configVarNameIn => ame_util.repeatedApproverConfigVar);
10570: /* Set treeLevel for efficiency in the inner loop. */
10571: if(repeatedApproversMode = ame_util.oncePerTransaction) then
10572: treeLevel := 0;
10573: elsif(repeatedApproversMode = ame_util.oncePerItemClass) then
10574: treeLevel := 1;
10575: elsif(repeatedApproversMode = ame_util.oncePerItem) then
10576: treeLevel := 2;
10577: elsif(repeatedApproversMode = ame_util.oncePerSublist) then

Line 10575: elsif(repeatedApproversMode = ame_util.oncePerItem) then

10571: if(repeatedApproversMode = ame_util.oncePerTransaction) then
10572: treeLevel := 0;
10573: elsif(repeatedApproversMode = ame_util.oncePerItemClass) then
10574: treeLevel := 1;
10575: elsif(repeatedApproversMode = ame_util.oncePerItem) then
10576: treeLevel := 2;
10577: elsif(repeatedApproversMode = ame_util.oncePerSublist) then
10578: treeLevel := 3;
10579: elsif(repeatedApproversMode = ame_util.oncePerActionType) then

Line 10577: elsif(repeatedApproversMode = ame_util.oncePerSublist) then

10573: elsif(repeatedApproversMode = ame_util.oncePerItemClass) then
10574: treeLevel := 1;
10575: elsif(repeatedApproversMode = ame_util.oncePerItem) then
10576: treeLevel := 2;
10577: elsif(repeatedApproversMode = ame_util.oncePerSublist) then
10578: treeLevel := 3;
10579: elsif(repeatedApproversMode = ame_util.oncePerActionType) then
10580: treeLevel := 4;
10581: elsif(repeatedApproversMode = ame_util.oncePerGroupOrChain) then

Line 10579: elsif(repeatedApproversMode = ame_util.oncePerActionType) then

10575: elsif(repeatedApproversMode = ame_util.oncePerItem) then
10576: treeLevel := 2;
10577: elsif(repeatedApproversMode = ame_util.oncePerSublist) then
10578: treeLevel := 3;
10579: elsif(repeatedApproversMode = ame_util.oncePerActionType) then
10580: treeLevel := 4;
10581: elsif(repeatedApproversMode = ame_util.oncePerGroupOrChain) then
10582: treeLevel := 5;
10583: else /* repeatedApproversMode = ame_util.eachOccurrence */

Line 10581: elsif(repeatedApproversMode = ame_util.oncePerGroupOrChain) then

10577: elsif(repeatedApproversMode = ame_util.oncePerSublist) then
10578: treeLevel := 3;
10579: elsif(repeatedApproversMode = ame_util.oncePerActionType) then
10580: treeLevel := 4;
10581: elsif(repeatedApproversMode = ame_util.oncePerGroupOrChain) then
10582: treeLevel := 5;
10583: else /* repeatedApproversMode = ame_util.eachOccurrence */
10584: treeLevel := 6;
10585: end if;

Line 10583: else /* repeatedApproversMode = ame_util.eachOccurrence */

10579: elsif(repeatedApproversMode = ame_util.oncePerActionType) then
10580: treeLevel := 4;
10581: elsif(repeatedApproversMode = ame_util.oncePerGroupOrChain) then
10582: treeLevel := 5;
10583: else /* repeatedApproversMode = ame_util.eachOccurrence */
10584: treeLevel := 6;
10585: end if;
10586: engStApproversCount := engStApprovers.count;
10587: for i in 1 .. engStApproversCount loop

Line 10596: if(engStApprovers(i).approval_status in (ame_util.suppressedStatus

10592: approver was previously processed, we don't want to duplicate their data in the engStItem
10593: variables.
10594: */
10595: tempProcessApprover := true;
10596: if(engStApprovers(i).approval_status in (ame_util.suppressedStatus
10597: ,ame_util.repeatedStatus
10598: ,ame_util.beatByFirstResponderStatus)) then
10599: tempProcessApprover := false;
10600: else

Line 10597: ,ame_util.repeatedStatus

10593: variables.
10594: */
10595: tempProcessApprover := true;
10596: if(engStApprovers(i).approval_status in (ame_util.suppressedStatus
10597: ,ame_util.repeatedStatus
10598: ,ame_util.beatByFirstResponderStatus)) then
10599: tempProcessApprover := false;
10600: else
10601: for j in 1 .. (i - 1) loop

Line 10598: ,ame_util.beatByFirstResponderStatus)) then

10594: */
10595: tempProcessApprover := true;
10596: if(engStApprovers(i).approval_status in (ame_util.suppressedStatus
10597: ,ame_util.repeatedStatus
10598: ,ame_util.beatByFirstResponderStatus)) then
10599: tempProcessApprover := false;
10600: else
10601: for j in 1 .. (i - 1) loop
10602: if(engStApprovers(j).name = engStApprovers(i).name and

Line 10614: ame_util.repeatedStatus and output its data for the index tempFirstOccurrenceCurGrouping.

10610: /*
10611: Iterate through the rest of the approver list, looking for engStApprovers(i).name, and outputting
10612: each occurrence's data as required to various engSt variables. If engStApprovers(i).name has
10613: already occurred in the current grouping, set engStApprovers(i).approval_status to
10614: ame_util.repeatedStatus and output its data for the index tempFirstOccurrenceCurGrouping.
10615: Otherwise output its data for index j. (Set tempFirstOccurrenceCurGrouping to j when we find a
10616: new repeated-approvers grouping.)
10617: */
10618: for j in i .. engStApproversCount loop

Line 10622: If repeatedApproversMode is ame_util.oncePerTransaction (that is, treeLevel = 6),

10618: for j in i .. engStApproversCount loop
10619: if(engStApprovers(j).name = engStApprovers(i).name and
10620: engStApprovers(j).approver_category = engStApprovers(i).approver_category) then
10621: /*
10622: If repeatedApproversMode is ame_util.oncePerTransaction (that is, treeLevel = 6),
10623: all occurrences of the approver with j > i are repeated.
10624: */
10625: if(j = i or
10626: treeLevel = 6 or

Line 10642: Don't overwrite non-null statuses with ame_util.repeatedStatus. These can reflect

10638: tempItemClass := engStApprovers(j).item_class;
10639: repeatedIndexesList(1) := j;
10640: else /* This is a repeated approver. */
10641: /*
10642: Don't overwrite non-null statuses with ame_util.repeatedStatus. These can reflect
10643: per-item approver responses. See the ame_api2.updateApprovalStatus code for details.
10644: Also, don't suppress special forwardees. See bug 3401298 for details.
10645: */
10646: if(engStApprovers(j).approval_status is null and

Line 10647: engStApprovers(j).source not like ame_util.specialForwardInsertion || '%') then

10643: per-item approver responses. See the ame_api2.updateApprovalStatus code for details.
10644: Also, don't suppress special forwardees. See bug 3401298 for details.
10645: */
10646: if(engStApprovers(j).approval_status is null and
10647: engStApprovers(j).source not like ame_util.specialForwardInsertion || '%') then
10648: engStApprovers(j).approval_status := ame_util.repeatedStatus;
10649: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then
10650: fnd_log.string
10651: (fnd_log.level_statement

Line 10648: engStApprovers(j).approval_status := ame_util.repeatedStatus;

10644: Also, don't suppress special forwardees. See bug 3401298 for details.
10645: */
10646: if(engStApprovers(j).approval_status is null and
10647: engStApprovers(j).source not like ame_util.specialForwardInsertion || '%') then
10648: engStApprovers(j).approval_status := ame_util.repeatedStatus;
10649: if fnd_log.g_current_runtime_level <= fnd_log.level_statement then
10650: fnd_log.string
10651: (fnd_log.level_statement
10652: ,'ame_engine.processRepeatedApprovers'

Line 10657: if engStApprovers(j).approval_status in (ame_util.repeatedStatus

10653: ,'Repeated Approver ::: ' || engStApprovers(j).name
10654: );
10655: end if;
10656: end if;
10657: if engStApprovers(j).approval_status in (ame_util.repeatedStatus
10658: ,ame_util.notifiedByRepeatedStatus
10659: ,ame_util.approvedByRepeatedStatus
10660: ,ame_util.rejectedByRepeatedStatus
10661: ,ame_util.rejectStatus

Line 10658: ,ame_util.notifiedByRepeatedStatus

10654: );
10655: end if;
10656: end if;
10657: if engStApprovers(j).approval_status in (ame_util.repeatedStatus
10658: ,ame_util.notifiedByRepeatedStatus
10659: ,ame_util.approvedByRepeatedStatus
10660: ,ame_util.rejectedByRepeatedStatus
10661: ,ame_util.rejectStatus
10662: ,ame_util.approvedStatus

Line 10659: ,ame_util.approvedByRepeatedStatus

10655: end if;
10656: end if;
10657: if engStApprovers(j).approval_status in (ame_util.repeatedStatus
10658: ,ame_util.notifiedByRepeatedStatus
10659: ,ame_util.approvedByRepeatedStatus
10660: ,ame_util.rejectedByRepeatedStatus
10661: ,ame_util.rejectStatus
10662: ,ame_util.approvedStatus
10663: ,ame_util.notifiedStatus) then

Line 10660: ,ame_util.rejectedByRepeatedStatus

10656: end if;
10657: if engStApprovers(j).approval_status in (ame_util.repeatedStatus
10658: ,ame_util.notifiedByRepeatedStatus
10659: ,ame_util.approvedByRepeatedStatus
10660: ,ame_util.rejectedByRepeatedStatus
10661: ,ame_util.rejectStatus
10662: ,ame_util.approvedStatus
10663: ,ame_util.notifiedStatus) then
10664: /* Get the repeated by approver's tree node index */

Line 10661: ,ame_util.rejectStatus

10657: if engStApprovers(j).approval_status in (ame_util.repeatedStatus
10658: ,ame_util.notifiedByRepeatedStatus
10659: ,ame_util.approvedByRepeatedStatus
10660: ,ame_util.rejectedByRepeatedStatus
10661: ,ame_util.rejectStatus
10662: ,ame_util.approvedStatus
10663: ,ame_util.notifiedStatus) then
10664: /* Get the repeated by approver's tree node index */
10665: repeatedIndexesList(repeatedIndexesList.count + 1) := j;

Line 10662: ,ame_util.approvedStatus

10658: ,ame_util.notifiedByRepeatedStatus
10659: ,ame_util.approvedByRepeatedStatus
10660: ,ame_util.rejectedByRepeatedStatus
10661: ,ame_util.rejectStatus
10662: ,ame_util.approvedStatus
10663: ,ame_util.notifiedStatus) then
10664: /* Get the repeated by approver's tree node index */
10665: repeatedIndexesList(repeatedIndexesList.count + 1) := j;
10666: end if;

Line 10663: ,ame_util.notifiedStatus) then

10659: ,ame_util.approvedByRepeatedStatus
10660: ,ame_util.rejectedByRepeatedStatus
10661: ,ame_util.rejectStatus
10662: ,ame_util.approvedStatus
10663: ,ame_util.notifiedStatus) then
10664: /* Get the repeated by approver's tree node index */
10665: repeatedIndexesList(repeatedIndexesList.count + 1) := j;
10666: end if;
10667: end if;

Line 10687: if engStApprovers(i).approval_status = ame_util.repeatedStatus or

10683: -- Handle the case of migration from pre ASP to ASP.
10684: for i in 1 .. engStApprovers.count loop
10685: for j in 1 .. engStRepeatedIndexes.count loop
10686: if engStRepeatedIndexes(j) = i and engStRepeatedAppIndexes(j) <> i then
10687: if engStApprovers(i).approval_status = ame_util.repeatedStatus or
10688: engStApprovers(i).approval_status is null then
10689: if engStApprovers(engStRepeatedAppIndexes(j)).approval_status = ame_util.approvedStatus then
10690: engStApprovers(i).approval_status := ame_util.approvedByRepeatedStatus;
10691: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status

Line 10689: if engStApprovers(engStRepeatedAppIndexes(j)).approval_status = ame_util.approvedStatus then

10685: for j in 1 .. engStRepeatedIndexes.count loop
10686: if engStRepeatedIndexes(j) = i and engStRepeatedAppIndexes(j) <> i then
10687: if engStApprovers(i).approval_status = ame_util.repeatedStatus or
10688: engStApprovers(i).approval_status is null then
10689: if engStApprovers(engStRepeatedAppIndexes(j)).approval_status = ame_util.approvedStatus then
10690: engStApprovers(i).approval_status := ame_util.approvedByRepeatedStatus;
10691: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10692: = ame_util.noResponseStatus then
10693: engStApprovers(i).approval_status := ame_util2.noResponseByRepeatedStatus;

Line 10690: engStApprovers(i).approval_status := ame_util.approvedByRepeatedStatus;

10686: if engStRepeatedIndexes(j) = i and engStRepeatedAppIndexes(j) <> i then
10687: if engStApprovers(i).approval_status = ame_util.repeatedStatus or
10688: engStApprovers(i).approval_status is null then
10689: if engStApprovers(engStRepeatedAppIndexes(j)).approval_status = ame_util.approvedStatus then
10690: engStApprovers(i).approval_status := ame_util.approvedByRepeatedStatus;
10691: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10692: = ame_util.noResponseStatus then
10693: engStApprovers(i).approval_status := ame_util2.noResponseByRepeatedStatus;
10694: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status

Line 10692: = ame_util.noResponseStatus then

10688: engStApprovers(i).approval_status is null then
10689: if engStApprovers(engStRepeatedAppIndexes(j)).approval_status = ame_util.approvedStatus then
10690: engStApprovers(i).approval_status := ame_util.approvedByRepeatedStatus;
10691: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10692: = ame_util.noResponseStatus then
10693: engStApprovers(i).approval_status := ame_util2.noResponseByRepeatedStatus;
10694: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10695: = ame_util.notifiedStatus then
10696: engStApprovers(i).approval_status := ame_util.notifiedByRepeatedStatus;

Line 10693: engStApprovers(i).approval_status := ame_util2.noResponseByRepeatedStatus;

10689: if engStApprovers(engStRepeatedAppIndexes(j)).approval_status = ame_util.approvedStatus then
10690: engStApprovers(i).approval_status := ame_util.approvedByRepeatedStatus;
10691: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10692: = ame_util.noResponseStatus then
10693: engStApprovers(i).approval_status := ame_util2.noResponseByRepeatedStatus;
10694: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10695: = ame_util.notifiedStatus then
10696: engStApprovers(i).approval_status := ame_util.notifiedByRepeatedStatus;
10697: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status

Line 10695: = ame_util.notifiedStatus then

10691: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10692: = ame_util.noResponseStatus then
10693: engStApprovers(i).approval_status := ame_util2.noResponseByRepeatedStatus;
10694: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10695: = ame_util.notifiedStatus then
10696: engStApprovers(i).approval_status := ame_util.notifiedByRepeatedStatus;
10697: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10698: = ame_util.forwardStatus then
10699: engStApprovers(i).approval_status := ame_util2.forwardByRepeatedStatus;

Line 10696: engStApprovers(i).approval_status := ame_util.notifiedByRepeatedStatus;

10692: = ame_util.noResponseStatus then
10693: engStApprovers(i).approval_status := ame_util2.noResponseByRepeatedStatus;
10694: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10695: = ame_util.notifiedStatus then
10696: engStApprovers(i).approval_status := ame_util.notifiedByRepeatedStatus;
10697: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10698: = ame_util.forwardStatus then
10699: engStApprovers(i).approval_status := ame_util2.forwardByRepeatedStatus;
10700: end if;

Line 10698: = ame_util.forwardStatus then

10694: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10695: = ame_util.notifiedStatus then
10696: engStApprovers(i).approval_status := ame_util.notifiedByRepeatedStatus;
10697: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10698: = ame_util.forwardStatus then
10699: engStApprovers(i).approval_status := ame_util2.forwardByRepeatedStatus;
10700: end if;
10701: end if;
10702: end if;

Line 10699: engStApprovers(i).approval_status := ame_util2.forwardByRepeatedStatus;

10695: = ame_util.notifiedStatus then
10696: engStApprovers(i).approval_status := ame_util.notifiedByRepeatedStatus;
10697: elsif engStApprovers(engStRepeatedAppIndexes(j)).approval_status
10698: = ame_util.forwardStatus then
10699: engStApprovers(i).approval_status := ame_util2.forwardByRepeatedStatus;
10700: end if;
10701: end if;
10702: end if;
10703: end loop;

Line 10708: if engStApprovers(i).approval_status in (ame_util.notifiedByRepeatedStatus

10704: end loop;
10705: -- handle the repetaed status case
10706: tempRepeatedAprCount := engStRepeatedIndexes.count;
10707: for i in 1..engStApprovers.count loop
10708: if engStApprovers(i).approval_status in (ame_util.notifiedByRepeatedStatus
10709: ) then
10710: if tempRepeatedAprCount = 0 then
10711: if engStApprovers(i).approval_status = ame_util.notifiedByRepeatedStatus then
10712: engStApprovers(i).approval_status := ame_util.notifiedStatus ;

Line 10711: if engStApprovers(i).approval_status = ame_util.notifiedByRepeatedStatus then

10707: for i in 1..engStApprovers.count loop
10708: if engStApprovers(i).approval_status in (ame_util.notifiedByRepeatedStatus
10709: ) then
10710: if tempRepeatedAprCount = 0 then
10711: if engStApprovers(i).approval_status = ame_util.notifiedByRepeatedStatus then
10712: engStApprovers(i).approval_status := ame_util.notifiedStatus ;
10713: end if;
10714: end if;
10715: tempChangeStatus := true;

Line 10712: engStApprovers(i).approval_status := ame_util.notifiedStatus ;

10708: if engStApprovers(i).approval_status in (ame_util.notifiedByRepeatedStatus
10709: ) then
10710: if tempRepeatedAprCount = 0 then
10711: if engStApprovers(i).approval_status = ame_util.notifiedByRepeatedStatus then
10712: engStApprovers(i).approval_status := ame_util.notifiedStatus ;
10713: end if;
10714: end if;
10715: tempChangeStatus := true;
10716: for j in 1..tempRepeatedAprCount loop

Line 10719: (engStApprovers(engStRepeatedAppIndexes(j)).approval_status = ame_util.notifiedStatus

10715: tempChangeStatus := true;
10716: for j in 1..tempRepeatedAprCount loop
10717: if engStRepeatedIndexes(j) = i and engStRepeatedAppIndexes(j) <> i then
10718: if engStApprovers(engStRepeatedAppIndexes(j)).approval_status is null or
10719: (engStApprovers(engStRepeatedAppIndexes(j)).approval_status = ame_util.notifiedStatus
10720: and engStApprovers(i).approval_status = ame_util.notifiedByRepeatedStatus ) then
10721: tempChangeStatus := false;
10722: exit;
10723: end if;

Line 10720: and engStApprovers(i).approval_status = ame_util.notifiedByRepeatedStatus ) then

10716: for j in 1..tempRepeatedAprCount loop
10717: if engStRepeatedIndexes(j) = i and engStRepeatedAppIndexes(j) <> i then
10718: if engStApprovers(engStRepeatedAppIndexes(j)).approval_status is null or
10719: (engStApprovers(engStRepeatedAppIndexes(j)).approval_status = ame_util.notifiedStatus
10720: and engStApprovers(i).approval_status = ame_util.notifiedByRepeatedStatus ) then
10721: tempChangeStatus := false;
10722: exit;
10723: end if;
10724: end if;

Line 10727: if engStApprovers(i).approval_status = ame_util.notifiedByRepeatedStatus then

10723: end if;
10724: end if;
10725: end loop;
10726: if tempChangeStatus then
10727: if engStApprovers(i).approval_status = ame_util.notifiedByRepeatedStatus then
10728: engStApprovers(i).approval_status := ame_util.notifiedStatus ;
10729: end if;
10730: end if;
10731: end if;

Line 10728: engStApprovers(i).approval_status := ame_util.notifiedStatus ;

10724: end if;
10725: end loop;
10726: if tempChangeStatus then
10727: if engStApprovers(i).approval_status = ame_util.notifiedByRepeatedStatus then
10728: engStApprovers(i).approval_status := ame_util.notifiedStatus ;
10729: end if;
10730: end if;
10731: end if;
10732: end loop;

Line 10735: ame_util.runtimeException(packageNameIn => 'ame_engine',

10731: end if;
10732: end loop;
10733: exception
10734: when others then
10735: ame_util.runtimeException(packageNameIn => 'ame_engine',
10736: routineNameIn => 'processRepeatedApprovers',
10737: exceptionNumberIn => sqlcode,
10738: exceptionStringIn => sqlerrm);
10739: raise;

Line 10744: currentFirstRuleIndexes ame_util.idList; /* indexed by rule type */

10740: end processRepeatedApprovers;
10741: procedure processRules(processOnlyProductionsIn in boolean default false) as
10742: currentActionTypeId integer;
10743: currentFirstItemIndex integer;
10744: currentFirstRuleIndexes ame_util.idList; /* indexed by rule type */
10745: currentIndex integer;
10746: currentItemClassId integer;
10747: currentItemId ame_util.stringType;
10748: currentLastItemIndex integer;

Line 10747: currentItemId ame_util.stringType;

10743: currentFirstItemIndex integer;
10744: currentFirstRuleIndexes ame_util.idList; /* indexed by rule type */
10745: currentIndex integer;
10746: currentItemClassId integer;
10747: currentItemId ame_util.stringType;
10748: currentLastItemIndex integer;
10749: currentLastRuleIndexes ame_util.idList; /* indexed by rule type */
10750: currentRuleType integer;
10751: ruleCount integer;

Line 10749: currentLastRuleIndexes ame_util.idList; /* indexed by rule type */

10745: currentIndex integer;
10746: currentItemClassId integer;
10747: currentItemId ame_util.stringType;
10748: currentLastItemIndex integer;
10749: currentLastRuleIndexes ame_util.idList; /* indexed by rule type */
10750: currentRuleType integer;
10751: ruleCount integer;
10752: ruleTypes ame_util.idList;
10753: tempIndex integer;

Line 10752: ruleTypes ame_util.idList;

10748: currentLastItemIndex integer;
10749: currentLastRuleIndexes ame_util.idList; /* indexed by rule type */
10750: currentRuleType integer;
10751: ruleCount integer;
10752: ruleTypes ame_util.idList;
10753: tempIndex integer;
10754: tempLastRuleIndex integer;
10755: tempRuleType integer;
10756: ruleTypeUpperLimit integer;

Line 10769: ruleTypes(1) := ame_util.productionRuleType;

10765: Combination rules have already been split into their single-action
10766: components, and exceptions have been converted into authority rules,
10767: so ignore these rule types.
10768: */
10769: ruleTypes(1) := ame_util.productionRuleType;
10770: ruleTypes(2) := ame_util.preListGroupRuleType;
10771: ruleTypes(3) := ame_util.authorityRuleType;
10772: ruleTypes(4) := ame_util.postListGroupRuleType;
10773: ruleTypes(5) := ame_util.listModRuleType;

Line 10770: ruleTypes(2) := ame_util.preListGroupRuleType;

10766: components, and exceptions have been converted into authority rules,
10767: so ignore these rule types.
10768: */
10769: ruleTypes(1) := ame_util.productionRuleType;
10770: ruleTypes(2) := ame_util.preListGroupRuleType;
10771: ruleTypes(3) := ame_util.authorityRuleType;
10772: ruleTypes(4) := ame_util.postListGroupRuleType;
10773: ruleTypes(5) := ame_util.listModRuleType;
10774: ruleTypes(6) := ame_util.substitutionRuleType;

Line 10771: ruleTypes(3) := ame_util.authorityRuleType;

10767: so ignore these rule types.
10768: */
10769: ruleTypes(1) := ame_util.productionRuleType;
10770: ruleTypes(2) := ame_util.preListGroupRuleType;
10771: ruleTypes(3) := ame_util.authorityRuleType;
10772: ruleTypes(4) := ame_util.postListGroupRuleType;
10773: ruleTypes(5) := ame_util.listModRuleType;
10774: ruleTypes(6) := ame_util.substitutionRuleType;
10775: /* Initialize the engine substitution variables. */

Line 10772: ruleTypes(4) := ame_util.postListGroupRuleType;

10768: */
10769: ruleTypes(1) := ame_util.productionRuleType;
10770: ruleTypes(2) := ame_util.preListGroupRuleType;
10771: ruleTypes(3) := ame_util.authorityRuleType;
10772: ruleTypes(4) := ame_util.postListGroupRuleType;
10773: ruleTypes(5) := ame_util.listModRuleType;
10774: ruleTypes(6) := ame_util.substitutionRuleType;
10775: /* Initialize the engine substitution variables. */
10776: engAppSubHandlerFirstIndex := null;

Line 10773: ruleTypes(5) := ame_util.listModRuleType;

10769: ruleTypes(1) := ame_util.productionRuleType;
10770: ruleTypes(2) := ame_util.preListGroupRuleType;
10771: ruleTypes(3) := ame_util.authorityRuleType;
10772: ruleTypes(4) := ame_util.postListGroupRuleType;
10773: ruleTypes(5) := ame_util.listModRuleType;
10774: ruleTypes(6) := ame_util.substitutionRuleType;
10775: /* Initialize the engine substitution variables. */
10776: engAppSubHandlerFirstIndex := null;
10777: engAppSubHandlerLastIndex := null;

Line 10774: ruleTypes(6) := ame_util.substitutionRuleType;

10770: ruleTypes(2) := ame_util.preListGroupRuleType;
10771: ruleTypes(3) := ame_util.authorityRuleType;
10772: ruleTypes(4) := ame_util.postListGroupRuleType;
10773: ruleTypes(5) := ame_util.listModRuleType;
10774: ruleTypes(6) := ame_util.substitutionRuleType;
10775: /* Initialize the engine substitution variables. */
10776: engAppSubHandlerFirstIndex := null;
10777: engAppSubHandlerLastIndex := null;
10778: /* Initialize the state variables. */

Line 10834: if (currentRuleType = ame_util.substitutionRuleType) then

10830: currentActionTypeId <> engAppActionTypeIds(tempIndex)) then
10831: /* Process the current action type for the current item. */
10832: engAppHandlerLastIndex := tempIndex - 1;
10833: processActionType;
10834: if (currentRuleType = ame_util.substitutionRuleType) then
10835: /* Set variables so subsequent call to the substitution handler is
10836: possible without iterating through the applicable rule list again */
10837: engAppSubHandlerFirstIndex :=currentFirstRuleIndexes(tempRuleType);
10838: engAppSubHandlerLastIndex := currentLastRuleIndexes(tempRuleType);

Line 10891: ame_util.runtimeException(packageNameIn => 'ame_engine',

10887: end if;
10888: end if;
10889: exception
10890: when others then
10891: ame_util.runtimeException(packageNameIn => 'ame_engine',
10892: routineNameIn => 'processRules',
10893: exceptionNumberIn => sqlcode,
10894: exceptionStringIn => sqlerrm);
10895: raise;

Line 10899: currentItemId ame_util.stringType;

10895: raise;
10896: end processRules;
10897: procedure processRelativePriorities as
10898: currentItemClassId integer;
10899: currentItemId ame_util.stringType;
10900: currentRuleType integer;
10901: currentThreshold integer;
10902: engAppRuleIdsCount integer;
10903: ruleDeleted boolean;

Line 10909: tempThresholds ame_util.idList;

10905: tempDoRelativePriorities boolean;
10906: tempFirstIndex integer;
10907: tempLastIndex integer;
10908: tempThresholdCounter integer;
10909: tempThresholds ame_util.idList;
10910: ruleExists boolean;
10911: tempIndex integer;
10912: oldTempIndex integer;
10913: begin

Line 10931: tempDoRelativePriorities := engPriorityModes(currentRuleType) = ame_util.relativeRulePriority;

10927: currentItemId := engAppAppItemIds(tempFirstIndex);
10928: currentRuleType := engAppRuleTypes(tempFirstIndex);
10929: tempThresholds.delete;
10930: tempLastIndex := null;
10931: tempDoRelativePriorities := engPriorityModes(currentRuleType) = ame_util.relativeRulePriority;
10932: /* Find tempLastIndex and optionally set the values in tempThresholds. */
10933: for i in tempFirstIndex .. engAppRuleIdsCount loop
10934: /* The following if does its comparisons in descending order of probability of success, for efficiency. */
10935: if(currentRuleType <> engAppRuleTypes(i) or

Line 10990: tempDoRelativePriorities := engPriorityModes(i) = ame_util.relativeRulePriority;

10986: else
10987: /* Evaluate priorities at transaction level */
10988: /* BUG Fixes : 4472308 and 4065967 */
10989: for i in 0 .. 7 loop
10990: tempDoRelativePriorities := engPriorityModes(i) = ame_util.relativeRulePriority;
10991: if tempDoRelativePriorities then
10992: ruleExists := false;
10993: tempIndex := engAppRuleIds.first;
10994: loop

Line 11048: ame_util.runtimeException(packageNameIn => 'ame_engine',

11044: compactParametersIn => false);
11045: end if;
11046: exception
11047: when others then
11048: ame_util.runtimeException(packageNameIn => 'ame_engine',
11049: routineNameIn => 'processRelativePriorities',
11050: exceptionNumberIn => sqlcode,
11051: exceptionStringIn => sqlerrm);
11052: raise;

Line 11057: tempSurrogateApprover ame_util.approverRecord2;

11053: end processRelativePriorities;
11054: procedure processUnresponsiveApprovers as
11055: engStApproversCount integer;
11056: tempIndex integer;
11057: tempSurrogateApprover ame_util.approverRecord2;
11058: begin
11059: /* First handle the empty-list case. */
11060: engStApproversCount := engStApprovers.count;
11061: if(engStApproversCount = 0) then

Line 11067: if(engStApprovers(tempIndex).approval_status = ame_util.noResponseStatus) then

11063: end if;
11064: /* Now handle the non-empty case. */
11065: tempIndex := 1; /* post-increment */
11066: loop
11067: if(engStApprovers(tempIndex).approval_status = ame_util.noResponseStatus) then
11068: /* Fetch surrogate's wf_roles-specific data. */
11069: ame_approver_type_pkg.getSurrogate(origSystemIn => engStApprovers(tempIndex).orig_system,
11070: origSystemIdIn => engStApprovers(tempIndex).orig_system_id,
11071: origSystemIdOut => tempSurrogateApprover.orig_system_id,

Line 11076: tempSurrogateApprover.api_insertion := ame_util.apiInsertion;

11072: wfRolesNameOut => tempSurrogateApprover.name,
11073: displayNameOut => tempSurrogateApprover.display_name);
11074: tempSurrogateApprover.orig_system := engStApprovers(tempIndex).orig_system;
11075: /* Set fields constant for all surrogates. */
11076: tempSurrogateApprover.api_insertion := ame_util.apiInsertion;
11077: tempSurrogateApprover.source := ame_util.surrogateInsertion;
11078: /* Set common-valued fields. */
11079: tempSurrogateApprover.approver_category := engStApprovers(tempIndex).approver_category;
11080: tempSurrogateApprover.authority := engStApprovers(tempIndex).authority;

Line 11077: tempSurrogateApprover.source := ame_util.surrogateInsertion;

11073: displayNameOut => tempSurrogateApprover.display_name);
11074: tempSurrogateApprover.orig_system := engStApprovers(tempIndex).orig_system;
11075: /* Set fields constant for all surrogates. */
11076: tempSurrogateApprover.api_insertion := ame_util.apiInsertion;
11077: tempSurrogateApprover.source := ame_util.surrogateInsertion;
11078: /* Set common-valued fields. */
11079: tempSurrogateApprover.approver_category := engStApprovers(tempIndex).approver_category;
11080: tempSurrogateApprover.authority := engStApprovers(tempIndex).authority;
11081: tempSurrogateApprover.action_type_id := engStApprovers(tempIndex).action_type_id;

Line 11126: ame_util.runtimeException(packageNameIn => 'ame_engine',

11122: tempIndex := tempIndex + 1;
11123: end loop;
11124: exception
11125: when others then
11126: ame_util.runtimeException(packageNameIn => 'ame_engine',
11127: routineNameIn => 'processUnresponsiveApprovers',
11128: exceptionNumberIn => sqlcode,
11129: exceptionStringIn => sqlerrm);
11130: raise;

Line 11168: errorMessage ame_util.longestStringType;

11164: fndApplicationIdIn in integer default null,
11165: transactionTypeIdIn in varchar2 default null) as
11166: badLocalTransException exception;
11167: errorCode integer;
11168: errorMessage ame_util.longestStringType;
11169: nullValuesException exception;
11170: tempConfigVarValue ame_config_vars.variable_value%type;
11171: begin
11172: /*

Line 11328: tempConfigVarValue := getConfigVarValue(configVarNameIn => ame_util.productionConfigVar);

11324: if(fetchConfigVarsIn) then
11325: /* Fetch. */
11326: fetchConfigVars;
11327: /* Reconcile the engProcessProduction values with the productionFunctionality config var. */
11328: tempConfigVarValue := getConfigVarValue(configVarNameIn => ame_util.productionConfigVar);
11329: if(engProcessProductionActions and
11330: tempConfigVarValue in (ame_util.noProductions, ame_util.perTransactionProductions)) then
11331: engProcessProductionActions := false;
11332: end if;

Line 11330: tempConfigVarValue in (ame_util.noProductions, ame_util.perTransactionProductions)) then

11326: fetchConfigVars;
11327: /* Reconcile the engProcessProduction values with the productionFunctionality config var. */
11328: tempConfigVarValue := getConfigVarValue(configVarNameIn => ame_util.productionConfigVar);
11329: if(engProcessProductionActions and
11330: tempConfigVarValue in (ame_util.noProductions, ame_util.perTransactionProductions)) then
11331: engProcessProductionActions := false;
11332: end if;
11333: if(engProcessProductionRules and
11334: tempConfigVarValue in (ame_util.noProductions, ame_util.perApproverProductions)) then

Line 11334: tempConfigVarValue in (ame_util.noProductions, ame_util.perApproverProductions)) then

11330: tempConfigVarValue in (ame_util.noProductions, ame_util.perTransactionProductions)) then
11331: engProcessProductionActions := false;
11332: end if;
11333: if(engProcessProductionRules and
11334: tempConfigVarValue in (ame_util.noProductions, ame_util.perApproverProductions)) then
11335: engProcessProductionRules := false;
11336: end if;
11337: end if;
11338: /* Optionally fetch the transaction's attribute values. */

Line 11345: getHeaderAttValue2(attributeNameIn => ame_util.evalPrioritiesPerItemAttribute) =

11341: fetchItemClassData;
11342: fetchAttributeValues(fetchInactivesIn => fetchInactiveAttValuesIn);
11343: /* Set misc. frequently-used attribute-value caches. */
11344: engEvalPrioritiesPerItem :=
11345: getHeaderAttValue2(attributeNameIn => ame_util.evalPrioritiesPerItemAttribute) =
11346: ame_util.booleanAttributeTrue;
11347: engRepeatSubstitutions :=
11348: getHeaderAttValue2(attributeNameIn => ame_util.repeatSubstitutionsAttribute) =
11349: ame_util.booleanAttributeTrue;

Line 11346: ame_util.booleanAttributeTrue;

11342: fetchAttributeValues(fetchInactivesIn => fetchInactiveAttValuesIn);
11343: /* Set misc. frequently-used attribute-value caches. */
11344: engEvalPrioritiesPerItem :=
11345: getHeaderAttValue2(attributeNameIn => ame_util.evalPrioritiesPerItemAttribute) =
11346: ame_util.booleanAttributeTrue;
11347: engRepeatSubstitutions :=
11348: getHeaderAttValue2(attributeNameIn => ame_util.repeatSubstitutionsAttribute) =
11349: ame_util.booleanAttributeTrue;
11350: /* A null effective rule date should be interpreted as sysdate. */

Line 11348: getHeaderAttValue2(attributeNameIn => ame_util.repeatSubstitutionsAttribute) =

11344: engEvalPrioritiesPerItem :=
11345: getHeaderAttValue2(attributeNameIn => ame_util.evalPrioritiesPerItemAttribute) =
11346: ame_util.booleanAttributeTrue;
11347: engRepeatSubstitutions :=
11348: getHeaderAttValue2(attributeNameIn => ame_util.repeatSubstitutionsAttribute) =
11349: ame_util.booleanAttributeTrue;
11350: /* A null effective rule date should be interpreted as sysdate. */
11351: engEffectiveRuleDate := ame_util.versionStringToDate(stringDateIn =>
11352: getHeaderAttValue2(attributeNameIn => ame_util.effectiveRuleDateAttribute));

Line 11349: ame_util.booleanAttributeTrue;

11345: getHeaderAttValue2(attributeNameIn => ame_util.evalPrioritiesPerItemAttribute) =
11346: ame_util.booleanAttributeTrue;
11347: engRepeatSubstitutions :=
11348: getHeaderAttValue2(attributeNameIn => ame_util.repeatSubstitutionsAttribute) =
11349: ame_util.booleanAttributeTrue;
11350: /* A null effective rule date should be interpreted as sysdate. */
11351: engEffectiveRuleDate := ame_util.versionStringToDate(stringDateIn =>
11352: getHeaderAttValue2(attributeNameIn => ame_util.effectiveRuleDateAttribute));
11353: if(engEffectiveRuleDate is null) then

Line 11351: engEffectiveRuleDate := ame_util.versionStringToDate(stringDateIn =>

11347: engRepeatSubstitutions :=
11348: getHeaderAttValue2(attributeNameIn => ame_util.repeatSubstitutionsAttribute) =
11349: ame_util.booleanAttributeTrue;
11350: /* A null effective rule date should be interpreted as sysdate. */
11351: engEffectiveRuleDate := ame_util.versionStringToDate(stringDateIn =>
11352: getHeaderAttValue2(attributeNameIn => ame_util.effectiveRuleDateAttribute));
11353: if(engEffectiveRuleDate is null) then
11354: engEffectiveRuleDate := sysdate;
11355: else

Line 11352: getHeaderAttValue2(attributeNameIn => ame_util.effectiveRuleDateAttribute));

11348: getHeaderAttValue2(attributeNameIn => ame_util.repeatSubstitutionsAttribute) =
11349: ame_util.booleanAttributeTrue;
11350: /* A null effective rule date should be interpreted as sysdate. */
11351: engEffectiveRuleDate := ame_util.versionStringToDate(stringDateIn =>
11352: getHeaderAttValue2(attributeNameIn => ame_util.effectiveRuleDateAttribute));
11353: if(engEffectiveRuleDate is null) then
11354: engEffectiveRuleDate := sysdate;
11355: else
11356: -- evaluate the attributes with use count 0 if they are used in rules

Line 11389: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

11385: end if;
11386: exception
11387: when badLocalTransException then
11388: errorCode := -20001;
11389: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
11390: messageNameIn => 'AME_400688_ENG_TESTTX_NONLOCAL');
11391: ame_util.runtimeException(packageNameIn => 'ame_engine',
11392: routineNameIn => 'setContext',
11393: exceptionNumberIn => errorCode,

Line 11391: ame_util.runtimeException(packageNameIn => 'ame_engine',

11387: when badLocalTransException then
11388: errorCode := -20001;
11389: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
11390: messageNameIn => 'AME_400688_ENG_TESTTX_NONLOCAL');
11391: ame_util.runtimeException(packageNameIn => 'ame_engine',
11392: routineNameIn => 'setContext',
11393: exceptionNumberIn => errorCode,
11394: exceptionStringIn => errorMessage);
11395: raise_application_error(errorCode,

Line 11399: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

11395: raise_application_error(errorCode,
11396: errorMessage);
11397: when nullValuesException then
11398: errorCode := -20001;
11399: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
11400: messageNameIn => 'AME_400129_ENG_APPLID_NULL');
11401: ame_util.runtimeException(packageNameIn => 'ame_engine',
11402: routineNameIn => 'setContext',
11403: exceptionNumberIn => errorCode,

Line 11401: ame_util.runtimeException(packageNameIn => 'ame_engine',

11397: when nullValuesException then
11398: errorCode := -20001;
11399: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
11400: messageNameIn => 'AME_400129_ENG_APPLID_NULL');
11401: ame_util.runtimeException(packageNameIn => 'ame_engine',
11402: routineNameIn => 'setContext',
11403: exceptionNumberIn => errorCode,
11404: exceptionStringIn => errorMessage);
11405: raise_application_error(errorCode,

Line 11408: ame_util.runtimeException(packageNameIn => 'ame_engine',

11404: exceptionStringIn => errorMessage);
11405: raise_application_error(errorCode,
11406: errorMessage);
11407: when others then
11408: ame_util.runtimeException(packageNameIn => 'ame_engine',
11409: routineNameIn => 'setContext',
11410: exceptionNumberIn => sqlcode,
11411: exceptionStringIn => sqlerrm);
11412: raise;

Line 11419: errorMessage ame_util.longestStringType;

11415: parameterIn in varchar2 default null,
11416: stateIn in varchar2 default null) as
11417: argumentLengthException exception;
11418: errorCode integer;
11419: errorMessage ame_util.longestStringType;
11420: handlerName ame_temp_handler_states.handler_name%type;
11421: begin
11422: if(lengthb(stateIn) > 100 or
11423: lengthb(parameterIn) > 100) then

Line 11449: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

11445: stateIn);
11446: exception
11447: when argumentLengthException then
11448: errorCode := -20001;
11449: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
11450: messageNameIn => 'AME_400130_ENG_HDLR_PAR_LNG');
11451: ame_util.runtimeException(packageNameIn => 'ame_engine',
11452: routineNameIn => 'setHandlerState',
11453: exceptionNumberIn => errorCode,

Line 11451: ame_util.runtimeException(packageNameIn => 'ame_engine',

11447: when argumentLengthException then
11448: errorCode := -20001;
11449: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
11450: messageNameIn => 'AME_400130_ENG_HDLR_PAR_LNG');
11451: ame_util.runtimeException(packageNameIn => 'ame_engine',
11452: routineNameIn => 'setHandlerState',
11453: exceptionNumberIn => errorCode,
11454: exceptionStringIn => errorMessage);
11455: raise_application_error(errorCode,

Line 11458: ame_util.runtimeException(packageNameIn => 'ame_engine',

11454: exceptionStringIn => errorMessage);
11455: raise_application_error(errorCode,
11456: errorMessage);
11457: when others then
11458: ame_util.runtimeException(packageNameIn => 'ame_engine',
11459: routineNameIn => 'setHandlerState',
11460: exceptionNumberIn => sqlcode,
11461: exceptionStringIn => sqlerrm);
11462: raise;

Line 11484: ame_util.runtimeException(packageNameIn => 'ame_engine',

11480: end if;
11481: end loop;
11482: exception
11483: when others then
11484: ame_util.runtimeException(packageNameIn => 'ame_engine',
11485: routineNameIn => 'setInsertedApprovalStatus',
11486: exceptionNumberIn => sqlcode,
11487: exceptionStringIn => sqlerrm);
11488: raise;

Line 11492: engRuleAppliedYN(ruleIndexIn) := ame_util.booleanTrue;

11488: raise;
11489: end setInsertedApprovalStatus;
11490: procedure setRuleApplied(ruleIndexIn in integer) as
11491: begin
11492: engRuleAppliedYN(ruleIndexIn) := ame_util.booleanTrue;
11493: end setRuleApplied;
11494: procedure sortApplicableRules(sortByActionTypeIn in boolean) as
11495: exchangeActionTypeId integer;
11496: exchangeAppItemId ame_util.stringType;

Line 11496: exchangeAppItemId ame_util.stringType;

11492: engRuleAppliedYN(ruleIndexIn) := ame_util.booleanTrue;
11493: end setRuleApplied;
11494: procedure sortApplicableRules(sortByActionTypeIn in boolean) as
11495: exchangeActionTypeId integer;
11496: exchangeAppItemId ame_util.stringType;
11497: exchangeApproverCategory ame_util.charType;
11498: exchangeItemClassId integer;
11499: exchangeItemId ame_util.stringType;
11500: exchangeParameter ame_actions.parameter%type;

Line 11497: exchangeApproverCategory ame_util.charType;

11493: end setRuleApplied;
11494: procedure sortApplicableRules(sortByActionTypeIn in boolean) as
11495: exchangeActionTypeId integer;
11496: exchangeAppItemId ame_util.stringType;
11497: exchangeApproverCategory ame_util.charType;
11498: exchangeItemClassId integer;
11499: exchangeItemId ame_util.stringType;
11500: exchangeParameter ame_actions.parameter%type;
11501: exchangeParameterTwo ame_actions.parameter_two%type;

Line 11499: exchangeItemId ame_util.stringType;

11495: exchangeActionTypeId integer;
11496: exchangeAppItemId ame_util.stringType;
11497: exchangeApproverCategory ame_util.charType;
11498: exchangeItemClassId integer;
11499: exchangeItemId ame_util.stringType;
11500: exchangeParameter ame_actions.parameter%type;
11501: exchangeParameterTwo ame_actions.parameter_two%type;
11502: exchangePriority integer;
11503: exchangeRuleId integer;

Line 11505: exchangeRuleType ame_util.stringType;

11501: exchangeParameterTwo ame_actions.parameter_two%type;
11502: exchangePriority integer;
11503: exchangeRuleId integer;
11504: exchangeRuleItemClassId integer;
11505: exchangeRuleType ame_util.stringType;
11506: exchangeRuleAppliedYN ame_util.charType;
11507: begin
11508: /*
11509: This is a simple sort algorithm, but it is efficient for small input counts.

Line 11506: exchangeRuleAppliedYN ame_util.charType;

11502: exchangePriority integer;
11503: exchangeRuleId integer;
11504: exchangeRuleItemClassId integer;
11505: exchangeRuleType ame_util.stringType;
11506: exchangeRuleAppliedYN ame_util.charType;
11507: begin
11508: /*
11509: This is a simple sort algorithm, but it is efficient for small input counts.
11510: The inputs are generally nearly sorted, which makes at least a nonrandomized

Line 11575: ame_util.runtimeException(packageNameIn => 'ame_engine',

11571: end loop;
11572: end loop;
11573: exception
11574: when others then
11575: ame_util.runtimeException(packageNameIn => 'ame_engine',
11576: routineNameIn => 'sortApplicableRules',
11577: exceptionNumberIn => sqlcode,
11578: exceptionStringIn => sqlerrm);
11579: raise;

Line 11615: ame_util.appendRuleIdToSource(ruleIdIn => ruleIdIn,

11611: /* Get and set the approval status. */
11612: engStApprovers(approverIndexIn).approval_status :=
11613: getHandlerApprovalStatus(approverIn => engStApprovers(approverIndexIn));
11614: /* Append ruleIdIn to source value. */
11615: ame_util.appendRuleIdToSource(ruleIdIn => ruleIdIn,
11616: sourceInOut => engStApprovers(approverIndexIn).source);
11617: /* Update the occurrence values of the same approver wherever the approver occurs later in the same chain. */
11618: for i in approverIndexIn + 1 .. engStApprovers.count loop
11619: if(currentGroupOrChainId <> engStApprovers(i).group_or_chain_id or

Line 11635: ame_util.runtimeException(packageNameIn => 'ame_engine',

11631: end if;
11632: end loop;
11633: exception
11634: when others then
11635: ame_util.runtimeException(packageNameIn => 'ame_engine',
11636: routineNameIn => 'substituteApprover',
11637: exceptionNumberIn => sqlcode,
11638: exceptionStringIn => sqlerrm);
11639: raise;

Line 11695: ame_util.copyApproverRecord2(approverRecord2In => engStApprovers(i + truncateCount),

11691: */
11692: truncateCount := lastIndexToTruncate - firstIndexToTruncate + 1;
11693: /* Copy the end of the list down truncateCount places. */
11694: for i in firstIndexToTruncate .. (engStApproversCount - truncateCount) loop
11695: ame_util.copyApproverRecord2(approverRecord2In => engStApprovers(i + truncateCount),
11696: approverRecord2Out => engStApprovers(i));
11697: end loop;
11698: /* Code to delete the approvers from the tree whenever there are approver suppressions */
11699: if engPrepareApproverTree then

Line 11700: siblingTreeNodeIndex := ame_util.noSiblingIndex;

11696: approverRecord2Out => engStApprovers(i));
11697: end loop;
11698: /* Code to delete the approvers from the tree whenever there are approver suppressions */
11699: if engPrepareApproverTree then
11700: siblingTreeNodeIndex := ame_util.noSiblingIndex;
11701: /* Approvers Tree is sparse */
11702: loopIndex := engStApproversTree.last;
11703: loop
11704: if engStApproversTree(loopIndex).tree_level = 6 then

Line 11733: ame_util.runtimeException(packageNameIn => 'ame_engine',

11729: /* Delete the last truncateCount places. */
11730: engStApprovers.delete(engStApproversCount - truncateCount + 1, engStApproversCount);
11731: exception
11732: when others then
11733: ame_util.runtimeException(packageNameIn => 'ame_engine',
11734: routineNameIn => 'truncateChain',
11735: exceptionNumberIn => sqlcode,
11736: exceptionStringIn => sqlerrm);
11737: raise;

Line 11754: ame_util.runtimeException(packageNameIn => 'ame_engine',

11750: end if;
11751: engTransactionIsLocked := false;
11752: exception
11753: when others then
11754: ame_util.runtimeException(packageNameIn => 'ame_engine',
11755: routineNameIn => 'unlockTransaction',
11756: exceptionNumberIn => sqlcode,
11757: exceptionStringIn => sqlerrm);
11758: raise;

Line 11783: errorMessage ame_util.longestStringType;

11779: fndApplicationIdIn in integer default null,
11780: transactionTypeIdIn in varchar2 default null) as
11781: configVarException exception;
11782: errorCode integer;
11783: errorMessage ame_util.longestStringType;
11784: begin
11785: setContext(isTestTransactionIn => isTestTransactionIn,
11786: isLocalTransactionIn => isLocalTransactionIn,
11787: fetchConfigVarsIn => fetchConfigVarsIn,

Line 11944: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',

11940: end if;
11941: exception
11942: when configVarException then
11943: errorCode := -20001;
11944: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
11945: messageNameIn => 'AME_400691_INV_PARAM_ENG_UPDTX');
11946: ame_util.runtimeException(packageNameIn => 'ame_engine',
11947: routineNameIn => 'updateTransactionState',
11948: exceptionNumberIn => errorCode,

Line 11946: ame_util.runtimeException(packageNameIn => 'ame_engine',

11942: when configVarException then
11943: errorCode := -20001;
11944: errorMessage := ame_util.getMessage(applicationShortNameIn =>'PER',
11945: messageNameIn => 'AME_400691_INV_PARAM_ENG_UPDTX');
11946: ame_util.runtimeException(packageNameIn => 'ame_engine',
11947: routineNameIn => 'updateTransactionState',
11948: exceptionNumberIn => errorCode,
11949: exceptionStringIn => errorMessage);
11950: raise_application_error(errorCode,

Line 11953: ame_util.runtimeException(packageNameIn => 'ame_engine',

11949: exceptionStringIn => errorMessage);
11950: raise_application_error(errorCode,
11951: errorMessage);
11952: when others then
11953: ame_util.runtimeException(packageNameIn => 'ame_engine',
11954: routineNameIn => 'updateTransactionState',
11955: exceptionNumberIn => sqlcode,
11956: exceptionStringIn => sqlerrm);
11957: raise;

Line 11960: tempActionTypeIds ame_util.idList;

11956: exceptionStringIn => sqlerrm);
11957: raise;
11958: end updateTransactionState;
11959: procedure updateOldApproverList as
11960: tempActionTypeIds ame_util.idList;
11961: tempApiValues ame_util.charList;
11962: tempAuthorityValues ame_util.charList;
11963: tempCategories ame_util.charList;
11964: tempCount integer;

Line 11961: tempApiValues ame_util.charList;

11957: raise;
11958: end updateTransactionState;
11959: procedure updateOldApproverList as
11960: tempActionTypeIds ame_util.idList;
11961: tempApiValues ame_util.charList;
11962: tempAuthorityValues ame_util.charList;
11963: tempCategories ame_util.charList;
11964: tempCount integer;
11965: tempGroupOrChainIds ame_util.idList;

Line 11962: tempAuthorityValues ame_util.charList;

11958: end updateTransactionState;
11959: procedure updateOldApproverList as
11960: tempActionTypeIds ame_util.idList;
11961: tempApiValues ame_util.charList;
11962: tempAuthorityValues ame_util.charList;
11963: tempCategories ame_util.charList;
11964: tempCount integer;
11965: tempGroupOrChainIds ame_util.idList;
11966: tempItemClasses ame_util.stringList;

Line 11963: tempCategories ame_util.charList;

11959: procedure updateOldApproverList as
11960: tempActionTypeIds ame_util.idList;
11961: tempApiValues ame_util.charList;
11962: tempAuthorityValues ame_util.charList;
11963: tempCategories ame_util.charList;
11964: tempCount integer;
11965: tempGroupOrChainIds ame_util.idList;
11966: tempItemClasses ame_util.stringList;
11967: tempItemIds ame_util.stringList;

Line 11965: tempGroupOrChainIds ame_util.idList;

11961: tempApiValues ame_util.charList;
11962: tempAuthorityValues ame_util.charList;
11963: tempCategories ame_util.charList;
11964: tempCount integer;
11965: tempGroupOrChainIds ame_util.idList;
11966: tempItemClasses ame_util.stringList;
11967: tempItemIds ame_util.stringList;
11968: tempNames ame_util.longStringList;
11969: tempOccurrences ame_util.idList;

Line 11966: tempItemClasses ame_util.stringList;

11962: tempAuthorityValues ame_util.charList;
11963: tempCategories ame_util.charList;
11964: tempCount integer;
11965: tempGroupOrChainIds ame_util.idList;
11966: tempItemClasses ame_util.stringList;
11967: tempItemIds ame_util.stringList;
11968: tempNames ame_util.longStringList;
11969: tempOccurrences ame_util.idList;
11970: tempOrderNumbers ame_util.idList;

Line 11967: tempItemIds ame_util.stringList;

11963: tempCategories ame_util.charList;
11964: tempCount integer;
11965: tempGroupOrChainIds ame_util.idList;
11966: tempItemClasses ame_util.stringList;
11967: tempItemIds ame_util.stringList;
11968: tempNames ame_util.longStringList;
11969: tempOccurrences ame_util.idList;
11970: tempOrderNumbers ame_util.idList;
11971: tempStatuses ame_util.stringList;

Line 11968: tempNames ame_util.longStringList;

11964: tempCount integer;
11965: tempGroupOrChainIds ame_util.idList;
11966: tempItemClasses ame_util.stringList;
11967: tempItemIds ame_util.stringList;
11968: tempNames ame_util.longStringList;
11969: tempOccurrences ame_util.idList;
11970: tempOrderNumbers ame_util.idList;
11971: tempStatuses ame_util.stringList;
11972: begin

Line 11969: tempOccurrences ame_util.idList;

11965: tempGroupOrChainIds ame_util.idList;
11966: tempItemClasses ame_util.stringList;
11967: tempItemIds ame_util.stringList;
11968: tempNames ame_util.longStringList;
11969: tempOccurrences ame_util.idList;
11970: tempOrderNumbers ame_util.idList;
11971: tempStatuses ame_util.stringList;
11972: begin
11973: delete from ame_temp_old_approver_lists

Line 11970: tempOrderNumbers ame_util.idList;

11966: tempItemClasses ame_util.stringList;
11967: tempItemIds ame_util.stringList;
11968: tempNames ame_util.longStringList;
11969: tempOccurrences ame_util.idList;
11970: tempOrderNumbers ame_util.idList;
11971: tempStatuses ame_util.stringList;
11972: begin
11973: delete from ame_temp_old_approver_lists
11974: where

Line 11971: tempStatuses ame_util.stringList;

11967: tempItemIds ame_util.stringList;
11968: tempNames ame_util.longStringList;
11969: tempOccurrences ame_util.idList;
11970: tempOrderNumbers ame_util.idList;
11971: tempStatuses ame_util.stringList;
11972: begin
11973: delete from ame_temp_old_approver_lists
11974: where
11975: application_id = engAmeApplicationId and

Line 11981: ame_util.convertApproversTable2ToValues(approversTableIn => engStApprovers,

11977: /*
11978: Bulk insert the transaction's current state into ame_temp_old_approver_lists.
11979: Take the state from engStApprovers, to account for all operations on the approver list.
11980: */
11981: ame_util.convertApproversTable2ToValues(approversTableIn => engStApprovers,
11982: namesOut => tempNames,
11983: itemClassesOut => tempItemClasses,
11984: itemIdsOut => tempItemIds,
11985: apiInsertionsOut => tempApiValues,

Line 12034: ame_util.runtimeException(packageNameIn => 'ame_engine',

12030: tempCategories(i),
12031: tempStatuses(i));
12032: exception
12033: when others then
12034: ame_util.runtimeException(packageNameIn => 'ame_engine',
12035: routineNameIn => 'updateOldApproverList',
12036: exceptionNumberIn => sqlcode,
12037: exceptionStringIn => sqlerrm);
12038: raise;

Line 12048: ame_util.runtimeException(packageNameIn => 'ame_engine',

12044: begin
12045: null;
12046: exception
12047: when others then
12048: ame_util.runtimeException(packageNameIn => 'ame_engine',
12049: routineNameIn => 'testEngine',
12050: exceptionNumberIn => sqlcode,
12051: exceptionStringIn => sqlerrm);
12052: raise;

Line 12057: approverIn in ame_util.approverRecord2,

12053: end testEngine;
12054: procedure updateApprovalStatus(applicationIdIn in number,
12055: transactionTypeIn in varchar2,
12056: transactionIdIn in varchar2,
12057: approverIn in ame_util.approverRecord2,
12058: notificationIn in ame_util2.notificationRecord
12059: default ame_util2.emptyNotificationRecord,
12060: forwardeeIn in ame_util.approverRecord2 default
12061: ame_util.emptyApproverRecord2,

Line 12058: notificationIn in ame_util2.notificationRecord

12054: procedure updateApprovalStatus(applicationIdIn in number,
12055: transactionTypeIn in varchar2,
12056: transactionIdIn in varchar2,
12057: approverIn in ame_util.approverRecord2,
12058: notificationIn in ame_util2.notificationRecord
12059: default ame_util2.emptyNotificationRecord,
12060: forwardeeIn in ame_util.approverRecord2 default
12061: ame_util.emptyApproverRecord2,
12062: updateItemIn in boolean default false) as

Line 12059: default ame_util2.emptyNotificationRecord,

12055: transactionTypeIn in varchar2,
12056: transactionIdIn in varchar2,
12057: approverIn in ame_util.approverRecord2,
12058: notificationIn in ame_util2.notificationRecord
12059: default ame_util2.emptyNotificationRecord,
12060: forwardeeIn in ame_util.approverRecord2 default
12061: ame_util.emptyApproverRecord2,
12062: updateItemIn in boolean default false) as
12063: ameApplicationId integer;

Line 12060: forwardeeIn in ame_util.approverRecord2 default

12056: transactionIdIn in varchar2,
12057: approverIn in ame_util.approverRecord2,
12058: notificationIn in ame_util2.notificationRecord
12059: default ame_util2.emptyNotificationRecord,
12060: forwardeeIn in ame_util.approverRecord2 default
12061: ame_util.emptyApproverRecord2,
12062: updateItemIn in boolean default false) as
12063: ameApplicationId integer;
12064: apiInsertionException exception;

Line 12061: ame_util.emptyApproverRecord2,

12057: approverIn in ame_util.approverRecord2,
12058: notificationIn in ame_util2.notificationRecord
12059: default ame_util2.emptyNotificationRecord,
12060: forwardeeIn in ame_util.approverRecord2 default
12061: ame_util.emptyApproverRecord2,
12062: updateItemIn in boolean default false) as
12063: ameApplicationId integer;
12064: apiInsertionException exception;
12065: approver ame_util.approverRecord2;

Line 12065: approver ame_util.approverRecord2;

12061: ame_util.emptyApproverRecord2,
12062: updateItemIn in boolean default false) as
12063: ameApplicationId integer;
12064: apiInsertionException exception;
12065: approver ame_util.approverRecord2;
12066: approverInIndex integer;
12067: approverInIsSpecialForwardee boolean;
12068: badApproverException exception;
12069: badForwardeeException exception;

Line 12071: currentApprovers ame_util.approversTable2;

12067: approverInIsSpecialForwardee boolean;
12068: badApproverException exception;
12069: badForwardeeException exception;
12070: badStatusException exception;
12071: currentApprovers ame_util.approversTable2;
12072: errorCode integer;
12073: errorMessage ame_util.longStringType;
12074: firstIndexInChain integer;
12075: forwardee ame_util.approverRecord2;

Line 12073: errorMessage ame_util.longStringType;

12069: badForwardeeException exception;
12070: badStatusException exception;
12071: currentApprovers ame_util.approversTable2;
12072: errorCode integer;
12073: errorMessage ame_util.longStringType;
12074: firstIndexInChain integer;
12075: forwardee ame_util.approverRecord2;
12076: forwardeeIndex integer;
12077: forwardeeType ame_util.stringType;

Line 12075: forwardee ame_util.approverRecord2;

12071: currentApprovers ame_util.approversTable2;
12072: errorCode integer;
12073: errorMessage ame_util.longStringType;
12074: firstIndexInChain integer;
12075: forwardee ame_util.approverRecord2;
12076: forwardeeIndex integer;
12077: forwardeeType ame_util.stringType;
12078: forwarderFound boolean;
12079: forwarderType ame_util.stringType;

Line 12077: forwardeeType ame_util.stringType;

12073: errorMessage ame_util.longStringType;
12074: firstIndexInChain integer;
12075: forwardee ame_util.approverRecord2;
12076: forwardeeIndex integer;
12077: forwardeeType ame_util.stringType;
12078: forwarderFound boolean;
12079: forwarderType ame_util.stringType;
12080: forwardingBehavior ame_util.stringType;
12081: insertedApprover ame_util.approverRecord2;

Line 12079: forwarderType ame_util.stringType;

12075: forwardee ame_util.approverRecord2;
12076: forwardeeIndex integer;
12077: forwardeeType ame_util.stringType;
12078: forwarderFound boolean;
12079: forwarderType ame_util.stringType;
12080: forwardingBehavior ame_util.stringType;
12081: insertedApprover ame_util.approverRecord2;
12082: prevApproverIndex integer;
12083: prevApproverOccurrence integer;

Line 12080: forwardingBehavior ame_util.stringType;

12076: forwardeeIndex integer;
12077: forwardeeType ame_util.stringType;
12078: forwarderFound boolean;
12079: forwarderType ame_util.stringType;
12080: forwardingBehavior ame_util.stringType;
12081: insertedApprover ame_util.approverRecord2;
12082: prevApproverIndex integer;
12083: prevApproverOccurrence integer;
12084: repeatedIndexes ame_util.idList;

Line 12081: insertedApprover ame_util.approverRecord2;

12077: forwardeeType ame_util.stringType;
12078: forwarderFound boolean;
12079: forwarderType ame_util.stringType;
12080: forwardingBehavior ame_util.stringType;
12081: insertedApprover ame_util.approverRecord2;
12082: prevApproverIndex integer;
12083: prevApproverOccurrence integer;
12084: repeatedIndexes ame_util.idList;
12085: repeatedAppIndexes ame_util.idList;

Line 12084: repeatedIndexes ame_util.idList;

12080: forwardingBehavior ame_util.stringType;
12081: insertedApprover ame_util.approverRecord2;
12082: prevApproverIndex integer;
12083: prevApproverOccurrence integer;
12084: repeatedIndexes ame_util.idList;
12085: repeatedAppIndexes ame_util.idList;
12086: superiorApprover ame_util.approverRecord2;
12087: tempInsertionOrder integer;
12088: tempParameter ame_temp_insertions.parameter%type;

Line 12085: repeatedAppIndexes ame_util.idList;

12081: insertedApprover ame_util.approverRecord2;
12082: prevApproverIndex integer;
12083: prevApproverOccurrence integer;
12084: repeatedIndexes ame_util.idList;
12085: repeatedAppIndexes ame_util.idList;
12086: superiorApprover ame_util.approverRecord2;
12087: tempInsertionOrder integer;
12088: tempParameter ame_temp_insertions.parameter%type;
12089: tempCOAGroupActionTypeId integer;

Line 12086: superiorApprover ame_util.approverRecord2;

12082: prevApproverIndex integer;
12083: prevApproverOccurrence integer;
12084: repeatedIndexes ame_util.idList;
12085: repeatedAppIndexes ame_util.idList;
12086: superiorApprover ame_util.approverRecord2;
12087: tempInsertionOrder integer;
12088: tempParameter ame_temp_insertions.parameter%type;
12089: tempCOAGroupActionTypeId integer;
12090: tempPreGroupActionTypeId integer;

Line 12092: votingRegime ame_util.charType;

12088: tempParameter ame_temp_insertions.parameter%type;
12089: tempCOAGroupActionTypeId integer;
12090: tempPreGroupActionTypeId integer;
12091: tempPostGroupActionTypeId integer;
12092: votingRegime ame_util.charType;
12093: approverOldApprovalStatus varchar2(50);
12094: tempReason varchar2(50);
12095: tempStatus varchar2(50);
12096: begin

Line 12102: if(approverIn.approval_status = ame_util.clearExceptionsStatus) then

12098: ame_engine.lockTransaction(fndApplicationIdIn => applicationIdIn,
12099: transactionIdIn => transactionIdIn,
12100: transactionTypeIdIn => transactionTypeIn);
12101: /* Clear the exception log when required. */
12102: if(approverIn.approval_status = ame_util.clearExceptionsStatus) then
12103: delete from ame_exceptions_log
12104: where
12105: transaction_id = transactionIdIn and
12106: application_id = ameApplicationId;

Line 12149: (currentApprovers(i).approval_status = ame_util.approvedStatus or

12145: could be trying to clear an approvers status */
12146: if(approverIn.approval_status is null) then /* Clear Approver status */
12147: for i in 1 .. currentApprovers.count loop
12148: if(approverIn.name = currentApprovers(i).name and
12149: (currentApprovers(i).approval_status = ame_util.approvedStatus or
12150: currentApprovers(i).approval_status = ame_util.approveAndForwardStatus or
12151: currentApprovers(i).approval_status = ame_util.forwardStatus or
12152: currentApprovers(i).approval_status = ame_util2.reassignStatus or
12153: currentApprovers(i).approval_status = ame_util.rejectStatus or

Line 12150: currentApprovers(i).approval_status = ame_util.approveAndForwardStatus or

12146: if(approverIn.approval_status is null) then /* Clear Approver status */
12147: for i in 1 .. currentApprovers.count loop
12148: if(approverIn.name = currentApprovers(i).name and
12149: (currentApprovers(i).approval_status = ame_util.approvedStatus or
12150: currentApprovers(i).approval_status = ame_util.approveAndForwardStatus or
12151: currentApprovers(i).approval_status = ame_util.forwardStatus or
12152: currentApprovers(i).approval_status = ame_util2.reassignStatus or
12153: currentApprovers(i).approval_status = ame_util.rejectStatus or
12154: currentApprovers(i).approval_status = ame_util.notifiedStatus or

Line 12151: currentApprovers(i).approval_status = ame_util.forwardStatus or

12147: for i in 1 .. currentApprovers.count loop
12148: if(approverIn.name = currentApprovers(i).name and
12149: (currentApprovers(i).approval_status = ame_util.approvedStatus or
12150: currentApprovers(i).approval_status = ame_util.approveAndForwardStatus or
12151: currentApprovers(i).approval_status = ame_util.forwardStatus or
12152: currentApprovers(i).approval_status = ame_util2.reassignStatus or
12153: currentApprovers(i).approval_status = ame_util.rejectStatus or
12154: currentApprovers(i).approval_status = ame_util.notifiedStatus or
12155: currentApprovers(i).approval_status = ame_util.exceptionStatus or

Line 12152: currentApprovers(i).approval_status = ame_util2.reassignStatus or

12148: if(approverIn.name = currentApprovers(i).name and
12149: (currentApprovers(i).approval_status = ame_util.approvedStatus or
12150: currentApprovers(i).approval_status = ame_util.approveAndForwardStatus or
12151: currentApprovers(i).approval_status = ame_util.forwardStatus or
12152: currentApprovers(i).approval_status = ame_util2.reassignStatus or
12153: currentApprovers(i).approval_status = ame_util.rejectStatus or
12154: currentApprovers(i).approval_status = ame_util.notifiedStatus or
12155: currentApprovers(i).approval_status = ame_util.exceptionStatus or
12156: currentApprovers(i).approval_status = ame_util.noResponseStatus ) and

Line 12153: currentApprovers(i).approval_status = ame_util.rejectStatus or

12149: (currentApprovers(i).approval_status = ame_util.approvedStatus or
12150: currentApprovers(i).approval_status = ame_util.approveAndForwardStatus or
12151: currentApprovers(i).approval_status = ame_util.forwardStatus or
12152: currentApprovers(i).approval_status = ame_util2.reassignStatus or
12153: currentApprovers(i).approval_status = ame_util.rejectStatus or
12154: currentApprovers(i).approval_status = ame_util.notifiedStatus or
12155: currentApprovers(i).approval_status = ame_util.exceptionStatus or
12156: currentApprovers(i).approval_status = ame_util.noResponseStatus ) and
12157: (approverIn.occurrence is null or

Line 12154: currentApprovers(i).approval_status = ame_util.notifiedStatus or

12150: currentApprovers(i).approval_status = ame_util.approveAndForwardStatus or
12151: currentApprovers(i).approval_status = ame_util.forwardStatus or
12152: currentApprovers(i).approval_status = ame_util2.reassignStatus or
12153: currentApprovers(i).approval_status = ame_util.rejectStatus or
12154: currentApprovers(i).approval_status = ame_util.notifiedStatus or
12155: currentApprovers(i).approval_status = ame_util.exceptionStatus or
12156: currentApprovers(i).approval_status = ame_util.noResponseStatus ) and
12157: (approverIn.occurrence is null or
12158: approverIn.occurrence = currentApprovers(i).occurrence) and

Line 12155: currentApprovers(i).approval_status = ame_util.exceptionStatus or

12151: currentApprovers(i).approval_status = ame_util.forwardStatus or
12152: currentApprovers(i).approval_status = ame_util2.reassignStatus or
12153: currentApprovers(i).approval_status = ame_util.rejectStatus or
12154: currentApprovers(i).approval_status = ame_util.notifiedStatus or
12155: currentApprovers(i).approval_status = ame_util.exceptionStatus or
12156: currentApprovers(i).approval_status = ame_util.noResponseStatus ) and
12157: (approverIn.occurrence is null or
12158: approverIn.occurrence = currentApprovers(i).occurrence) and
12159: (approverIn.group_or_chain_id is null or

Line 12156: currentApprovers(i).approval_status = ame_util.noResponseStatus ) and

12152: currentApprovers(i).approval_status = ame_util2.reassignStatus or
12153: currentApprovers(i).approval_status = ame_util.rejectStatus or
12154: currentApprovers(i).approval_status = ame_util.notifiedStatus or
12155: currentApprovers(i).approval_status = ame_util.exceptionStatus or
12156: currentApprovers(i).approval_status = ame_util.noResponseStatus ) and
12157: (approverIn.occurrence is null or
12158: approverIn.occurrence = currentApprovers(i).occurrence) and
12159: (approverIn.group_or_chain_id is null or
12160: approverIn.group_or_chain_id = currentApprovers(i).group_or_chain_id) and

Line 12175: currentApprovers(i).approval_status = ame_util.nullStatus or

12171: else
12172: for i in 1 .. currentApprovers.count loop
12173: if(approverIn.name = currentApprovers(i).name and
12174: (currentApprovers(i).approval_status is null or
12175: currentApprovers(i).approval_status = ame_util.nullStatus or
12176: (currentApprovers(i).approver_category = ame_util.approvalApproverCategory and
12177: currentApprovers(i).approval_status = ame_util.notifiedStatus)) and
12178: (approverIn.occurrence is null or
12179: approverIn.occurrence = currentApprovers(i).occurrence) and

Line 12176: (currentApprovers(i).approver_category = ame_util.approvalApproverCategory and

12172: for i in 1 .. currentApprovers.count loop
12173: if(approverIn.name = currentApprovers(i).name and
12174: (currentApprovers(i).approval_status is null or
12175: currentApprovers(i).approval_status = ame_util.nullStatus or
12176: (currentApprovers(i).approver_category = ame_util.approvalApproverCategory and
12177: currentApprovers(i).approval_status = ame_util.notifiedStatus)) and
12178: (approverIn.occurrence is null or
12179: approverIn.occurrence = currentApprovers(i).occurrence) and
12180: (approverIn.group_or_chain_id is null or

Line 12177: currentApprovers(i).approval_status = ame_util.notifiedStatus)) and

12173: if(approverIn.name = currentApprovers(i).name and
12174: (currentApprovers(i).approval_status is null or
12175: currentApprovers(i).approval_status = ame_util.nullStatus or
12176: (currentApprovers(i).approver_category = ame_util.approvalApproverCategory and
12177: currentApprovers(i).approval_status = ame_util.notifiedStatus)) and
12178: (approverIn.occurrence is null or
12179: approverIn.occurrence = currentApprovers(i).occurrence) and
12180: (approverIn.group_or_chain_id is null or
12181: approverIn.group_or_chain_id = currentApprovers(i).group_or_chain_id) and

Line 12204: ame_util.copyApproverRecord2(approverRecord2In => approverIn,

12200: end loop;
12201: end if;
12202: /* Initialize the local variable approver. */
12203: if(approverInIndex is null) then
12204: ame_util.copyApproverRecord2(approverRecord2In => approverIn,
12205: approverRecord2Out => approver);
12206: else
12207: ame_util.copyApproverRecord2(approverRecord2In => currentApprovers(approverInIndex),
12208: approverRecord2Out => approver);

Line 12207: ame_util.copyApproverRecord2(approverRecord2In => currentApprovers(approverInIndex),

12203: if(approverInIndex is null) then
12204: ame_util.copyApproverRecord2(approverRecord2In => approverIn,
12205: approverRecord2Out => approver);
12206: else
12207: ame_util.copyApproverRecord2(approverRecord2In => currentApprovers(approverInIndex),
12208: approverRecord2Out => approver);
12209: approverOldApprovalStatus := approver.approval_status;
12210: approver.approval_status := approverIn.approval_status;
12211: end if;

Line 12218: if((approver.approver_category = ame_util.approvalApproverCategory and

12214: currentApprovers(approverInIndex). Any code below this comment that cannot reference
12215: approver should have a comment explaining why.
12216: */
12217: /* Make sure the input approval statuses are valid. */
12218: if((approver.approver_category = ame_util.approvalApproverCategory and
12219: approver.approval_status not in (ame_util.approvedStatus,
12220: ame_util.approveAndForwardStatus,
12221: ame_util.forwardStatus,
12222: ame_util.rejectStatus,

Line 12219: approver.approval_status not in (ame_util.approvedStatus,

12215: approver should have a comment explaining why.
12216: */
12217: /* Make sure the input approval statuses are valid. */
12218: if((approver.approver_category = ame_util.approvalApproverCategory and
12219: approver.approval_status not in (ame_util.approvedStatus,
12220: ame_util.approveAndForwardStatus,
12221: ame_util.forwardStatus,
12222: ame_util.rejectStatus,
12223: ame_util.noResponseStatus,

Line 12220: ame_util.approveAndForwardStatus,

12216: */
12217: /* Make sure the input approval statuses are valid. */
12218: if((approver.approver_category = ame_util.approvalApproverCategory and
12219: approver.approval_status not in (ame_util.approvedStatus,
12220: ame_util.approveAndForwardStatus,
12221: ame_util.forwardStatus,
12222: ame_util.rejectStatus,
12223: ame_util.noResponseStatus,
12224: ame_util.nullStatus,

Line 12221: ame_util.forwardStatus,

12217: /* Make sure the input approval statuses are valid. */
12218: if((approver.approver_category = ame_util.approvalApproverCategory and
12219: approver.approval_status not in (ame_util.approvedStatus,
12220: ame_util.approveAndForwardStatus,
12221: ame_util.forwardStatus,
12222: ame_util.rejectStatus,
12223: ame_util.noResponseStatus,
12224: ame_util.nullStatus,
12225: ame_util.notifiedStatus,

Line 12222: ame_util.rejectStatus,

12218: if((approver.approver_category = ame_util.approvalApproverCategory and
12219: approver.approval_status not in (ame_util.approvedStatus,
12220: ame_util.approveAndForwardStatus,
12221: ame_util.forwardStatus,
12222: ame_util.rejectStatus,
12223: ame_util.noResponseStatus,
12224: ame_util.nullStatus,
12225: ame_util.notifiedStatus,
12226: ame_util2.reassignStatus) and

Line 12223: ame_util.noResponseStatus,

12219: approver.approval_status not in (ame_util.approvedStatus,
12220: ame_util.approveAndForwardStatus,
12221: ame_util.forwardStatus,
12222: ame_util.rejectStatus,
12223: ame_util.noResponseStatus,
12224: ame_util.nullStatus,
12225: ame_util.notifiedStatus,
12226: ame_util2.reassignStatus) and
12227: approver.approval_status is not null) or

Line 12224: ame_util.nullStatus,

12220: ame_util.approveAndForwardStatus,
12221: ame_util.forwardStatus,
12222: ame_util.rejectStatus,
12223: ame_util.noResponseStatus,
12224: ame_util.nullStatus,
12225: ame_util.notifiedStatus,
12226: ame_util2.reassignStatus) and
12227: approver.approval_status is not null) or
12228: (approver.approver_category = ame_util.fyiApproverCategory and

Line 12225: ame_util.notifiedStatus,

12221: ame_util.forwardStatus,
12222: ame_util.rejectStatus,
12223: ame_util.noResponseStatus,
12224: ame_util.nullStatus,
12225: ame_util.notifiedStatus,
12226: ame_util2.reassignStatus) and
12227: approver.approval_status is not null) or
12228: (approver.approver_category = ame_util.fyiApproverCategory and
12229: approver.approval_status is not null and

Line 12226: ame_util2.reassignStatus) and

12222: ame_util.rejectStatus,
12223: ame_util.noResponseStatus,
12224: ame_util.nullStatus,
12225: ame_util.notifiedStatus,
12226: ame_util2.reassignStatus) and
12227: approver.approval_status is not null) or
12228: (approver.approver_category = ame_util.fyiApproverCategory and
12229: approver.approval_status is not null and
12230: approver.approval_status <> ame_util.notifiedStatus)) then

Line 12228: (approver.approver_category = ame_util.fyiApproverCategory and

12224: ame_util.nullStatus,
12225: ame_util.notifiedStatus,
12226: ame_util2.reassignStatus) and
12227: approver.approval_status is not null) or
12228: (approver.approver_category = ame_util.fyiApproverCategory and
12229: approver.approval_status is not null and
12230: approver.approval_status <> ame_util.notifiedStatus)) then
12231: raise badStatusException;
12232: end if;

Line 12230: approver.approval_status <> ame_util.notifiedStatus)) then

12226: ame_util2.reassignStatus) and
12227: approver.approval_status is not null) or
12228: (approver.approver_category = ame_util.fyiApproverCategory and
12229: approver.approval_status is not null and
12230: approver.approval_status <> ame_util.notifiedStatus)) then
12231: raise badStatusException;
12232: end if;
12233: /* Prepare forwardee (if any), if the forwarder is in the current list. */
12234: if(approver.approval_status in (ame_util.approveAndForwardStatus, ame_util.forwardStatus) and

Line 12234: if(approver.approval_status in (ame_util.approveAndForwardStatus, ame_util.forwardStatus) and

12230: approver.approval_status <> ame_util.notifiedStatus)) then
12231: raise badStatusException;
12232: end if;
12233: /* Prepare forwardee (if any), if the forwarder is in the current list. */
12234: if(approver.approval_status in (ame_util.approveAndForwardStatus, ame_util.forwardStatus) and
12235: approverInIndex is not null) then
12236: /* Make sure a valid forwardee exists for forwardings. */
12237: if(forwardeeIn.name is null or
12238: forwardeeIn.name = approver.name) then

Line 12241: if(approver.source like (ame_util.specialForwardInsertion || '%')) then

12237: if(forwardeeIn.name is null or
12238: forwardeeIn.name = approver.name) then
12239: raise badForwardeeException;
12240: end if;
12241: if(approver.source like (ame_util.specialForwardInsertion || '%')) then
12242: approverInIsSpecialForwardee := true;
12243: else
12244: approverInIsSpecialForwardee := false;
12245: end if;

Line 12247: ame_util.copyApproverRecord2(approverRecord2In => forwardeeIn,

12243: else
12244: approverInIsSpecialForwardee := false;
12245: end if;
12246: /* Copy forwardeeIn to forwardee. */
12247: ame_util.copyApproverRecord2(approverRecord2In => forwardeeIn,
12248: approverRecord2Out => forwardee);
12249: /* If approverInIsSpecialForwardee, silently convert api_insertion to
12250: ame_util.apiInsertion for forwardee */
12251: if approverInIsSpecialForwardee then

Line 12250: ame_util.apiInsertion for forwardee */

12246: /* Copy forwardeeIn to forwardee. */
12247: ame_util.copyApproverRecord2(approverRecord2In => forwardeeIn,
12248: approverRecord2Out => forwardee);
12249: /* If approverInIsSpecialForwardee, silently convert api_insertion to
12250: ame_util.apiInsertion for forwardee */
12251: if approverInIsSpecialForwardee then
12252: forwardee.api_insertion := ame_util.apiInsertion;
12253: end if;
12254: /* Make sure the forwardee has the correct api_insertion value for COA forwarders. */

Line 12252: forwardee.api_insertion := ame_util.apiInsertion;

12248: approverRecord2Out => forwardee);
12249: /* If approverInIsSpecialForwardee, silently convert api_insertion to
12250: ame_util.apiInsertion for forwardee */
12251: if approverInIsSpecialForwardee then
12252: forwardee.api_insertion := ame_util.apiInsertion;
12253: end if;
12254: /* Make sure the forwardee has the correct api_insertion value for COA forwarders. */
12255: if(/* Special forwardees can only do ad-hoc forwardings. */
12256: (approverInIsSpecialForwardee and

Line 12257: forwardee.api_insertion <> ame_util.apiInsertion) or

12253: end if;
12254: /* Make sure the forwardee has the correct api_insertion value for COA forwarders. */
12255: if(/* Special forwardees can only do ad-hoc forwardings. */
12256: (approverInIsSpecialForwardee and
12257: forwardee.api_insertion <> ame_util.apiInsertion) or
12258: /* Ad-hoc approvers can only do ad-hoc forwardings. */
12259: ((not approverInIsSpecialForwardee and
12260: approver.authority <> ame_util.authorityApprover or
12261: approver.api_insertion = ame_util.apiInsertion) and

Line 12260: approver.authority <> ame_util.authorityApprover or

12256: (approverInIsSpecialForwardee and
12257: forwardee.api_insertion <> ame_util.apiInsertion) or
12258: /* Ad-hoc approvers can only do ad-hoc forwardings. */
12259: ((not approverInIsSpecialForwardee and
12260: approver.authority <> ame_util.authorityApprover or
12261: approver.api_insertion = ame_util.apiInsertion) and
12262: forwardee.api_insertion <> ame_util.apiInsertion) or
12263: /* COA approvers other than special forwardees can only do COA forwardings. */
12264: (not approverInIsSpecialForwardee and

Line 12261: approver.api_insertion = ame_util.apiInsertion) and

12257: forwardee.api_insertion <> ame_util.apiInsertion) or
12258: /* Ad-hoc approvers can only do ad-hoc forwardings. */
12259: ((not approverInIsSpecialForwardee and
12260: approver.authority <> ame_util.authorityApprover or
12261: approver.api_insertion = ame_util.apiInsertion) and
12262: forwardee.api_insertion <> ame_util.apiInsertion) or
12263: /* COA approvers other than special forwardees can only do COA forwardings. */
12264: (not approverInIsSpecialForwardee and
12265: approver.authority = ame_util.authorityApprover and

Line 12262: forwardee.api_insertion <> ame_util.apiInsertion) or

12258: /* Ad-hoc approvers can only do ad-hoc forwardings. */
12259: ((not approverInIsSpecialForwardee and
12260: approver.authority <> ame_util.authorityApprover or
12261: approver.api_insertion = ame_util.apiInsertion) and
12262: forwardee.api_insertion <> ame_util.apiInsertion) or
12263: /* COA approvers other than special forwardees can only do COA forwardings. */
12264: (not approverInIsSpecialForwardee and
12265: approver.authority = ame_util.authorityApprover and
12266: approver.api_insertion <> ame_util.apiInsertion and

Line 12265: approver.authority = ame_util.authorityApprover and

12261: approver.api_insertion = ame_util.apiInsertion) and
12262: forwardee.api_insertion <> ame_util.apiInsertion) or
12263: /* COA approvers other than special forwardees can only do COA forwardings. */
12264: (not approverInIsSpecialForwardee and
12265: approver.authority = ame_util.authorityApprover and
12266: approver.api_insertion <> ame_util.apiInsertion and
12267: forwardee.api_insertion <> ame_util.apiAuthorityInsertion)) then
12268: raise apiInsertionException;
12269: end if;

Line 12266: approver.api_insertion <> ame_util.apiInsertion and

12262: forwardee.api_insertion <> ame_util.apiInsertion) or
12263: /* COA approvers other than special forwardees can only do COA forwardings. */
12264: (not approverInIsSpecialForwardee and
12265: approver.authority = ame_util.authorityApprover and
12266: approver.api_insertion <> ame_util.apiInsertion and
12267: forwardee.api_insertion <> ame_util.apiAuthorityInsertion)) then
12268: raise apiInsertionException;
12269: end if;
12270: /* Make sure forwardee has complete approver-matching data. */

Line 12267: forwardee.api_insertion <> ame_util.apiAuthorityInsertion)) then

12263: /* COA approvers other than special forwardees can only do COA forwardings. */
12264: (not approverInIsSpecialForwardee and
12265: approver.authority = ame_util.authorityApprover and
12266: approver.api_insertion <> ame_util.apiInsertion and
12267: forwardee.api_insertion <> ame_util.apiAuthorityInsertion)) then
12268: raise apiInsertionException;
12269: end if;
12270: /* Make sure forwardee has complete approver-matching data. */
12271: if(forwardee.orig_system is null or

Line 12285: forwardee.api_insertion := ame_util.apiInsertion;

12281: make sure the forwardee is an ad-hoc insertion. Make this change silently,
12282: so calling applications don't have to be originating-system aware.
12283: */
12284: if(approver.orig_system <> forwardee.orig_system) then
12285: forwardee.api_insertion := ame_util.apiInsertion;
12286: end if;
12287: forwardee.item_class := approver.item_class;
12288: forwardee.item_id := approver.item_id;
12289: forwardee.authority := approver.authority;

Line 12309: ame_util.nullStatus, ame_util.nullHistoryStatus,

12305: occurrence)
12306: values(transactionIdIn,
12307: ameApplicationId,
12308: decode(approver.approval_status,
12309: ame_util.nullStatus, ame_util.nullHistoryStatus,
12310: null, ame_util.nullHistoryStatus,
12311: approver.approval_status),
12312: sysdate,
12313: approver.item_class,

Line 12310: null, ame_util.nullHistoryStatus,

12306: values(transactionIdIn,
12307: ameApplicationId,
12308: decode(approver.approval_status,
12309: ame_util.nullStatus, ame_util.nullHistoryStatus,
12310: null, ame_util.nullHistoryStatus,
12311: approver.approval_status),
12312: sysdate,
12313: approver.item_class,
12314: approver.item_id,

Line 12317: ame_util.nullHistoryActionTypeId,

12313: approver.item_class,
12314: approver.item_id,
12315: approver.name,
12316: approver.approver_category,
12317: ame_util.nullHistoryActionTypeId,
12318: ame_util.nullHistoryGroupOrChainId,
12319: ame_util.nullHistoryOccurrence);
12320: /* As approver is no longer in the approval list, log the message in the
12321: history table with a cleared date equal to sysdate. Also, first set

Line 12318: ame_util.nullHistoryGroupOrChainId,

12314: approver.item_id,
12315: approver.name,
12316: approver.approver_category,
12317: ame_util.nullHistoryActionTypeId,
12318: ame_util.nullHistoryGroupOrChainId,
12319: ame_util.nullHistoryOccurrence);
12320: /* As approver is no longer in the approval list, log the message in the
12321: history table with a cleared date equal to sysdate. Also, first set
12322: date_cleared for other possible rows for this approver in the history

Line 12319: ame_util.nullHistoryOccurrence);

12315: approver.name,
12316: approver.approver_category,
12317: ame_util.nullHistoryActionTypeId,
12318: ame_util.nullHistoryGroupOrChainId,
12319: ame_util.nullHistoryOccurrence);
12320: /* As approver is no longer in the approval list, log the message in the
12321: history table with a cleared date equal to sysdate. Also, first set
12322: date_cleared for other possible rows for this approver in the history
12323: table so that rows do not appear in the history table. */

Line 12350: ,actionTypeIdIn => ame_util.nullHistoryActionTypeId

12346: ,nameIn => approver.name
12347: ,appCategoryIn => approver.approver_category
12348: ,itemClassIn => approver.item_class
12349: ,itemIdIn => approver.item_id
12350: ,actionTypeIdIn => ame_util.nullHistoryActionTypeId
12351: ,authorityIn => approver.authority
12352: ,statusIn => approver.approval_status
12353: ,grpOrChainIdIn => ame_util.nullHistoryGroupOrChainId
12354: ,occurrenceIn => ame_util.nullHistoryOccurrence

Line 12353: ,grpOrChainIdIn => ame_util.nullHistoryGroupOrChainId

12349: ,itemIdIn => approver.item_id
12350: ,actionTypeIdIn => ame_util.nullHistoryActionTypeId
12351: ,authorityIn => approver.authority
12352: ,statusIn => approver.approval_status
12353: ,grpOrChainIdIn => ame_util.nullHistoryGroupOrChainId
12354: ,occurrenceIn => ame_util.nullHistoryOccurrence
12355: ,apiInsertionIn => approver.api_insertion
12356: ,memberOrderNumberIn => approver.member_order_number
12357: ,notificationIdIn => notificationIn.notification_id

Line 12354: ,occurrenceIn => ame_util.nullHistoryOccurrence

12350: ,actionTypeIdIn => ame_util.nullHistoryActionTypeId
12351: ,authorityIn => approver.authority
12352: ,statusIn => approver.approval_status
12353: ,grpOrChainIdIn => ame_util.nullHistoryGroupOrChainId
12354: ,occurrenceIn => ame_util.nullHistoryOccurrence
12355: ,apiInsertionIn => approver.api_insertion
12356: ,memberOrderNumberIn => approver.member_order_number
12357: ,notificationIdIn => notificationIn.notification_id
12358: ,userCommentsIn => notificationIn.user_comments

Line 12363: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',

12359: ,dateClearedIn => sysdate
12360: ,historyTypeIn => 'APPROVERNOTPRESENT');
12361: /* Insert a warning into AME's exception log and return. */
12362: errorCode := -20001;
12363: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',
12364: messageNameIn => 'AME_400065_API_NO_MATCH_APPR2');
12365: /*
12366: Pass localErrorIn => true in this case, because we're just logging a warning
12367: to the AME exception log, and we don't want the warning to appear in the

Line 12370: ame_util.runtimeException(packageNameIn => 'ame_engine',

12366: Pass localErrorIn => true in this case, because we're just logging a warning
12367: to the AME exception log, and we don't want the warning to appear in the
12368: Workflow context stack.
12369: */
12370: ame_util.runtimeException(packageNameIn => 'ame_engine',
12371: routineNameIn => 'updateApprovalStatus',
12372: exceptionNumberIn => errorCode,
12373: exceptionStringIn => errorMessage);
12374: return;

Line 12390: ame_util.nullStatus, ame_util.nullHistoryStatus,

12386: occurrence)
12387: values(transactionIdIn,
12388: ameApplicationId,
12389: decode(approver.approval_status,
12390: ame_util.nullStatus, ame_util.nullHistoryStatus,
12391: null, ame_util.nullHistoryStatus,
12392: approver.approval_status),
12393: sysdate,
12394: approver.item_class,

Line 12391: null, ame_util.nullHistoryStatus,

12387: values(transactionIdIn,
12388: ameApplicationId,
12389: decode(approver.approval_status,
12390: ame_util.nullStatus, ame_util.nullHistoryStatus,
12391: null, ame_util.nullHistoryStatus,
12392: approver.approval_status),
12393: sysdate,
12394: approver.item_class,
12395: approver.item_id,

Line 12405: if(approverOldApprovalStatus in (ame_util.suppressedStatus, ame_util.beatByFirstResponderStatus, ame_util.repeatedStatus)) then

12401: /*
12402: If the approver has been suppressed or is a repeated approver, disregard their response,
12403: even if they're trying to forward.
12404: */
12405: if(approverOldApprovalStatus in (ame_util.suppressedStatus, ame_util.beatByFirstResponderStatus, ame_util.repeatedStatus)) then
12406: /* The response though disregarded must be logged in the history table. This should not be shown in
12407: the history region. Hence set the date_cleared to sysdate. */
12408: insertIntoTransApprovalHistory
12409: (transactionIdIn => transactionIdIn

Line 12456: if(approver.approval_status in (ame_util.forwardStatus, ame_util.approveAndForwardStatus)) then

12452: is true, update also any other occurrences of the same approver for the same item
12453: class and item ID.
12454: */
12455: if(updateItemIn) then
12456: if(approver.approval_status in (ame_util.forwardStatus, ame_util.approveAndForwardStatus)) then
12457: /* Update the forwarder proper. */
12458: update ame_temp_old_approver_lists
12459: set approval_status = approver.approval_status
12460: where

Line 12471: set approval_status = ame_util.suppressedStatus

12467: group_or_chain_id = approver.group_or_chain_id and
12468: occurrence = approver.occurrence;
12469: /* Suppress other occurrences of the approver, for the same item. */
12470: update ame_temp_old_approver_lists
12471: set approval_status = ame_util.suppressedStatus
12472: where
12473: application_id = ameApplicationId and
12474: transaction_id = transactionIdIn and
12475: name = approver.name and

Line 12509: if approver.approval_status in (ame_util.approvedStatus

12505: if approverInIndex is not null then
12506: setInsertedApprovalStatus(currentApproverIndexIn => approverInIndex
12507: ,approvalStatusIn => approver.approval_status);
12508: end if;
12509: if approver.approval_status in (ame_util.approvedStatus
12510: ,ame_util.rejectStatus
12511: ,ame_util.approveAndForwardStatus
12512: ,ame_util.forwardStatus
12513: ,ame_util.noResponseStatus) then

Line 12510: ,ame_util.rejectStatus

12506: setInsertedApprovalStatus(currentApproverIndexIn => approverInIndex
12507: ,approvalStatusIn => approver.approval_status);
12508: end if;
12509: if approver.approval_status in (ame_util.approvedStatus
12510: ,ame_util.rejectStatus
12511: ,ame_util.approveAndForwardStatus
12512: ,ame_util.forwardStatus
12513: ,ame_util.noResponseStatus) then
12514: for z in 1 .. repeatedIndexes.count loop

Line 12511: ,ame_util.approveAndForwardStatus

12507: ,approvalStatusIn => approver.approval_status);
12508: end if;
12509: if approver.approval_status in (ame_util.approvedStatus
12510: ,ame_util.rejectStatus
12511: ,ame_util.approveAndForwardStatus
12512: ,ame_util.forwardStatus
12513: ,ame_util.noResponseStatus) then
12514: for z in 1 .. repeatedIndexes.count loop
12515: if repeatedIndexes(z) = approverInIndex and repeatedAppIndexes(z) <> approverInIndex then

Line 12512: ,ame_util.forwardStatus

12508: end if;
12509: if approver.approval_status in (ame_util.approvedStatus
12510: ,ame_util.rejectStatus
12511: ,ame_util.approveAndForwardStatus
12512: ,ame_util.forwardStatus
12513: ,ame_util.noResponseStatus) then
12514: for z in 1 .. repeatedIndexes.count loop
12515: if repeatedIndexes(z) = approverInIndex and repeatedAppIndexes(z) <> approverInIndex then
12516: update ame_temp_old_approver_lists

Line 12513: ,ame_util.noResponseStatus) then

12509: if approver.approval_status in (ame_util.approvedStatus
12510: ,ame_util.rejectStatus
12511: ,ame_util.approveAndForwardStatus
12512: ,ame_util.forwardStatus
12513: ,ame_util.noResponseStatus) then
12514: for z in 1 .. repeatedIndexes.count loop
12515: if repeatedIndexes(z) = approverInIndex and repeatedAppIndexes(z) <> approverInIndex then
12516: update ame_temp_old_approver_lists
12517: set approval_status = decode(approver.approval_status

Line 12518: ,ame_util.approvedStatus

12514: for z in 1 .. repeatedIndexes.count loop
12515: if repeatedIndexes(z) = approverInIndex and repeatedAppIndexes(z) <> approverInIndex then
12516: update ame_temp_old_approver_lists
12517: set approval_status = decode(approver.approval_status
12518: ,ame_util.approvedStatus
12519: ,ame_util.approvedByRepeatedStatus
12520: ,ame_util.approveAndForwardStatus
12521: ,ame_util.approvedByRepeatedStatus
12522: ,ame_util.rejectStatus

Line 12519: ,ame_util.approvedByRepeatedStatus

12515: if repeatedIndexes(z) = approverInIndex and repeatedAppIndexes(z) <> approverInIndex then
12516: update ame_temp_old_approver_lists
12517: set approval_status = decode(approver.approval_status
12518: ,ame_util.approvedStatus
12519: ,ame_util.approvedByRepeatedStatus
12520: ,ame_util.approveAndForwardStatus
12521: ,ame_util.approvedByRepeatedStatus
12522: ,ame_util.rejectStatus
12523: ,ame_util.rejectedByRepeatedStatus

Line 12520: ,ame_util.approveAndForwardStatus

12516: update ame_temp_old_approver_lists
12517: set approval_status = decode(approver.approval_status
12518: ,ame_util.approvedStatus
12519: ,ame_util.approvedByRepeatedStatus
12520: ,ame_util.approveAndForwardStatus
12521: ,ame_util.approvedByRepeatedStatus
12522: ,ame_util.rejectStatus
12523: ,ame_util.rejectedByRepeatedStatus
12524: ,ame_util.forwardStatus

Line 12521: ,ame_util.approvedByRepeatedStatus

12517: set approval_status = decode(approver.approval_status
12518: ,ame_util.approvedStatus
12519: ,ame_util.approvedByRepeatedStatus
12520: ,ame_util.approveAndForwardStatus
12521: ,ame_util.approvedByRepeatedStatus
12522: ,ame_util.rejectStatus
12523: ,ame_util.rejectedByRepeatedStatus
12524: ,ame_util.forwardStatus
12525: ,ame_util2.forwardByRepeatedStatus

Line 12522: ,ame_util.rejectStatus

12518: ,ame_util.approvedStatus
12519: ,ame_util.approvedByRepeatedStatus
12520: ,ame_util.approveAndForwardStatus
12521: ,ame_util.approvedByRepeatedStatus
12522: ,ame_util.rejectStatus
12523: ,ame_util.rejectedByRepeatedStatus
12524: ,ame_util.forwardStatus
12525: ,ame_util2.forwardByRepeatedStatus
12526: ,ame_util2.reassignStatus

Line 12523: ,ame_util.rejectedByRepeatedStatus

12519: ,ame_util.approvedByRepeatedStatus
12520: ,ame_util.approveAndForwardStatus
12521: ,ame_util.approvedByRepeatedStatus
12522: ,ame_util.rejectStatus
12523: ,ame_util.rejectedByRepeatedStatus
12524: ,ame_util.forwardStatus
12525: ,ame_util2.forwardByRepeatedStatus
12526: ,ame_util2.reassignStatus
12527: ,ame_util.nullStatus

Line 12524: ,ame_util.forwardStatus

12520: ,ame_util.approveAndForwardStatus
12521: ,ame_util.approvedByRepeatedStatus
12522: ,ame_util.rejectStatus
12523: ,ame_util.rejectedByRepeatedStatus
12524: ,ame_util.forwardStatus
12525: ,ame_util2.forwardByRepeatedStatus
12526: ,ame_util2.reassignStatus
12527: ,ame_util.nullStatus
12528: ,ame_util.noResponseStatus

Line 12525: ,ame_util2.forwardByRepeatedStatus

12521: ,ame_util.approvedByRepeatedStatus
12522: ,ame_util.rejectStatus
12523: ,ame_util.rejectedByRepeatedStatus
12524: ,ame_util.forwardStatus
12525: ,ame_util2.forwardByRepeatedStatus
12526: ,ame_util2.reassignStatus
12527: ,ame_util.nullStatus
12528: ,ame_util.noResponseStatus
12529: ,ame_util2.noResponseByRepeatedStatus

Line 12526: ,ame_util2.reassignStatus

12522: ,ame_util.rejectStatus
12523: ,ame_util.rejectedByRepeatedStatus
12524: ,ame_util.forwardStatus
12525: ,ame_util2.forwardByRepeatedStatus
12526: ,ame_util2.reassignStatus
12527: ,ame_util.nullStatus
12528: ,ame_util.noResponseStatus
12529: ,ame_util2.noResponseByRepeatedStatus
12530: ,ame_util.repeatedStatus)

Line 12527: ,ame_util.nullStatus

12523: ,ame_util.rejectedByRepeatedStatus
12524: ,ame_util.forwardStatus
12525: ,ame_util2.forwardByRepeatedStatus
12526: ,ame_util2.reassignStatus
12527: ,ame_util.nullStatus
12528: ,ame_util.noResponseStatus
12529: ,ame_util2.noResponseByRepeatedStatus
12530: ,ame_util.repeatedStatus)
12531: where application_id = ameApplicationId

Line 12528: ,ame_util.noResponseStatus

12524: ,ame_util.forwardStatus
12525: ,ame_util2.forwardByRepeatedStatus
12526: ,ame_util2.reassignStatus
12527: ,ame_util.nullStatus
12528: ,ame_util.noResponseStatus
12529: ,ame_util2.noResponseByRepeatedStatus
12530: ,ame_util.repeatedStatus)
12531: where application_id = ameApplicationId
12532: and transaction_id = transactionIdIn

Line 12529: ,ame_util2.noResponseByRepeatedStatus

12525: ,ame_util2.forwardByRepeatedStatus
12526: ,ame_util2.reassignStatus
12527: ,ame_util.nullStatus
12528: ,ame_util.noResponseStatus
12529: ,ame_util2.noResponseByRepeatedStatus
12530: ,ame_util.repeatedStatus)
12531: where application_id = ameApplicationId
12532: and transaction_id = transactionIdIn
12533: and name = approver.name

Line 12530: ,ame_util.repeatedStatus)

12526: ,ame_util2.reassignStatus
12527: ,ame_util.nullStatus
12528: ,ame_util.noResponseStatus
12529: ,ame_util2.noResponseByRepeatedStatus
12530: ,ame_util.repeatedStatus)
12531: where application_id = ameApplicationId
12532: and transaction_id = transactionIdIn
12533: and name = approver.name
12534: and item_class = currentApprovers(repeatedAppIndexes(z)).item_class

Line 12539: and approval_status in ( ame_util.notifiedByRepeatedStatus

12535: and item_id = currentApprovers(repeatedAppIndexes(z)).item_id
12536: and action_type_id = currentApprovers(repeatedAppIndexes(z)).action_type_id
12537: and group_or_chain_id = currentApprovers(repeatedAppIndexes(z)).group_or_chain_id
12538: and occurrence = currentApprovers(repeatedAppIndexes(z)).occurrence
12539: and approval_status in ( ame_util.notifiedByRepeatedStatus
12540: ,ame_util.repeatedStatus);
12541: select decode(approver.approval_status
12542: ,ame_util.approvedStatus
12543: ,ame_util.approvedByRepeatedStatus

Line 12540: ,ame_util.repeatedStatus);

12536: and action_type_id = currentApprovers(repeatedAppIndexes(z)).action_type_id
12537: and group_or_chain_id = currentApprovers(repeatedAppIndexes(z)).group_or_chain_id
12538: and occurrence = currentApprovers(repeatedAppIndexes(z)).occurrence
12539: and approval_status in ( ame_util.notifiedByRepeatedStatus
12540: ,ame_util.repeatedStatus);
12541: select decode(approver.approval_status
12542: ,ame_util.approvedStatus
12543: ,ame_util.approvedByRepeatedStatus
12544: ,ame_util.approveAndForwardStatus

Line 12542: ,ame_util.approvedStatus

12538: and occurrence = currentApprovers(repeatedAppIndexes(z)).occurrence
12539: and approval_status in ( ame_util.notifiedByRepeatedStatus
12540: ,ame_util.repeatedStatus);
12541: select decode(approver.approval_status
12542: ,ame_util.approvedStatus
12543: ,ame_util.approvedByRepeatedStatus
12544: ,ame_util.approveAndForwardStatus
12545: ,ame_util.approvedByRepeatedStatus
12546: ,ame_util.rejectStatus

Line 12543: ,ame_util.approvedByRepeatedStatus

12539: and approval_status in ( ame_util.notifiedByRepeatedStatus
12540: ,ame_util.repeatedStatus);
12541: select decode(approver.approval_status
12542: ,ame_util.approvedStatus
12543: ,ame_util.approvedByRepeatedStatus
12544: ,ame_util.approveAndForwardStatus
12545: ,ame_util.approvedByRepeatedStatus
12546: ,ame_util.rejectStatus
12547: ,ame_util.rejectedByRepeatedStatus

Line 12544: ,ame_util.approveAndForwardStatus

12540: ,ame_util.repeatedStatus);
12541: select decode(approver.approval_status
12542: ,ame_util.approvedStatus
12543: ,ame_util.approvedByRepeatedStatus
12544: ,ame_util.approveAndForwardStatus
12545: ,ame_util.approvedByRepeatedStatus
12546: ,ame_util.rejectStatus
12547: ,ame_util.rejectedByRepeatedStatus
12548: ,ame_util.forwardStatus

Line 12545: ,ame_util.approvedByRepeatedStatus

12541: select decode(approver.approval_status
12542: ,ame_util.approvedStatus
12543: ,ame_util.approvedByRepeatedStatus
12544: ,ame_util.approveAndForwardStatus
12545: ,ame_util.approvedByRepeatedStatus
12546: ,ame_util.rejectStatus
12547: ,ame_util.rejectedByRepeatedStatus
12548: ,ame_util.forwardStatus
12549: ,ame_util2.forwardByRepeatedStatus

Line 12546: ,ame_util.rejectStatus

12542: ,ame_util.approvedStatus
12543: ,ame_util.approvedByRepeatedStatus
12544: ,ame_util.approveAndForwardStatus
12545: ,ame_util.approvedByRepeatedStatus
12546: ,ame_util.rejectStatus
12547: ,ame_util.rejectedByRepeatedStatus
12548: ,ame_util.forwardStatus
12549: ,ame_util2.forwardByRepeatedStatus
12550: ,ame_util2.reassignStatus

Line 12547: ,ame_util.rejectedByRepeatedStatus

12543: ,ame_util.approvedByRepeatedStatus
12544: ,ame_util.approveAndForwardStatus
12545: ,ame_util.approvedByRepeatedStatus
12546: ,ame_util.rejectStatus
12547: ,ame_util.rejectedByRepeatedStatus
12548: ,ame_util.forwardStatus
12549: ,ame_util2.forwardByRepeatedStatus
12550: ,ame_util2.reassignStatus
12551: ,ame_util.nullStatus

Line 12548: ,ame_util.forwardStatus

12544: ,ame_util.approveAndForwardStatus
12545: ,ame_util.approvedByRepeatedStatus
12546: ,ame_util.rejectStatus
12547: ,ame_util.rejectedByRepeatedStatus
12548: ,ame_util.forwardStatus
12549: ,ame_util2.forwardByRepeatedStatus
12550: ,ame_util2.reassignStatus
12551: ,ame_util.nullStatus
12552: ,ame_util.noResponseStatus

Line 12549: ,ame_util2.forwardByRepeatedStatus

12545: ,ame_util.approvedByRepeatedStatus
12546: ,ame_util.rejectStatus
12547: ,ame_util.rejectedByRepeatedStatus
12548: ,ame_util.forwardStatus
12549: ,ame_util2.forwardByRepeatedStatus
12550: ,ame_util2.reassignStatus
12551: ,ame_util.nullStatus
12552: ,ame_util.noResponseStatus
12553: ,ame_util2.noResponseByRepeatedStatus

Line 12550: ,ame_util2.reassignStatus

12546: ,ame_util.rejectStatus
12547: ,ame_util.rejectedByRepeatedStatus
12548: ,ame_util.forwardStatus
12549: ,ame_util2.forwardByRepeatedStatus
12550: ,ame_util2.reassignStatus
12551: ,ame_util.nullStatus
12552: ,ame_util.noResponseStatus
12553: ,ame_util2.noResponseByRepeatedStatus
12554: ,ame_util.repeatedStatus) into tempStatus from dual;

Line 12551: ,ame_util.nullStatus

12547: ,ame_util.rejectedByRepeatedStatus
12548: ,ame_util.forwardStatus
12549: ,ame_util2.forwardByRepeatedStatus
12550: ,ame_util2.reassignStatus
12551: ,ame_util.nullStatus
12552: ,ame_util.noResponseStatus
12553: ,ame_util2.noResponseByRepeatedStatus
12554: ,ame_util.repeatedStatus) into tempStatus from dual;
12555: setInsertedApprovalStatus(currentApproverIndexIn => repeatedAppIndexes(z)

Line 12552: ,ame_util.noResponseStatus

12548: ,ame_util.forwardStatus
12549: ,ame_util2.forwardByRepeatedStatus
12550: ,ame_util2.reassignStatus
12551: ,ame_util.nullStatus
12552: ,ame_util.noResponseStatus
12553: ,ame_util2.noResponseByRepeatedStatus
12554: ,ame_util.repeatedStatus) into tempStatus from dual;
12555: setInsertedApprovalStatus(currentApproverIndexIn => repeatedAppIndexes(z)
12556: ,approvalStatusIn => tempStatus);

Line 12553: ,ame_util2.noResponseByRepeatedStatus

12549: ,ame_util2.forwardByRepeatedStatus
12550: ,ame_util2.reassignStatus
12551: ,ame_util.nullStatus
12552: ,ame_util.noResponseStatus
12553: ,ame_util2.noResponseByRepeatedStatus
12554: ,ame_util.repeatedStatus) into tempStatus from dual;
12555: setInsertedApprovalStatus(currentApproverIndexIn => repeatedAppIndexes(z)
12556: ,approvalStatusIn => tempStatus);
12557: end if;

Line 12554: ,ame_util.repeatedStatus) into tempStatus from dual;

12550: ,ame_util2.reassignStatus
12551: ,ame_util.nullStatus
12552: ,ame_util.noResponseStatus
12553: ,ame_util2.noResponseByRepeatedStatus
12554: ,ame_util.repeatedStatus) into tempStatus from dual;
12555: setInsertedApprovalStatus(currentApproverIndexIn => repeatedAppIndexes(z)
12556: ,approvalStatusIn => tempStatus);
12557: end if;
12558: end loop;

Line 12560: if approver.approval_status in (ame_util.approvedStatus, ame_util.rejectStatus ) then

12556: ,approvalStatusIn => tempStatus);
12557: end if;
12558: end loop;
12559: end if;
12560: if approver.approval_status in (ame_util.approvedStatus, ame_util.rejectStatus ) then
12561: /* Account for approval-group and chain-of-authority voting. */
12562: /* get action type id's for ame_util.groupChainApprovalTypeName,
12563: ame_util.postApprovalTypeName and ame_util.preApprovalTypeName */
12564: tempCOAGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>

Line 12562: /* get action type id's for ame_util.groupChainApprovalTypeName,

12558: end loop;
12559: end if;
12560: if approver.approval_status in (ame_util.approvedStatus, ame_util.rejectStatus ) then
12561: /* Account for approval-group and chain-of-authority voting. */
12562: /* get action type id's for ame_util.groupChainApprovalTypeName,
12563: ame_util.postApprovalTypeName and ame_util.preApprovalTypeName */
12564: tempCOAGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>
12565: ame_util.groupChainApprovalTypeName);
12566: tempPreGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>

Line 12563: ame_util.postApprovalTypeName and ame_util.preApprovalTypeName */

12559: end if;
12560: if approver.approval_status in (ame_util.approvedStatus, ame_util.rejectStatus ) then
12561: /* Account for approval-group and chain-of-authority voting. */
12562: /* get action type id's for ame_util.groupChainApprovalTypeName,
12563: ame_util.postApprovalTypeName and ame_util.preApprovalTypeName */
12564: tempCOAGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>
12565: ame_util.groupChainApprovalTypeName);
12566: tempPreGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>
12567: ame_util.preApprovalTypeName);

Line 12565: ame_util.groupChainApprovalTypeName);

12561: /* Account for approval-group and chain-of-authority voting. */
12562: /* get action type id's for ame_util.groupChainApprovalTypeName,
12563: ame_util.postApprovalTypeName and ame_util.preApprovalTypeName */
12564: tempCOAGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>
12565: ame_util.groupChainApprovalTypeName);
12566: tempPreGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>
12567: ame_util.preApprovalTypeName);
12568: tempPostGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>
12569: ame_util.postApprovalTypeName);

Line 12567: ame_util.preApprovalTypeName);

12563: ame_util.postApprovalTypeName and ame_util.preApprovalTypeName */
12564: tempCOAGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>
12565: ame_util.groupChainApprovalTypeName);
12566: tempPreGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>
12567: ame_util.preApprovalTypeName);
12568: tempPostGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>
12569: ame_util.postApprovalTypeName);
12570: if approver.action_type_id in (tempPreGroupActionTypeId
12571: ,tempPostGroupActionTypeId) then

Line 12569: ame_util.postApprovalTypeName);

12565: ame_util.groupChainApprovalTypeName);
12566: tempPreGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>
12567: ame_util.preApprovalTypeName);
12568: tempPostGroupActionTypeId := ame_action_pkg.getActionTypeIdByName(actionTypeNameIn =>
12569: ame_util.postApprovalTypeName);
12570: if approver.action_type_id in (tempPreGroupActionTypeId
12571: ,tempPostGroupActionTypeId) then
12572: -- removed tempCOAGroupActionTypeId from above list for the
12573: -- bug 4095605

Line 12581: if(votingRegime = ame_util.firstApproverVoting) then

12577: -- in approver.group_or_chain_id
12578: else
12579: votingRegime := ame_engine.getActionTypeVotingRegime(actionTypeIdIn => approver.action_type_id);
12580: end if;
12581: if(votingRegime = ame_util.firstApproverVoting) then
12582: /*
12583: approverIn must be the first responder (otherwise, they would be suppressed,
12584: and we would have returned above). Suppress the other approval approvers in the
12585: group or chain (including other occurrences of the input approver).

Line 12588: set approval_status = ame_util.beatByFirstResponderStatus

12584: and we would have returned above). Suppress the other approval approvers in the
12585: group or chain (including other occurrences of the input approver).
12586: */
12587: update ame_temp_old_approver_lists
12588: set approval_status = ame_util.beatByFirstResponderStatus
12589: where
12590: application_id = ameApplicationId and
12591: transaction_id = transactionIdIn and
12592: (name <> approver.name or

Line 12598: approver_category = ame_util.approvalApproverCategory and

12594: item_class = approver.item_class and
12595: item_id = approver.item_id and
12596: action_type_id = approver.action_type_id and
12597: group_or_chain_id = approver.group_or_chain_id and
12598: approver_category = ame_util.approvalApproverCategory and
12599: approval_status = ame_util.notifiedStatus;
12600: for i in 1..currentApprovers.count loop
12601: if currentApprovers(i).item_class = approver.item_class and
12602: currentApprovers(i).item_id = approver.item_id and

Line 12599: approval_status = ame_util.notifiedStatus;

12595: item_id = approver.item_id and
12596: action_type_id = approver.action_type_id and
12597: group_or_chain_id = approver.group_or_chain_id and
12598: approver_category = ame_util.approvalApproverCategory and
12599: approval_status = ame_util.notifiedStatus;
12600: for i in 1..currentApprovers.count loop
12601: if currentApprovers(i).item_class = approver.item_class and
12602: currentApprovers(i).item_id = approver.item_id and
12603: currentApprovers(i).action_type_id = approver.action_type_id and

Line 12606: currentApprovers(i).approval_status = ame_util.notifiedStatus and

12602: currentApprovers(i).item_id = approver.item_id and
12603: currentApprovers(i).action_type_id = approver.action_type_id and
12604: currentApprovers(i).group_or_chain_id = approver.group_or_chain_id and
12605: currentApprovers(i).approver_category = approver.approver_category and
12606: currentApprovers(i).approval_status = ame_util.notifiedStatus and
12607: (currentApprovers(i).name <> approver.name or
12608: currentApprovers(i).occurrence <> approver.occurrence) then
12609: setInsertedApprovalStatus(currentApproverIndexIn => i
12610: ,approvalStatusIn => ame_util.beatByFirstResponderStatus);

Line 12610: ,approvalStatusIn => ame_util.beatByFirstResponderStatus);

12606: currentApprovers(i).approval_status = ame_util.notifiedStatus and
12607: (currentApprovers(i).name <> approver.name or
12608: currentApprovers(i).occurrence <> approver.occurrence) then
12609: setInsertedApprovalStatus(currentApproverIndexIn => i
12610: ,approvalStatusIn => ame_util.beatByFirstResponderStatus);
12611: end if;
12612: end loop;
12613: /* Insert rows in the notification approval history region for approvers
12614: with beat by first responder */

Line 12642: and currentApprovers(x).approver_category = ame_util.approvalApproverCategory

12638: and currentApprovers(x).action_type_id = approver.action_type_id
12639: and currentApprovers(x).group_or_chain_id = approver.group_or_chain_id
12640: and (currentApprovers(x).name <> approver.name or
12641: currentApprovers(x).occurrence <> approver.occurrence)
12642: and currentApprovers(x).approver_category = ame_util.approvalApproverCategory
12643: and currentApprovers(x).approval_status <> ame_util.approvedByRepeatedStatus then
12644: for z in 1 .. repeatedIndexes.count loop
12645: if repeatedIndexes(z) = x and repeatedAppIndexes(z) <> x then
12646: update ame_temp_old_approver_lists

Line 12643: and currentApprovers(x).approval_status <> ame_util.approvedByRepeatedStatus then

12639: and currentApprovers(x).group_or_chain_id = approver.group_or_chain_id
12640: and (currentApprovers(x).name <> approver.name or
12641: currentApprovers(x).occurrence <> approver.occurrence)
12642: and currentApprovers(x).approver_category = ame_util.approvalApproverCategory
12643: and currentApprovers(x).approval_status <> ame_util.approvedByRepeatedStatus then
12644: for z in 1 .. repeatedIndexes.count loop
12645: if repeatedIndexes(z) = x and repeatedAppIndexes(z) <> x then
12646: update ame_temp_old_approver_lists
12647: set approval_status = ame_util.nullStatus

Line 12647: set approval_status = ame_util.nullStatus

12643: and currentApprovers(x).approval_status <> ame_util.approvedByRepeatedStatus then
12644: for z in 1 .. repeatedIndexes.count loop
12645: if repeatedIndexes(z) = x and repeatedAppIndexes(z) <> x then
12646: update ame_temp_old_approver_lists
12647: set approval_status = ame_util.nullStatus
12648: where application_id = ameApplicationId
12649: and transaction_id = transactionIdIn
12650: and name = currentApprovers(x).name
12651: and item_class = currentApprovers(repeatedAppIndexes(z)).item_class

Line 12656: and approval_status = ame_util.notifiedByRepeatedStatus;

12652: and item_id = currentApprovers(repeatedAppIndexes(z)).item_id
12653: and action_type_id = currentApprovers(repeatedAppIndexes(z)).action_type_id
12654: and group_or_chain_id = currentApprovers(repeatedAppIndexes(z)).group_or_chain_id
12655: and occurrence = currentApprovers(repeatedAppIndexes(z)).occurrence
12656: and approval_status = ame_util.notifiedByRepeatedStatus;
12657: if(sql%rowcount > 0) then
12658: setInsertedApprovalStatus(currentApproverIndexIn => repeatedAppIndexes(z)
12659: ,approvalStatusIn => ame_util.nullStatus);
12660: end if;

Line 12659: ,approvalStatusIn => ame_util.nullStatus);

12655: and occurrence = currentApprovers(repeatedAppIndexes(z)).occurrence
12656: and approval_status = ame_util.notifiedByRepeatedStatus;
12657: if(sql%rowcount > 0) then
12658: setInsertedApprovalStatus(currentApproverIndexIn => repeatedAppIndexes(z)
12659: ,approvalStatusIn => ame_util.nullStatus);
12660: end if;
12661: end if;
12662: end loop;
12663: end if;

Line 12671: if(approver.approval_status = ame_util2.reassignStatus) then

12667: end if;
12668: --+
12669: --+ process reassignStatus
12670: --+
12671: if(approver.approval_status = ame_util2.reassignStatus) then
12672: ame_util.copyApproverRecord2(approverRecord2In => forwardeeIn,
12673: approverRecord2Out => forwardee);
12674: -- fetch forwardee details
12675: if(forwardee.orig_system is null or

Line 12672: ame_util.copyApproverRecord2(approverRecord2In => forwardeeIn,

12668: --+
12669: --+ process reassignStatus
12670: --+
12671: if(approver.approval_status = ame_util2.reassignStatus) then
12672: ame_util.copyApproverRecord2(approverRecord2In => forwardeeIn,
12673: approverRecord2Out => forwardee);
12674: -- fetch forwardee details
12675: if(forwardee.orig_system is null or
12676: forwardee.orig_system_id is null or

Line 12685: ame_util.fieldDelimiter ||

12681: displayNameOut => forwardee.display_name);
12682: end if;
12683: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12684: tempParameter := approver.name ||
12685: ame_util.fieldDelimiter ||
12686: approver.item_class ||
12687: ame_util.fieldDelimiter ||
12688: approver.item_id ||
12689: ame_util.fieldDelimiter ||

Line 12687: ame_util.fieldDelimiter ||

12683: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12684: tempParameter := approver.name ||
12685: ame_util.fieldDelimiter ||
12686: approver.item_class ||
12687: ame_util.fieldDelimiter ||
12688: approver.item_id ||
12689: ame_util.fieldDelimiter ||
12690: approver.action_type_id ||
12691: ame_util.fieldDelimiter ||

Line 12689: ame_util.fieldDelimiter ||

12685: ame_util.fieldDelimiter ||
12686: approver.item_class ||
12687: ame_util.fieldDelimiter ||
12688: approver.item_id ||
12689: ame_util.fieldDelimiter ||
12690: approver.action_type_id ||
12691: ame_util.fieldDelimiter ||
12692: approver.group_or_chain_id ||
12693: ame_util.fieldDelimiter ||

Line 12691: ame_util.fieldDelimiter ||

12687: ame_util.fieldDelimiter ||
12688: approver.item_id ||
12689: ame_util.fieldDelimiter ||
12690: approver.action_type_id ||
12691: ame_util.fieldDelimiter ||
12692: approver.group_or_chain_id ||
12693: ame_util.fieldDelimiter ||
12694: approver.occurrence;
12695: insert into ame_temp_insertions(

Line 12693: ame_util.fieldDelimiter ||

12689: ame_util.fieldDelimiter ||
12690: approver.action_type_id ||
12691: ame_util.fieldDelimiter ||
12692: approver.group_or_chain_id ||
12693: ame_util.fieldDelimiter ||
12694: approver.occurrence;
12695: insert into ame_temp_insertions(
12696: transaction_id,
12697: application_id,

Line 12713: ame_util.afterApprover,

12709: reason) values(
12710: transactionIdIn,
12711: ameApplicationId,
12712: tempInsertionOrder,
12713: ame_util.afterApprover,
12714: tempParameter,
12715: ame_util.afterApproverDescription || approver.display_name,
12716: forwardee.name,
12717: forwardee.item_class,

Line 12715: ame_util.afterApproverDescription || approver.display_name,

12711: ameApplicationId,
12712: tempInsertionOrder,
12713: ame_util.afterApprover,
12714: tempParameter,
12715: ame_util.afterApproverDescription || approver.display_name,
12716: forwardee.name,
12717: forwardee.item_class,
12718: forwardee.item_id,
12719: forwardee.approver_category,

Line 12721: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,

12717: forwardee.item_class,
12718: forwardee.item_id,
12719: forwardee.approver_category,
12720: decode(forwarderType,
12721: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,
12722: ame_util.apiInsertion),
12723: approver.authority,
12724: sysdate,
12725: ame_approver_deviation_pkg.reassignStatus );

Line 12722: ame_util.apiInsertion),

12718: forwardee.item_id,
12719: forwardee.approver_category,
12720: decode(forwarderType,
12721: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,
12722: ame_util.apiInsertion),
12723: approver.authority,
12724: sysdate,
12725: ame_approver_deviation_pkg.reassignStatus );
12726: end if;

Line 12729: if(approver.approval_status in (ame_util.forwardStatus,

12725: ame_approver_deviation_pkg.reassignStatus );
12726: end if;
12727: --+
12728: /* Process the forwardee, checking for special forwarding cases. */
12729: if(approver.approval_status in (ame_util.forwardStatus,
12730: ame_util.approveAndForwardStatus)) then
12731: forwardeeType := null;
12732: if(approverInIsSpecialForwardee or
12733: approver.authority <> ame_util.authorityApprover or

Line 12730: ame_util.approveAndForwardStatus)) then

12726: end if;
12727: --+
12728: /* Process the forwardee, checking for special forwarding cases. */
12729: if(approver.approval_status in (ame_util.forwardStatus,
12730: ame_util.approveAndForwardStatus)) then
12731: forwardeeType := null;
12732: if(approverInIsSpecialForwardee or
12733: approver.authority <> ame_util.authorityApprover or
12734: approver.api_insertion = ame_util.apiInsertion) then

Line 12733: approver.authority <> ame_util.authorityApprover or

12729: if(approver.approval_status in (ame_util.forwardStatus,
12730: ame_util.approveAndForwardStatus)) then
12731: forwardeeType := null;
12732: if(approverInIsSpecialForwardee or
12733: approver.authority <> ame_util.authorityApprover or
12734: approver.api_insertion = ame_util.apiInsertion) then
12735: forwarderType := ame_util.adHocForwarder;
12736: else
12737: forwarderType := ame_util.chainOfAuthorityForwarder;

Line 12734: approver.api_insertion = ame_util.apiInsertion) then

12730: ame_util.approveAndForwardStatus)) then
12731: forwardeeType := null;
12732: if(approverInIsSpecialForwardee or
12733: approver.authority <> ame_util.authorityApprover or
12734: approver.api_insertion = ame_util.apiInsertion) then
12735: forwarderType := ame_util.adHocForwarder;
12736: else
12737: forwarderType := ame_util.chainOfAuthorityForwarder;
12738: end if;

Line 12735: forwarderType := ame_util.adHocForwarder;

12731: forwardeeType := null;
12732: if(approverInIsSpecialForwardee or
12733: approver.authority <> ame_util.authorityApprover or
12734: approver.api_insertion = ame_util.apiInsertion) then
12735: forwarderType := ame_util.adHocForwarder;
12736: else
12737: forwarderType := ame_util.chainOfAuthorityForwarder;
12738: end if;
12739: /* Use the reverse keyword to find the match nearest to approver. */

Line 12737: forwarderType := ame_util.chainOfAuthorityForwarder;

12733: approver.authority <> ame_util.authorityApprover or
12734: approver.api_insertion = ame_util.apiInsertion) then
12735: forwarderType := ame_util.adHocForwarder;
12736: else
12737: forwarderType := ame_util.chainOfAuthorityForwarder;
12738: end if;
12739: /* Use the reverse keyword to find the match nearest to approver. */
12740: for i in reverse 1 .. approverInIndex loop
12741: if(currentApprovers(i).name = forwardee.name) then

Line 12743: if(forwarderType = ame_util.chainOfAuthorityForwarder and

12739: /* Use the reverse keyword to find the match nearest to approver. */
12740: for i in reverse 1 .. approverInIndex loop
12741: if(currentApprovers(i).name = forwardee.name) then
12742: forwardeeIndex := i;
12743: if(forwarderType = ame_util.chainOfAuthorityForwarder and
12744: currentApprovers(i).action_type_id = forwardee.action_type_id and
12745: currentApprovers(i).group_or_chain_id = forwardee.group_or_chain_id) then
12746: forwardeeType := ame_util.previousSameChainForwardee;
12747: else

Line 12746: forwardeeType := ame_util.previousSameChainForwardee;

12742: forwardeeIndex := i;
12743: if(forwarderType = ame_util.chainOfAuthorityForwarder and
12744: currentApprovers(i).action_type_id = forwardee.action_type_id and
12745: currentApprovers(i).group_or_chain_id = forwardee.group_or_chain_id) then
12746: forwardeeType := ame_util.previousSameChainForwardee;
12747: else
12748: forwardeeType := ame_util.alreadyInListForwardee;
12749: end if;
12750: exit;

Line 12748: forwardeeType := ame_util.alreadyInListForwardee;

12744: currentApprovers(i).action_type_id = forwardee.action_type_id and
12745: currentApprovers(i).group_or_chain_id = forwardee.group_or_chain_id) then
12746: forwardeeType := ame_util.previousSameChainForwardee;
12747: else
12748: forwardeeType := ame_util.alreadyInListForwardee;
12749: end if;
12750: exit;
12751: end if;
12752: end loop;

Line 12753: if(forwarderType = ame_util.chainOfAuthorityForwarder and

12749: end if;
12750: exit;
12751: end if;
12752: end loop;
12753: if(forwarderType = ame_util.chainOfAuthorityForwarder and
12754: (forwardeeType is null or
12755: forwardeeType = ame_util.alreadyInListForwardee) and
12756: ame_approver_type_pkg.isASubordinate(approverIn => approver,
12757: possibleSubordApproverIn => forwardee)) then

Line 12755: forwardeeType = ame_util.alreadyInListForwardee) and

12751: end if;
12752: end loop;
12753: if(forwarderType = ame_util.chainOfAuthorityForwarder and
12754: (forwardeeType is null or
12755: forwardeeType = ame_util.alreadyInListForwardee) and
12756: ame_approver_type_pkg.isASubordinate(approverIn => approver,
12757: possibleSubordApproverIn => forwardee)) then
12758: forwardeeType := ame_util.subordSameHierarchyForwardee;
12759: end if;

Line 12758: forwardeeType := ame_util.subordSameHierarchyForwardee;

12754: (forwardeeType is null or
12755: forwardeeType = ame_util.alreadyInListForwardee) and
12756: ame_approver_type_pkg.isASubordinate(approverIn => approver,
12757: possibleSubordApproverIn => forwardee)) then
12758: forwardeeType := ame_util.subordSameHierarchyForwardee;
12759: end if;
12760: if(forwardeeType = ame_util.previousSameChainForwardee) then
12761: forwardee.occurrence := currentApprovers(forwardeeIndex).occurrence + 1;
12762: else

Line 12760: if(forwardeeType = ame_util.previousSameChainForwardee) then

12756: ame_approver_type_pkg.isASubordinate(approverIn => approver,
12757: possibleSubordApproverIn => forwardee)) then
12758: forwardeeType := ame_util.subordSameHierarchyForwardee;
12759: end if;
12760: if(forwardeeType = ame_util.previousSameChainForwardee) then
12761: forwardee.occurrence := currentApprovers(forwardeeIndex).occurrence + 1;
12762: else
12763: forwardee.occurrence := 1;
12764: end if;

Line 12767: forwarderType := ame_util.adHocForwarder;

12763: forwardee.occurrence := 1;
12764: end if;
12765: if(forwardeeType is null) then /* Handle normal forwarding cases. */
12766: if(approver.orig_system <> forwardee.orig_system) then
12767: forwarderType := ame_util.adHocForwarder;
12768: end if;
12769: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12770: tempParameter := approver.name ||
12771: ame_util.fieldDelimiter ||

Line 12771: ame_util.fieldDelimiter ||

12767: forwarderType := ame_util.adHocForwarder;
12768: end if;
12769: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12770: tempParameter := approver.name ||
12771: ame_util.fieldDelimiter ||
12772: approver.item_class ||
12773: ame_util.fieldDelimiter ||
12774: approver.item_id ||
12775: ame_util.fieldDelimiter ||

Line 12773: ame_util.fieldDelimiter ||

12769: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12770: tempParameter := approver.name ||
12771: ame_util.fieldDelimiter ||
12772: approver.item_class ||
12773: ame_util.fieldDelimiter ||
12774: approver.item_id ||
12775: ame_util.fieldDelimiter ||
12776: approver.action_type_id ||
12777: ame_util.fieldDelimiter ||

Line 12775: ame_util.fieldDelimiter ||

12771: ame_util.fieldDelimiter ||
12772: approver.item_class ||
12773: ame_util.fieldDelimiter ||
12774: approver.item_id ||
12775: ame_util.fieldDelimiter ||
12776: approver.action_type_id ||
12777: ame_util.fieldDelimiter ||
12778: approver.group_or_chain_id ||
12779: ame_util.fieldDelimiter ||

Line 12777: ame_util.fieldDelimiter ||

12773: ame_util.fieldDelimiter ||
12774: approver.item_id ||
12775: ame_util.fieldDelimiter ||
12776: approver.action_type_id ||
12777: ame_util.fieldDelimiter ||
12778: approver.group_or_chain_id ||
12779: ame_util.fieldDelimiter ||
12780: approver.occurrence;
12781: insert into ame_temp_insertions(

Line 12779: ame_util.fieldDelimiter ||

12775: ame_util.fieldDelimiter ||
12776: approver.action_type_id ||
12777: ame_util.fieldDelimiter ||
12778: approver.group_or_chain_id ||
12779: ame_util.fieldDelimiter ||
12780: approver.occurrence;
12781: insert into ame_temp_insertions(
12782: transaction_id,
12783: application_id,

Line 12799: ame_util.afterApprover,

12795: reason) values(
12796: transactionIdIn,
12797: ameApplicationId,
12798: tempInsertionOrder,
12799: ame_util.afterApprover,
12800: tempParameter,
12801: ame_util.afterApproverDescription || approver.display_name,
12802: forwardee.name,
12803: forwardee.item_class,

Line 12801: ame_util.afterApproverDescription || approver.display_name,

12797: ameApplicationId,
12798: tempInsertionOrder,
12799: ame_util.afterApprover,
12800: tempParameter,
12801: ame_util.afterApproverDescription || approver.display_name,
12802: forwardee.name,
12803: forwardee.item_class,
12804: forwardee.item_id,
12805: forwardee.approver_category,

Line 12807: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,

12803: forwardee.item_class,
12804: forwardee.item_id,
12805: forwardee.approver_category,
12806: decode(forwarderType,
12807: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,
12808: ame_util.apiInsertion),
12809: approver.authority,
12810: sysdate
12811: ,ame_approver_deviation_pkg.forwardReason );

Line 12808: ame_util.apiInsertion),

12804: forwardee.item_id,
12805: forwardee.approver_category,
12806: decode(forwarderType,
12807: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,
12808: ame_util.apiInsertion),
12809: approver.authority,
12810: sysdate
12811: ,ame_approver_deviation_pkg.forwardReason );
12812: else /* Handle special forwarding cases. */

Line 12816: should always be ame_util.specialForwardInsertion. The insertions' order

12812: else /* Handle special forwarding cases. */
12813: /*
12814: All of the insertees generated within this if statement should have the same
12815: action_type_id and group_or_chain_id as approver. The insertees' source
12816: should always be ame_util.specialForwardInsertion. The insertions' order
12817: types should always be ame_util.afterApprover.
12818: */
12819: forwardingBehavior := ame_engine.getForwardingBehavior(forwarderTypeIn => forwarderType,
12820: forwardeeTypeIn => forwardeeType,

Line 12817: types should always be ame_util.afterApprover.

12813: /*
12814: All of the insertees generated within this if statement should have the same
12815: action_type_id and group_or_chain_id as approver. The insertees' source
12816: should always be ame_util.specialForwardInsertion. The insertions' order
12817: types should always be ame_util.afterApprover.
12818: */
12819: forwardingBehavior := ame_engine.getForwardingBehavior(forwarderTypeIn => forwarderType,
12820: forwardeeTypeIn => forwardeeType,
12821: approvalStatusIn => approver.approval_status);

Line 12822: if(forwardingBehavior in (ame_util.repeatForwarder,

12818: */
12819: forwardingBehavior := ame_engine.getForwardingBehavior(forwarderTypeIn => forwarderType,
12820: forwardeeTypeIn => forwardeeType,
12821: approvalStatusIn => approver.approval_status);
12822: if(forwardingBehavior in (ame_util.repeatForwarder,
12823: ame_util.skipForwarder,
12824: ame_util.remand)) then
12825: /*
12826: Locate the start of the chain, so we can calculate each insertee's occurrence

Line 12823: ame_util.skipForwarder,

12819: forwardingBehavior := ame_engine.getForwardingBehavior(forwarderTypeIn => forwarderType,
12820: forwardeeTypeIn => forwardeeType,
12821: approvalStatusIn => approver.approval_status);
12822: if(forwardingBehavior in (ame_util.repeatForwarder,
12823: ame_util.skipForwarder,
12824: ame_util.remand)) then
12825: /*
12826: Locate the start of the chain, so we can calculate each insertee's occurrence
12827: value, for use in the following insertee's insertion parameter.

Line 12824: ame_util.remand)) then

12820: forwardeeTypeIn => forwardeeType,
12821: approvalStatusIn => approver.approval_status);
12822: if(forwardingBehavior in (ame_util.repeatForwarder,
12823: ame_util.skipForwarder,
12824: ame_util.remand)) then
12825: /*
12826: Locate the start of the chain, so we can calculate each insertee's occurrence
12827: value, for use in the following insertee's insertion parameter.
12828: */

Line 12843: if(forwardingBehavior in (ame_util.forwardeeOnly,

12839: firstIndexInChain := 1;
12840: end if;
12841: end if;
12842: /* Handle the special forwarding cases. */
12843: if(forwardingBehavior in (ame_util.forwardeeOnly,
12844: ame_util.forwarderAndForwardee)) then
12845: /* Insert forwardee as ad-hoc or COA, according to whether approverIn is ad-hoc or COA. */
12846: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12847: tempParameter := approver.name ||

Line 12844: ame_util.forwarderAndForwardee)) then

12840: end if;
12841: end if;
12842: /* Handle the special forwarding cases. */
12843: if(forwardingBehavior in (ame_util.forwardeeOnly,
12844: ame_util.forwarderAndForwardee)) then
12845: /* Insert forwardee as ad-hoc or COA, according to whether approverIn is ad-hoc or COA. */
12846: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12847: tempParameter := approver.name ||
12848: ame_util.fieldDelimiter ||

Line 12848: ame_util.fieldDelimiter ||

12844: ame_util.forwarderAndForwardee)) then
12845: /* Insert forwardee as ad-hoc or COA, according to whether approverIn is ad-hoc or COA. */
12846: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12847: tempParameter := approver.name ||
12848: ame_util.fieldDelimiter ||
12849: approver.item_class ||
12850: ame_util.fieldDelimiter ||
12851: approver.item_id ||
12852: ame_util.fieldDelimiter ||

Line 12850: ame_util.fieldDelimiter ||

12846: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12847: tempParameter := approver.name ||
12848: ame_util.fieldDelimiter ||
12849: approver.item_class ||
12850: ame_util.fieldDelimiter ||
12851: approver.item_id ||
12852: ame_util.fieldDelimiter ||
12853: approver.action_type_id ||
12854: ame_util.fieldDelimiter ||

Line 12852: ame_util.fieldDelimiter ||

12848: ame_util.fieldDelimiter ||
12849: approver.item_class ||
12850: ame_util.fieldDelimiter ||
12851: approver.item_id ||
12852: ame_util.fieldDelimiter ||
12853: approver.action_type_id ||
12854: ame_util.fieldDelimiter ||
12855: approver.group_or_chain_id ||
12856: ame_util.fieldDelimiter ||

Line 12854: ame_util.fieldDelimiter ||

12850: ame_util.fieldDelimiter ||
12851: approver.item_id ||
12852: ame_util.fieldDelimiter ||
12853: approver.action_type_id ||
12854: ame_util.fieldDelimiter ||
12855: approver.group_or_chain_id ||
12856: ame_util.fieldDelimiter ||
12857: approver.occurrence;
12858: insert into ame_temp_insertions(

Line 12856: ame_util.fieldDelimiter ||

12852: ame_util.fieldDelimiter ||
12853: approver.action_type_id ||
12854: ame_util.fieldDelimiter ||
12855: approver.group_or_chain_id ||
12856: ame_util.fieldDelimiter ||
12857: approver.occurrence;
12858: insert into ame_temp_insertions(
12859: transaction_id,
12860: application_id,

Line 12877: ame_util.afterApprover,

12873: reason) values(
12874: transactionIdIn,
12875: ameApplicationId,
12876: tempInsertionOrder,
12877: ame_util.afterApprover,
12878: tempParameter,
12879: ame_util.afterApproverDescription || approver.display_name,
12880: forwardee.name,
12881: forwardee.item_class,

Line 12879: ame_util.afterApproverDescription || approver.display_name,

12875: ameApplicationId,
12876: tempInsertionOrder,
12877: ame_util.afterApprover,
12878: tempParameter,
12879: ame_util.afterApproverDescription || approver.display_name,
12880: forwardee.name,
12881: forwardee.item_class,
12882: forwardee.item_id,
12883: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */

Line 12883: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */

12879: ame_util.afterApproverDescription || approver.display_name,
12880: forwardee.name,
12881: forwardee.item_class,
12882: forwardee.item_id,
12883: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
12884: decode(forwarderType,
12885: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,
12886: ame_util.apiInsertion),
12887: approver.authority,

Line 12885: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,

12881: forwardee.item_class,
12882: forwardee.item_id,
12883: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
12884: decode(forwarderType,
12885: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,
12886: ame_util.apiInsertion),
12887: approver.authority,
12888: ame_util.booleanTrue,
12889: sysdate,

Line 12886: ame_util.apiInsertion),

12882: forwardee.item_id,
12883: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
12884: decode(forwarderType,
12885: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,
12886: ame_util.apiInsertion),
12887: approver.authority,
12888: ame_util.booleanTrue,
12889: sysdate,
12890: ame_approver_deviation_pkg.forwardReason);

Line 12888: ame_util.booleanTrue,

12884: decode(forwarderType,
12885: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,
12886: ame_util.apiInsertion),
12887: approver.authority,
12888: ame_util.booleanTrue,
12889: sysdate,
12890: ame_approver_deviation_pkg.forwardReason);
12891: if(forwardingBehavior = ame_util.forwarderAndForwardee) then /* Insert the forwarder. */
12892: tempInsertionOrder := ame_engine.getNextInsertionOrder;

Line 12891: if(forwardingBehavior = ame_util.forwarderAndForwardee) then /* Insert the forwarder. */

12887: approver.authority,
12888: ame_util.booleanTrue,
12889: sysdate,
12890: ame_approver_deviation_pkg.forwardReason);
12891: if(forwardingBehavior = ame_util.forwarderAndForwardee) then /* Insert the forwarder. */
12892: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12893: tempParameter := forwardee.name ||
12894: ame_util.fieldDelimiter ||
12895: forwardee.item_class ||

Line 12894: ame_util.fieldDelimiter ||

12890: ame_approver_deviation_pkg.forwardReason);
12891: if(forwardingBehavior = ame_util.forwarderAndForwardee) then /* Insert the forwarder. */
12892: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12893: tempParameter := forwardee.name ||
12894: ame_util.fieldDelimiter ||
12895: forwardee.item_class ||
12896: ame_util.fieldDelimiter ||
12897: forwardee.item_id ||
12898: ame_util.fieldDelimiter ||

Line 12896: ame_util.fieldDelimiter ||

12892: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12893: tempParameter := forwardee.name ||
12894: ame_util.fieldDelimiter ||
12895: forwardee.item_class ||
12896: ame_util.fieldDelimiter ||
12897: forwardee.item_id ||
12898: ame_util.fieldDelimiter ||
12899: forwardee.action_type_id ||
12900: ame_util.fieldDelimiter ||

Line 12898: ame_util.fieldDelimiter ||

12894: ame_util.fieldDelimiter ||
12895: forwardee.item_class ||
12896: ame_util.fieldDelimiter ||
12897: forwardee.item_id ||
12898: ame_util.fieldDelimiter ||
12899: forwardee.action_type_id ||
12900: ame_util.fieldDelimiter ||
12901: forwardee.group_or_chain_id ||
12902: ame_util.fieldDelimiter ||

Line 12900: ame_util.fieldDelimiter ||

12896: ame_util.fieldDelimiter ||
12897: forwardee.item_id ||
12898: ame_util.fieldDelimiter ||
12899: forwardee.action_type_id ||
12900: ame_util.fieldDelimiter ||
12901: forwardee.group_or_chain_id ||
12902: ame_util.fieldDelimiter ||
12903: forwardee.occurrence;
12904: insert into ame_temp_insertions(

Line 12902: ame_util.fieldDelimiter ||

12898: ame_util.fieldDelimiter ||
12899: forwardee.action_type_id ||
12900: ame_util.fieldDelimiter ||
12901: forwardee.group_or_chain_id ||
12902: ame_util.fieldDelimiter ||
12903: forwardee.occurrence;
12904: insert into ame_temp_insertions(
12905: transaction_id,
12906: application_id,

Line 12923: ame_util.afterApprover,

12919: reason) values(
12920: transactionIdIn,
12921: ameApplicationId,
12922: tempInsertionOrder,
12923: ame_util.afterApprover,
12924: tempParameter,
12925: ame_util.afterApproverDescription || forwardee.display_name,
12926: approver.name,
12927: approver.item_class,

Line 12925: ame_util.afterApproverDescription || forwardee.display_name,

12921: ameApplicationId,
12922: tempInsertionOrder,
12923: ame_util.afterApprover,
12924: tempParameter,
12925: ame_util.afterApproverDescription || forwardee.display_name,
12926: approver.name,
12927: approver.item_class,
12928: approver.item_id,
12929: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */

Line 12929: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */

12925: ame_util.afterApproverDescription || forwardee.display_name,
12926: approver.name,
12927: approver.item_class,
12928: approver.item_id,
12929: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
12930: decode(forwarderType,
12931: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,
12932: ame_util.apiInsertion),
12933: approver.authority,

Line 12931: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,

12927: approver.item_class,
12928: approver.item_id,
12929: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
12930: decode(forwarderType,
12931: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,
12932: ame_util.apiInsertion),
12933: approver.authority,
12934: ame_util.booleanTrue,
12935: sysdate,

Line 12932: ame_util.apiInsertion),

12928: approver.item_id,
12929: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
12930: decode(forwarderType,
12931: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,
12932: ame_util.apiInsertion),
12933: approver.authority,
12934: ame_util.booleanTrue,
12935: sysdate,
12936: ame_approver_deviation_pkg.forwardForwardeeReason);

Line 12934: ame_util.booleanTrue,

12930: decode(forwarderType,
12931: ame_util.chainOfAuthorityForwarder, ame_util.apiAuthorityInsertion,
12932: ame_util.apiInsertion),
12933: approver.authority,
12934: ame_util.booleanTrue,
12935: sysdate,
12936: ame_approver_deviation_pkg.forwardForwardeeReason);
12937: end if;
12938: elsif(forwardingBehavior in (ame_util.repeatForwarder, ame_util.skipForwarder)) then

Line 12938: elsif(forwardingBehavior in (ame_util.repeatForwarder, ame_util.skipForwarder)) then

12934: ame_util.booleanTrue,
12935: sysdate,
12936: ame_approver_deviation_pkg.forwardForwardeeReason);
12937: end if;
12938: elsif(forwardingBehavior in (ame_util.repeatForwarder, ame_util.skipForwarder)) then
12939: /*
12940: These cases are for a forwardee who is a subordinate of approverIn (who must be
12941: a COA approver), but who does not already precede approverIn in the list. In this
12942: case we insert starting at the insertee, and ascending the hierarchy up to but not

Line 12943: including approver. In the case of ame_util.repeatForwarder, we then add

12939: /*
12940: These cases are for a forwardee who is a subordinate of approverIn (who must be
12941: a COA approver), but who does not already precede approverIn in the list. In this
12942: case we insert starting at the insertee, and ascending the hierarchy up to but not
12943: including approver. In the case of ame_util.repeatForwarder, we then add
12944: approverIn and stop. In the case of ame_util.skipForwarder, we then add
12945: approverIn's superior and stop. The insertees are all COA approvers.
12946: */
12947: /* Insert the forwardee. */

Line 12944: approverIn and stop. In the case of ame_util.skipForwarder, we then add

12940: These cases are for a forwardee who is a subordinate of approverIn (who must be
12941: a COA approver), but who does not already precede approverIn in the list. In this
12942: case we insert starting at the insertee, and ascending the hierarchy up to but not
12943: including approver. In the case of ame_util.repeatForwarder, we then add
12944: approverIn and stop. In the case of ame_util.skipForwarder, we then add
12945: approverIn's superior and stop. The insertees are all COA approvers.
12946: */
12947: /* Insert the forwardee. */
12948: tempInsertionOrder := ame_engine.getNextInsertionOrder;

Line 12950: ame_util.fieldDelimiter ||

12946: */
12947: /* Insert the forwardee. */
12948: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12949: tempParameter := approver.name ||
12950: ame_util.fieldDelimiter ||
12951: approver.item_class ||
12952: ame_util.fieldDelimiter ||
12953: approver.item_id ||
12954: ame_util.fieldDelimiter ||

Line 12952: ame_util.fieldDelimiter ||

12948: tempInsertionOrder := ame_engine.getNextInsertionOrder;
12949: tempParameter := approver.name ||
12950: ame_util.fieldDelimiter ||
12951: approver.item_class ||
12952: ame_util.fieldDelimiter ||
12953: approver.item_id ||
12954: ame_util.fieldDelimiter ||
12955: approver.action_type_id ||
12956: ame_util.fieldDelimiter ||

Line 12954: ame_util.fieldDelimiter ||

12950: ame_util.fieldDelimiter ||
12951: approver.item_class ||
12952: ame_util.fieldDelimiter ||
12953: approver.item_id ||
12954: ame_util.fieldDelimiter ||
12955: approver.action_type_id ||
12956: ame_util.fieldDelimiter ||
12957: approver.group_or_chain_id ||
12958: ame_util.fieldDelimiter ||

Line 12956: ame_util.fieldDelimiter ||

12952: ame_util.fieldDelimiter ||
12953: approver.item_id ||
12954: ame_util.fieldDelimiter ||
12955: approver.action_type_id ||
12956: ame_util.fieldDelimiter ||
12957: approver.group_or_chain_id ||
12958: ame_util.fieldDelimiter ||
12959: approver.occurrence;
12960: insert into ame_temp_insertions(

Line 12958: ame_util.fieldDelimiter ||

12954: ame_util.fieldDelimiter ||
12955: approver.action_type_id ||
12956: ame_util.fieldDelimiter ||
12957: approver.group_or_chain_id ||
12958: ame_util.fieldDelimiter ||
12959: approver.occurrence;
12960: insert into ame_temp_insertions(
12961: transaction_id,
12962: application_id,

Line 12979: ame_util.afterApprover,

12975: reason) values(
12976: transactionIdIn,
12977: ameApplicationId,
12978: tempInsertionOrder,
12979: ame_util.afterApprover,
12980: tempParameter,
12981: ame_util.afterApproverDescription || approver.display_name,
12982: forwardee.name,
12983: forwardee.item_class,

Line 12981: ame_util.afterApproverDescription || approver.display_name,

12977: ameApplicationId,
12978: tempInsertionOrder,
12979: ame_util.afterApprover,
12980: tempParameter,
12981: ame_util.afterApproverDescription || approver.display_name,
12982: forwardee.name,
12983: forwardee.item_class,
12984: forwardee.item_id,
12985: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */

Line 12985: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */

12981: ame_util.afterApproverDescription || approver.display_name,
12982: forwardee.name,
12983: forwardee.item_class,
12984: forwardee.item_id,
12985: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
12986: ame_util.apiAuthorityInsertion,
12987: ame_util.authorityApprover,
12988: ame_util.booleanTrue,
12989: sysdate,

Line 12986: ame_util.apiAuthorityInsertion,

12982: forwardee.name,
12983: forwardee.item_class,
12984: forwardee.item_id,
12985: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
12986: ame_util.apiAuthorityInsertion,
12987: ame_util.authorityApprover,
12988: ame_util.booleanTrue,
12989: sysdate,
12990: ame_approver_deviation_pkg.forwardReason);

Line 12987: ame_util.authorityApprover,

12983: forwardee.item_class,
12984: forwardee.item_id,
12985: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
12986: ame_util.apiAuthorityInsertion,
12987: ame_util.authorityApprover,
12988: ame_util.booleanTrue,
12989: sysdate,
12990: ame_approver_deviation_pkg.forwardReason);
12991: insertedApprover.name := forwardee.name;

Line 12988: ame_util.booleanTrue,

12984: forwardee.item_id,
12985: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
12986: ame_util.apiAuthorityInsertion,
12987: ame_util.authorityApprover,
12988: ame_util.booleanTrue,
12989: sysdate,
12990: ame_approver_deviation_pkg.forwardReason);
12991: insertedApprover.name := forwardee.name;
12992: insertedApprover.orig_system := forwardee.orig_system;

Line 13009: if(forwardingBehavior = ame_util.skipForwarder) then

13005: superiorOut => superiorApprover);
13006: if(superiorApprover.name = approver.name) then
13007: forwarderFound := true;
13008: tempReason := ame_approver_deviation_pkg.forwardForwardeeReason;
13009: if(forwardingBehavior = ame_util.skipForwarder) then
13010: tempReason := ame_approver_deviation_pkg.forwardEngInsReason;
13011: --insertedApprover.name := approver.name;
13012: --insertedApprover.orig_system_id := approver.orig_system_id;
13013: ame_approver_type_pkg.getSuperior(approverIn => approver,

Line 13028: ame_util.fieldDelimiter ||

13024: end loop;
13025: /* Prepare and do the insertion. */
13026: tempInsertionOrder := ame_engine.getNextInsertionOrder;
13027: tempParameter := insertedApprover.name ||
13028: ame_util.fieldDelimiter ||
13029: insertedApprover.item_class ||
13030: ame_util.fieldDelimiter ||
13031: insertedApprover.item_id ||
13032: ame_util.fieldDelimiter ||

Line 13030: ame_util.fieldDelimiter ||

13026: tempInsertionOrder := ame_engine.getNextInsertionOrder;
13027: tempParameter := insertedApprover.name ||
13028: ame_util.fieldDelimiter ||
13029: insertedApprover.item_class ||
13030: ame_util.fieldDelimiter ||
13031: insertedApprover.item_id ||
13032: ame_util.fieldDelimiter ||
13033: insertedApprover.action_type_id ||
13034: ame_util.fieldDelimiter ||

Line 13032: ame_util.fieldDelimiter ||

13028: ame_util.fieldDelimiter ||
13029: insertedApprover.item_class ||
13030: ame_util.fieldDelimiter ||
13031: insertedApprover.item_id ||
13032: ame_util.fieldDelimiter ||
13033: insertedApprover.action_type_id ||
13034: ame_util.fieldDelimiter ||
13035: insertedApprover.group_or_chain_id ||
13036: ame_util.fieldDelimiter ||

Line 13034: ame_util.fieldDelimiter ||

13030: ame_util.fieldDelimiter ||
13031: insertedApprover.item_id ||
13032: ame_util.fieldDelimiter ||
13033: insertedApprover.action_type_id ||
13034: ame_util.fieldDelimiter ||
13035: insertedApprover.group_or_chain_id ||
13036: ame_util.fieldDelimiter ||
13037: insertedApprover.occurrence;
13038: insert into ame_temp_insertions(

Line 13036: ame_util.fieldDelimiter ||

13032: ame_util.fieldDelimiter ||
13033: insertedApprover.action_type_id ||
13034: ame_util.fieldDelimiter ||
13035: insertedApprover.group_or_chain_id ||
13036: ame_util.fieldDelimiter ||
13037: insertedApprover.occurrence;
13038: insert into ame_temp_insertions(
13039: transaction_id,
13040: application_id,

Line 13057: ame_util.afterApprover,

13053: reason) values(
13054: transactionIdIn,
13055: ameApplicationId,
13056: tempInsertionOrder,
13057: ame_util.afterApprover,
13058: tempParameter,
13059: ame_util.afterApproverDescription || insertedApprover.display_name,
13060: superiorApprover.name,
13061: approver.item_class,

Line 13059: ame_util.afterApproverDescription || insertedApprover.display_name,

13055: ameApplicationId,
13056: tempInsertionOrder,
13057: ame_util.afterApprover,
13058: tempParameter,
13059: ame_util.afterApproverDescription || insertedApprover.display_name,
13060: superiorApprover.name,
13061: approver.item_class,
13062: approver.item_id,
13063: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */

Line 13063: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */

13059: ame_util.afterApproverDescription || insertedApprover.display_name,
13060: superiorApprover.name,
13061: approver.item_class,
13062: approver.item_id,
13063: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
13064: ame_util.apiAuthorityInsertion,
13065: ame_util.authorityApprover,
13066: ame_util.booleanTrue,
13067: sysdate,

Line 13064: ame_util.apiAuthorityInsertion,

13060: superiorApprover.name,
13061: approver.item_class,
13062: approver.item_id,
13063: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
13064: ame_util.apiAuthorityInsertion,
13065: ame_util.authorityApprover,
13066: ame_util.booleanTrue,
13067: sysdate,
13068: tempReason);

Line 13065: ame_util.authorityApprover,

13061: approver.item_class,
13062: approver.item_id,
13063: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
13064: ame_util.apiAuthorityInsertion,
13065: ame_util.authorityApprover,
13066: ame_util.booleanTrue,
13067: sysdate,
13068: tempReason);
13069: if(forwarderFound) then

Line 13066: ame_util.booleanTrue,

13062: approver.item_id,
13063: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
13064: ame_util.apiAuthorityInsertion,
13065: ame_util.authorityApprover,
13066: ame_util.booleanTrue,
13067: sysdate,
13068: tempReason);
13069: if(forwarderFound) then
13070: exit;

Line 13075: elsif(forwardingBehavior = ame_util.remand) then

13071: end if;
13072: insertedApprover.name := superiorApprover.name;
13073: insertedApprover.orig_system_id := superiorApprover.orig_system_id;
13074: end loop;
13075: elsif(forwardingBehavior = ame_util.remand) then
13076: /*
13077: Remanding is possible only when forwardeeIn already precedes approverIn in
13078: the list (not necessarily in the same chain), and approverIn is a COA approver. In
13079: such cases, we insert starting with forwardeeIn and continuing up to and including

Line 13099: ame_util.fieldDelimiter ||

13095: end loop;
13096: end if;
13097: tempInsertionOrder := ame_engine.getNextInsertionOrder;
13098: tempParameter := currentApprovers(prevApproverIndex).name ||
13099: ame_util.fieldDelimiter ||
13100: approver.item_class ||
13101: ame_util.fieldDelimiter ||
13102: approver.item_id ||
13103: ame_util.fieldDelimiter ||

Line 13101: ame_util.fieldDelimiter ||

13097: tempInsertionOrder := ame_engine.getNextInsertionOrder;
13098: tempParameter := currentApprovers(prevApproverIndex).name ||
13099: ame_util.fieldDelimiter ||
13100: approver.item_class ||
13101: ame_util.fieldDelimiter ||
13102: approver.item_id ||
13103: ame_util.fieldDelimiter ||
13104: approver.action_type_id ||
13105: ame_util.fieldDelimiter ||

Line 13103: ame_util.fieldDelimiter ||

13099: ame_util.fieldDelimiter ||
13100: approver.item_class ||
13101: ame_util.fieldDelimiter ||
13102: approver.item_id ||
13103: ame_util.fieldDelimiter ||
13104: approver.action_type_id ||
13105: ame_util.fieldDelimiter ||
13106: approver.group_or_chain_id ||
13107: ame_util.fieldDelimiter ||

Line 13105: ame_util.fieldDelimiter ||

13101: ame_util.fieldDelimiter ||
13102: approver.item_id ||
13103: ame_util.fieldDelimiter ||
13104: approver.action_type_id ||
13105: ame_util.fieldDelimiter ||
13106: approver.group_or_chain_id ||
13107: ame_util.fieldDelimiter ||
13108: prevApproverOccurrence;
13109: insert into ame_temp_insertions(

Line 13107: ame_util.fieldDelimiter ||

13103: ame_util.fieldDelimiter ||
13104: approver.action_type_id ||
13105: ame_util.fieldDelimiter ||
13106: approver.group_or_chain_id ||
13107: ame_util.fieldDelimiter ||
13108: prevApproverOccurrence;
13109: insert into ame_temp_insertions(
13110: transaction_id,
13111: application_id,

Line 13128: ame_util.afterApprover,

13124: reason) values(
13125: transactionIdIn,
13126: ameApplicationId,
13127: tempInsertionOrder,
13128: ame_util.afterApprover,
13129: tempParameter,
13130: ame_util.afterApproverDescription || insertedApprover.display_name,
13131: currentApprovers(i).name,
13132: approver.item_class,

Line 13130: ame_util.afterApproverDescription || insertedApprover.display_name,

13126: ameApplicationId,
13127: tempInsertionOrder,
13128: ame_util.afterApprover,
13129: tempParameter,
13130: ame_util.afterApproverDescription || insertedApprover.display_name,
13131: currentApprovers(i).name,
13132: approver.item_class,
13133: approver.item_id,
13134: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */

Line 13134: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */

13130: ame_util.afterApproverDescription || insertedApprover.display_name,
13131: currentApprovers(i).name,
13132: approver.item_class,
13133: approver.item_id,
13134: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
13135: ame_util.apiInsertion,
13136: approver.authority,
13137: ame_util.booleanTrue,
13138: sysdate,

Line 13135: ame_util.apiInsertion,

13131: currentApprovers(i).name,
13132: approver.item_class,
13133: approver.item_id,
13134: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
13135: ame_util.apiInsertion,
13136: approver.authority,
13137: ame_util.booleanTrue,
13138: sysdate,
13139: ame_approver_deviation_pkg.forwardRemandReason);

Line 13137: ame_util.booleanTrue,

13133: approver.item_id,
13134: ame_util.approvalApproverCategory, /* Forwarding is not possible from an FYI approver. */
13135: ame_util.apiInsertion,
13136: approver.authority,
13137: ame_util.booleanTrue,
13138: sysdate,
13139: ame_approver_deviation_pkg.forwardRemandReason);
13140: prevApproverIndex := prevApproverIndex + 1;
13141: end loop;

Line 13142: /* else forwardingBehavior = ame_util.ignoreForwarding */

13138: sysdate,
13139: ame_approver_deviation_pkg.forwardRemandReason);
13140: prevApproverIndex := prevApproverIndex + 1;
13141: end loop;
13142: /* else forwardingBehavior = ame_util.ignoreForwarding */
13143: end if;
13144: end if;
13145: /* Cycle the engine to write the forwardees out to the old-approvers table. */
13146: ame_engine.updateTransactionState(isTestTransactionIn => false,

Line 13177: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',

13173: transactionIdIn => transactionIdIn,
13174: transactionTypeIdIn => transactionTypeIn);
13175: errorCode := -20001;
13176: if transactionTypeIn is not null then
13177: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',
13178: messageNameIn => 'AME_400298_API_FOR_NOT_VALID',
13179: tokenNameOneIn => 'TRANSACTION_ID',
13180: tokenValueOneIn => transactionIdIn,
13181: tokenNameTwoIn => 'TRANSACTION_TYPE',

Line 13184: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',

13180: tokenValueOneIn => transactionIdIn,
13181: tokenNameTwoIn => 'TRANSACTION_TYPE',
13182: tokenValueTwoIn => transactionTypeIn);
13183: else
13184: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',
13185: messageNameIn => 'AME_400066_API_FOR_NOT_VALID2',
13186: tokenNameOneIn => 'TRANSACTION_ID',
13187: tokenValueOneIn => transactionIdIn);
13188: end if;

Line 13189: ame_util.runtimeException(packageNameIn => 'ame_engine',

13185: messageNameIn => 'AME_400066_API_FOR_NOT_VALID2',
13186: tokenNameOneIn => 'TRANSACTION_ID',
13187: tokenValueOneIn => transactionIdIn);
13188: end if;
13189: ame_util.runtimeException(packageNameIn => 'ame_engine',
13190: routineNameIn => 'updateApprovalStatus',
13191: exceptionNumberIn => errorCode,
13192: exceptionStringIn => errorMessage);
13193: raise_application_error(errorCode,

Line 13201: ame_util.getMessage(applicationShortNameIn => 'PER',

13197: transactionIdIn => transactionIdIn,
13198: transactionTypeIdIn => transactionTypeIn);
13199: errorCode := -20001;
13200: errorMessage :=
13201: ame_util.getMessage(applicationShortNameIn => 'PER',
13202: messageNameIn => 'AME_400246_API_FWD_SAME_VALUE');
13203: ame_util.runtimeException(packageNameIn => 'ame_engine',
13204: routineNameIn => 'updateApprovalStatus',
13205: exceptionNumberIn => errorCode,

Line 13203: ame_util.runtimeException(packageNameIn => 'ame_engine',

13199: errorCode := -20001;
13200: errorMessage :=
13201: ame_util.getMessage(applicationShortNameIn => 'PER',
13202: messageNameIn => 'AME_400246_API_FWD_SAME_VALUE');
13203: ame_util.runtimeException(packageNameIn => 'ame_engine',
13204: routineNameIn => 'updateApprovalStatus',
13205: exceptionNumberIn => errorCode,
13206: exceptionStringIn => errorMessage);
13207: raise_application_error(errorCode,

Line 13215: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',

13211: transactionIdIn => transactionIdIn,
13212: transactionTypeIdIn => transactionTypeIn);
13213: errorCode := -20001;
13214: if transactionTypeIn is not null then
13215: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',
13216: messageNameIn => 'AME_400247_API_APPR_STAT_VALUE',
13217: tokenNameOneIn => 'TRANSACTION_ID',
13218: tokenValueOneIn => transactionIdIn,
13219: tokenNameTwoIn => 'TRANSACTION_TYPE',

Line 13222: tokenValueThreeIn => ame_util.approvedStatus,

13218: tokenValueOneIn => transactionIdIn,
13219: tokenNameTwoIn => 'TRANSACTION_TYPE',
13220: tokenValueTwoIn => transactionTypeIn,
13221: tokenNameThreeIn => 'APPROVED_STATUS',
13222: tokenValueThreeIn => ame_util.approvedStatus,
13223: tokenNameFourIn => 'APPROVED_FORWARD_STATUS',
13224: tokenValueFourIn => ame_util.approveAndForwardStatus,
13225: tokenNameFiveIn => 'EXCEPTION_STATUS',
13226: tokenValueFiveIn => ame_util.exceptionStatus ,

Line 13224: tokenValueFourIn => ame_util.approveAndForwardStatus,

13220: tokenValueTwoIn => transactionTypeIn,
13221: tokenNameThreeIn => 'APPROVED_STATUS',
13222: tokenValueThreeIn => ame_util.approvedStatus,
13223: tokenNameFourIn => 'APPROVED_FORWARD_STATUS',
13224: tokenValueFourIn => ame_util.approveAndForwardStatus,
13225: tokenNameFiveIn => 'EXCEPTION_STATUS',
13226: tokenValueFiveIn => ame_util.exceptionStatus ,
13227: tokenNameSixIn => 'FORWARD_STATUS',
13228: tokenValueSixIn => ame_util.forwardStatus,

Line 13226: tokenValueFiveIn => ame_util.exceptionStatus ,

13222: tokenValueThreeIn => ame_util.approvedStatus,
13223: tokenNameFourIn => 'APPROVED_FORWARD_STATUS',
13224: tokenValueFourIn => ame_util.approveAndForwardStatus,
13225: tokenNameFiveIn => 'EXCEPTION_STATUS',
13226: tokenValueFiveIn => ame_util.exceptionStatus ,
13227: tokenNameSixIn => 'FORWARD_STATUS',
13228: tokenValueSixIn => ame_util.forwardStatus,
13229: tokenNameSevenIn => 'REJECT_STATUS',
13230: tokenValueSevenIn => ame_util.rejectStatus);

Line 13228: tokenValueSixIn => ame_util.forwardStatus,

13224: tokenValueFourIn => ame_util.approveAndForwardStatus,
13225: tokenNameFiveIn => 'EXCEPTION_STATUS',
13226: tokenValueFiveIn => ame_util.exceptionStatus ,
13227: tokenNameSixIn => 'FORWARD_STATUS',
13228: tokenValueSixIn => ame_util.forwardStatus,
13229: tokenNameSevenIn => 'REJECT_STATUS',
13230: tokenValueSevenIn => ame_util.rejectStatus);
13231: else
13232: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',

Line 13230: tokenValueSevenIn => ame_util.rejectStatus);

13226: tokenValueFiveIn => ame_util.exceptionStatus ,
13227: tokenNameSixIn => 'FORWARD_STATUS',
13228: tokenValueSixIn => ame_util.forwardStatus,
13229: tokenNameSevenIn => 'REJECT_STATUS',
13230: tokenValueSevenIn => ame_util.rejectStatus);
13231: else
13232: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',
13233: messageNameIn => 'AME_400064_API_APPR_STAT_VAL2',
13234: tokenNameOneIn => 'TRANSACTION_ID',

Line 13232: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',

13228: tokenValueSixIn => ame_util.forwardStatus,
13229: tokenNameSevenIn => 'REJECT_STATUS',
13230: tokenValueSevenIn => ame_util.rejectStatus);
13231: else
13232: errorMessage := ame_util.getMessage(applicationShortNameIn => 'PER',
13233: messageNameIn => 'AME_400064_API_APPR_STAT_VAL2',
13234: tokenNameOneIn => 'TRANSACTION_ID',
13235: tokenValueOneIn => transactionIdIn,
13236: tokenNameTwoIn => 'APPROVED_STATUS',

Line 13237: tokenValueTwoIn => ame_util.approvedStatus,

13233: messageNameIn => 'AME_400064_API_APPR_STAT_VAL2',
13234: tokenNameOneIn => 'TRANSACTION_ID',
13235: tokenValueOneIn => transactionIdIn,
13236: tokenNameTwoIn => 'APPROVED_STATUS',
13237: tokenValueTwoIn => ame_util.approvedStatus,
13238: tokenNameThreeIn => 'APPROVED_FORWARD_STATUS',
13239: tokenValueThreeIn => ame_util.approveAndForwardStatus,
13240: tokenNameFourIn => 'EXCEPTION_STATUS',
13241: tokenValueFourIn => ame_util.exceptionStatus ,

Line 13239: tokenValueThreeIn => ame_util.approveAndForwardStatus,

13235: tokenValueOneIn => transactionIdIn,
13236: tokenNameTwoIn => 'APPROVED_STATUS',
13237: tokenValueTwoIn => ame_util.approvedStatus,
13238: tokenNameThreeIn => 'APPROVED_FORWARD_STATUS',
13239: tokenValueThreeIn => ame_util.approveAndForwardStatus,
13240: tokenNameFourIn => 'EXCEPTION_STATUS',
13241: tokenValueFourIn => ame_util.exceptionStatus ,
13242: tokenNameFiveIn => 'FORWARD_STATUS',
13243: tokenValueFiveIn => ame_util.forwardStatus,

Line 13241: tokenValueFourIn => ame_util.exceptionStatus ,

13237: tokenValueTwoIn => ame_util.approvedStatus,
13238: tokenNameThreeIn => 'APPROVED_FORWARD_STATUS',
13239: tokenValueThreeIn => ame_util.approveAndForwardStatus,
13240: tokenNameFourIn => 'EXCEPTION_STATUS',
13241: tokenValueFourIn => ame_util.exceptionStatus ,
13242: tokenNameFiveIn => 'FORWARD_STATUS',
13243: tokenValueFiveIn => ame_util.forwardStatus,
13244: tokenNameSixIn => 'REJECT_STATUS',
13245: tokenValueSixIn => ame_util.rejectStatus);

Line 13243: tokenValueFiveIn => ame_util.forwardStatus,

13239: tokenValueThreeIn => ame_util.approveAndForwardStatus,
13240: tokenNameFourIn => 'EXCEPTION_STATUS',
13241: tokenValueFourIn => ame_util.exceptionStatus ,
13242: tokenNameFiveIn => 'FORWARD_STATUS',
13243: tokenValueFiveIn => ame_util.forwardStatus,
13244: tokenNameSixIn => 'REJECT_STATUS',
13245: tokenValueSixIn => ame_util.rejectStatus);
13246: end if;
13247: ame_util.runtimeException(packageNameIn => 'ame_engine',

Line 13245: tokenValueSixIn => ame_util.rejectStatus);

13241: tokenValueFourIn => ame_util.exceptionStatus ,
13242: tokenNameFiveIn => 'FORWARD_STATUS',
13243: tokenValueFiveIn => ame_util.forwardStatus,
13244: tokenNameSixIn => 'REJECT_STATUS',
13245: tokenValueSixIn => ame_util.rejectStatus);
13246: end if;
13247: ame_util.runtimeException(packageNameIn => 'ame_engine',
13248: routineNameIn => 'updateApprovalStatus',
13249: exceptionNumberIn => errorCode,

Line 13247: ame_util.runtimeException(packageNameIn => 'ame_engine',

13243: tokenValueFiveIn => ame_util.forwardStatus,
13244: tokenNameSixIn => 'REJECT_STATUS',
13245: tokenValueSixIn => ame_util.rejectStatus);
13246: end if;
13247: ame_util.runtimeException(packageNameIn => 'ame_engine',
13248: routineNameIn => 'updateApprovalStatus',
13249: exceptionNumberIn => errorCode,
13250: exceptionStringIn => errorMessage);
13251: raise_application_error(errorCode,

Line 13257: ame_util.runtimeException(packageNameIn => 'ame_engine',

13253: when others then
13254: ame_engine.unlockTransaction(fndApplicationIdIn => applicationIdIn,
13255: transactionIdIn => transactionIdIn,
13256: transactionTypeIdIn => transactionTypeIn);
13257: ame_util.runtimeException(packageNameIn => 'ame_engine',
13258: routineNameIn => 'updateApprovalStatus',
13259: exceptionNumberIn => sqlcode,
13260: exceptionStringIn => sqlerrm);
13261: raise;

Line 13279: and order_type = ame_util.absoluteOrder;

13275: set parameter = parameter - 1
13276: where insertion_order = approverInsertionOrder
13277: and application_id = engAmeApplicationId
13278: and transaction_id = engTransactionId
13279: and order_type = ame_util.absoluteOrder;
13280: end if;
13281: tempIndex := engStInsertionIndexes.next(tempIndex);
13282: end loop;
13283: end if;