Defining Approval Processes
Understanding Approval Processes
Approval processes are a common form of business process. The approval steps that you place on the approval rule set map represent the approval levels that are required for the activity.
A typical approval process incorporates many business rules, for example:
• Employees can approve purchases up to a given amount, based on their level in the organization: supervisors can approve up to 500 USD, managers up to 5000 USD, and so on.
• All product improvement requests are approved by both a manufacturing representative and a safety inspector.
• People can approve items for their own departments only.
• If an item requires a vice president’s approval, bypass the usual step of manager approval. Business rules like these are usually incorporated into Workflow PeopleCode programs. Logical statements in the PeopleCode check the data on the page, such as the page where employees enter purchase requests, to determine whether the conditions are right for entering a work item into the workflow.
With approval rule sets, you define approval rules on a graphical map.
Features That Are Common to Virtual Approver and GetApprovers
Virtual Approver and GetApprovers PeopleCode share the following advantages: • You can determine the appropriate approver for each approval step.• You define and configure approval rules using the same PeopleSoft Application Designer interface that you use to develop all business process maps.
• You can define different approval rules for different business processes and multiple sets of rules for the same process.
• You can build multistep approval processes, with steps occurring sequentially or in parallel. • You access the approval rule set through built-in PeopleCode functions.
Virtual Approver uses the functions Virtual_Approver and Virtual_Router. GetApprovers is a PeopleCode function. In both cases, the functions use the approval rule set to determine whether approvals are needed and who the appropriate approvers are. To change a rule, you change the approval rule set rather than the PeopleCode.
Defining Approval Processes Chapter 10
When they save a page, Virtual Approver or GetApprovers checks the approval rules that you’ve defined to determine the necessary approvals.
Differences Between Virtual Approver and GetApprovers
Virtual Approver and GetApprovers PeopleCode differ in significant ways. Use the information in the following table to decide which is appropriate in a given situation:
Virtual Approver GetApprovers
The system determines the next approver (if any) at each step along the way.
The entire approval chain is determined at the beginning. Because Virtual Approver processes only one approval step
at a time, the system always has the latest data about any substitute approvers, for example, when someone goes on vacation or leaves the organization.
Because the entire approval chain is determined at the beginning of the process, you capture the approval chain at a single point in time. If an approver goes on vacation and schedules a substitute approver, GetApprovers isn’t aware of this.
Because the system determines the next approver (if any) at each step along the way, you can’t show users all of the approvals that are required for a transaction.
Because the entire approval chain is determined at the beginning, you can expose that data on a page that users can see.
Virtual Approver, with Virtual Router, generates workflow routings to approvers.
GetApprovers does not notify approvers. After it provides the list of approvers, you must build a custom approval application. Typically, you store the list of approvers as part of the transaction (usually in a child table), so that the entire approval chain can be viewed. Additional development is necessary to define how approvals occur.
Virtual Approver automatically displays a message to a user who enters a transaction that requires approval. The user can submit the transaction for approval or cancel the transaction.
By itself, GetApprovers does not provide information to the user. You must provide messages.
Note: Because GetApprovers returns only a list of approvers, it can be used with Virtual Approver
without disrupting normal Virtual Approver functionality. You might use GetApprovers and Virtual Approver together to add forecasting capability to Virtual Approver.
Understanding Virtual Approver
This section discusses: • Virtual Approver.
• Virtual Approver templates.
Chapter 10 Defining Approval Processes
Virtual Approver
Approval rule sets are PeopleSoft Application Designer definitions that are similar in appearance to workflow maps. Approval rule sets reference business processes, but they are not embedded within business processes (unlike activities, which are part of business processes). That is, approval rule sets are not represented by physical icons on workflow maps.
Instead, approval rule sets are separate definitions that are referenced by Workflow PeopleCode.
Specifically, Virtual Approver finds the next approver by calling Virtual_Approver() and then sends that person a workflow notification by calling VirtualRouter(). You use different PeopleCode to trigger Virtual Approver than you use for other workflow events, but the function of the PeopleCode is the same: to identify the next users and to send them notifications.
To examine how Virtual Approver fits into PeopleSoft Workflow, consider a business process for ordering supplies. The first two activities within this business process are for creating orders and approving orders. The Create Order activity consists of a single step: entering the order information into the PeopleSoft system.
When an employee enters an order, PeopleCode triggers Virtual Approver, which reads the specified approval rule set to determine whether the order requires approval and, if so, who must approve the order. When an order requires approval, Virtual Approver sends a routing to the approver. The approver works on the item using the activity that is specified in the first step of the approval rule set—in this case, the Approve Order activity.
The Approve Order activity also consists of a single step: approving the requisition. The approver can approver the order, deny the order, or recycle the order back to the original requestor for changes.
Image: Approve Order activity
Defining Approval Processes Chapter 10
When the approver is finished, PeopleCode again triggers Virtual Approver. Virtual Approver PeopleCode includes a parameter that specifies the approval action. Valid actions are A (Approve), D (Deny), or R (Recycle).
If the approver approves the action, Virtual Approver checks the approval rule set to determine whether additional approvals are required.
• If additional approvals are not needed, Virtual Approver triggers the Authorized Order event, which sends a confirmation email message to the original user and sends a worklist routing to the buyer who places the purchase order.
• If additional approvals are needed, Virtual Approver triggers the Approve Order event again. This is the same event that was triggered when the original user first submitted the order, but when Virtual Approver determines who must approve the order, the routing goes to the next person in the approval chain.
If the approver denies the order, Virtual Approver triggers the Deny Order event, which sends an email message notifying the original user that the order was denied.
If the approver recycles the order, Virtual Approver triggers the Recycle Order event, which sends an email message telling the person who is defined in the routing (either the original submitter or the previous approver) to change the order and resubmit it.
As you can see, the workflow maps show the events and routings that Virtual Approver triggers, just as the maps show all workflow events and routing. To determine whether Virtual Approver is involved in a particular workflow application, check the SaveEdit and Workflow PeopleCode. If the PeopleCode uses Virtual Approver, you can identify the approval rule set being used.
Virtual Approver Templates
This PeopleSoft application delivers applications with some of the most common approval processes already set up. For example, PeopleSoft Payables uses a Virtual Approver-based business process to streamline voucher processing. In many cases, you must adapt an existing process, rather than develop a new one.
To adapt the approval rules for an existing business process, open the approval rule set for that process and update it with the rules that apply to your business. Because approval rule sets are managed objects within PeopleSoft Application Designer, the PeopleSoft upgrade tools help you manage upgrades. That’s the advantage of the table-driven approach to approval processing.
User List Roles for Organizational Levels
Some of the Virtual Approver processes that are delivered with PeopleSoft applications use user list roles that PeopleSoft has already defined: EMPLOYEE, MANAGER, VICE PRESIDENT, and so on. Virtual Approver uses these roles to specify the levels of authorization authority that a user has.
Although PeopleSoft delivers these default roles, you must make sure that the set of roles accurately reflects the levels in your company and that they’re assigned to the appropriate users.
Chapter 10 Defining Approval Processes
Understanding Approval Rule Sets
An approval rule set is a workflow map representing the criteria for determining which approvals are required for a transaction. The components of the map are individual approval steps: one for each level of approval.
Subsequent sections discuss how to: • Create approval rule sets. • Define approval steps. • Maintain approval rules.
Note: The Approval Rule Properties dialog box, Virtual Approver, and some currency-related
PeopleCode functions depend on a set of database objects that do not exist in the PTSYS database. The set of database objects includes: PS_RT_DFLT_VW, PS_RT_TYPE_TBL, and RT_TYPE_LANG. These database objects currently reside in the Common Components project, which is named EO_COMMON. If you require these features to function within the PTSYS database, then you must transfer these tables into the PTSYS database using the upgrade copy feature in Application Designer.
Creating Approval Rule Sets
This section discusses how to: • Create approval rule sets. • Specify approval rule properties.
• Specify additional approval rule properties.
• Make an effective-dated change to an approval rule set.
Except where specified, this process is the same, regardless of whether Virtual Approver or GetApprovers uses the approval rule set.
Creating an Approval Rule Set
To create an approval rule set:1. In PeopleSoft Application Designer, select File, New. 2. Select Approval Rule Set and click OK.
3. Save the rule set and assign an effective date.
Unless you specifically want to make the approval rule set effective at a particular time, use a standard effective date, such as 01/01/1900.
Defining Approval Processes Chapter 10
Specifying Approval Rule Properties
This section discusses how to specify approval rule properties.
Image: Approval Rule Properties dialog box
This example illustrates the fields and controls on the Approval Rule Properties dialog box.
To specify approval rule properties:
1. Open the Approval Rule Properties dialog box by selecting File, Definition Properties. The Approval Rule Properties dialog box appears, displaying the General tab.
2. Enter descriptive information about the approval rule set.
Use the Icon Descr (icon description) field to specify a description that appears next to the rule set’s name in dialog boxes that list approval rule sets.
3. (Optional) Temporarily suspend the use of this approval rule set.
Clear the Approval Active check box to prevent Virtual Approver from checking the approval rules. Instead, it automatically approves all transactions.
Chapter 10 Defining Approval Processes
Select Allow Self Approval if users are permitted to approve transactions that they entered. Selecting this option does not mean that transactions are automatically approved; self-approval is still subject to the person’s approval limits. For example, if managers can approve purchase requisitions up to 5000 USD, then a manager who submits a requisition for 7500 USD cannot self-approve that requisition, even if you allow self-approval.
Specifying Additional Approval Rule Properties
This section describes how to specify additional approval rule properties.
Image: Approval Rules Properties dialog box - Use tab
This example illustrates the fields and controls on the Approval Rules Properties dialog box - Use tab.
To specify additional approval rule properties: 1. Select the Use tab.
Enter the name of the business process that is associated with this rule set.
Although approval rule sets are not represented by physical icons on workflow maps (business processes and activities), the approval process that you’re defining is part of a workflow business process. Enter the name of that business process here. This information is required when you use Virtual Approver.
Defining Approval Processes Chapter 10
When you add PeopleCode to call Virtual Approver from the transaction page, this business process is one of the input parameters.
2. Specify the event to trigger when all required approvals have occurred.
Note: This information is for Virtual Approver only; the GetApprovers function disregards this
information.
In the On Authorized group box, enter an activity name (associated with the business process that you’ve specified) and event name to specify which event should be triggered when the transaction is fully approved. Virtual Approver triggers this event when final approval occurs. For example, after a purchase requisition is approved, it is logical to trigger an event that notifies a buyer that the approved requisition is ready to be fulfilled.
PeopleSoft Application Designer enables you to deactivate individual business events. If you deactivate an event that Virtual Approver is supposed to trigger, the event isn’t triggered.
An On Authorized activity or event is optional. Try to avoid using the same activity or event as on the individual step's On Pre-Approved field.
3. Specify currency units for the approval rules.
Enter currency information only if the approval rules are based on monetary amounts in the transaction.
Enter the currency code and rate type that are used in your approval rules. For example, if a rule requires approvals for amounts over 1000 USD, enter USD.
4. Specify the currency unit for the transaction.
Specify the currency record and currency field name that store the currency code for the data to be evaluated. For example, to evaluate whether a requisition requires approval, you must know the amount of the requisition and the currency in which that amount is expressed.
Note: If the currency that is specified for the transaction being processed is different from the
currency that is specified for the approval rule, Virtual Approver performs the appropriate currency conversion before making the comparison.
5. Click OK to close the properties dialog box. 6. Add approval steps to the rule set.
7. Save the approval rule set.
Making an Effective-Dated Change to an Approval Rule Set
To make an effective-dated change to an approval rule set:1. Open the approval rule set. 2. Select File, Save As.
Chapter 10 Defining Approval Processes
4. Click OK.
Now, a new object with the same name exists, but it has a different effective date. The different effective-dated versions of the rule set appear separately in the dialog box.
5. Modify the rules, as needed.
Defining Approval Steps
This section provides an overview of approval steps and discusses how to: • Add a rule step to a rule set
• Define a rule step. • Specify rule step rules. • Specify rule step events.
Understanding Approval Steps
Rule steps are the individual approval steps. Approval rule sets incorporate one rule step for each level of approval that might be required.
When the person who submits something for approval has no self-approval authority, you do not need to include a step for that person. However, you may include a step for that user so that your graphical map more clearly documents the entire process. As long as that user has no authorization authority, Virtual Approver bypasses that user anyway.
If users who submit items for approval have some level of authorization, for example, users can self- approve amounts up to 100 USD. Then, the first rule step must represent that approval level.
Adding a Rule Step to a Rule Set
To add a rule step to a rule set:Note: This process is the same, regardless of whether Virtual Approver or GetApprovers uses the
approval rule set.
1. Click Approval Step on the toolbar.
2. Click the location on the approval rule set where you want the step to appear. An Approval Step icon appears where you clicked.
Defining Approval Processes Chapter 10
Defining a Rule Step
This section discusses how to define a rule step:
Image: Rule Step Definition dialog box - Definition tab
This example illustrates the fields and controls on the Rule Step Definition dialog box - Definition tab.
To define a rule step:
1. Double-click the rule step icon, or right-click it and select Item Properties. The Rule Step Definition dialog box appears.
2. Enter an icon description.
Use the Icon Descr field to specify a description to appear in dialog box boxes that list this type of map. If you leave this field blank, the map name appears by default.
3. In the Route to Role list box, select the role that performs this step.
The role that you select is the role of the user who approves items at this step and path. The system verifies this role against the row-level rule that you set up in a previous step before routing items. Select a user list role that corresponds to a level within your organization. In approval processes, a
Chapter 10 Defining Approval Processes
Note: The Virtual Router portion of Virtual Approver determines who should receive the work
item based on the role that you specify here, with the query role that is assigned to the worklist in PeopleSoft Application Designer. The worklist's query role must accept a role name as a bind variable, as the standard route control roles do.
4. In the Equally Authorized Roles field, select all of the roles that are qualified to process the transaction at this step.
For example, consider a purchase request process in which managers can approve transactions up to 25,000 USD. If a manager enters a request for 25,000 USD or less, Virtual Approver automatically approves it. Now, suppose that you also want to allow system administrators to self-approve up to 25,000 USD (if you allow self-approval). All you do is add SYSTEM ADMINISTRATOR to the Equally Authorized Roles box. System administrators don’t receive transactions routed to them, but they are treated as managers for the requests that they submit.
You can also use this field for users who do not normally participate in the approval process, but who have the necessary authority to approve at this level. This can be useful for exception processing, for example, when the regular approver is unavailable or you need to approve a transaction outside the worklist. Be aware that even if an equally authorized user handles the approval, the worklist routing in