AMX Components Introduction to Approval Management

Using Approval Management 26-9 ■ User-defined outcomes - Business outcomes, such as Approve and Reject, that are associated with a task. When a user performs these types of actions, the task is removed from the user’s Inbox and is marked as completed or moved to the next approver. ■ Delegate - Allows a user to assign a task to another person or role to act on his or her behalf. ■ Escalate - Allows a user or an administrator to escalate a task to the users supervisor. ■ Reassign - Allows users to transfer a task to another user. From that point on, the new users hierarchy is used for supervisor or other organization-based approvals. ■ Withdraw - Allows the task initiator or administrator to cancel or withdraw the task after the approval has started. ■ Request for Information - Allows a task approver to request information from any prior participant or the task initiator. ■ Pushback - Allows the task approver to push back the task to the previous approver to review it again. ■ Adhoc Insertions - Allows any task assignee to insert approvers in the generated approval list. See the section Acting on Tasks: The Task Details Page, in the chapter Using Oracle BPEL Worklist Application in Oracle Fusion Middleware Developers Guide for Oracle SOA Suite for a complete list of actions.

26.2.6 Business Rules for Approval

Approvers of a task can be defined either inline in a task definition or by using business rules to specify the list builders that identify the actual approvers of a task. In addition, you can use business rules to specify approver substitution and list modifications. These rules are defined with the help of Oracle Business Rules and can vary between organizations. Typically, however, they are defined by the customer. Business rules are a combination of conditions and actions. Optionally, priority and validity periods can be defined for these rules. In Human Workflow rules, rule conditions are defined using fact types that correspond to the task, and to the task message and entity attributes which are XML representations of SDO objects. Rule actions consist of approver list builders and their parameters. Approver list builders move up a particular hierarchy and construct or modify the approver list according to the parameters defined. Approver list builders are implemented as XML JAXB fact types. For more information about these concepts, see the chapter Overview of Oracle Business Rules in Oracle Fusion Middleware Developers Guide for Oracle SOA Suite.

26.2.6.1 List Creation

A list creation policy includes rule conditions and actions that create the list builders. The following example rules illustrate the configuration of the Supervisory list-builder parameters that create an approver list based on an SDO-based fact type. Note: The position list builder does not allow the approver to delegate, escalate or perform adhoc insertions. 26-10 Modeling and Implementation Guide for Oracle Business Process Management Example 26–1 Rule 1 IF ExpenseItems.ReceiptAmount 200 THEN call CreateSupervisoryList levels:1, startingPoint:HierarchyBuilder.getPrinicipaljstein,-1,,, uptoApprover:HierarchyBuilder.getPrinicipalwfaulk,-1,,, autoActionEnabled:false,autoAction:null, responseType:ResponseType.REQUIRED,ruleName:Rule_1,lists:Lists Example 26–2 Rule 2 IF xpenseItems.ReceiptAmount = 200 THEN call CreateSupervisoryList levels:1, startingPoint:HierarchyBuilder.getPrinicipalwfaulk,-1,,, uptoApprover:HierarchyBuilder.getPrinicipalcdickens,-1,,, autoActionEnabled:false,autoAction:null, responseType:ResponseType.REQUIRED,ruleName:Rule_2,lists:Lists For more information, see Section 26.3.6.4.1, How to Create Lists.

26.2.6.2 Approver Substitution

Users, groups, and application roles appearing in a list can be substituted using list substitution. List substitution is available from Rules Designer and does not require any configuration in JDeveloper. The following example rule illustrates approver-substitution usage. Example 26–3 Approver-Substitution Usage IF ExpenseItems.ReceiptAmount new BigDecimal4000 THEN call SubstitutefromId:jcooper, toId:jstein, ruleName:Substituted, substitutionRules: SubstitutionRules This rule implies that if the expense item amount is less than 4000, then substitute approver jcooper, if present in the approver list, with approver jstein. For more information, see Section 26.3.6.4.2, How to Make Approver Substitutions.

26.2.6.3 List Modification

Job Level and Position lists can be extended or truncated from rules. List modification is applied after list creation. The following example rule illustrates list-modification usage. Example 26–4 List-Modification Usage IF ExpenseItems.ReceiptAmount new BigDecimal3000 THEN Call ExtendifFinalApproverLevel:3, extendBy:2,ruleName:Modified,lists:Lists This rule implies that if the expense item amount is greater than 3000, and if the final approver in the approver list is of Job Level 3, then extend the approver list by at least two relative levels. Using Approval Management 26-11 For more information, see Section 26.3.6.4.3, How to Make List Modifications.

26.3 Designing Approval Management Tasks in Oracle JDeveloper

You design approval management tasks by defining a human task that provides the ability to model multi-stage approvals and determine the appropriate approvers based on approval policies for a business object and the associated HR hierarchy provider. This section describes the overall modeling process and the specifics of the process you use to model approval management tasks in JDeveloper.

26.3.1 Introduction to the Modeling Process

The modeling process for designing approval management tasks includes the following: ■ Creating a human task definition ■ Creating a task display form using the Human Task Editor Creating a human task definition includes the following tasks: ■ Specifying general information, such as task title and task-title globalization, outcomes, priority, owner, and category ■ Defining task parameters, including those with service data object SDO references ■ Specifying mapped attributes ■ Modeling task routing by specifying stages and list builders, and modeling any business rules that define the list builders ■ Defining escalation and renewal policies ■ Specifying notification settings ■ Modeling any advanced settings like callbacks, security access rules, and restricted assignment Some of these procedures are discussed in the sections that follow. For information about those that are not discussed, see Creating the Human Task Definition with the Human Task Editor in Oracle Fusion Middleware Developers Guide for Oracle SOA Suite. You also must create a task display using an ADF task flow to display the details of the approval. ADF task flows are used to model the user interface for the task details page. For more information, see Designing Task Display Forms for Human Tasks in Oracle Fusion Middleware Developers Guide for Oracle SOA Suite.

26.3.2 Before You Begin

Before designing approval management tasks, you must satisfy the following prerequisites: ■ You must have deployed SDO services. ■ You must have created a human task service component in which to design the approval task.