Understanding Virtual Approver

This section provides an overview of 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

This diagram illustrates an Approve Order activity.

Approve Order activity

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.

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.

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.