Professional Documents
Culture Documents
Approvals
Management
Developers Guide
RELEASE 11i10/AME.A
December 2004
Audience
For any Action Types that are not seeded or any Oracle Application module
that is not integrated with AME, please submit a request to your support
representative with a business case for this addition.
Note: The remainder of this guide assumes that you have studied the
implementation guide.
AME Security
• an attribute usage
3. Select ‘Maintain transaction types’ and then the ‘Continue’ button on the
‘Choose an Activity’ form.
4. Select the ‘Add a Transaction Type’ button at the bottom of the ‘All
Transaction Types’ form.
5. Select the originating application that will own the transaction type, and
then the ‘Continue’ button, on the ‘Choose an Application’ form.
The transaction type will be created with a default item-class usage for the
header item class. See Chapter 4 of this guide to learn how to add other item-
class usages to the transaction type. See Chapter 3 of the implementation
guide to learn how to edit your transaction type’s attribute usages. See
Chapter 11 of the implementation guide to learn how to edit your transaction
type’s configuration variables.
Building an ActionType 11
Overview
• chain of authority
• list–modification
• substitution
• pre-approval
• post-approval
• production
To determine whether you need to create a custom action type, follow these
Building an ActionType 12
steps:
If none of the above approaches meets your needs, you may elect to build a
custom action type.
NOTE: AME development and Oracle Support offer best effort support for
custom action types.
1. Identify the approver types that the action type is based on. (See Chapter
3 of this guide for details about approver types.)
2. Code the action type’s handler, and give the APPS account execute
privileges on it.
3. Register the action type in AME using the actions tab in the AME UI.
Building an ActionType 13
4. Create actions for the new action type. (See Chapter 5 of the
implementation guide for details.)
5. Test the action type. (See Chapter 10 of the implementation guide for
details.)
Most action types have several actions, and each action has a set of (zero, one,
or two) parameters defined for it. How the action type’s handler interprets
an action’s parameters varies with the action type. The parameters of an
authority action type’s actions typically represent requirements for certain
levels of authority, and the handler typically generates a chain of authority
satisfying the most stringent of such requirement. The parameters of
approver–group action types’ actions typically identify approval groups.
The parameters of list–editing actions represent specific types of alterations
to an approver list, for example changes that reflect non–uniformities in an
organization’s signing–authority rules.
Before you code your handler, you should define the syntax and semantics
rules for the parameters of your action type’s actions. The rules should make
it easy for your handler efficiently to sort, aggregate, and interpret the
parameters of several actions.
AME may call your action-type handler very frequently. Recall that list-
modification and substitution rules apply to an entire transaction’s approver
list. As a result, AME’s engine invokes the handlers of the action types used
by these rules once per transaction. In contrast, The other rules types
(ignoring the production rule type) can apply to each item in a transaction’s
lists of subordinate items. AME’s engine may invoke the handlers of the
action types used by these rules once per item. So if, for example, a
transaction has 50 line items, AME’s engine may invoke an authority action
type’s handler 50 times for the transaction. If the originating application
generates 1,000 transactions of the same type per day, AME’s engine might
invoke the handler 50,000 times per day. So if the number of transactions
and items that use your action type may be substantial, it is critical that you
make your handler efficient.
Building an ActionType 14
3. Compare your handler’s asymptotic (long run) performance to that of
one of the seeded handlers.
3. Calculate and output the mean execution time per transaction ID.
Set up your rules to use a seeded action type (and not use the action type
you’re testing), and run the test procedure. Then, change the rules using the
seeded action type to use your action type instead, and re-run the test
procedure. The results should be comparable.
Programming Interface
Package Specification
Package Name
ame_actionType_handler
Entry-Point Procedure
procedure handler;
Building an ActionType 15
end ame_function_handler;
Package Body
Handler-Procedure Architecture
The following subsections describe the architecture appropriate for each type
of handler.
Authority-Handler Architecture
Building an ActionType 16
3. Analyze the action parameters to determine how many chains of
authority the rules require, and when to end each chain.
j. Go to step 4d.
Notes:
1. At step 3, you may eliminate duplicate action parameters, but if you do,
you should keep track of the IDs of all rules requiring a given parameter,
for use in populating each approver’s source field.
Field Value
Building an ActionType 17
Field Value
name, orig_system, The handler fetches these values at steps 4.a, 4.e,
orig_system_id and 4.h. The handler may start by fetching an
approver’s wf_roles.name value, and then use
ame_approver_type_pkg.
getOrigSystemIdAndDisplayName to fetch the
other fields’ values. Or, the handler may start
by fetching the approver’s orig_system_id value
(such as a per_all_people_f.person_id value),
and then use ame_approver_type_pkg.
getWfRolesNameAndDisplayName to fetch the
other values.
Building an ActionType 18
Field Value
Building an ActionType 19
Field Value
3. If the handler only needs to generate one chain of authority, eliminate the
loop at step 4, and simply do invidual steps contained 4 once.
Approver-Group-Handler Architecture
4. Fetch the required groups’ order numbers and ordering modes by calling
ame_engine.getApprovalGroupConfigs. (Note that this procedure sorts
Building an ActionType 20
the group IDs in place by group order number first, then by group ID.)
• Call ame_engine.addApprover.
Notes:
1. At step 3, you may eliminate duplicate action parameters, but if you do,
you should preserve in your rule-ID list the IDs of all the applicable
rules, for use in populating each approver’s source field.
Field Value
Building an ActionType 21
Field Value
Building an ActionType 22
Field Value
List-Editing-Handler Architecture
Building an ActionType 23
3. For each (remaining) row in the output variables of
ame_engine.getHandlerRules3, loop.
Notes:
PL/SQL Exceptions
Building an ActionType 24
ame_util.getMessage(
applicationShortNameIn => 'PER',
messageNameIn =>
AME_400448_AJHA_JOB_NOT_ASSD');
ame_util.runtimeException(
packageNameIn =>
'ame_absolute_job_level_handler',
routineNameIn => 'getJobLevelAndSupervisor',
exceptionNumberIn => errorCode,
exceptionStringIn => errorMessage);
raise_application_error(errorCode,
errorMessage);
when others then
ame_util.runtimeException(
packageNameIn =>
'ame_absolute_job_level_handler',
routineNameIn => 'getJobLevelAndSupervisor',
exceptionNumberIn => sqlcode,
exceptionStringIn => sqlerrm);
raise;
Once your handler is ready, you need to register it with AME using the
actions tab. Note that this tab requires administrative or developer
privileges.
2. Select the ‘Add Action Type’ button at the bottom of the list of actions.
3. Select the appropriate rule type from the ‘Create an Action Type-Step 1’
form, and then select the ‘Create Action Type’ button.
4. Enter and select the properties of the action type, and the current
transaction type’s configuration for it, on the ‘Create an Action Type-Step
2’ form. If you select ‘yes’ on the ‘Dynamic Action Description’ radio
button, you must enter a dynamic action-description query in the
‘Action-Description Query’ field below. Such queries can reference the
bind variables :parameterOne and (for list-editing action types)
:parameterTwo, which AME binds to an action’s parameter values. For
example,
At this point the wizard creates the action type and takes you to the
Building an ActionType 25
‘Create an Action’ form. You can use this form to create the first
action for your action type. When you submit the form, the wizard
takes you to the new action type’s editing form, where you can add
more actions or change some of the action type’s properties and
configuration values.
Building an ActionType 26
insertions resides in the engine. insertions resides in the handler.
10. The logic to identify surrogate The logic to identify surrogate
approvers resides in the handler. approvers resides in the approver type
object layer.
11. The handler transaction state needs to Temporary tables/ global engine
be maintained in temporary tables/ variables are not needed to maintain
global engine variables. transaction state. This can be done by
using private handler package
variables.
12. The rules which require the approver The rules which require the approver to
to be part of the approver list are not be part of the approver list are
accurately identified. All applicable accurately identified. Only rules which
rules are included in the source require the approver to be included in
column of the approver record. the approver list are mentioned in the
source column of the approver record.
13. The List Modification actions which The List Modification actions which
truncates the approver list actually truncates the approver list will either set
delete the approvers from the approver the approvers approver_category to
list. ame_util.fyiApproverCategory, if
possible or will set the approvers
approval_status to
ame_util.suppressedStatus.
Building an ActionType 27
3
Defining an
Approver Type
For AME to use an approver type, it must be be registered with AME (not
merely Workflow Directory Services). Currently there is no user interface to
register an approver type. Rather, one must execute a set of SQL statements
that insert rows into the ame_approver_types and
ame_approver_type_usages tables, and you must customize several runtime
routines in AME code. (AME enhancement request 32767685 requests
eliminating the need to customize AME code when adding an approver
type.) If you need to use an approver type that AME does not yet seed, we
strongly encourage you to request that AME development release a patch
supporting the approver type, rather than registering it yourself.
1. Code a PL/SQL procedure that AME users can invoke to query for
approvers of the new type.
3. Identify the action types that can use the new approver type. For each
such action type, insert a row into ame_approver_type_usages.
The rest of this chapter explains how to perform each of these steps.
Procedure Signature
Procedure Name
[approverType]ApproverQuery
Argument List
At run time, the first five arguments contain the query criteria
that the end user entered or selected on the approver-query form
of the approver-query wizard. The integer excludeListCountIn
sets appropriately the the number of rows that the procedure
may output, to account for a set of excluded approvers known to
the approver-query wizard at run time. The two output
arguments identify approvers that match the query criteria.
Functionality
When you register your approver type with AME, you provide a
set of query criteria that the approver-query wizard should
present when an end user queries for approvers of your
approver type. The end user may leave any or all of these blank,
so that your procedure may receive null values in any
combination of its criterion[n]In arguments. The simplest way to
accommodate such null query criteria is to have your cursor
define a cursor that encapsulates your approver query. The
cursor’s argument list should match exactly the input argument
list of the query procedure. The cursor’s where clause should
accommodate null query criteria like this:
where
(criterion1In is null or
If the cursor does not select too many rows, your procedure
should check that it returns at least one:
if(approverNames.count = 0) then
raise ame_util.zeroApproversException;
approverNamesOut := null;
approverDescriptionsOut := null;
return;
end if;
Use the following insert statement to register the new approver type with
AME:
insert into ame_approver_types(
approver_type_id,
orig_system,
query_variable_1_label,
query_variable_2_label,
approverTypeId
origSystem
variable[n]LovQuery
queryProcedure
createdBy
creationDate
lastUpdatedBy
lastUpdateDate
lastUpdateLogin
startDate
endDate
Once you have inserted a row into ame_approver_types for your approver
type, you must tell AME which custom action types may use the approver
type. Do not include seeded action types in your list. For each action type in
your list, follow these steps:
3. Select the ‘Add Approver Types’ button at the bottom of the ‘Edit Action
Type’ form.
4. Select the new approver type from the ‘Approver Type’ select list, and
then select the ‘Add’ button.
isASubordinate
getSuperior
getSurrogate
AME currently seeds item classes for a transaction’s header, line items, cost
centers, and project codes. Your originating application may recognize other
entities having a many-to-one relation to a transaction. For example, your
application may divide a transaction’s cost among several entities of the same
kind. If you want to enable any of your transaction types to define attributes
for these entities, or to generate one approver list per entity, you should
define an AME item class for the entity.
5. Select the ‘Create New Item Class’ button on the ‘Add an Item Class—
Step 1’ form.
6. Enter the item class’ name on the ‘Add an Item Class—Step 2’ form.
7. Enter the properties of the current transaction type’s usage of the new
item class on the ‘Add an Item Class—Step 3’ form, and then select the
‘Continue’ button to create the item class.
The item class will now appear on the list of item classes you reached at step
3 above.
Notifications
Exception Handling
There are several ways to enhance the basic algorithm. This section describes
some of them. To learn about other ways to enhance the basic algorithm,
review the API specifications in Appendix A.
Handling Rejections
The basic algorithm does not terminate if one of the approvers rejects the
transaction. In the event of a rejection, you may wish to stop at step four to
make sure the algorithm terminates.
In the basic algorithm, your application does not determine the membership
of a transaction’s approver list. It leaves all such decisions to AME. If your
application needs to let an end user insert approvers into the approver list
that AME generates for a given transaction, modify the basic algorithm as
follows:
2. Display the approver list to the end user. Include suppressed and
2. Display the approver list to the end user. (You don’t need to include
suppressed or repeated approvers, but you should track internally
the indexes of the approvers you display.)
6. Go to step one.
3. An approver may reject some but not all items, and AME may
stop those items’ approval processes while continuing the
approval processes of remaining items.
Sample Workflow
Overview
3. Create two processes, one each for master and detail. (See below
for details.)
Workflow Processes
The master process has four nodes. Here are descriptions of each
node:
Start Node
The first node is a standard function activity that simply marks the
start of the process.
Function WF_STANDARD.NOOP
Required yes
Is-Approval-Complete Node
The second node fetches the next set of approvers (if any) by calling
your PL/SQL package’s wrapper procedure for
ame_api2.getNextApprovers4. The node also checks whether the
transaction’s approval process is complete. If the process is
incomplete, the node creates and starts a child process for each
approver requiring notification.
Function <package_name>.<procedure_name>
Required yes
wf_engine.createProcess(
wf_engine.SetItemAttrText(
wf_engine.SetItemAttrText(
wf_engine.StartProcess(
<itemType>,
<childItemKey>);
Wait-for-Approver-Response Node
Function WF_STANDARD.BLOCK
Required yes
End Node
Function WF_STANDARD.BLOCK
Required yes
Start Node
The start node is a standard function activity that marks the start
of the process.
Function WF_STANDARD.NOOP
Required yes
Send-Notification Node
Function none
Required yes
Get-Approver-Response Node
Function <package_name>.<procedure_name>
wf_engine.GetItemAttrText(
ame_api2.updateApprovalStatus or
ame_api2.updateApprovalStatus2.
masterItemKey := wf_engine.GetItemAttrText(
wf_engine.CompleteActivity(
End Node
Required yes
Arguments
Approver Comparisons
• item_class
• name
• action_type_id
• group_or_chain_id
• occurrence.
ame_api2
validateApprover
Syntax
function validateApprover(
approverIn in ame_util.approverRecord2)
return boolean;
Description
clearAllApprovals
Syntax
procedure clearAllApprovals(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2);
Description
Syntax
procedure getAdminApprover(
applicationIdIn in number default null,
transactionTypeIn in varchar2,
adminApproverOut out nocopy
ame_util.approverRecord2);
Description
getAllApprovers1
Syntax
procedure getAllApprovers1(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2,
approversOut out nocopy ame_util.approversTable2,
itemIndexesOut out nocopy ame_util.idList,
itemClassesOut out nocopy ame_util.stringList,
itemIdsOut out nocopy ame_util.stringList,
itemSourcesOut out nocopy
ame_util.longStringList);
Description
Use this API to fetch and display the entire approver list, either
for information or to prompt for approver insertions or
suppresions. Do not use getAllApprovers1 by calling it, storing
its output approver list, and then iterating through that list in
your application. Doing so would risk inaccuracies in the
approver list introduced by changes in transaction values,
organizational structures, approval rules, etc.
GetAllApprovers2
Syntax
procedure getAllApprovers2(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2,
approversOut out nocopy ame_util.approversTable2,
itemIndexesOut out nocopy ame_util.idList,
itemClassesOut out nocopy ame_util.stringList,
itemIdsOut out nocopy ame_util.stringList,
itemSourcesOut out nocopy ame_util.longStringList,
productionIndexesOut out nocopy ame_util.idList,
variableNamesOut out nocopy ame_util.stringList,
variableValuesOut out nocopy ame_util.stringList);
Description
getAllApprovers3
Syntax
procedure getAllApprovers3(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2,
approversOut out nocopy ame_util.approversTable2,
itemIndexesOut out nocopy ame_util.idList,
itemClassesOut out nocopy ame_util.stringList,
itemIdsOut out nocopy ame_util.stringList,
Description
getAllApprovers4
Syntax
procedure getAllApprovers4(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2,
approversOut out nocopy ame_util.approversTable2,
itemIndexesOut out nocopy ame_util.idList,
itemClassesOut out nocopy ame_util.stringList,
itemIdsOut out nocopy ame_util.stringList,
itemSourcesOut out nocopyame_util.longStringList,
ruleIndexesOut out nocopy ame_util.idList,
sourceTypesOut out nocopy ame_util.stringList,
ruleIdsOut out nocopy ame_util.idList);
Description
getAllApprovers5
Syntax
procedure getAllApprovers5(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2,
approversOut out nocopy ame_util.approversTable2,
itemIndexesOut out nocopy ame_util.idList,
itemClassesOut out nocopy ame_util.stringList,
itemIdsOut out nocopy ame_util.stringList,
itemSourcesOut out nocopy ame_util.longStringList,
ruleIndexesOut out nocopy ame_util.idList,
sourceTypesOut out nocopy ame_util.stringList,
ruleDescriptionsOut out nocopy
ame_util.stringList);
Description
getAllApprovers6
Syntax
procedure getAllApprovers6(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2,
approversOut out nocopy ame_util.approversTable2,
itemIndexesOut out nocopy ame_util.idList,
itemClassesOut out nocopy ame_util.stringList,
itemIdsOut out nocopy ame_util.stringList,
itemSourcesOut out nocopy ame_util.longStringList,
ruleIndexesOut out nocopy ame_util.idList,
sourceTypesOut out nocopy ame_util.stringList,
ruleIdsOut out nocopy ame_util.idList,
ruleDescriptionsOut out nocopy
ame_util.stringList);
Description
Syntax
procedure getAllApprovers7(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2,
approversOut out nocopy ame_util.approversTable2);
Description
getAllItemApprovers
Syntax
procedure getAllItemApprovers1(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
itemClassIdIn in number,
itemIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2,
Description
getAllItemApprovers2
Syntax
procedure getAllItemApprovers2(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
itemClassNameIn in varchar2,
itemIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2,
approversOut out nocopy ame_util.approversTable2);
Description
getAndRecordAllApprovers
Syntax
procedure getAndRecordAllApprovers(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2,
approversOut out nocopy ame_util.approversTable2,
itemIndexesOut out nocopy ame_util.idList,
itemIdsOut out nocopy ame_util.stringList,
itemSourcesOut out nocopy
ame_util.longStringList);
Description
getItemStatus1
Syntax
procedure getItemStatus1(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
itemClassIdIn in integer,
itemIdIn in varchar2,
approvalProcessCompleteYNOut out varchar2);
Description
getItemStatus2
Syntax
procedure getItemStatus2(
applicationIdIn in number,
transactionTypeIn in varchar2,
Description
getItemStatuses
Syntax
procedure getItemStatuses(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
itemClassNamesOut out nocopy ame_util.stringList,
itemIdsOut out nocopy ame_util.stringList,
approvalProcessesCompleteYNOut out nocopy
ame_util.charList);
Description
getNextApprovers1
Syntax
procedure getNextApprovers1(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
flagApproversAsNotifiedIn in varchar2 default
ame_util.booleanTrue,
approvalProcessCompleteYNOut out varchar2,
nextApproversOut out nocopy
ame_util.approversTable2,
itemIndexesOut out nocopy ame_util.idList,
itemClassesOut out nocopy ame_util.stringList,
itemIdsOut out nocopy ame_util.stringList,
itemSourcesOut out nocopy ame_util.longStringList)
Description
getNextApprovers2
Syntax
procedure getNextApprovers2(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
flagApproversAsNotifiedIn in varchar2 default
ame_util.booleanTrue,
approvalProcessCompleteYNOut out varchar2,
nextApproversOut out nocopy
ame_util.approversTable2,
itemIndexesOut out nocopy ame_util.idList,
itemClassesOut out nocopy ame_util.stringList,
itemIdsOut out nocopy ame_util.stringList,
itemSourcesOut out nocopy ame_util.longStringList,
Description
getNextApprovers3
Syntax
procedure getNextApprovers3(
Description
getNextApprovers4
Syntax
procedure getNextApprovers4(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
flagApproversAsNotifiedIn in varchar2 default
ame_util.booleanTrue,
approvalProcessCompleteYNOut out varchar2,
nextApproversOut out nocopy
ame_util.approversTable2);
Description
getPendingApprovers
Syntax
procedure getPendingApprovers(
applicationIdIn in number,
Description
getTransactionProductions
Syntax
procedure getTransactionProductions(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
variableNamesOut out nocopy ame_util.stringList,
variableValuesOut out nocopy ame_util.stringList);
Description
initializeApprovalProcess
Syntax
procedure initializeApprovalProcess(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
recordApproverListIn in boolean default false);
Description
setFirstAuthorityApprover
Syntax
procedure setFirstAuthorityApprover(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approverIn in ame_util.approverRecord2,
clearChainStatusYNIn in varchar2);
Description
updateApprovalStatus
Syntax
procedure updateApprovalStatus(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approverIn in ame_util.approverRecord2,
forwardeeIn in ame_util.approverRecord2 default
ame_util.emptyApproverRecord2,
updateItemIn in boolean default false);
Description
updateApprovalStatus2
Syntax
procedure updateApprovalStatus2(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approvalStatusIn in varchar2,
approverNameIn in varchar2,
itemClassIn in varchar2 default null,
itemIdIn in varchar2 default null,
actionTypeIdIn in number default null,
groupOrChainIdIn in number default null,
occurrenceIn in number default null,
forwardeeIn in ame_util.approverRecord2 default
ame_util.emptyApproverRecord2);
Description
updateApprovalStatuses
Syntax
procedure updateApprovalStatuses(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approverIn in ame_util.approverRecord2,
approvalStatusesIn in ame_util.stringList default
ame_util.emptyStringList,
itemClassesIn in ame_util.stringList default
ame_util.emptyStringList,
itemIdsIn in ame_util.stringList default
ame_util.emptyStringList,
forwardeesIn in ame_util.approversTable2 default
ame_util.emptyApproversTable2);
Description
Syntax
procedure updateApprovalStatuses2(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approvalStatusIn in varchar2,
approvalStatusIn in varchar2,
approverNameIn in varchar2,
itemClassIn in varchar2 default null,
itemIdIn in varchar2 default null,
actionTypeIdIn in number default null,
groupOrChainIdIn in number default null,
occurrenceIn in number default null,
approvalStatusesIn in ame_util.stringList default
ame_util.emptyStringList,
itemClassesIn in ame_util.stringList default
ame_util.emptyStringList,
itemIdsIn in ame_util.stringList default
ame_util.emptyStringList,
forwardeesIn in ame_util.approversTable2 default
ame_util.emptyApproversTable2);
Description
ame_api3
getRuleDescription
Syntax
function getRuleDescription(
ruleIdIn in varchar2)
return varchar2;
Description
clearSuppression
Syntax
procedure clearSuppression(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approverIn in ame_util.approverRecord2);
clearSuppressions
Syntax
procedure clearSuppressions(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2);
Description
clearInsertion
Syntax
procedure clearInsertion(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approverIn in ame_util.approverRecord2);
Description
clearInsertions
Syntax
procedure clearInsertions(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2);
Description
getAllApprovalGroups
Syntax
procedure getAllApprovalGroups(
groupIdsOut out nocopy ame_util.idList,
groupNamesOut out nocopy ame_util.stringList);
Description
getApplicableRules1
Syntax
procedure getApplicableRules1(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
ruleIdsOut out nocopy ame_util.idList);
Description
getApplicableRules2
Syntax
procedure getApplicableRules2(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
Description
Syntax
procedure getApplicableRules3(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
Description
getApprovalGroupId
Syntax
procedure getApprovalGroupId(
groupNameIn ame_util.stringType,
groupIdOut out nocopy number);
Description
getAttributeValue
Syntax
procedure getAttributeValue(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
attributeNameIn in varchar2,
itemIdIn in varchar2,
attributeValue1Out out varchar2,
attributeValue2Out out varchar2,
attributeValue3Out out varchar2);
getConditionDetails
Syntax
procedure getConditionDetails(
conditionIdIn in number,
attributeNameOut out nocopy varchar2,
attributeTypeOut out nocopy varchar2,
attributeh4 DescriptionOut out nocopy varchar2,
lowerLimitOut out nocopy varchar2,
upperLimitOut out nocopy varchar2,
includeLowerLimitOut out nocopy varchar2,
includeUpperLimitOut out nocopy varchar2,
currencyCodeOut out nocopy varchar2,
allowedValuesOut out nocopy
ame_util.longestStringList);
Description
getGroupMembers1
Syntax
procedure getGroupMembers1(
applicationIdIn in number default null,
transactionTypeIn in varchar2 default null,
transactionIdIn in varchar2 default null,
groupIdIn in number,
memberDisplayNamesOut out nocopy
ame_util.longStringList);
Description
getGroupMembers2
Syntax
procedure getGroupMembers2(
applicationIdIn in number default null,
transactionTypeIn in varchar2 default null,
transactionIdIn in varchar2 default null,
groupIdIn in number,
memberNamesOut out nocopy ame_util.longStringList,
memberDisplayNamesOut out nocopy
ame_util.longStringList);
Description
getGroupMembers3
Syntax
procedure getGroupMembers3(
applicationIdIn in number default null,
transactionTypeIn in varchar2 default null,
transactionIdIn in varchar2 default null,
groupIdIn in number,
memberNamesOut out nocopy ame_util.longStringList,
memberOrderNumbersOut out nocopy ame_util.idList,
memberDisplayNamesOut out nocopy
ame_util.longStringList);
Description
getGroupMembers4
Syntax
procedure getGroupMembers4(
applicationIdIn in number default null,
transactionTypeIn in varchar2 default null,
transactionIdIn in varchar2 default null,
groupIdIn in number,
memberNamesOut out nocopy ame_util.longStringList,
memberOrderNumbersOut out nocopy ame_util.idList,
memberDisplayNamesOut out nocopy
ame_util.longStringList,
memberOrigSystemIdsOut out nocopy ame_util.idList,
memberOrigSystemsOut out nocopy
ame_util.stringList);
getItemClasses
Syntax
procedure getItemClasses(
applicationIdIn in number default null,
transactionTypeIn in varchar2 default null,
transactionIdIn in varchar2 default null,
itemClassIdsOut out nocopy ame_util.idList,
itemClassNamesOut out nocopy ame_util.stringList);
Description
getItemClassId
Syntax
procedure getItemClassId(
itemClassNameIn in varchar2,
itemClassIdOut out number);
Description
getItemClassName
Syntax
procedure getItemClassName(
itemClassIdIn in number,
itemClassNameOut out varchar2);
Description
getOldApprovers
Syntax
procedure getOldApprovers(
applicationIdIn in number,
Description
getRuleDetails1
Syntax
procedure getRuleDetails1(
ruleIdIn in number,
ruleTypeOut out nocopy varchar2,
ruleDescriptionOut out nocopy varchar2,
conditionIdsOut out nocopy ame_util.idList,
actionTypeNamesOut out nocopy ame_util.stringList,
actionTypeDescriptionsOut out nocopy
ame_util.stringList,
Description
getRuleDetails2
Syntax
procedure getRuleDetails2(
ruleIdIn in number,
ruleTypeOut out nocopy varchar2,
ruleDescriptionOut out nocopy varchar2,
conditionDescriptionsOut out nocopy
ame_util.longestStringList,
actionTypeNamesOut out nocopy ame_util.stringList,
actionTypeDescriptionsOut out nocopy
ame_util.stringList,
Description
getRuleDetails3
Syntax
procedure getRuleDetails3(
ruleIdIn in number,
ruleTypeOut out nocopy varchar2,
ruleDescriptionOut out nocopy varchar2,
conditionIdsOut out nocopy ame_util.idList,
conditionDescriptionsOut out nocopy
ame_util.longestStringList,
conditionHasLOVsOut out nocopy ame_util.charList,
actionTypeNamesOut out nocopy ame_util.stringList,
actionTypeDescriptionsOut out nocopy
ame_util.stringList,
Description
insertApprover
Syntax
procedure insertApprover(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approverIn in ame_util.approverRecord2,
positionIn in number,
insertionIn in ame_util.insertionRecord2);
Description
parseApproverSource
Syntax
procedure parseApproverSource(
approverSourceIn in varchar2,
sourceTypeOut out varchar2,
ruleIdsOut out nocopy ame_util.idList);
suppressApprover
Syntax
procedure suppressApprover(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approverIn in ame_util.approverRecord2);
Description
suppressApprovers
Syntax
procedure suppressApprovers(
applicationIdIn in number,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
approverIn in ame_util.approversTable2);
Description
validateApprover
Syntax
function validateApprover(
approverIn in ame_util.approverRecord)
return boolean;
Description
clearAllApprovals
Syntax
procedure clearAllApprovals(
applicationIdIn in integer,
transactionIdIn in varchar2,
transactionTypeIn in varchar2 default null);
Description
deleteApprover
Syntax
procedure deleteApprover(
applicationIdIn in integer,
transactionIdIn in varchar2,
approverIn in ame_util.approverRecord,
transactionTypeIn in varchar2 default null);
Description
deleteApprovers
Syntax
procedure deleteApprovers(
applicationIdIn in integer,
Description
getAdminApprover
Syntax
procedure getAdminApprover(
applicationIdIn in integer default null,
transactionTypeIn in varchar2 default null,
adminApproverOut out ame_util.approverRecord);
Description
getAllApprovers
Syntax
procedure getAllApprovers(
applicationIdIn in integer,
transactionIdIn in varchar2,
transactionTypeIn in varchar2 default null,
approversOut out ame_util.approversTable);
Description
getAvailableInsertions
Syntax
procedure getAvailableInsertions(
applicationIdIn in integer,
transactionIdIn in varchar2,
positionIn in integer,
transactionTypeIn in varchar2 default null,
availableInsertionsOut out nocopy
ame_util.insertionsTable);
Description
getAvailableOrders
Syntax
procedure getAvailableOrders(
applicationIdIn in integer,
transactionIdIn in varchar2,
positionIn in integer,
transactionTypeIn in varchar2 default null,
availableOrdersOut out ame_util.ordersTable);
Description
getNextApprover
Syntax
procedure getNextApprover(
applicationIdIn in integer,
transactionIdIn in varchar2,
transactionTypeIn in varchar2 default null,
Description
getGroupMembers
Syntax
procedure getGroupMembers(
applicationIdIn in integer,
transactionTypeIn in varchar2,
transactionIdIn in varchar2,
groupIdIn in number,
memberOrderNumbersOut out nocopy ame_util.idList,
memberPersonIdsOut out nocopy ame_util.idList,
memberUserIdsOut out nocopy ame_util.idList);
Description
getOldApprovers
Syntax
procedure getOldApprovers(
applicationIdIn in integer,
transactionIdIn in varchar2,
transactionTypeIn in varchar2 default null,
oldApproversOut out ame_util.approversTable);
Description
insertApprover
Syntax
procedure insertApprover(
applicationIdIn in integer,
transactionIdIn in varchar2,
approverIn in ame_util.approverRecord,
positionIn in integer,
orderIn in ame_util.orderRecord,
transactionTypeIn in varchar2 default null);
Description
setFirstAuthorityApprover
Syntax
procedure setFirstAuthorityApprover(
applicationIdIn in Integer,
transactionIdIn in varchar2
approverIn in ame_util.approverRecord,
transactionTypeIn in varchar2 default null);
Description
updateApprovalStatus
Syntax
procedure updateApprovalStatus(
applicationIdIn in integer,
transactionIdIn in varchar2,
approverIn in ame_util.approverRecord,
transactionTypeIn in varchar2 default null,
forwardeeIn in ame_util.approverRecord default
ame_util.emptyApproverRecord);
Description
updateApprovalStatus2
Syntax
procedure updateApprovalStatus2(
applicationIdIn in integer,
transactionIdIn in varchar2,
approvalStatusIn in varchar2,
approverPersonIdIn in integer default null,
approverUserIdIn in integer default null,
transactionTypeIn in varchar2 default null,
forwardeeIn in ame_util.approverRecord default
Description
getRuleDescription ame_api3.getRuleDescription
validateApprover ame_api2.validateApprover
clearAllApprovals ame_api2.clearAllApprovals
clearDeletion ame_api3.clearSuppression
clearDeletions ame_api3.clearSuppressions
clearInsertion ame_api3.clearInsertion
clearInsertions ame_api3.clearInsertions
deleteApprover ame_api3.suppressApprover
deleteApprovers ame_api3.suppressApprovers
getAdminApprover ame_api2.getAdminApprover
getAllApprovers ame_api2.getAllApprovers7
getAndRecordAllApprovers ame_api2.getAndRecordAllApprovers
getApplicableRules1 ame_api3.getApplicableRules1
getApplicableRules2 ame_api3.getApplicableRules2
getApplicableRules3 ame_api3.getApplicableRules3
getApproversAndRules1 ame_api2.getAllApprovers4
getApproversAndRules2 ame_api2.getAllApprovers5
getApproversAndRules3 ame_api2.getAllApprovers6
getAvailableInsertions ame_api3.getAvailableInsertions
getConditionDetails ame_api3.getConditionDetails
getGroupMembers ame_api3.getGroupMembers4
getNextApprover ame_api2.getNextApprovers4
getOldApprovers ame_api3.getOldApprovers
getRuleDetails1 ame_api3.getRuleDetails1
getRuleDetails2 ame_api3.getRuleDetails2
getRuleDetails3 ame_api3.getRuleDetails3
initializeApprovalProcess ame_api2.initializeApprovalProcess
insertApprover ame_api3.insertApprover
setFirstAuthorityApprover ame_api2.setFirstAuthorityApprover
updateApprovalStatus ame_api2.updateApprovalStatus
updateApprovalStatus2 ame_api2.updateApprovalStatus2
Data Types
All of the AME data types your code requires are declared in
ame_util’s package specification (in the package-header file
ameoutil.pkh). This section describes the data types you may
find useful.
approverRecord2
name varchar2(320),
orig_system varchar2(30),
orig_system_id number,
display_name varchar2(360),
approver_category varchar2(1),
api_insertion varchar2(1),
authority varchar2(1),
approval_status varchar2(50),
action_type_id integer,
group_or_chain_id integer,
occurrence integer,
source varchar2(500),
item_class ame_item_classes.name%type,
item_id ame_temp_old_approver_lists.item_id%type,
item_class_order_number integer,
sub_list_order_number integer,
action_type_order_number integer,
group_or_chain_order_number integer,
member_order_number integer,
approver_order_number integer);
name
orig_system
orig_system_id
display_name
approver_category
authority
approval_status
action_type_id
group_or_chain_id
source
This field's semantics may vary over time. You should never
parse or interpret this field yourself. Instead, use
ame_api3.parseApproverSource to do so. AME development
will not support any code you write to parse the source field.
item_class
This field contains the name of the item class of the item ID
identified by the approver's item_id field.
item_id
item_class_order_number
item_order_number
sub_list_order_number
action_type_order_number
group_or_chain_order_number
member_order_number
approver_order_number
approversTable2
insertionRecord2
item_class ame_item_classes.name%type,
item_id ame_temp_old_approver_lists.item_id%type,
action_type_id integer,
group_or_chain_id integer,
order_type varchar2(50),
parameter ame_temp_insertions.parameter%type,
api_insertion varchar2(1),
authority varchar2(1),
description varchar2(200));
The order_type field indicates the order relation that AME uses
to determine the insertion’s index in an approver list. AME
recalculates the location each time it generates the approver list.
Here are brief explanations of each possible value for the
order_type field, with accompanying syntax and semantics rules
for the parameter and description fields.
Absolute Order
After an Approver
ame_util.afterApproverDescription || approver.display_name
Before an Approver
First Authority
First Post-Approver
First Pre-Approver
Last Pre-Approver
ame_util.lastPreApproverDescription
insertionsTable2
approverRecord
user_id fnd_user.user_id%type,
person_id per_all_people_f.person_id%type,
first_name per_all_people_f.first_name%type,
last_name per_all_people_f.last_name%type,
api_insertion varchar2(1),
approval_status varchar2(50),
approval_type_id integer,
group_or_chain_id integer,
occurrence integer,
source varchar2(500));
user_id
The user_id field is null if and only if the person_id field is not
null. If the user_id field is not null, it must contain a valid
fnd_user.user_id value.
person_id
The person_id field is null if and only if the user_id field is not
null. If the person_id field is not null, it must contain a valid
per_all_people_f.person_id value.
first_name
last_name
approval_type_id
approversTable
order_type varchar2(50),
parameter ame_temp_insertions.parameter%type,
api_insertion varchar2(1),
authority varchar2(1),
description ame_temp_insertions.description%type);
Absolute Order
After an Approver
ame_util.afterApproverDescription || first_name || ‘ ‘ ||
last_name
where first_name and last_name are the values that you would
assign to the first_name and last_name fields of an
approverRecord representing the inserted approver.
Before an Approver
ame_util.beforeApproverDescription || first_name || ‘ ‘ ||
last_name
where first_name and last_name are the values that you would
assign to the first_name and last_name fields of an
approverRecord representing the inserted approver. See “After
an Approver” above.
First Authority
The first-authority order type does not use the parameter field.
The description should be
ame_util.firstAuthorityDescription
First Post-Approver
The first post-approver order relation does not use the parameter
field. The description should be
ame_util.firstPostApproverDescription
First Pre-Approver
The first pre-approver order relation does not use the parameter
field. The description should be
ame_util.firstPreApproverDescription
Last Post-Approver
The last post-approver order relation does not use the parameter
field. The description should be
ame_util.lastPostApproverDescription
Last Pre-Approver
The last pre-approver order relation does not use the parameter
field. The description should be
ame_util.lastPreApproverDescription
insertionTable
allowEmptyGroupAttribute ALLOW_EMPTY_APPROVAL_GR
OUPS
effectiveRuleDateAttribute EFFECTIVE_RULE_DATE
firstStartingPointAttribute FIRST_STARTING_POINT_PERSO
N_ID
jobLevelStartingPointAttribute JOB_LEVEL_NON_DEFAULT_STA
RTING_POINT_PERSON_ID
includeAllApproversAttribute INCLUDE_ALL_JOB_LEVEL_APP
ROVERS
lineItemStartingPointAttribute LINE_ITEM_STARTING_POINT_P
ERSON_ID
nonDefStartingPointPosAttr NON_DEFAULT_STARTING_POI
NT_POSITION_ID
nonDefPosStructureAttr NON_DEFAULT_POSITION_STR
UCTURE_ID
secondStartingPointAttribute SECOND_STARTING_POINT_PER
SON_ID
simplePosStartPointAttribute SIMPLE_POS_NON_DEFAULT_ST
ARTING_POINT_PERSON_ID
supStartingPointAttribute SUPERVISORY_NON_DEFAULT_
STARTING_POINT_PERSON_ID
topPositionIdAttribute TOP_POSITION_ID
topSupPersonIdAttribute TOP_SUPERVISOR_PERSON_ID
transactionDateAttribute TRANSACTION_DATE
transactionRequestorAttribute TRANSACTION_REQUESTOR_PE
RSON_ID
transactionReqUserAttribute TRANSACTION_REQUESTOR_US
ER_ID
transactionOrgAttribute TRANSACTION_ORG_ID
transactionGroupAttribute TRANSACTION_GROUP_ID
transactionReqPositionAttr TRANSACTION_REQUESTOR_PO
SITION_ID
transactionSetOfBooksAttribute TRANSACTION_SET_OF_BOOKS_
ID
Routines
getAdminName
Syntax
function getAdminName(
applicationIdIn in integer default null)
return varchar2;
Description
fieldDelimiter
Syntax
function fieldDelimiter
return varchar2;
Description
recordDelimiter
Syntax
function recordDelimiter
return varchar2;
Description
appendRuleIdToSource
Syntax
procedure appendRuleIdToSource(
ruleIdIn in integer,
sourceInOut in out nocopy varchar2);
Description
copyApproverRecord2
Syntax
procedure copyApproverRecord2(
approverRecord2In in approverRecord2,
approverRecord2Out out nocopy approverRecord2);
Description
Syntax
procedure copyApproversTable2(
approversTable2In in approversTable2,
approversTable2Out out nocopy approversTable2);
Description
runtimeException
Syntax
procedure runtimeException(
packageNameIn in varchar2,
routineNameIn in varchar2,
exceptionNumberIn in integer,
exceptionStringIn in varchar2);
Description
Engine Functions
getActionTypeChainOrderMode
Syntax
function getActionTypeChainOrderMode(
actionTypeIdIn in integer)
return varchar2;
Description
getActionTypeVotingRegime
Syntax
function getActionTypeVotingRegime(
actionTypeIdIn in integer)
return varchar2;
Description
getAttributeName
Syntax
function getAttributeName(
attributeIdIn in integer)
return varchar2;
Description
getAttributeIdByName
Syntax
function getAttributeIdByName(
attributeNameIn in varchar2)
return integer;
Description
getEffectiveRuleDate
Syntax
function getEffectiveRuleDate
return date;
Description
getHandlerActionTypeId
Syntax
function getHandlerActionTypeId
return integer;
Description
Syntax
function getHandlerActionTypeOrderNum
return integer;
Description
getHandlerApprovalStatus
Syntax
function getHandlerApprovalStatus(
approverIn in ame_util.approverRecord2)
return varchar2;
Description
getHandlerAuthority
Syntax
function getHandlerAuthority
return varchar2;
Description
getHandlerItemClassId
Syntax
function getHandlerItemClassId
return integer;
Description
getHandlerItemClassName
Syntax
function getHandlerItemClassName
return varchar2;
Description
getHandlerItemClassOrderNumber
Syntax
function getHandlerItemClassOrderNumber
return integer;
Description
getHandlerItemId
Syntax
function getHandlerItemId
return integer;
Description
getHandlerItemOrderNumber
Syntax
function getHandlerItemOrderNumber
return integer;
Description
getHandlerOccurrence
Syntax
function getHandlerOccurrence(
nameIn in varchar2,
itemClassIn in varchar2 default null,
itemIdIn in varchar2 default null,
actionTypeIdIn in integer default null,
groupOrChainIdIn in integer default null)
return integer;
Description
getHandlerSublistOrderNum
Syntax
function getHandlerSublistOrderNum
return integer;
Description
getHeaderAttValue1
Syntax
function getHeaderAttValue1(
attributeIdIn in integer)
return varchar2;
Description
getHeaderAttValue2
Syntax
function getHeaderAttValue2(
attributeNameIn in varchar2)
return varchar2
Description
getItemClassId
Syntax
function getItemClassId(
itemClassNameIn in varchar2)
return integer;
This function returns the ID of the item class with the name
itemClassNameIn.
getItemClassName
Syntax
function getItemClassName(
itemClassIdIn in integer)
return varchar2;
Description
getItemClassOrderNumber
Syntax
function getItemClassOrderNumber(
itemClassIdIn in integer)
return integer;
Description
This function returns the order number of the item class with ID
itemClassIdIn, for the transaction type of the transaction that the
engine is currently processing. Typically a handler calls this
function to populate an ame_util.approverRecord2 record’s
item_class_order_number field.
getItemOrderNumber
Syntax
function getItemOrderNumber(
itemClassNameIn in varchar2,
itemIdIn in varchar2)
return integer;
Description
This function returns the order number for the item with the ID
itemIdIn in the item class with the name itemClassNameIn.
Typically a handler calls this function to populate populate an
ame_util.approverRecord2 record’s item_order_number field.
getRuntimeGroupCount
Syntax
function getRuntimeGroupCount(
groupIdIn in integer)
Description
getSublistOrderNum
Syntax
function getSublistOrderNum(
itemClassNameIn in varchar2,
authorityIn in varchar2)
return integer;
Description
This function returns the sub-list order number for the sub-list
identified by the ame_util sub-list (authority) constant
authorityIn, for the item class with the name itemClassNameIn.
Typically a handler calls this function to populate an
ame_util.approverRecord2 record’s sub_list_order_number field.
Engine Procedures
addApprover
Syntax
procedure addApprover(
approverIn in ame_util.approverRecord2);
Description
getApprovalGroupConfigs
Syntax
procedure getApprovalGroupConfigs(
groupIdsInOut in out nocopy ame_util.idList,
orderNumbersOut out nocopy ame_util.idList,
votingRegimesOut out nocopy ame_util.charList);
Description
getHandlerCOAFirstApprover
Syntax
procedure getHandlerCOAFirstApprover(
itemClassIn in varchar2,
itemIdIn in varchar2,
actionTypeIdIn in integer,
groupOrChainIdIn in integer,
nameOut out nocopy varchar2,
origSystemOut out nocopy varchar2,
origSystemIdOut out nocopy integer,
displayNameOut out nocopy varchar2,
sourceOut out nocopy varchar2);
Description
getHandlerCOAInsertion
Syntax
procedure getHandlerCOAInsertion(
nameIn in varchar2,
itemClassIn in varchar2,
itemIdIn in varchar2,
actionTypeIdIn in integer,
groupOrChainIdIn in integer,
occurrenceIn in integer,
approvalStatusIn in varchar2,
nameOut out nocopy varchar2,
origSystemOut out nocopy varchar2,
origSystemIdOut out nocopy integer,
displayNameOut out nocopy varchar2,
sourceOut out nocopy varchar2);
Description
getHandlerRules
Syntax
procedure getHandlerRules(
ruleIdsOut out nocopy ame_util.idList,
approverCategoriesOut out nocopy
ame_util.charList,
parametersOut out nocopy ame_util.stringList,
parameterTwosOut out nocopy ame_util.stringList);
Description
getHandlerRules2
Syntax
procedure getHandlerRules2(
ruleIdsOut out nocopy ame_util.idList,
approverCategoriesOut out nocopy
ame_util.charList,
parametersOut out nocopy ame_util.stringList);
Description
getHandlerRules3
Syntax
procedure getHandlerRules3(
ruleIdsOut out nocopy ame_util.idList,
parametersOut out nocopy ame_util.stringList,
listModParameterOnesOut out nocopy
ame_util.stringList,
listModParameterTwosOut out nocopy
ame_util.longStringList);
Description
getHandlerLMApprovers
Syntax
procedure getHandlerLMApprovers(
listModParameterOneIn in varchar2,
listModParameterTwoIn in varchar2,
includeFyiApproversIn in boolean,
includeApprovalGroupsIn in boolean,
returnForwardeesIn in boolean,
approverIndexesOut out nocopy ame_util.idList,
lastForwardeeIndexesOut out nocopy
ame_util.idList);
Description
getHeaderAttValues1
Syntax
procedure getHeaderAttValues1(
attributeIdIn in integer,
attributeValue1Out out nocopy varchar2,
attributeValue2Out out nocopy varchar2,
attributeValue3Out out nocopy varchar2);
Description
getHeaderAttValues2
Syntax
procedure getHeaderAttValues2(
attributeNameIn in varchar2,
attributeValue1Out out nocopy varchar2,
attributeValue2Out out nocopy varchar2,
attributeValue3Out out nocopy varchar2);
Description
getRuntimeGroupMembers
Syntax
procedure getRuntimeGroupMembers(
groupIdIn in integer,
approverNamesOut out nocopy
ame_util.longStringList,
approverOrderNumbersOut out nocopy
ame_util.idList,
approverDisplayNamesOut out nocopy
ame_util.longStringList,
origSystemIdsOut out nocopy ame_util.idList,
origSystemsOut out nocopy ame_util.stringList);
Description
insertApprover
Syntax
procedure insertApprover(
indexIn in integer,
approverIn in ame_util.approverRecord2,
adjustMemberOrderNumbersIn in boolean default
false);
Description
insertApprovers
Syntax
procedure insertApprovers(
firstIndexIn in integer,
approversIn in ame_util.approversTable2);
substituteApprover
Syntax
procedure substituteApprover(
approverIndexIn in integer,
nameIn in varchar2,
actionTypeIdIn in varchar2,
ruleIdIn in integer);
Description
truncateChain
Syntax
procedure truncateChain(
approverIndexIn in integer,
ruleIdIn in integer);
Description
Index 122
Overview
This chapter illustrates how to create a variety of AME objects that a
development team would typically create, in the process of seeding a
transaction type:
• mandatory-attribute usages
• an item-class usage
Transaction Type
Mandatory-Attribute Usages
Index 123
decide what values or usages to seed for each. Their guiding
principle is to preserve or improve upon their old approvals
logic in their AME seed data. Here are their decisions:
select decode(sign(sum(line_item_amount) –
some_app_package.getApprovalThreshold),
1, ‘true’, ‘false’)
from some_app_line_items
Note that this usage assumes that the line-item amounts are in
the same currency as the threshold.
• The old logic is able to request approval per line item, and it
stops a transaction’s approval process when any line item is
rejected. So the team gives REJECTION_RESPONSE a static
usage having the value ame_util.stopAllItems.The old logic
never does per-line-item rule evaluation, so the team gives
USE_RESTRICTIVE_ITEM_EVALUATION a static false
usage.
• The team will integrate AME API calls into its application’s
Workflow process, so it gives USE_WORKFLOW a static true
usage.
Index 124
• The team uses its transactions’ Workflow item keys as
transaction IDs, so it gives WORKFLOW_ITEM_KEY the
dynamic usage
Configuration-Variable Values
• The old functionality uses line items, so the team seeds the
value ‘true’ for allowAllItemClassRules.
Index 125
• The old functionality does not have a rule-priority construct,
so the team disables rule priorities for all rule types in
rulePriorityModes.
Item-Class Usage
Next the team prepares to create an item-class usage for the line-
item item class.
Parallelization Mode
Per the above, the team assigns the line-item item class the serial
parallelization mode.
Sublist Mode
Per the above, the team assigns the line-item item class the serial
sublist mode.
Line-Item-ID Query
select to_char(line_item_id)
from some_app_line_items
Note that the order-by clause orders the item IDs in ascending
numerical order, rather than in ascending character-set order.
Character-set ordering would force the transaction type’s line-
item-level attributes’ usages to order by to_char(line_item_id),
which would be inefficient and easy to forget.
Action Parameters, 14 approval_status, 88
Action Type, 12 chain of authority, 12, 14, 17, 20, 24,
action_type_id, 90 43, 66, 82, 88, 89, 90, 91, 94, 99,
AME Security, 8, 9 101, 102, 116, 119, 121
appendRuleIdToSource, 104 clearAllApprovals, 55, 78
Index 126
clearInsertion, 69 getItemClassName, 74
clearInsertions, 69 getItemStatus1, 61
clearSuppression, 68 getItemStatus2, 61
Configuration-Variable Values, 125 getItemStatuses, 62
Creating a Transaction Type, 9 getNextApprover, 80
Define an Item Class, 38 getNextApprovers1, 62
deleteApprover, 78 getNextApprovers2, 63
deleteApprovers, 78 getNextApprovers3, 63
Exception Handling, 41 getNextApprovers4, 64
fieldDelimiter, 104 getOldApprovers, 74, 81
final (signing) authority, 43 getPendingApprovers, 64
getActionTypeChainOrderMode, 108 getRuleDescription, 68
getActionTypeVotingRegime, 108 getRuleDetails1, 75
getAdminApprover, 56 getRuleDetails2, 75
getAdminName, 103 getRuleDetails3, 76
getAllApprovalGroups, 70 getTransactionProductions, 65
getAllApprovers, 57, 79 group_or_chain_id, 90
getAllApprovers1, 56 initializeApprovalProcess, 65
getAllApprovers3, 57 insertApprover, 76, 81
getAllApprovers4, 58 List-Editing-Handler, 23
getAllApprovers5, 59 list–modification, 12
getAllApprovers6, 59 parseApproverSource, 76
getAllApprovers7, 60 PL/SQL Exceptions, 24
getAllItemApprovers, 60 post-approval, 12, 16, 20, 101, 120
getAllItemApprovers2, 60 pre-approval, 12, 20, 101, 120
getAndRecordAllApprovers, 61 production, 12, 14, 57, 65, 125
getApplicableRules1, 70 recordDelimiter, 104
getApplicableRules2, 70 setFirstAuthorityApprover, 66, 82
getApplicableRules3, 71 suppressApprover, 77
getApprovalGroupId, 71 suppressApprovers, 77
getAttributeValue, 71 Suppressing Approvers, 42
getAvailableInsertions, 80 the Default Approver List, 41
getAvailableOrders, 80 Unresponsive Approvers, 42
getConditionDetails, 72 updateApprovalStatus, 66, 82
getGroupMembers1, 72 updateApprovalStatus2, 67, 82
getGroupMembers2, 73 updateApprovalStatuses, 67
getGroupMembers3, 73 updateApprovalStatuses2, 68
getGroupMembers4, 73 validateApprover, 55, 78
getItemClasses, 74 Workflow Directory Services, 30
getItemClassId, 74
Index 127