Query Roles

Define a role as a query if you want to send work items to different people at different times. When an employee’s manager must approve a training request, the manager role is a query, because you want to send enrollment requests to different managers, depending on who makes the request.

When a role is defined as a query, the system determines who should receive a work item based on the values of fields on the page that triggers the routing. It uses context information from the current record to determine who needs to complete the work. For example, the manager role query uses the value of the Employee ID field from the course request to look up the name of the employee’s manager.

Because of the flexibility they bring to business processes, query roles are more common than user list roles.

When you create a query role, you tell the system how to determine who fills the role at runtime. You do not need to assign role users to the role, as you do with user list roles. However, you must set up the query by:

  1. Writing a query in PeopleSoft Query. The query identifies the users to whom the work item is routed. The query must take a value from the page that triggers the event, such as the user ID or employee ID, and return a list of role users.

  2. Defining the role through PeopleSoft Security Administration. For query roles, you pick the query that you want to run.

  3. Assigning the role to the appropriate workflow routings. Because the query has runtime bind variables, you must also specify which page field values to copy into the query.