Workflow errors on New Hire and Add employment instance

User tries to hire a new person or tries to add a new organization relationship encounters a series of error messages related to workflow as shown below. Even in vanilla installation, ‘PS’ user id would experience the same issue.

Error Message 1:
Role Benefits Administrator has no members. (52,7) 

This role doesn't have any members; if it's a query role, the query returned no results.
The system couldn't use the ROLEUSER specified as the System Default User in the Workflow Administrator, either because no System Default User has been identified or because the specified ROLEUSER was invalid.
There is a problem in calling TriggerBusinessEvent for the indicated Business Process/Event.
Review the program for errors.  If necessary, run a PeopleCode trace to determine the program that failed.
The PeopleCode TriggerBusinessEvent built-in function was used by the specified PeopleCode program and failed to execute correctly on the client  workstation.

Error Message 2:
Error when attempting to trigger Business Process / Event: Administer Workforce / Hire Employee (67,2) 

Error Message 3:
TriggerBusinessEvent failed for Administer Workforce.Hire Workforce-Hire Employee. (2,302) JOB.EMPLID.Workflow  PCPC:439  Statement:3 

At first look, issue seems to be because the role – 'Benefits Administrator' is missing for the user id accessing the system.
  • If the role is missing to the user id, make sure to add it.
Carefully reading the second portion of the first error message, will reveal another aspect to see if there is no system default user or even if there is one, is it a valid user with 'Benefits Administrator' role.
  • Navigate to PeopleTools > Workflow > Set Workflow Defaults and verify there is a system default userid. If there is one already, verify the user is active and has 'Benefits Administrator' role.
If none of these help, let's pay attention to the second and third error messages. It is clear that there is an issue with 'Hire Employee' event, 'Hire Workforce' Business activity and 'Administer Workforce' Business process, Opening the workflow objects in app designer will give further inputs.

Open 'Hire Workforce' Business activity, there will be an email as 'Benefits Administrator'. This indicates, that there will be an email triggered to users with role 'Benefits Administrator.
·                Now find out at least one user or system default workflow user with this role
·                For the identified user visit user profile page in PeopleTools > Security > User profile > General tab
·               Ensure an email address is added
·               Then go to Workflow tab and ensure 'Email User' option is selected.

Doing these changes should resolve the issue. The error message can also occur on doing a termination transaction. It can also happen with the role name changing to Payroll Administrator or Training Administrator or Facilities Administrator or MIS administrator or VC administrator. Similar steps should resolve the issue.
SQL query to find out list of users who have access to a Page and information on which Permission list enables the user to access the page:
FROM   psoprcls 
WHERE  oprclass IN (SELECT DISTINCT classid 
                    FROM   psauthitem 
                    WHERE  pnlitemname = :1) 

This query can be modified as below to see if a user has access to a particular component and if yes through which permission list.

FROM            psoprcls 
WHERE           oprclass IN 
                             SELECT DISTINCT classid 
                             FROM            psauthitem 
                             WHERE           pnlitemname = :1--required component name) 
AND             oprid = :2      --required userid

How to Query Which Components Are Accessed by Which Roles?
For example, for component "JOB_DATA", to find out which role should be given to a user which gives them access to that component or page use the following SQL.
FROM   psauthitem A, 
       psroleclass B, 
       psroleuser C 
WHERE  A.baritemname IN ( :1 ) 
       AND A.classid = B.classid 
       AND C.rolename = B.rolename 
       AND C.roleuser = 'PS' 

PeopleTools Tables - Part 3 - PeopleTools records for basic definitions in PeopleSoft Application Designer

After PeopleTools Tables - Part 1 - PeopleTools table for PS-Queries, and PeopleTools Tables - Part 2 - PeopleTools records for Security Definition the next set of PeopleTools records is here related to basic PeopleSoft object definitions related to Application development.

Record for Projects:
  1. PSPROJDEFNLANG - Project Definition Lang Table
  2. PSPROJECTDEFN        - Project Definition Table
  3. PSPROJECTDEP - Incident Dependency Table
  4. PSPROJECTINC - Project Incidents Table
  5. PSPROJECTITEM - Project Item Table Here are couple of my posts on PSPROJECTITEM Part 1 and Part 2 which will help in understanding PSPROJECTITEM record. Here is another post on PSPROJECTITEM record which explains querying PSPROJECTITEM data and extracting it to spreadsheet
  6. PSPROJECTMSG - Project Messages

Record for Fields:
  1. PSDBFIELD - A table with all Database Fields
  2. PSDBFIELDLANG - Alternate language for PSDBFIELD table
  3. PSDBFLDLABL - DBField Label Table where FIELDNAME represents DBField name while LABEL_ID is a unique ID of Field Label.
  4. PSDBFLDLABLLANG - DBField Label Language Table
  5. PSXLATITEM - Translate Value Items

Record for Records:
  1. PSRECDEFN - Record header table
  2. PSRECFIELD - Fields in the record (subrecords not expanded)
  3. PSRECFIELDALL - Fields in the record (subrecords expanded)
  4. PSKEYDEFN - Indexes
  5. PSTBLSPCCAT - Tablespaces
  6. PSRECTBLSPC - Records’ tablespace assignments
Record for Indexes:
Record for Pages:
  1. PSPNLDEFN - Page header table
  2. PSPNLFIELD - Page controls 
  3. PSPNLHTMLAREA - Static HTML Areas on Pages
Record for Components:
  1. PSPNLGRPDEFN - Component header table
  2. PSPNLGROUP - Pages in the components
Record for Component Interfaces:
  1. PSBCDEFN - header record; one row for each Component Interface
  2. PSBCITEM - one row for each property
  3. PSAUTHBUSCOMP - Component Interfaces access table. Links Permission Lists, Component Interfaces, Methods and Authorized Actions
Record for Menus:
  1. PSMENUDEFN - Menu header table
  2. PSMENUITEM - Items (components) on the menu