Configuring parallel processing
At TGB, candidates for an open position are interviewed by multiple team members. The existing interview process in the HRApps application only allows for one interviewer. The Human Resources (HR) department has requested this process be updated to support more than one interviewer for a candidate.
The following list includes the recommended tasks for completing this assignment.
- Create a new Embedded data field to hold the list of interviews, and add an empty entry to the list.
- Update the ScheduleInterview_0 section to add a table sourced by the Interviews property to enable adding and removing interviews. In the table, include the existing InterviewSchedule section to display the interview information.
- Replace the ConductInterview subprocess with a Split For Each shape configured to call the ConductInterview flow for each interviewer.
- Rename the ScheduleInterview assignment and flow action to reflect multiple interviews.
- Update the Assess Candidate screen for the user to view the feedback from all the interviewers.
Note: The ConductInterview flow is in the Interview data class and thus is not impacted by changing from the use of a page to a page list.
The following table provides the credentials you need to complete the challenge.
|Senior System Architect||SSA@TGB||pega123!|
Note: Your practice environment may support the completion of multiple challenges. As a result, the configuration shown in the challenge walkthrough may not match your environment exactly.
1 Create a page list property and edit pySetFieldDefaults data transform
- In the Pega instance for the challenge, enter the following credentials:
- In the User name field, enter SSA@TGB.
- In the Password field, enter pega123!.
- In Dev Studio select the Candidate case type. In the Data model tab, create a multiple records embedded data field named Interviews that is sourced from the existing data object TGB-HRApps-Data-Interview.
- In the Candidate case type data transform pySetFieldDefaults, add a row to initialize a property in the Interviews list to display an empty entry in the list when the screen is displayed.
Tip: To add a default entry to the list, initialize an element in the list item (for example, .Interviews(1).Location = "") .
2 Update the ScheduleInterview_0 section to add a table
- In the ScheduleInterview_0 section, add a Dynamic Layout.
- In the Dynamic Layout, create a text label named Interviews.
- Under the Dynamic Layout, add a Table layout and open the Layout Properties dialog box.
Note: You can use an embedded table or a repeating dynamic layout in the ScheduleInterview_0 section. It is a Pega best practice to use a repeating dynamic layout when displaying images or other dynamic content. Because the ScheduleInterview_0 section does not include images or other dynamic content, this challenge uses an embedded table.
- On the General tab, set the table source as the .Interviews list property.
- On the Operations tab of the table, set Row editing to Inline and Inline edit mode to Rows always editable.
- On the Embedded section TGB-HRApps-Data-Interview.InterviewSchedule, click the selection handle and drag the section to the first column, second row of the table.
Note: The table displays a column heading cell above the first row.
- Save the ScheduleInterview_0 section.
3 Edit the InterviewCandidate_0 flow to add a Split for Each shape
- In the Candidate case life cycle, in the Interview Candidate process, click the Configure process icon.
- Click Open process to open the process flow.
- Add a Split for Each advanced shape.
- In the Split For Each properties window, configure the details as shown in the following image by using the .Interviews property and the ConductInterview subflow.
- Replace the existing Conduct Interview subprocess shape with the Split For Each smart shape.
- Save the flow changes.
4 Edit the AssessCandidate_1 section and AssessmentRating declare expression
- In the AssessCandidate_1 section, add a Table layout to the bottom of the section.
- On the General tab of the table Layout properties window, configure the properties as shown in the following image.
- From the Structural menu, drag an Embedded section to the second row of the table.
- Click the Gear icon to open the Cell Properties dialog box
- In the Source field, enter or select InterviewFeedback.
- Delete the second dynamic layout.
- Save your changes to the section.
- Update the AssessmentRating declare expression to calculate the average of all interview ratings.
Tip: Use the Average of computation type to calculate the average value for a property in a page list. Leave the using entries in which field blank.
Confirm your work
- Create a new Candidate case and advance the case to the Interviews stage.
- Verify that an empty entry in the interviewer list exists.
- Add two interviewers to the list and click Submit.
- Verify that two assignments are displayed.
- Complete the two Interview candidate assignments.
- In the Assess Candidate approval step, verify that the assessment rating is the average of the two interviewer ratings.
Tip: You can also check the assessment rating using the Clipboard viewer to see the value of pyWorkPage.AssessmentRating.