Using Route Control Roles

This section provides an overview of route control query roles and discusses how to define routings in Application Designer.

When you use route controls, the application-specific data that you use to control routings is stored in database tables, not in PeopleCode or query definitions. To change the way that you route items, you update the route control tables using Workflow Administrator pages. You don’t have to modify code or business processes.

To preserve this advantage, you use a set of predefined query roles that are designed for use with route controls. The five route control query roles differ only in how many route control types you can use:

  • One Route Control Qry.

  • Two Route Controls Qry.

  • Three Route Controls Qry.

  • Four Route Controls Qry.

  • Five Route Controls Qry.

Role queries do not include application data (that is, the names of particular route control types or particular values). Instead, they have a series of runtime bind variables that you link to the route control types that you want.

Sample SQL of Role Query

This is the SQL for the Two Route Controls Qry role:

SELECT A.ROLEUSER
  FROM PS_RTE_CNTL_LN_VW2 A
  WHERE A.ROLENAME = :1
     AND A.RTE_CNTL_TYPE_1 = :2
     AND A.RTE_FROM_VALUE_1 <= :3
     AND A.RTE_TO_VALUE_1 >= :4
     AND A.RTE_CNTL_TYPE_2 = :5
     AND A.RTE_FROM_VALUE_2 <= :6
     AND A.RTE_TO_VALUE_2 >= :7 

Like all role queries, this query selects role users (although it retrieves the field from a special route control view, rather than the ROLEXLATOPR table).

Notice how generic the WHERE clause is and how many runtime bind variables it includes. This structure enables you to use the same role, regardless of which route control types you are using. The RTE_CNTL_TYPE bind variables enable you to plug in route control types at runtime.

A route control query has two classes of bind variables:

  • RTE_FROM_VALUE and RTE_TO_VALUE bind variables are set to values that come from the component that triggers the routing.

    They are similar to the bind variables that all role queries have. They enable the role to route items to different users based on some aspect of the item.

  • ROLENAME and RTE_CNTL_TYPE variables are typically set to constant values, representing the role and route control types that are relevant for the current routing.

    Note: The value for the ROLENAME bind variable should be a user list role that corresponds to a level in your organization. If you’re using route controls, you must have a set of organizational roles, and each role user should be assigned to at least one role. PeopleSoft provides a default set of roles—EMPLOYEE, MANAGER, and so on—but you might need to update them to reflect your organization.

To define routings in PeopleSoft Application Designer:

  1. Map the OPRID field (or the TO field for email routings) to the route control query that uses the number of route controls that are relevant for the routing decision.

  2. In the Specify Query Bind Variables dialog box, map the RTE_FROM_VALUE and RTE_TO_VALUE bind variables to fields from the page’s record definitions.

  3. Map the ROLENAME and RTE_CNTL_TYPE variables to constant values that provide the name of a user list role and route control type.

To experiment with how the route control queries work, the Review Role Users page enables you to mimic their operation.