Using Locations
Student Exercise
Using Locations - Student Exercise
Using Locations
The business analysts of an insurance company sent the following user stories:
Location User Story #1: “Let’s say we look at a person, e.g. William Andy, and we want to know more
details about his employer. Currently the only way to navigate to the employer is searching for it based
on the company name. We want to make the employer widget clickable on the person’s Person Info card
on the Details page. When the user clicks on it, it should navigate to the Company Info card on the
Details page of the company.” – Insurance company business analysts
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 2
Using Locations - Student Exercise
Location User Story #2: “When we look at a company, e.g. Albertson’s, we can see that it has a
Primary Contact. However, currently the only way to know more about that contact is searching for
him/her based on the name. We want to make the name of the primary contact navigable, so if the user
clicks on it the system will display the Person Info card on the Details page of the person.” – Insurance
company business analysts
Prerequisites
For this exercise, use TrainingApp, Guidewire Studio, and a supported web browser.
[Link] is the default URL for TrainingApp. To view, edit, and
delete various contacts, log in to TrainingApp as Alice Applegate. The login/password for Alice
Applegate is aapplegate/gw.
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 3
Using Locations - Student Exercise
Lab: Location user story #1
“We want to make the employer widget clickable on the person’s Person Info card on the Details page.
When the user clicks on it, it should navigate to the Company Info card on the Details page of the
company.” – Insurance company business analyst
1. Question: What is the name of the destination PCF file? What is the entry point signature?
2. Question: What is the name of the source PCF file?
1. Open Guidewire Studio
From the TrainingApp folder, open a command window and start Guidewire Studio for
TrainingApp.
Alternatively, use the Start TrainingApp Studio shortcut.
2. Run or Debug the TrainingApp project
Use the main menu, toolbar, or keystroke to run or Debug the server.
Verify that the Run or Debug Console tab shows ***** ContactManager ready *****.
3. Modify the Employer widget to link to the Employer’s Details page
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 4
Using Locations - Student Exercise
Figure 1 Source
Figure 2 Destination
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 5
Using Locations - Student Exercise
Hint
Troubleshooting “Widget is not clickable after configuration”
If you configured the source widget’s action property and reloaded the PCF changes, but
the widget is still not clickable: verify that you are passing in the right data to the destination page. For
example, if you wrote this:
[Link](anABContact)
in the widget’s action property, then use the ALT + SHIFT + W shortcut in the browser to verify what is
data in the anABContact variable. If it is not the employer, then use the Data Dictionary to find out how
you can get access to an ABPerson’s Employer.
Guidewire API
The action property
Most atomic widgets have the action property. This can be set to a Gosu statement. When set, the
atomic widget becomes clickable and when clicked, the Gosu statement is executed.
Activity
Verify the work you have done
1. Reload the PCF changes
In TrainingApp, reload the changes to the PCF file(s) and display keys.
2. Go to the Details page for William Andy
Click on edit and select Albertson’s as the employer
Click on update
Verify that Albertson’s is displayed as a link
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 6
Using Locations - Student Exercise
Verify if you click on the Albertson’s link the application displays the Details page of Albertson’s
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 7
Using Locations - Student Exercise
Lab: Location user story #2
“We want to make the name of the primary contact navigable, so if the user clicks on it the system will
display the Person Info card on the Details page of the person.” – Insurance company business analyst
1. Question: What is the name of the destination PCF file? What is the entry point signature?
2. Question: What is the name of the source PCF file?
1. Modify the Primary Contact widget so that it links to the person’s Details page.
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 8
Using Locations - Student Exercise
Figure 1 Source
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 9
Using Locations - Student Exercise
Figure 2 Destination
Hint
Troubleshooting “You do not have the permission required to perform this action:
ABCompanyDetailsPage”
Hint
In InsuranceSuite 9 and earlier, if the company does not have a primary contact, there is no
visible link, but the widget is still clickable. If you click on the empty link, TrainingApp will
throw an error. If you are working in one of these versions, you must configure the
available property to fix this:
(anABContact as ABCompany).PrimaryContact != null or [Link]
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 10
Using Locations - Student Exercise
Activity
Verify the work you have done
1. Reload the PCF changes
In TrainingApp, reload the changes to the PCF file(s) and display keys.
2. Go to the Details page for Alberton’s
If William Andy is not already the primary contact than click on Edit, select William Andy from the
drop down list and click on Update.
▪ Note#1: You can select a Primary Contact only from the list of employees.
▪ Note#2: If the list of employees is empty, then navigate to William Andy’s Details Page and
set Albertson’s as his employer.
Verify that William Andy is displayed for the Primary Contact as a link
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 11
Using Locations - Student Exercise
Verify if you click the link on the Primary Contact the application displays the Details page of William
Andy
Stop
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 12
Using Locations - Student Exercise
Lab Solution: Location user story #1
Solution
1. Question: What is the name of the destination PCF file? What is the entry point signature?
[Link]
ABCompanyDetailsPage(anABContact : ABContact)
2. Question: What is the name of the source PCF file?
[Link]
1. Modify the Employer widget’s action property in [Link]:
[Link]((anABContact as ABPerson).Employer)
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 13
Using Locations - Student Exercise
Lab Solution: Location user story #2
Solution
1. Question: What is the name of the destination PCF file? What is the entry point signature?
Name: [Link], Entry point: ABPersonDetailsPage(anABContact :
ABContact)
2. Question: What is the name of the source PCF file?
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 14
Using Locations - Student Exercise
[Link]
1. Modify the Primary Contact widget’s action property in [Link]:
[Link]((anABContact as ABCompany).PrimaryContact)
Guidewire Proprietary & Confidential – DO NOT DISTRIBUTE 15