1 package ame_engine as
2 /* $Header: ameeengi.pkh 120.7.12010000.2 2008/10/15 11:16:30 prasashe ship $ */
3 /*************************************************************************************
4 functions
5 *************************************************************************************/
6 /******************************** boolean functions *********************************/
7 function approversMatch(approverRecord1In in ame_util.approverRecord2,
8 approverRecord2In in ame_util.approverRecord2) return boolean;
9 function checkAttributeVariant(attributeIdIn in integer) return varchar2;
10 function evalPrioritiesPerItem return boolean;
11 function insertionExists(orderTypeIn in varchar2,
12 parameterIn in varchar2) return boolean;
13 function isLocalTransaction return boolean;
14 function isStaticAttUsage(attributeIdIn in integer) return boolean;
15 function isTestTransaction return boolean;
16 function processPriorities return boolean;
17 function processProductionActions return boolean;
18 function processProductionRules return boolean;
19 /********************************** get functions ***********************************/
20 function getActionTypeChainOrderMode(actionTypeIdIn in integer) return varchar2;
21 function getActionTypeId(actionTypeNameIn in varchar2) return integer;
22 function getActionTypeName(actionTypeIdIn in integer) return varchar2;
23 function getActionTypeOrderNumber(actionTypeIdIn in integer) return integer;
24 function getActionTypePackageName(actionTypeIdIn in integer) return varchar2;
25 function getActionTypeUsage(actionTypeIdIn in integer) return integer;
26 function getActionTypeVotingRegime(actionTypeIdIn in integer) return varchar2;
27 function getAmeApplicationId return integer;
28 function getApprovalProcessCompleteYN return varchar2; /* for API use only */
29 function getAttributeIdByName(attributeNameIn in varchar2) return integer;
30 function getAttributeName(attributeIdIn in integer) return varchar2;
31 function getAttributeType(attributeIdIn in integer) return varchar2;
32 /*
33 getConfigVarValue only works in a PL/SQL session that has been initialized by a call
34 to updateTransactionState.
35 */
36 function getConfigVarValue(configVarNameIn in varchar2) return varchar2;
37 function getEffectiveRuleDate return date;
38 function getFndApplicationId return integer;
39 /*
40 getForwardingBehavior only works in a PL/SQL session that has been initialized by a
41 call to updateTransactionState. The allowed values for forwarderTypeIn are
42 ame_util.chainOfAuthorityForwarder
43 ame_util.adHocForwarder
44 The allowed values for forwardeeTypeIn are
45 ame_util.previousSameChainForwardee
46 ame_util.subordSameHierarchyForwardee
47 ame_util.alreadyInListForwardee
48 The allowed values for approvalStatus in are
49 ame_util.approveAndForwardStatus
50 ame_util.forwardStatus
51 */
52 function getForwardingBehavior(forwarderTypeIn in varchar2,
53 forwardeeTypeIn in varchar2,
54 approvalStatusIn in varchar2) return varchar2;
55 /* Only action-type handlers should call the getHandler functions. See also the getHandler procedures. */
56 function getHandlerActionTypeId return integer;
57 function getHandlerActionTypeOrderNum return integer;
58 function getHandlerApprovalStatus(approverIn in ame_util.approverRecord2) return varchar2;
59 /* Only call getHandlerAuthority for action types that always generate approvers within a fixed sublist. */
60 function getHandlerAuthority return varchar2;
61 /*
62 The getHandlerItem[Whatever] functions relate to the item to which a rule applies, <<not>> to
63 the item that satisfies the rule. These items differ for header-level rules with conditions
64 on subordinate-item-class attributes, when per-item evaluation is enabled.
65 */
66 function getHandlerItemClassId return integer;
67 function getHandlerItemClassName return varchar2;
68 function getHandlerItemClassOrderNumber return integer;
69 function getHandlerItemId return varchar2;
70 function getHandlerItemOrderNumber return integer;
71 /*
72 If any of the default-null inputs to getHandlerOccurrence is null, the function returns the next
73 occurrence value for the group or chain most recently added to the approver list. If all of the
74 default-null inputs are non-null, the function returns the next occurrence for the group or chain
75 identified by the inputs.
76 */
77 function getHandlerOccurrence(nameIn in varchar2,
78 itemClassIn in varchar2 default null,
79 itemIdIn in varchar2 default null,
80 actionTypeIdIn in integer default null,
81 groupOrChainIdIn in integer default null) return integer;
82 function getHandlerRuleType return integer;
83 /*
84 getHandlerState is included in this version of the engine for architectural backwards compatibility
85 for custom handlers only. The engine's handler-state functionality is deprecated. Please use
86 package variables to maintain handler state instead.
87 */
88 function getHandlerState(handlerNameIn in varchar2,
89 parameterIn in varchar2 default null) return varchar2;
90 /*
91 Only call getHandlerSublistOrderNum for action types that always generate approvers within a fixed sublist.
92 This function returns the sublist order number determined by the sublist-ordering mode for the item class
93 to which a rule applies.
94 */
95 function getHandlerSublistOrderNum return integer;
96 /*
97 The following attribute-value-fetching functions only work for attributes
98 that are not of the currency attribute type. For attributes that may be
99 of that type, use the corresponding getHeaderAttValues or getItemAttValues
100 procedures.
101 */
102 function getHeaderAttValue1(attributeIdIn in integer) return varchar2;
103 function getHeaderAttValue2(attributeNameIn in varchar2) return varchar2;
104 function getItemAttValue1(attributeIdIn in integer,
105 itemIdIn in varchar2) return varchar2;
106 function getItemAttValue2(attributeNameIn in varchar2,
107 itemIdIn in varchar2) return varchar2;
108 function getItemClassId(itemClassNameIn in varchar2) return integer;
109 function getItemClassName(itemClassIdIn in integer) return varchar2;
110 function getItemClassOrderNumber(itemClassIdIn in integer) return integer;
111 function getItemClassParMode(itemClassIdIn in integer) return varchar2;
112 function getItemClassSublistMode(itemClassIdIn in integer) return varchar2;
113 function getItemOrderNumber(itemClassNameIn in varchar2,
114 itemIdIn in varchar2) return integer;
115 /* Call updateTransactionState with fetchInsertionsIn set true, before calling getNextInsertionOrder. */
116 function getNextInsertionOrder return integer;
117 function getNullActionTypeOrderNumber return integer;
118 function getRuntimeGroupCount(groupIdIn in integer) return integer;
119 function getSublistOrderNum(itemClassNameIn in varchar2,
120 authorityIn in varchar2) return integer;
121 function getTransactionId return varchar2;
122 function getTransactionTypeId return varchar2;
123 function getVariantAttributeValue(attributeIdIn in integer,
124 itemClassIn in varchar2,
125 itemIdIn in varchar2) return number;
126 /*************************************************************************************
127 procedures
128 *************************************************************************************/
129 procedure checkApprover(approverIn in ame_util.approverRecord2);
130 /*
131 The following procedures are for API use only. Their output arguments correspond to API
132 output arguments. The API calls updateApprovalProcessState and then calls one or more
133 of these procedures to populate API output arguments as required. See also the function
134 getApprovalProcessCompleteYN.
135 */
136 procedure getApprovers(approversOut out nocopy ame_util.approversTable2);
137 /* This procedure will be called by the API's to fetch the approver tree from the engine */
138 procedure getApprovers2(approversOut out nocopy ame_util.approversTable2
139 ,approversTreeOut out nocopy ame_util.approversTreeTable);
140 /* Procedure to return applicable rules and their descriptions */
141 procedure getApplicableRules
142 (ruleIdsOut out nocopy ame_util.idList
143 ,ruleDescriptionsOut out nocopy ame_util.stringList);
144 procedure getInsertions
145 (positionIn in number
146 ,orderTypeIn in varchar2 default null
147 ,coaInsertionsYNIn in varchar2 default ame_util.booleanTrue
148 ,availableInsertionsOut out nocopy ame_util.insertionsTable2
149 );
150 procedure getItemAppProcessCompleteYN(itemAppProcessCompleteYNOut out nocopy ame_util.charList);
151 procedure getItemClasses(itemClassesOut out nocopy ame_util.stringList);
152 procedure getItemIds(itemIdsOut out nocopy ame_util.stringList);
153 procedure getItemIndexes(itemIndexesOut out nocopy ame_util.idList);
154 /* Procedure's to return all itemids and itemclasses or the current transaction */
155 procedure getAllItemClasses(itemClassNamesOut out nocopy ame_util.stringList);
156 procedure getAllItemIds(itemIdsOut out nocopy ame_util.stringList);
157 procedure getItemSources(itemSourcesOut out nocopy ame_util.longStringList);
158 procedure getProductionIndexes(productionIndexesOut out nocopy ame_util.idList);
159 /* getRepeatedIndexes is Added for asynch */
160 procedure getRepeatedIndexes(repeatedIndexesOut out nocopy ame_util.idList
161 ,repeatedAppIndexesOut out nocopy ame_util.idList);
162 procedure getRuleDescriptions(ruleDescriptionsOut out nocopy ame_util.stringList);
163 procedure getRuleIds(ruleIdsOut out nocopy ame_util.idList);
164 procedure getRuleIndexes(ruleIndexesOut out nocopy ame_util.idList);
165 procedure getSourceTypes(sourceTypesOut out nocopy ame_util.stringList);
166 procedure getTransVariableNames(transVariableNamesOut out nocopy ame_util.stringList);
167 procedure getTransVariableValues(transVariableValuesOut out nocopy ame_util.stringList);
168 procedure getVariableNames(variableNamesOut out nocopy ame_util.stringList);
169 procedure getVariableValues(variableValuesOut out nocopy ame_util.stringList);
170 /*
171 The following procedures are for the test tab's use and the action-type handlers' use.
172 They let the handlers manipulate the approver list, query for approver insertions and
173 deletions, etc.
174 */
175 /* addApprover adds an approver to the end of the list. */
176 procedure addApprover(approverIn in ame_util.approverRecord2);
177 /*
178 clearHandlerState is included in this version of the engine for architectural backwards compatibility
179 for custom handlers only. The engine's handler-state functionality is deprecated. Please use
180 package variables to maintain handler state instead.
181 */
182 procedure clearHandlerState(handlerNameIn in varchar2,
183 parameterIn in varchar2 default null);
184 /* getAllApprovers is for amem0013.sql backwards compatibility only. Do not use it elsewhere. */
185 procedure getAllApprovers(approversOut out nocopy ame_util.approversTable);
186 /*
187 getApprovalGroupConfigs returns the input group IDs in groupIdsInOut, as well as the
188 output arguments, sorted first by group order number, second by group ID. So approval-group
189 handlers can process the groups in the order this procedure returns them.
190 BUG : 4491715 modified to sort sources and approver categories with the group ids
191 */
192 procedure getApprovalGroupConfigs(groupIdsInOut in out nocopy ame_util.idList,
193 sourcesInOut in out nocopy ame_util.longStringList,
194 approverCategoriesInOut in out nocopy ame_util.charList,
195 orderNumbersOut out nocopy ame_util.idList,
196 votingRegimesOut out nocopy ame_util.charList);
197 /* Only action-type handlers should call the getHandler procedures. See also the getHandler functions. */
198 /* getHandlerCOAFirstApprover only returns inserted approvers with the ame_util.firstAuthority order type. */
199 procedure getHandlerCOAFirstApprover(itemClassIn in varchar2,
200 itemIdIn in varchar2,
201 actionTypeIdIn in integer,
202 groupOrChainIdIn in integer,
203 nameOut out nocopy varchar2,
204 origSystemOut out nocopy varchar2,
205 origSystemIdOut out nocopy integer,
206 displayNameOut out nocopy varchar2,
207 sourceOut out nocopy varchar2);
208 /* getHandlerCOAInsertion only returns inserted approvers with the ame_util.afterApprover order type. */
209 procedure getHandlerCOAInsertion(nameIn in varchar2,
210 itemClassIn in varchar2,
211 itemIdIn in varchar2,
212 actionTypeIdIn in integer,
213 groupOrChainIdIn in integer,
214 occurrenceIn in integer,
215 approvalStatusIn in varchar2,
216 nameOut out nocopy varchar2,
217 origSystemOut out nocopy varchar2,
218 origSystemIdOut out nocopy integer,
219 displayNameOut out nocopy varchar2,
220 sourceOut out nocopy varchar2);
221 procedure getHandlerRules(ruleIdsOut out nocopy ame_util.idList,
222 approverCategoriesOut out nocopy ame_util.charList,
223 parametersOut out nocopy ame_util.stringList,
224 parameterTwosOut out nocopy ame_util.stringList);
225 procedure getHandlerRules2(ruleIdsOut out nocopy ame_util.idList,
226 approverCategoriesOut out nocopy ame_util.charList,
227 parametersOut out nocopy ame_util.stringList);
228 procedure getHandlerRules3(ruleIdsOut out nocopy ame_util.idList,
229 ruleIndexesOut out nocopy ame_util.idList,
230 parametersOut out nocopy ame_util.stringList,
231 listModParameterOnesOut out nocopy ame_util.stringList,
232 listModParameterTwosOut out nocopy ame_util.longStringList);
233 /*
234 getHandlerLMApprovers returns the indexes of the approvers in engStApprovers that
235 have the wf_roles.name value listModParameterTwoIn, at the positions within an approval
236 group or chain of authority required by listModParameterOneIn, and satisfying the
237 includeFyiApproversIn and includeApprovalGroupsIn arguments' requirements. Each
238 matched approver's index is written to approverIndexesOut. If the calling handler
239 needs to know also the last approver in a chain of forwardees following a matched
240 approver who forwards (with or without approval), the handler should set
241 returnForwardeesIn true. Then lastForwardeeIndexesOut(i) will be the index of the
242 last forwardee in engStApprovers corresponding to the matched approver at
243 engStApprovers(approverIndexesOut(i)).
244 */
245 procedure getHandlerLMApprovers(listModParameterOneIn in varchar2,
246 listModParameterTwoIn in varchar2,
247 includeFyiApproversIn in boolean,
248 includeApprovalGroupsIn in boolean,
249 returnForwardeesIn in boolean,
250 approverIndexesOut out nocopy ame_util.idList,
251 lastForwardeeIndexesOut out nocopy ame_util.idList);
252 /*
253 The following attribute-value-fetching procedures work for attributes of all
254 types (including currency types). If you know the attribute whose value you want
255 to fetch is not of currency type, and either (1) the attribute is header level or
256 (2) you want to fetch its value for just one item ID, you can use one of the
257 getHeaderAttValue or getItemAttValue functions declared above.
258 */
259 procedure getHeaderAttValues1(attributeIdIn in integer,
260 attributeValue1Out out nocopy varchar2,
261 attributeValue2Out out nocopy varchar2,
262 attributeValue3Out out nocopy varchar2);
263 procedure getHeaderAttValues2(attributeNameIn in varchar2,
264 attributeValue1Out out nocopy varchar2,
265 attributeValue2Out out nocopy varchar2,
266 attributeValue3Out out nocopy varchar2);
267 procedure getItemAttValues1(attributeIdIn in integer,
268 itemIdIn in varchar2,
269 attributeValue1Out out nocopy varchar2,
270 attributeValue2Out out nocopy varchar2,
271 attributeValue3Out out nocopy varchar2);
272 procedure getItemAttValues2(attributeNameIn in varchar2,
273 itemIdIn in varchar2,
274 attributeValue1Out out nocopy varchar2,
275 attributeValue2Out out nocopy varchar2,
276 attributeValue3Out out nocopy varchar2);
277 procedure getItemAttValues3(attributeIdIn in integer,
278 itemIndexIn in varchar2,
279 attributeValue1Out out nocopy varchar2,
280 attributeValue2Out out nocopy varchar2,
281 attributeValue3Out out nocopy varchar2);
282 /*
283 Use the getItemClassAttValues procedures to fetch all of the attribute values
284 of a given item class. Use one of the first two variants for attributes known
285 not to be currency attributes, and one of the other two for attributes of
286 unknown type.
287 */
288 procedure getItemClassAttValues1(attributeIdIn in integer,
289 attributeValuesOut out nocopy ame_util.attributeValueList);
290 procedure getItemClassAttValues2(attributeNameIn in varchar2,
291 attributeValuesOut out nocopy ame_util.attributeValueList);
292 procedure getItemClassAttValues3(attributeIdIn in integer,
293 attributeValues1Out out nocopy ame_util.attributeValueList,
294 attributeValues2Out out nocopy ame_util.attributeValueList,
295 attributeValues3Out out nocopy ame_util.attributeValueList);
296 procedure getItemClassAttValues4(attributeNameIn in varchar2,
297 attributeValues1Out out nocopy ame_util.attributeValueList,
298 attributeValues2Out out nocopy ame_util.attributeValueList,
299 attributeValues3Out out nocopy ame_util.attributeValueList);
300 procedure getItemClassItemIds(itemClassIdIn in integer,
301 itemIdsOut out nocopy ame_util.stringList);
302 --+
303 procedure getAllProductions(productionsOut out nocopy ame_util2.productionsTable);
304 procedure getProductions(itemClassIn in varchar2
305 ,itemIdIn in varchar2
306 ,productionsOut out nocopy ame_util2.productionsTable);
307 /*
308 Runtime code should call ame_engine.getRuntimeGroupMembers, <<not>> ame_approval_group_pkg.getRuntimeGroupMembers,
312 procedure getRuntimeGroupMembers(groupIdIn in integer,
309 to fetch an approval group's membership. (The engine version only performs the fetch the first time it is called,
310 in a given PL/SQL context. Thereafter it returns values cached in an engine package variable.)
311 */
313 approverNamesOut out nocopy ame_util.longStringList,
314 approverOrderNumbersOut out nocopy ame_util.idList,
315 approverDisplayNamesOut out nocopy ame_util.longStringList,
316 origSystemIdsOut out nocopy ame_util.idList,
317 origSystemsOut out nocopy ame_util.stringList);
318 /*
319 Only the test-tab object layer should call getTestTransApplicableRules. It should first call
320 updateTransactionState. The itemClassIdsOut and itemIdsOut variables identify the items that
321 satisfy the rules.
322 */
323 procedure getTestTransApplicableRules(ruleItemClassIdsOut out nocopy ame_util.idList,
324 itemClassIdsOut out nocopy ame_util.idList,
325 itemIdsOut out nocopy ame_util.stringList,
326 ruleIdsOut out nocopy ame_util.idList,
327 ruleTypesOut out nocopy ame_util.idList,
328 ruleDescriptionsOut out nocopy ame_util.stringList);
329 /*
330 Only the test-tab object layer should call getTestTransApprovers. No call to updateTransactionState
331 should precede it. The approverListStageIn argument should be an integer between one and five
332 (inclusive), indicating which step in the approver-list algorithm the engine should complete before
333 getTestTransApprovers returns the approver list as of that stage. Here are the stages:
334 stage operations completed
335 ----- --------------------
336 1 generation of default approver list, accounting for chain-of-authority insertions
337 2 ad-hoc insertions (including surrogates)
338 3 ad-hoc deletions
339 4 elimination of repeated approvers per configuration-variable values
340 5 generation of approver order numbers
341 The test tab should skip stages 2-3 for test transactions.
342 */
343 procedure getTestTransApprovers(isTestTransactionIn in boolean,
344 transactionIdIn in varchar2,
345 ameApplicationIdIn in integer,
346 approverListStageIn in integer,
347 approversOut out nocopy ame_util.approversTable2,
348 productionIndexesOut out nocopy ame_util.idList,
349 variableNamesOut out nocopy ame_util.stringList,
350 variableValuesOut out nocopy ame_util.stringList);
351 /* initializePlsqlContext is for amem0013.sql backwards compatibility only. Do not use it elsewhere. */
352 procedure initializePlsqlContext(ameApplicationIdIn in integer default null,
353 fndApplicationIdIn in integer default null,
354 transactionIdIn in varchar2 default null,
355 transactionTypeIdIn in varchar2 default null,
356 fetchConfigVarsIn in boolean default true,
357 fetchOldApproversIn in boolean default true,
358 fetchInsertionsIn in boolean default true,
359 fetchDeletionsIn in boolean default true,
360 fetchAttributeValuesIn in boolean default true,
361 fetchInactiveAttValuesIn in boolean default false);
362 /*
363 insertApprover inserts a single approver at an arbitrary location in the current
364 approver list. Insertion may occur after the last approver. If adjustMemberOrderNumbersIn
365 is true, insertApprover performs the insertion and then adjusts the member_order_number
366 values of the approvers at and above indexIn, in the same group or chain as approverIn,
367 according to the following rules:
368 1. If engStApprovers(indexIn) (i.e. approverIn after the insertion) is the only approver
369 in its group or chain, set its member_order_number to one.
370 2. Otherwise, if the previous approver but not the subsequent approver (if any) is in
371 the same group or chain, set engStApprovers(indexIn).member_order_number to
372 engStApprovers(indexIn - 1).member_order_number + 1.
373 3. Otherwise, if the next approver but not the previous approver (if any) is in the
374 same group or chain, set engStApprovers(indexIn).member_order_number to
375 engStApprovers(indexIn + 1).member_order_number - 1.
376 4. Otherwise, if the approvers on either side of engStApprovers(indexIn) have the same
377 member_order_number, set engStApprovers(indexIn).member_order_number to that value.
378 (Basically, preserve parallel group-or-chain ordering if it exists.)
379 5. Otherwise, set engStApprovers(indexIn).member_order_number to follow the previous
380 approver, and increment the member_order_number values of any subsequent approvers
381 in the same chain, so they follow engStApprovers(indexIn). (Basically, preserve
382 serial group-or-chain ordering if it exists.)
383 */
384 procedure insertApprover(indexIn in integer,
385 approverIn in ame_util.approverRecord2,
386 adjustMemberOrderNumbersIn in boolean default false,
387 approverLocationIn in boolean default ame_util.lastAmongEquals,
391 insertApprovers inserts a list of approvers at an arbitrary location in the current
388 inserteeIndexIn in number default null,
389 currentInsIndex in integer default null);
390 /*
392 approver list. approversIn(1) will have the index firstIndexIn in engStApprovers.
393 Insertion may occur after the last approver.
394 */
395 procedure insertApprovers(firstIndexIn in integer,
396 approversIn in ame_util.approversTable2);
397 /*
398 Any API routine that could change transactional data in any of the ame_temp tables
399 must call lockTransaction right after the routine's begin statement, and must call
400 unlockTransaction right before returning (in both cases even if the routine calls another
401 API routine that also calls lockTransaction). Make sure every possible return calls
402 unlockTransaction, including the exception handlers.
403 */
404 procedure lockTransaction(fndApplicationIdIn in integer,
405 transactionIdIn in varchar2,
406 transactionTypeIdIn in varchar2 default null);
407 procedure logTransaction;
408 /* parseFields parses stringIn into strings separated by ame_util.fieldDelimiter. */
409 procedure parseFields(stringIn in varchar2,
410 fieldsOut out nocopy ame_util.longStringList);
411 procedure updateInsertions(indexIn in integer);
412 procedure processExceptions;
413 /*
414 setHandlerState is included in this version of the engine for architectural backwards compatibility
415 for custom handlers only. The engine's handler-state functionality is deprecated. Please use
416 package variables to maintain handler state instead.
417 */
418 procedure setHandlerState(handlerNameIn in varchar2,
419 parameterIn in varchar2 default null,
420 stateIn in varchar2 default null);
421 /* Procedure called by LM /substitution handlers to indicate that the rule is applied */
422 procedure setRuleApplied(ruleIndexIn in integer);
423 procedure substituteApprover(approverIndexIn in integer,
424 nameIn in varchar2,
425 actionTypeIdIn in varchar2,
426 ruleIdIn in integer);
427 /*
428 truncateChain truncates the chain of authority in engStApprovers including
429 the approver at approverIndexIn, starting with the first approver after that
430 approver (if any). If the allowFyiNotifications configuration variable is
431 set to ame_util.yes, truncation means changing to ame_util.fyiApproverCategory
432 the approver_category of the rest of the chain. Otherwise it means deleting
433 the rest of the chain. Note that if a routine calls truncateChain repeatedly,
434 it will need to account for the fact that truncation changes the indexes of
435 approvers occurring after the point of truncation. This suggests sorting the
436 target indexes in descending order, and truncating in that order. . . .
437 */
438 procedure truncateChain(approverIndexIn in integer,
439 ruleIdIn in integer);
440 procedure unlockTransaction(fndApplicationIdIn in integer,
441 transactionIdIn in varchar2,
442 transactionTypeIdIn in varchar2 default null);
443 /*
444 All API calls and test functions should call updateTransactionState to cycle the engine,
445 before calling other engine routines to fetch transaction-state values.
446 */
447 procedure updateTransactionState(isTestTransactionIn in boolean,
448 isLocalTransactionIn in boolean,
449 fetchConfigVarsIn in boolean,
450 fetchOldApproversIn in boolean,
451 fetchInsertionsIn in boolean,
452 fetchDeletionsIn in boolean,
453 fetchAttributeValuesIn in boolean,
454 fetchInactiveAttValuesIn in boolean,
455 processProductionActionsIn in boolean,
456 processProductionRulesIn in boolean,
457 updateCurrentApproverListIn in boolean,
458 updateOldApproverListIn in boolean,
459 processPrioritiesIn in boolean,
460 prepareItemDataIn in boolean,
461 prepareRuleIdsIn in boolean,
462 prepareRuleDescsIn in boolean,
463 prepareApproverTreeIn in boolean default false,
464 transactionIdIn in varchar2,
465 ameApplicationIdIn in integer default null,
466 fndApplicationIdIn in integer default null,
467 transactionTypeIdIn in varchar2 default null);
468 /* test procedure */
469 procedure testEngine(printContextYNIn in varchar2 default 'N',
470 printAppRulesYNIn in varchar2 default 'N',
471 printApproversYNIn in varchar2 default 'N');
472 /* getNext Approvers */
473 procedure getNextApprovers(
474 applicationIdIn in number
475 ,transactionTypeIn in varchar2
476 ,transactionIdIn in varchar2
477 ,nextApproversType in number
478 ,flagApproversAsNotifiedIn in varchar2 default ame_util.booleanTrue
479 ,approvalProcessCompleteYNOut out nocopy varchar2
483 ,itemIdsOut out nocopy ame_util.stringList
480 ,nextApproversOut out nocopy ame_util.approversTable2
481 ,itemIndexesOut out nocopy ame_util.idList
482 ,itemClassesOut out nocopy ame_util.stringList
484 ,itemSourcesOut out nocopy ame_util.longStringList
485 ,productionIndexesOut out nocopy ame_util.idList
486 ,variableNamesOut out nocopy ame_util.stringList
487 ,variableValuesOut out nocopy ame_util.stringList
488 ,transVariableNamesOut out nocopy ame_util.stringList
489 ,transVariableValuesOut out nocopy ame_util.stringList);
490 /* updateApprovalStatus */
491 procedure updateApprovalStatus(applicationIdIn in number,
495 notificationIn in ame_util2.notificationRecord
492 transactionTypeIn in varchar2,
493 transactionIdIn in varchar2,
494 approverIn in ame_util.approverRecord2,
496 default ame_util2.emptyNotificationRecord,
497 forwardeeIn in ame_util.approverRecord2 default
498 ame_util.emptyApproverRecord2,
499 updateItemIn in boolean default false) ;
500 procedure setDeviationReasonDate(reasonIn in varchar2,dateIn in date);
501 end ame_engine;