1 package ame_util as
2 /* $Header: ameoutil.pkh 120.2.12010000.1 2008/07/28 06:22:35 appldev ship $ */
3 /* user-defined data types */
4 /* The id and string types are for various record definitions and local-variable declarations. */
5 charValue varchar2(1);
6 parameterValue varchar2(320);
7 boilerplateValue varchar2(80);
8 longBoilerplateValue varchar2(300);
9 attributeValue varchar2(100);
10 stringValue varchar2(100);
11 longStringValue varchar2(500);
12 longestStringValue varchar2(4000);
13 subtype charType is charValue%type;
14 subtype parameterType is parameterValue%type;
15 subtype boilerplateType is boilerplateValue%type;
16 subtype attributeValueType is attributeValue%type;
17 subtype stringType is stringValue%type;
18 subtype longStringType is longStringValue%type;
19 subtype longestStringType is longestStringValue%type;
20 /*
21 The longBoilerplateType and longBoilerplateList datatypes are for
22 boilerplate strings that are too long to be stored as AK attributes. The
23 English-language values of such strings should not exceed 100 bytes
24 (characters), so that their translates values will not exceed
25 300 bytes. Always fetch a long-boilerplate string into a local variable of
26 type longBoilerplateType or longBoilerplateList.
27 */
28 subtype longBoilerplateType is longBoilerplateValue%type;
29 type longBoilerplateList is table of longBoilerplateType index by binary_integer;
30 parameterTypeLength constant integer := 320;
31 attributeValueTypeLength constant integer := 100;
32 stringTypeLength constant integer := 100;
33 longStringTypeLength constant integer := 500;
34 longestStringTypeLength constant integer := 4000;
35 type idStringRecord is record(
36 id integer,
37 string stringType);
38 type attributeValueList is table of attributeValueType index by binary_integer;
39 type charList is table of charType index by binary_integer;
40 type dateList is table of date index by binary_integer;
41 type idList is table of integer index by binary_integer;
42 type idStringTable is table of idStringRecord index by binary_integer;
43 type numberList is table of number index by binary_integer;
44 type boilerplateList is table of boilerplateType index by binary_integer;
45 type stringList is table of stringType index by binary_integer;
46 type longStringList is table of longStringType index by binary_integer;
47 type longestStringList is table of longestStringType index by binary_integer;
48 /* engine and API types */
49 type approvalGroupMemberRecord is record(
50 group_id integer,
51 name varchar2(320),
52 orig_system varchar2(48),
53 orig_system_id integer);
54 type approvalProcessRecord is record(
55 line_item_id integer,
56 rule_id integer,
57 rule_type integer,
58 action_type_id integer,
59 parameter parameterType,
60 priority integer,
61 approver_category varchar2(1));
62 type approverRecord is record(
63 user_id fnd_user.user_id%type,
64 person_id per_all_people_f.person_id%type,
65 first_name per_all_people_f.first_name%type,
66 last_name per_all_people_f.last_name%type,
67 api_insertion varchar2(1),
68 authority varchar2(1),
69 approval_status varchar2(50),
70 approval_type_id integer,
71 group_or_chain_id integer,
72 occurrence integer,
73 source varchar2(500));
74 type approverRecord2 is record(
75 name varchar2(320),
76 orig_system varchar2(30),
77 orig_system_id number,
78 display_name varchar2(360),
79 approver_category varchar2(1),
80 api_insertion varchar2(1),
81 authority varchar2(1),
82 approval_status varchar2(50),
83 action_type_id integer,
84 group_or_chain_id integer,
85 occurrence integer,
86 source varchar2(500),
87 item_class ame_item_classes.name%type,
88 item_id ame_temp_old_approver_lists.item_id%type,
89 item_class_order_number integer,
90 item_order_number integer,
91 sub_list_order_number integer,
92 action_type_order_number integer,
93 group_or_chain_order_number integer,
94 member_order_number integer,
95 approver_order_number integer);
96 type attributeValueRecord is record(
97 attribute_value_1 attributeValueType,
98 attribute_value_2 attributeValueType,
99 attribute_value_3 attributeValueType);
100 type handlerTransStateRecord is record(
101 handler_name stringType,
102 state stringType);
103 type insertionRecord is record(
104 order_type varchar2(50),
105 parameter ame_temp_insertions.parameter%type,
106 api_insertion varchar2(1),
107 authority varchar2(1),
108 description ame_temp_insertions.description%type);
109 type insertionRecord2 is record(
110 item_class ame_item_classes.name%type,
111 item_id ame_temp_old_approver_lists.item_id%type,
112 action_type_id integer,
113 group_or_chain_id integer,
114 order_type varchar2(50),
115 parameter ame_temp_insertions.parameter%type,
116 api_insertion varchar2(1),
117 authority varchar2(1),
118 description varchar2(200));
119 /*
120 AME_STRIPING
121 type lineItemStripeRuleRecord is record(
122 line_item_id integer,
123 stripe_set_id integer,
124 rule_id integer,
125 rule_type integer,
126 action_type_id integer,
127 parameter parameterType,
128 priority integer);
129 */
130 type orderRecord is record(
131 order_type varchar2(50),
132 parameter ame_temp_insertions.parameter%type,
133 description varchar2(200));
134 type workflowLogRecord is record(
135 package_name varchar2(50),
136 routine_name varchar2(50),
137 log_id integer,
138 transaction_id varchar2(50),
139 exception_number integer,
140 exception_string longestStringType);
141 /* Record to represent a engine approver tree node */
142 type approverTreeRecord is record(
143 parent_index integer,
144 child_index integer,
145 sibling_index integer,
146 approver_index integer,
147 tree_level integer,
148 tree_level_id varchar2(320),
149 order_number integer,
150 min_order integer,
151 max_order integer,
152 status integer,
153 is_suspended varchar2(1));
154 /* Data Type to store the engine approver tree */
155 type approversTreeTable is table of approverTreeRecord index by binary_integer;
156 type approvalGroupMembersTable is table of approvalGroupMemberRecord index by binary_integer;
157 type approvalProcessTable is table of approvalProcessRecord index by binary_integer;
158 type approversTable is table of approverRecord index by binary_integer;
159 type approversTable2 is table of approverRecord2 index by binary_integer;
160 type sVAttributeValuesTable is table of attributeValueType index by binary_integer;
161 type attributeValuesTable is table of attributeValueRecord index by binary_integer;
162 type exceptionLogTable is table of ame_exceptions_log%rowtype index by binary_integer;
163 type handlerTransStateTable is table of handlerTransStateRecord index by binary_integer;
164 type insertionsTable is table of insertionRecord index by binary_integer;
165 type insertionsTable2 is table of insertionRecord2 index by binary_integer;
166
167 /*
168 AME_STRIPING
169 type lineItemStripeRuleTable is table of lineItemStripeRuleRecord index by binary_integer;
170 */
171 type ordersTable is table of orderRecord index by binary_integer;
172 type parametersTable is table of parameterType index by binary_integer;
173 type workflowLogTable is table of workflowLogRecord index by binary_integer;
174 /* misc. types */
175 type queryCursor is ref cursor;
176 /* Constants used by the engine to process the approver tree */
177 noChildIndex constant integer := -1;
178 noParentIndex constant integer := -1;
179 noSiblingIndex constant integer := -1;
180 noApproverIndex constant integer := -1;
181 invalidTreeIndex constant integer := -1;
182 unknownStatus constant integer := -1;
183 startedStatus constant integer := 3;
184 notStartedStatus constant integer := 2;
185 completedStatus constant integer := 1;
186 firstAmongEquals constant boolean := true;
187 lastAmongEquals constant boolean := false;
188 minimumApproverOrderNumber constant integer := 1;
189 /* misc. constants */
190 ameShortName constant varchar2(3) := 'AME';
191 defaultDateFormatModel constant varchar2(50) := 'DD-MM-YYYY';
192 oneSecond constant number := 1/86400;
193 mandAttActionTypeId constant integer := -1;
194 seededDataCreatedById constant integer := 1;
195 yes constant varchar(3) := 'yes';
196 no constant varchar2(2) := 'no';
197 testTrans constant varchar2(10) := 'testTrans';
198 realTrans constant varchar2(10) := 'realTrans';
199 /* special wf_roles.name values */
200 invalidApproverWfRolesName constant varchar2(50) := 'AME_INVALID_APPROVER';
201 /* ICX constants */
202 developerResponsibility constant integer := 5;
203 appAdminResponsibility constant integer := 4;
204 genBusResponsibility constant integer := 3;
205 limBusResponsibility constant integer := 2;
206 readOnlyResponsibility constant integer := 1;
207 noResponsibility constant integer := 0;
208 devRespKey constant varchar2(50) := 'AMEDEVELOPER';
209 appAdminRespKey constant varchar2(50) := 'AMEAPPADM';
210 genBusUserRespKey constant varchar2(50) := 'AMEGENUSER';
211 limBusUserRespKey constant varchar2(50) := 'AMELIMUSER';
212 readOnlyUserRespKey constant varchar2(50) := 'AMEROUSER';
213 webFunction constant varchar2(17) := 'AME_WEB_APPROVALS';
214 attributeCode constant varchar2(26) := 'AME_INTERNAL_TRANS_TYPE_ID';
215 /* per fnd app id */
216 perFndAppId constant integer := 800;
217 /* generalized-approver-type (GAT) constants */
218 /* GAT originating-system constants */
219 fndRespOrigSystem constant varchar2(8) := 'FND_RESP';
220 fndUserOrigSystem constant varchar2(7) := 'FND_USR';
221 perOrigSystem constant varchar2(3) := 'PER';
222 posOrigSystem constant varchar2(3) := 'POS';
223 /* GAT lookup types */
224 origSystemLookupType constant fnd_lookups.lookup_type%type := 'FND_WF_ORIG_SYSTEMS';
225 /* GAT approver categories */
226 approvalApproverCategory constant varchar2(1) := 'A';
227 fyiApproverCategory constant varchar2(1) := 'F';
228 /* GAT other constants */
229 anyApproverType constant integer := -1;
230 approverWfRolesName constant varchar2(50) := 'wf_roles_name';
231 /* developer-key constants */
232 devKeyPlaceHolder constant varchar2(9) := 'CHANGE_ME';
233 seededKeyPrefix constant varchar2(4) := 'SEED';
234 /* chain-of-authority ordering modes */
235 parallelChainsMode constant varchar2(1) := 'P';
236 serialChainsMode constant varchar2(1) := 'S';
237 /* The following values are the only allowed values for
238 ame_approval_group_config.voting_regime. All of the values other
239 than orderNumberVoting are also allowed for
240 ame_action_type_config.voting_regime. */
241 consensusVoting constant varchar2(1) := 'C';
242 firstApproverVoting constant varchar2(1) := 'F';
243 orderNumberVoting constant varchar2(1) := 'O';
244 serializedVoting constant varchar2(1) := 'S';
245 /*
246 None of the empty[whatever] variables below should ever be overwritten. They
247 are only to be used as default arguments where empty defaults are required.
248 */
249 emptyApproverRecord approverRecord;
250 emptyApproverRecord2 approverRecord2;
251 emptyApproversTable approversTable;
252 emptyApproversTable2 approversTable2;
253 emptyDateList dateList;
254 emptyDbmsSqlVarchar2Table dbms_sql.varchar2_table;
255 emptyExceptionLogTable exceptionLogTable;
256 emptyIdList idList;
257 emptyIdStringTable idStringTable;
258 emptyInsertionRecord insertionRecord;
259 emptyInsertionRecord2 insertionRecord2;
260 emptyInsertionsTable insertionsTable;
261 emptyInsertionsTable2 insertionsTable2;
262 emptyParametersTable parametersTable;
263 emptyOrderRecord orderRecord;
264 emptyOrdersTable ordersTable;
265 emptyOwaUtilIdentArr owa_util.ident_arr;
266 emptyCharList charList;
267 emptyAttributeValueList attributeValueList;
268 emptyStringList stringList;
269 emptyLongStringList longStringList;
270 emptyLongestStringList longestStringList;
271 emptyWorkflowLogTable workflowLogTable;
272 /* approver types */
273 approverPersonId constant varchar2(50) := 'person_id';
274 approverUserId constant varchar2(50) := 'user_id';
275 approverOamGroupId constant varchar2(50) := 'OAM_group_id';
276 /*
277 The following constants are the only allowed values in an approverRecord2's
278 api_insertion field. They have the following meanings. (1) An
279 apiAuthorityInsertion is an insertion into the chain of authority requiring
280 the chain to jump at the insertion. (2) An apiInsertion is an "ad hoc"
281 insertion. If it occurs in the chain of authority, it does not require the
282 chain to jump at the insertion. The chain skips over the ad-hoc insertion.
283 (3) An oamGenerated approver is not an insertion, but is generated by the
284 rules in OAM applying to the transaction.
285 */
286 apiAuthorityInsertion constant varchar2(1) := 'A';
287 apiInsertion constant varchar2(1) := 'Y';
288 oamGenerated constant varchar2(1) := 'N';
289 /*
290 The following constants are the only allowed values in an approverRecord2's
291 authority field. Note that the constants are backwards compatible with the
292 original Y/N values, and are also ordered so that one can select approvers
293 in the proper order out of ame_temp_approval_processes.
294 */
295 preApprover constant varchar2(1) := 'N';
296 authorityApprover constant varchar2(1) := 'Y';
297 postApprover constant varchar2(1) := 'Z';
298 /*
299 The following constants are the only allowed values in an approverRecord2's
300 approval_status fields. Note that there is no 'D' on the end of 'APPROVE'
301 in the value of approvedStatus; this is intentional.
302 */
303 approveAndForwardStatus constant varchar2(20) := 'APPROVE AND FORWARD';
304 approvedStatus constant varchar2(20) := 'APPROVE';
305 beatByFirstResponderStatus constant varchar2(50) := 'BEAT BY FIRST RESPONDER';
306 clearExceptionsStatus constant varchar2(20) := 'CLEAR EXCEPTIONS';
307 exceptionStatus constant varchar2(20) := 'EXCEPTION';
308 forwardStatus constant varchar2(20) := 'FORWARD';
309 noResponseStatus constant varchar2(20) := 'NO RESPONSE';
310 notifiedStatus constant varchar2(20) := 'NOTIFIED';
311 nullStatus constant varchar2(1) := null;
312 rejectStatus constant varchar2(20) := 'REJECT';
313 repeatedStatus constant varchar2(20) := 'REPEATED';
314 suppressedStatus constant varchar2(20) := 'SUPPRESSED';
315 /* New status added for asynchronous parallel approver functionality*/
316 notifiedByRepeatedStatus constant varchar2(20) := 'NOTIFIEDBYREPEATED';
317 approvedByRepeatedStatus constant varchar2(20) := 'APPROVEDBYREPEATED';
318 rejectedByRepeatedStatus constant varchar2(20) := 'REJECTEDBYREPEATED';
319 /*
320 The following values are components of the only allowed values of the source field
321 of an approverRecord2, when the record's api_insertion value is not ame_util.oamGenerated.
322 */
323 approveAndForwardInsertion constant varchar2(20) := 'APPROVE_AND_FORWARD';
324 forwardInsertion constant varchar2(20) := 'FORWARD';
325 specialForwardInsertion constant varchar2(20) := 'SPECIAL FORWARD';
326 otherInsertion constant varchar2(20) := 'OTHER';
327 surrogateInsertion constant varchar2(20) := 'SURROGATE';
328 /* The following value is prepended to the source field of a deleted approver. */
329 apiSuppression constant varchar2(20) := 'SUPPRESSED';
330 /*
331 The following constants are the only allowed values in the fields of the
332 forwardingBehavior configuration variable:
333 */
334 forwardeeOnly constant varchar2(20) := 'FORWARDEE_ONLY';
335 forwarderAndForwardee constant varchar2(20) := 'FORWARDER_FORWARDEE';
336 ignoreForwarding constant varchar2(20) := 'IGNORE';
337 remand constant varchar2(20) := 'REMAND';
338 repeatForwarder constant varchar2(20) := 'REPEAT_FORWARDER';
339 skipForwarder constant varchar2(20) := 'SKIP_FORWARDER';
340 /*
341 The following constants are the only allowed values of the repeatedApprovers
342 configuration variable:
343 */
344 oncePerTransaction constant varchar2(50) := 'ONCE_PER_TRANSACTION';
345 oncePerItemClass constant varchar2(50) := 'ONCE_PER_ITEM_CLASS';
346 oncePerItem constant varchar2(50) := 'ONCE_PER_ITEM';
347 oncePerSublist constant varchar2(50) := 'ONCE_PER_SUBLIST';
348 oncePerActionType constant varchar2(50) := 'ONCE_PER_ACTION_TYPE';
349 oncePerGroupOrChain constant varchar2(50) := 'ONCE_PER_GROUP_OR_CHAIN';
350 eachOccurrence constant varchar2(50) := 'EACH_OCCURRENCE';
351 /*
355 continueAllOtherItems constant varchar2(50) := 'CONTINUE_ALL_OTHER_ITEMS';
352 The following constants are the only allowed values of the REJECTION_RESPONSE
353 mandatory attribute.
354 */
356 continueOtherSubItems constant varchar2(50) := 'CONTINUE_OTHER_SUBORDINATE_ITEMS';
357 stopAllItems constant varchar2(50) := 'STOP_ALL_ITEMS';
358 /*
359 The ame_engine.getForwardingBehavior function requires a forwarder type
360 and a forwardee type. The values below are allowed. When the forwarder
361 is a chainOfAuthorityForwarder, alreadyInListForwardee refers to an
362 approver who is already in the approver list, but not in the same chain
363 of authority as the forwarder. (When the forwarder is an adHocForwarder,
364 alreadyInListForwardee is the only allowed value.)
365 */
366 chainOfAuthorityForwarder constant varchar2(50) := 'CHAIN_FORWARDER';
367 adHocForwarder constant varchar2(50) := 'AD_HOC_FORWARDER';
368 previousSameChainForwardee constant varchar2(50) := 'SAME_CHAIN_PREVIOUS_FORWARDEE';
369 subordSameHierarchyForwardee constant varchar2(50) := 'SUBORDINATE_SAME_HIERARCHY';
370 alreadyInListForwardee constant varchar2(50) := 'ALREADY_IN_LIST';
371 /*
372 The API inserts the following constants in the ame_approvals_history table. These
373 values should never appear in an approverRecord.
374 */
375 /* pseudo-null constants for adhoc insertions */
376 nullInsertionActionTypeId constant integer := -1;
377 nullInsertionGroupOrChainId constant integer := -1;
378 /* pseudo-null constants for adhoc insertions. For backward compatibility only. These 2 constants
379 should not be used in the AME code at all. */
380 adHocInsertionApprovalTypeId constant integer := -1;
381 adHocInsertionGroupOrChainId constant integer := -1;
382 /* pseudo-null constants for ame_approvals_history entries */
383 nullHistoryActionTypeId constant integer := 0.5;
384 nullHistoryGroupOrChainId constant integer := 0.5;
385 nullHistoryOccurrence constant integer := 0.5;
386 nullHistoryStatus constant varchar2(20) := 'NULL';
387 nullHistorySource constant varchar2(20) := 'NULL';
388 /*
389 The following constants are used by the API to identify types of order
390 relations for ad-hoc insertions. They are the only valid values in the
391 orderRecord record's order_type field.
392 */
393 absoluteOrder constant varchar2(50) := 'absolute order';
394 absoluteOrderDescription constant varchar2(200) :=
395 'Regardless of changes in the approver list''s membership, give the new approver ' ||
396 'the following order number: ';
397 afterApprover constant varchar2(50) := 'after approver';
398 afterApproverDescription constant varchar2(200) :=
399 'Always put the new approver right after the following approver: ';
400 beforeApprover constant varchar2(50) := 'before approver';
401 beforeApproverDescription constant varchar2(200) :=
402 'Always put the new approver right before the following approver: ';
403 firstAuthority constant varchar2(50) := 'first authority';
404 firstAuthorityDescription constant varchar2(200) :=
405 'Start all chains of authority at the new approver.';
406 firstAuthorityParameter constant varchar2(100) := 'first authority';
407 firstPostApprover constant varchar2(50) := 'first post-approver';
408 firstPostApproverDescription constant varchar2(200) := 'Make the approver the first post-approver.';
409 firstPostParameter constant varchar2(50) := 'first_post_approver';
410 firstPreApprover constant varchar2(50) := 'first pre-approver';
411 firstPreApproverDescription constant varchar2(200) := 'Make the approver the first pre-approver.';
412 firstPreParameter constant varchar2(50) := 'first_pre_approver';
413 lastPostApprover constant varchar2(50) := 'last post-approver';
414 lastPostApproverDescription constant varchar2(200) := 'Make the approver the last post-approver.';
415 lastPostParameter constant varchar2(50) := 'last_post_approver';
416 lastPreApprover constant varchar2(50) := 'last pre-approver';
417 lastPreApproverDescription constant varchar2(200) := 'Make the approver the last pre-approver.';
418 lastPreParameter constant varchar2(50) := 'last_pre_approver';
419 /*
420 The following constants are the only placeholders that may appear in the
421 query strings defining an attribute for a given application, i.e. in
422 the ame_attribute_usages.query_string column.
423 */
424 transactionIdPlaceholder constant varchar2(50) := ':transactionId';
425 /* ame_attributes.attribute_type allowed values */
426 numberAttributeType constant varchar2(20) := 'number';
427 stringAttributeType constant varchar2(20) := 'string';
428 dateAttributeType constant varchar2(20) := 'date';
429 booleanAttributeType constant varchar2(20) := 'boolean';
430 currencyAttributeType constant varchar2(20) := 'currency';
431 /* boolean attribute allowed values */
432 booleanAttributeTrue constant varchar2(10) := 'true';
433 booleanAttributeFalse constant varchar2(10) := 'false';
434 /* rule type labels */
435 ruleTypeLabel0 constant varchar2(50) := 'combination';
436 ruleTypeLabel1 constant varchar2(50) := 'list-creation rule';
437 ruleTypeLabel2 constant varchar2(50) := 'list-creation exception';
438 ruleTypeLabel3 constant varchar2(50) := 'list-modification rule';
439 ruleTypeLabel4 constant varchar2(50) := 'substitution';
440 ruleTypeLabel5 constant varchar2(50) := 'pre-list approval-group rule';
441 ruleTypeLabel6 constant varchar2(50) := 'post-list approval-group rule';
442 ruleTypeLabel7 constant varchar2(50) := 'production';
443 /* ame_rules.rule_type allowed values */
444 combinationRuleType constant integer := 0;
445 authorityRuleType constant number := 1;
446 exceptionRuleType constant number := 2;
450 postListGroupRuleType constant number := 6;
447 listModRuleType constant number := 3;
448 substitutionRuleType constant number := 4;
449 preListGroupRuleType constant number := 5;
451 productionRuleType constant integer := 7;
452 /* ame_conditions.condition_type allowed values */
453 ordinaryConditionType constant varchar2(20) := 'auth';
454 exceptionConditionType constant varchar2(20) := 'pre';
455 listModConditionType constant varchar2(20) := 'post';
456 /* dynamic-action-description bind variables */
457 actionParameterOne constant varchar2(20) := ':parameterOne';
458 actionParameterTwo constant varchar2(20) := ':parameterTwo';
459 /* constants for list-modification conditions */
460 anyApprover constant varchar2(50) := 'any_approver';
461 finalApprover constant varchar2(50) := 'final_approver';
462 /* The following 2 constants only to be used for backward comp. */
463 dynamicPostApprover constant varchar2(50) := 'dynamic post-approver';
464 dynamicPreApprover constant varchar2(50) := 'dynamic pre-approver';
465 /* pseudo-boolean constants */
466 booleanTrue constant varchar2(1) := 'Y';
467 booleanFalse constant varchar2(1) := 'N';
468 /*
469 ame_attribute_usages.user_editable possible values:
470 (1) booleanTrue: the user can edit the query string (usage), but has not
471 (2) booleanFalse: the user cannot edit the query string
472 (3) userEdited: the user has edited the query string.
473 If the value is booleanTrue or booleanFalse, it's ok to overwrite the usage when
474 installing a patch. If the value is userEdited, the patch should not overwrite
475 the query string.
476 */
477 userEdited constant varchar2(1) := 'Z';
478 /* mandatory-attribute names */
479 allowAutoApprovalAttribute constant varchar2(50) := 'ALLOW_REQUESTOR_APPROVAL';
480 allowDeletingOamApprovers constant varchar2(50) := 'ALLOW_DELETING_RULE_GENERATED_APPROVERS';
481 atLeastOneRuleAttribute constant varchar2(50) := 'AT_LEAST_ONE_RULE_MUST_APPLY';
482 transactionDateAttribute constant varchar2(50) := 'TRANSACTION_DATE';
483 transactionRequestorAttribute constant varchar2(50) := 'TRANSACTION_REQUESTOR_PERSON_ID';
484 transactionReqUserAttribute constant varchar2(50) := 'TRANSACTION_REQUESTOR_USER_ID';
485 transactionOrgAttribute constant varchar2(50) := 'TRANSACTION_ORG_ID';
486 transactionGroupAttribute constant varchar2(50) := 'TRANSACTION_GROUP_ID';
487 transactionSetOfBooksAttribute constant varchar2(50) := 'TRANSACTION_SET_OF_BOOKS_ID';
488 effectiveRuleDateAttribute constant varchar2(50) := 'EFFECTIVE_RULE_DATE';
489 useWorkflowAttribute constant varchar2(50) := 'USE_WORKFLOW';
490 workflowItemKeyAttribute constant varchar2(50) := 'WORKFLOW_ITEM_KEY';
491 workflowItemTypeAttribute constant varchar2(50) := 'WORKFLOW_ITEM_TYPE';
492 restrictiveLIEvalAttribute constant varchar2(50) := 'USE_RESTRICTIVE_LINE_ITEM_EVALUATION';
493 evalPrioritiesPerLIAttribute constant varchar2(50) := 'EVALUATE_PRIORITIES_PER_LINE_ITEM';
494 restrictiveItemEvalAttribute constant varchar2(50) := 'USE_RESTRICTIVE_ITEM_EVALUATION';
495 evalPrioritiesPerItemAttribute constant varchar2(50) := 'EVALUATE_PRIORITIES_PER_ITEM';
496 rejectionResponseAttribute constant varchar2(50) := 'REJECTION_RESPONSE';
497 repeatSubstitutionsAttribute constant varchar2(50) := 'REPEAT_SUBSTITUTIONS';
498 /* attribute names referenced by job-level handlers */
499 jobLevelStartingPointAttribute constant varchar2(50) := 'JOB_LEVEL_NON_DEFAULT_STARTING_POINT_PERSON_ID';
500 firstStartingPointAttribute constant varchar2(50) := 'FIRST_STARTING_POINT_PERSON_ID';
501 secondStartingPointAttribute constant varchar2(50) := 'SECOND_STARTING_POINT_PERSON_ID';
502 includeAllApproversAttribute constant varchar2(50) := 'INCLUDE_ALL_JOB_LEVEL_APPROVERS';
503 lineItemStartingPointAttribute constant varchar2(50) := 'LINE_ITEM_STARTING_POINT_PERSON_ID';
504 /* attribute names referenced by position handler, and allowed values */
505 positionSortMethodAttribute constant varchar2(50) := 'POSITION_APPROVER_SORT_METHOD';
506 orderedPositionSort constant varchar2(50) := 'ordered';
507 randomPositionSort constant varchar2(50) := 'random';
508 simplePosStartPointAttribute constant varchar2(50) := 'SIMPLE_POS_NON_DEFAULT_STARTING_POINT_PERSON_ID';
509 /* attribute names referenced by position handler */
510 nonDefStartingPointPosAttr constant varchar2(50) := 'NON_DEFAULT_STARTING_POINT_POSITION_ID';
511 nonDefPosStructureAttr constant varchar2(50) := 'NON_DEFAULT_POSITION_STRUCTURE_ID';
512 transactionReqPositionAttr constant varchar2(50) := 'TRANSACTION_REQUESTOR_POSITION_ID';
513 topPositionIdAttribute constant varchar2(50) := 'TOP_POSITION_ID';
514 /* attribute names referenced by approval-group handers */
515 allowEmptyGroupAttribute constant varchar2(50) := 'ALLOW_EMPTY_APPROVAL_GROUPS';
516 /* attribute names referenced by supervisory handler */
517 supStartingPointAttribute constant varchar2(50) := 'SUPERVISORY_NON_DEFAULT_STARTING_POINT_PERSON_ID';
518 topSupPersonIdAttribute constant varchar2(50) := 'TOP_SUPERVISOR_PERSON_ID';
519 /* referenced handler names */
520 absoluteJobLevelHandlerName constant varchar2(50) := 'ame_absolute_job_level_handler';
521 simplePositionHandlerName constant varchar2(50) := 'ame_simple_position_handler';
522 /* referenced approval-type names */
523 preApprovalTypeName constant varchar2(50) := 'pre-chain-of-authority approvals';
524 absoluteJobLevelTypeName constant varchar2(50) := 'absolute job level';
525 relativeJobLevelTypeName constant varchar2(50) := 'relative job level';
526 supervisoryLevelTypeName constant varchar2(50) := 'supervisory level';
527 positionTypeName constant varchar2(50) := 'hr position';
528 positionLevelTypeName constant varchar2(50) := 'hr position level';
532 dualChainsAuthorityTypeName constant varchar2(50) := 'dual chains of authority';
529 managerFinalApproverTypeName constant varchar2(50) := 'manager then final approver';
530 finalApproverOnlyTypeName constant varchar2(50):= 'final approver only';
531 lineItemJobLevelTypeName constant varchar2(50) := 'line-item job-level chains of authority';
533 groupChainApprovalTypeName constant varchar2(50) := 'approval-group chain of authority';
534 nonFinalAuthority constant varchar2(50) := 'nonfinal authority';
535 finalAuthorityTypeName constant varchar2(50) := 'final authority';
536 substitutionTypeName constant varchar2(50) := 'substitution';
537 postApprovalTypeName constant varchar2(50) := 'post-chain-of-authority approvals';
538 productionActionTypeName constant varchar2(50) := 'production rule';
539 /* referenced item-class names */
540 costCenterItemClassName constant varchar2(100) := 'cost center';
541 headerItemClassName constant varchar2(100) := 'header';
542 lineItemItemClassName constant varchar2(100) := 'line item';
543 /* configuration-variable names */
544 adminApproverConfigVar constant varchar2(50) := 'adminApprover';
545 purgeFrequencyConfigVar constant varchar2(50) := 'purgeFrequency';
546 useWorkflowConfigVar constant varchar2(50) := 'useWorkflow';
547 helpPathConfigVar constant varchar2(50) := 'helpPath';
548 htmlPathConfigVar constant varchar2(50) := 'htmlPath';
549 imagePathConfigVar constant varchar2(50) := 'imagePath';
550 portalUrlConfigVar constant varchar2(50) := 'portalUrl';
551 distEnvConfigVar constant varchar2(50) := 'distributedEnvironment';
552 curConvWindowConfigVar constant varchar2(50) := 'currencyConversionWindow';
553 forwardingConfigVar constant varchar2(50) := 'forwardingBehaviors';
554 repeatedApproverConfigVar constant varchar2(50) := 'repeatedApprovers';
555 allowAllApproverTypesConfigVar constant varchar2(30) := 'allowAllApproverTypes';
556 allowFyiNotificationsConfigVar constant varchar2(30) := 'allowFyiNotifications';
557 rulePriorityModesConfigVar constant varchar2(50) := 'rulePriorityModes';
558 productionConfigVar constant varchar2(50) := 'productionFunctionality';
559 allowAllICRulesConfigVar constant varchar2(50) := 'allowAllItemClassRules';
560 /* productionFunctionality allowed values */
561 noProductions constant varchar2(50) := 'none';
562 perApproverProductions constant varchar2(50) := 'approver';
563 perTransactionProductions constant varchar2(50) := 'transaction';
564 allProductions constant varchar2(50) := 'all';
565 /* productionFunctionality exception */
566 productionException exception;
567 /* chain-of-authority ordering modes */
568 sequentialChainsMode constant varchar2(1) := 'S';
569 /*
570 allowedValues for headerListParallelizationMode configuration variable
571 */
572 headerAfterItems constant varchar2(1) := 'A';
573 headerBeforeItems constant varchar2(1) := 'B';
574 headerWithFirstItems constant varchar2(1) := 'W';
575 /*
576 The following constants are the only allowed values for the
577 ame_item_class_usages.item_class_sublist_mode column.
578 */
579 parallelSublists constant varchar2(1) := 'P';
580 preFirst constant varchar2(1) := 'R';
581 preAndAuthorityFirst constant varchar2(1) := 'A';
582 serialSublists constant varchar2(1) := 'S';
583 /*
584 The following constants are the only allowed values
585 for the ame_item_class_usages.item_class_par_mode
586 column.
587 */
588 parallelItems constant varchar2(1) := 'P';
589 serialItems constant varchar2(1) := 'S';
590 /*
591 AME_STRIPING
592 useRuleStripingConfigVar constant varchar2(50) := 'useRuleStriping';
593 */
594 /* rulePriorityModes */
595 disabledRulePriorityDefVal constant varchar2(100) := 'disabled:disabled:disabled:disabled:disabled:disabled:disabled:disabled';
596 disabledRulePriority constant varchar2(50) := 'disabled';
597 absoluteRulePriority constant varchar2(50) := 'absolute';
598 relativeRulePriority constant varchar2(50) := 'relative';
599 /* sourceDescriptionOut */
600 /* one or more rules required the approver. */
601 ruleGeneratedSource constant varchar2(50) := 'rule generated' ;
602 /* Another approver forwarded to this approver, or this approver forwarded to another approver, and
603 the repeatedApprover configuration variable's value required that this approver re-approve after the
604 forwardee approves. */
605 forwardeeSource constant varchar2(50) := 'forwardee';
606 /* An end user of the originating application inserted the approver from within the application. */
607 inserteeSource constant varchar2(50) := 'insertee';
608 /* Another approver was unresponsive, and the originating application so informed AME. AME
609 added this approver to serve as a surrogate for the unresponsive approver. */
610 surrogateSource constant varchar2(50) :='surrogate';
611 /* The calling application deleted the approver (via an API call). */
612 suppressionSource constant varchar2(50) := 'suppressed by end user';
613 /* versionStartDate stuff */
614 objectVersionException exception;
615 versionDateFormatModel constant varchar2(50) := 'YYYY:MM:DD:HH24:MI:SS';
616 /* Approver-query-handler procecdures should raise this exception when they fetch more than 50 rows. */
617 tooManyApproversException exception;
618 /* Approver-query-handler procecdures should raise this exception when they fetch zero rows. */
619 zeroApproversException exception;
620 /* transaction-type cookie name */
621 transactionTypeCookie constant varchar2(50) := 'AME_TRANSACTION_TYPE';
622 /* admin-activity types */
623 applicationAdministration constant varchar2(50) := 'applicationAdministration';
627 conditionListForm constant varchar2(50) := 'conditionListForm';
624 transactionTypeAdministration constant varchar2(50) := 'transactionTypeAdministration';
625 /* condition navigation paths */
626 stringListForm constant varchar2(50) := 'stringListForm';
628 /* UI style-sheet constants (one per class in amestyle.css) */
629 activeFooterItemStyle constant varchar2(30) := 'activeFooterItem';
630 detailsHeadingStyle constant varchar2(30) := 'detailsHeading';
631 detailsLabelStyle constant varchar2(30) := 'detailsLabel';
632 editFormLinkStyle constant varchar2(30) := 'editFormLink';
633 footerItemStyle constant varchar2(30) := 'footerItem';
634 formOrListHeadingStyle constant varchar2(30) := 'formOrListHeading';
635 listDeleteHeadingStyle constant varchar2(30) := 'listDeleteHeading';
636 listSubheadingStyle constant varchar2(30) := 'listSubheading';
637 navLinkStyle constant varchar2(30) := 'navLink';
638 staticDescriptionStyle constant varchar2(30) := 'staticDescription';
639 transTypeHeadingStyle constant varchar2(30) := 'transTypeHeading';
640 twoColumnFormLabelStyle constant varchar2(30) := 'twoColumnFormLabel';
641 /*
642 AME_STRIPING
643 rule-striping stuff
644 stripeWildcard varchar2(50) := 'AME_*';
645 */
646 /* functions and procedures */
647 /*
648 canonNumStringToDisplayString formats canonicalNumberStringIn according to the formatting
649 conventions for the currency represented by currencyCodeIn. Otherwise, at present,
650 the input string's formatting is unchanged. We should nevertheless call this function to
651 format number-strings for display so that we can easily upgrade our number displays to NLS
652 conformance, when that becomes possible.
653 */
654 function canonNumStringToDisplayString(canonicalNumberStringIn in varchar2,
655 currencyCodeIn in varchar2 default null) return varchar2;
656 function convertCurrency(fromCurrencyCodeIn in varchar2,
657 toCurrencyCodeIn in varchar2,
658 conversionTypeIn in varchar2,
659 amountIn in number,
660 dateIn in date default sysdate,
661 applicationIdIn in integer default null) return number;
662 /*
663 dateStringsToString takes values YYYY, MM, and DD and transforms them to a date-string
664 with the format versionDateFormatModel. Use it in handlers for forms having the
665 ame_util.twoColumnFormDateInput widget.
666 */
667 function dateStringsToString(yearIn in varchar2,
668 monthIn in varchar2,
669 dayIn in varchar2) return varchar2;
670 function escapeSpaceChars(stringIn in varchar2) return varchar2;
671 function fieldDelimiter return varchar2;
672 function filterHtmlUponInput(stringIn in varchar2) return varchar2;
673 function filterHtmlUponRendering(stringIn in varchar2) return varchar2;
674 function getAdminName(applicationIdIn in integer default null) return varchar2;
675 function getBusGroupName(busGroupIdIn in integer) return varchar2;
676 /*
677 getCarriageReturn returns ASCII 13, a carriage return. Some Web browsers combine this
678 character with ASCII 10, a line feed (which is what the Enter key generates), to create
679 a new line in a textarea input. The removeReturns function removes both of these
680 characters, optionally replacing them by a space character, and returning the result.
681 When you want to strip the returns out of a string, use removeReturns.
682 */
683 function getCarriageReturn return varchar2;
684 function getContactAdminString(applicationIdIn in integer default null) return varchar2;
685 function getColumnLength(tableNameIn in varchar2,
686 columnNameIn in varchar2,
687 fndApplicationIdIn in integer default 800) return integer;
688 function getConfigDesc(variableNameIn in varchar2) return varchar2;
689 function getConfigVar(variableNameIn in varchar2,
690 applicationIdIn in integer default null) return varchar2;
691 function getCurrencyName(currencyCodeIn in varchar2) return varchar2;
692 /*
693 AME_STRIPING
694 function getCurrentStripeSetId(applicationIdIn in integer) return integer;
695 */
696 function getCurrentUserId return integer;
697 function getDayString(dateIn in date) return varchar2;
698 function getHighestResponsibility return integer;
699 /* getLineFeed returns ASCII character 10, which is what the return key produces. */
700 function getLabel(attributeApplicationIdIn in number,
701 attributeCodeIn in varchar2,
702 returnColonAndSpaces in boolean default false) return varchar2;
703 function getLineFeed return varchar2;
704 function getLongBoilerplate(applicationShortNameIn in varchar2,
705 messageNameIn in varchar2,
706 tokenNameOneIn in varchar2 default null,
707 tokenValueOneIn in varchar2 default null,
708 tokenNameTwoIn in varchar2 default null,
709 tokenValueTwoIn in varchar2 default null,
710 tokenNameThreeIn in varchar2 default null,
711 tokenValueThreeIn in varchar2 default null,
712 tokenNameFourIn in varchar2 default null,
713 tokenValueFourIn in varchar2 default null,
714 tokenNameFiveIn in varchar2 default null,
715 tokenValueFiveIn in varchar2 default null,
719 tokenValueSevenIn in varchar2 default null,
716 tokenNameSixIn in varchar2 default null,
717 tokenValueSixIn in varchar2 default null,
718 tokenNameSevenIn in varchar2 default null,
720 tokenNameEightIn in varchar2 default null,
721 tokenValueEightIn in varchar2 default null,
722 tokenNameNineIn in varchar2 default null,
723 tokenValueNineIn in varchar2 default null,
724 tokenNameTenIn in varchar2 default null,
725 tokenValueTenIn in varchar2 default null) return varchar2;
726 function getMessage(applicationShortNameIn in varchar2,
727 messageNameIn in varchar2,
728 tokenNameOneIn in varchar2 default null,
729 tokenValueOneIn in varchar2 default null,
730 tokenNameTwoIn in varchar2 default null,
731 tokenValueTwoIn in varchar2 default null,
732 tokenNameThreeIn in varchar2 default null,
733 tokenValueThreeIn in varchar2 default null,
734 tokenNameFourIn in varchar2 default null,
735 tokenValueFourIn in varchar2 default null,
736 tokenNameFiveIn in varchar2 default null,
737 tokenValueFiveIn in varchar2 default null,
738 tokenNameSixIn in varchar2 default null,
739 tokenValueSixIn in varchar2 default null,
740 tokenNameSevenIn in varchar2 default null,
741 tokenValueSevenIn in varchar2 default null,
742 tokenNameEightIn in varchar2 default null,
743 tokenValueEightIn in varchar2 default null,
744 tokenNameNineIn in varchar2 default null,
745 tokenValueNineIn in varchar2 default null,
746 tokenNameTenIn in varchar2 default null,
747 tokenValueTenIn in varchar2 default null) return varchar2;
748 function getMonthString(dateIn in date) return varchar2;
749 function getOrgName(orgIdIn in integer) return varchar2;
750 function getPlsqlDadPath return varchar2;
751 function getQuery(selectClauseIn in varchar2) return ame_util.queryCursor ;
752 function getServerName return varchar2;
753 function getServerPort return varchar2;
754 function getSetOfBooksName(setOfBooksIdIn in integer) return varchar2;
755 function getTransTypeCookie return integer;
756 /*
757 AME_STRIPING
758 function getStripeSetCookieName(applicationIdIn in integer) return varchar2;
759 */
760 function getYearString(dateIn in date) return varchar2;
761 function hasOrderClause(queryStringIn in varchar2) return boolean;
762 function idListsMatch(idList1InOut in out nocopy idList,
763 idList2InOut in out nocopy idList,
764 sortList1In in boolean default false,
765 sortList2In in boolean default true) return boolean;
766 /*
767 inputNumStringToCanonNumString converts inputNumberStringIn to a number-string in
768 canonical format, for storage in database tables. It also validates the input. If
769 currencyCodeIn is non-null, the validation includes checking the proper number of
770 decimal places for a currency number-string. We should always use this function to
771 convert input number-strings to storable number-strings.
772 */
773 function inputNumStringToCanonNumString(inputNumberStringIn in varchar2,
774 currencyCodeIn in varchar2 default null) return varchar2;
775 function isAnEvenNumber(numberIn in integer) return boolean;
776 function isAnInteger(stringIn in varchar2) return boolean;
777 function isANegativeInteger(stringIn in varchar2) return boolean;
778 function isANonNegativeInteger(stringIn in varchar2) return boolean;
779 function isANumber(stringIn in varchar2,
780 allowDecimalsIn in boolean default true,
781 allowNegativesIn in boolean default true) return boolean;
782 function isArgumentTooLong(tableNameIn in varchar2,
783 columnNameIn in varchar2,
784 argumentIn in varchar2) return boolean;
785 function isConversionTypeValid(conversionTypeIn in varchar2) return boolean;
786 function isCurrencyCodeValid(currencyCodeIn in varchar2) return boolean;
787 function isDateInRange(currentDateIn in date default sysdate,
788 startDateIn in date,
789 endDateIn in date) return boolean;
790 function longStringListsMatch(longStringList1InOut in out nocopy longStringList,
791 longStringList2InOut in out nocopy longStringList,
792 sortList1In in boolean default false,
793 sortList2In in boolean default true) return boolean;
794 function longestStringListsMatch(longestStringList1InOut in out nocopy longestStringList,
795 longestStringList2InOut in out nocopy longestStringList,
796 sortList1In in boolean default false,
797 sortList2In in boolean default true) return boolean;
798 function matchCharacter(stringIn in varchar2,
799 locationIn in integer,
800 characterIn in varchar2) return boolean;
804 function removeReturns(stringIn in varchar2,
801 function personIdToUserId(personIdIn in integer) return integer;
802 function recordDelimiter return varchar2;
803 /* See the comment for getCarriageReturn above for an explanation of removeReturns. */
805 replaceWithSpaces in boolean default false) return varchar2;
806 function removeScriptTags(stringIn in varchar2 default null) return varchar2;
807 function stringListsMatch(stringList1InOut in out nocopy stringList,
808 stringList2InOut in out nocopy stringList,
809 sortList1In in boolean default false,
810 sortList2In in boolean default true) return boolean;
811 function userIdToPersonId(userIdIn in integer) return integer;
812 function useWorkflow(transactionIdIn in varchar2 default null,
813 applicationIdIn in integer) return boolean;
814 function validateUser(responsibilityIn in integer,
815 applicationIdIn in integer default null) return integer;
816 /*
817 versionDateToDisplayDate transforms a date-string with the format versionDateFormatModel
818 to a date-string formatted per the end user's preferences by fnd_date.date_to_displayDate.
819 */
820 function versionDateToDisplayDate(stringDateIn in varchar2) return varchar2;
821 /* versionDateToString transforms a date to a date-string with the format versionDateFormatModel. */
822 function versionDateToString(dateIn in date) return varchar2;
823 /* versionStringToDate transforms a date-string with the format versionDateFormatModel to a date. */
824 function versionStringToDate(stringDateIn in varchar2) return date;
825 procedure appendRuleIdToSource(ruleIdIn in integer,
826 sourceInOut in out nocopy varchar2);
827 /* Translation Routines for approverRecord- approverRecord2*/
828 procedure apprRecordToApprRecord2(approverRecordIn in ame_util.approverRecord,
829 itemIdIn in varchar2 default null,
830 approverRecord2Out out nocopy ame_util.approverRecord2);
831 procedure apprRecord2ToApprRecord(approverRecord2In in ame_util.approverRecord2,
832 approverRecordOut out nocopy ame_util.approverRecord);
833 procedure apprTableToApprTable2(approversTableIn in ame_util.approversTable,
834 itemIdIn in varchar2 default null,
835 approversTable2Out out nocopy ame_util.approversTable2) ;
836 procedure apprTable2ToApprTable(approversTable2In in ame_util.approversTable2,
837 approversTableOut out nocopy ame_util.approversTable);
838 procedure checkForSqlInjection(queryStringIn in varchar2);
839 procedure compactIdList(idListInOut in out nocopy idList);
840 procedure compactLongStringList(longStringListInOut in out nocopy ame_util.longStringList);
841 procedure compactLongestStringList(longestStringListInOut in out nocopy ame_util.longestStringList);
842 procedure compactStringList(stringListInOut in out nocopy ame_util.stringList) ;
843 procedure convertApproversTableToValues(approversTableIn in ame_util.approversTable,
844 personIdValuesOut out nocopy ame_util.idList,
845 userIdValuesOut out nocopy ame_util.idList,
846 apiInsertionValuesOut out nocopy ame_util.charList,
847 authorityValuesOut out nocopy ame_util.charList,
848 approvalTypeIdValuesOut out nocopy ame_util.idList,
849 groupOrChainIdValuesOut out nocopy ame_util.idList,
850 occurrenceValuesOut out nocopy ame_util.idList,
851 sourceValuesOut out nocopy ame_util.longStringList,
852 statusValuesOut out nocopy ame_util.stringList);
853 procedure convertApproversTable2ToValues(approversTableIn in ame_util.approversTable2,
854 namesOut out nocopy ame_util.longStringList,
855 itemClassesOut out nocopy ame_util.stringList,
856 itemIdsOut out nocopy ame_util.stringList,
857 apiInsertionsOut out nocopy ame_util.charList,
858 authoritiesOut out nocopy ame_util.charList,
859 actionTypeIdsOut out nocopy ame_util.idList,
860 groupOrChainIdsOut out nocopy ame_util.idList,
861 occurrencesOut out nocopy ame_util.idList,
862 approverCategoriesOut out nocopy ame_util.charList,
863 statusesOut out nocopy ame_util.stringList);
864 procedure convertValuesToApproversTable(personIdValuesIn in ame_util.idList,
865 userIdValuesIn in ame_util.idList,
866 apiInsertionValuesIn in ame_util.charList,
867 authorityValuesIn in ame_util.charList,
868 approvalTypeIdValuesIn in ame_util.idList,
869 groupOrChainIdValuesIn in ame_util.idList,
870 occurrenceValuesIn in ame_util.idList,
871 sourceValuesIn in ame_util.longStringList,
872 statusValuesIn in ame_util.stringList,
876 apiInsertionValuesIn in ame_util.charList,
873 approversTableOut out nocopy ame_util.approversTable);
874 procedure convertValuesToApproversTable2(nameValuesIn in ame_util.longStringList,
875 approverCategoryValuesIn in ame_util.charList,
877 authorityValuesIn in ame_util.charList,
878 approvalTypeIdValuesIn in ame_util.idList,
879 groupOrChainIdValuesIn in ame_util.idList,
880 occurrenceValuesIn in ame_util.idList,
881 sourceValuesIn in ame_util.longStringList,
882 statusValuesIn in ame_util.stringList,
883 approversTableOut out nocopy ame_util.approversTable2);
884 procedure copyApproverRecord2(approverRecord2In in approverRecord2,
885 approverRecord2Out out nocopy approverRecord2);
886 procedure copyApproversTable2(approversTable2In in approversTable2,
887 approversTable2Out out nocopy approversTable2);
888 procedure copyCharList(charListIn in charList,
889 charListOut out nocopy charList);
890 procedure copyIdList(idListIn in idList,
891 idListOut out nocopy idList);
892 procedure copyLongStringList(longStringListIn in longStringList,
893 longStringListOut out nocopy longStringList);
894 procedure copyStringList(stringListIn in stringList,
895 stringListOut out nocopy stringList);
896 procedure deserializeLongStringList(longStringListIn in varchar2,
897 longStringListOut out nocopy longStringList);
898 procedure getAllowedAppIds(applicationIdsOut out nocopy ame_util.stringList,
899 applicationNamesOut out nocopy ame_util.stringList);
900 procedure getApplicationList(applicationListOut out nocopy idStringTable);
901 procedure getApplicationList2(applicationIdListOut out nocopy stringList,
902 applicationNameListOut out nocopy stringList);
903 procedure getApplicationList3(applicationIdIn in integer,
904 applicationIdListOut out nocopy stringList,
905 applicationNameListOut out nocopy stringList);
906 procedure getConversionTypes(conversionTypesOut out nocopy ame_util.stringList);
907 procedure getCurrencyCodes(currencyCodesOut out nocopy ame_util.stringList);
908 procedure getCurrencies(currencyCodesOut out nocopy ame_util.stringList,
909 currencyNamesOut out nocopy ame_util.stringList);
910 procedure getFndApplicationId(applicationIdIn in integer,
911 fndApplicationIdOut out nocopy integer,
912 transactionTypeIdOut out nocopy varchar2);
913 procedure getWorkflowAttributeValues(applicationIdIn in integer,
914 transactionIdIn in varchar2,
915 workflowItemKeyOut out nocopy varchar2,
916 workflowItemTypeOut out nocopy varchar2);
917 procedure identArrToIdList(identArrIn in owa_util.ident_arr,
918 startIndexIn in integer default 2,
919 idListOut out nocopy idList);
920 procedure identArrToLongestStringList(identArrIn in owa_util.ident_arr,
921 startIndexIn in integer default 2,
922 longestStringListOut out nocopy longestStringList);
923 procedure identArrToStringList(identArrIn in owa_util.ident_arr,
924 startIndexIn in integer default 2,
925 stringListOut out nocopy stringList);
926 procedure idListToStringList(idListIn in idList,
927 stringListOut out nocopy stringList);
928 /* Translation Routines for insertionRecord - insertionRecord2 */
929 procedure insTable2ToInsTable(insertionsTable2In in ame_util.insertionsTable2,
930 insertionsTableOut out nocopy ame_util.insertionsTable) ;
931 procedure insTableToInsTable2(insertionsTableIn in ame_util.insertionsTable,
932 transactionIdIn in varchar2,
933 insertionsTable2Out out nocopy ame_util.insertionsTable2) ;
934 procedure makeEven(numberInOut in out nocopy integer);
935 procedure makeOdd(numberInOut in out nocopy integer);
936 /* Translation Routines orderRecord - insertionRecord2 */
937 procedure ordRecordToInsRecord2(orderRecordIn in ame_util.orderRecord,
938 transactionIdIn in varchar2,
939 approverIn in ame_util.approverRecord,
940 insertionRecord2Out out nocopy ame_util.insertionRecord2) ;
941
942 /*
943 An ame_util.approverRecord2's source field is either a field-delimited list of
944 rule IDs, or a string representing any of several insertion types. In all cases,
945 parseSourceValue sets sourceDescriptionOut to a string describing the source. In
946 the case of a rule-generated approver, parseSourceValue populates ruleIdListOut
947 with the rule IDs requiring the approver.
948 */
949 procedure parseSourceValue(sourceValueIn in varchar2,
950 sourceDescriptionOut out nocopy varchar2,
951 ruleIdListOut out nocopy ame_util.idList);
955 localErrorIn in boolean,
952 procedure parseStaticCurAttValue(applicationIdIn in integer,
953 attributeIdIn in integer,
954 attributeValueIn in varchar2,
956 amountOut out nocopy varchar2,
957 currencyOut out nocopy varchar2,
958 conversionTypeOut out nocopy varchar2);
959 procedure purgeOldTempData;
960 procedure purgeOldTempData2(errbuf out nocopy varchar2,
961 retcode out nocopy varchar2);
962 procedure purgeOldTransLocks(errbuf out nocopy varchar2,
963 retcode out nocopy varchar2);
964 procedure runtimeException(packageNameIn in varchar2,
965 routineNameIn in varchar2,
966 exceptionNumberIn in integer,
967 exceptionStringIn in varchar2);
968 procedure serializeApprovers(approverNamesIn in ame_util.longStringList,
969 approverDescriptionsIn in ame_util.longStringList,
970 maxOutputLengthIn in integer,
971 approverNamesOut out nocopy varchar2,
972 approverDescriptionsOut out nocopy varchar2);
973 procedure setConfigVar(variableNameIn in varchar2,
974 variableValueIn in varchar2,
975 applicationIdIn in integer default null);
976 /*
977 AME_STRIPING
978 procedure setCurrentStripeSetId(applicationIdIn in integer,
979 stripeSetIdIn in integer);
980 */
981 procedure setTransTypeCookie(applicationIdIn in integer);
982 procedure sortIdListInPlace(idListInOut in out nocopy idList);
983 procedure sortLongStringListInPlace(longStringListInOut in out nocopy longStringList);
984 procedure sortLongestStringListInPlace(longestStringListInOut in out nocopy longestStringList);
985 procedure sortStringListInPlace(stringListInOut in out nocopy stringList);
986 procedure stringListToIdList(stringListIn in stringList,
987 idListOut out nocopy idList);
988 procedure substituteStrings(stringIn in varchar2,
989 targetStringsIn in ame_util.stringList,
990 substitutionStringsIn in ame_util.stringList,
991 stringOut out nocopy varchar2);
992 end ame_util;