IS10 FUND K StudentWorkbook
IS10 FUND K StudentWorkbook
IS10 FUND K StudentWorkbook
Kickstart
Student Workbook
InsuranceSuite 10 Fundamentals: Kickstart - Student Workbook
Table of contents
Introduction ............................................................................................................................................................... 6
Introduction to Gosu........................................................................................................................... 91
Prerequisites ...................................................................................................................................................... 91
Lab: Coding with Gosu ....................................................................................................................................... 91
8.2.1 Write it down ......................................................................................................................................... 91
8.2.2 Configuration ......................................................................................................................................... 92
8.2.3 Verification ............................................................................................................................................ 92
Lab: Working with arrays.................................................................................................................................... 93
8.3.1 Write it down ......................................................................................................................................... 93
8.3.2 Configuration ......................................................................................................................................... 94
Introduction
Welcome to the Guidewire InsuranceSuite™ 10.0 Fundamentals Kickstart course.
The Student Workbook you will lead you through various course module exercises and additional information.
The module numbers correspond to the module numbers in your training. As time allows, complete the
assigned exercises to the best of your ability.
In this lab, you will start Guidewire Studio, start a development instance of TrainingApp from Studio, and then
log in to TrainingApp. In TrainingApp, you will search for contacts and create new contacts. You will end this
lab by exiting Guidewire Studio and stopping the application.
Prerequisites
For this exercise, use TrainingApp, Guidewire Studio, and a supported web browser.
http://localhost:8880/ab/ContactManager.do 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.
Use the main menu, toolbar, or keystroke to start TrainingApp in debug mode.
3. Verify that you are running TrainingApp
Hint
Opening a command from the command window
To open a new command window from a folder, hold down the Shift key on the keyboard and use your mouse to
right-click on the TrainingApp folder. From the context menu select the Open command window here option.
Hint
Running tasks from the command window
If you cannot recall the exact name of the task you want to execute you can always run the following command:
C:\GW10\TrainingApp\gwb tasks
Write it down
What are the two ways that you can run TrainingApp from Guidewire Studio?
In this exercise, you will log in to TrainingApp as Alice Applegate. As Alice Applegate, you will search for
contacts and create new contacts. Then, you will log out of TrainingApp. Finally, you will stop TrainingApp from
Guidewire Studio.
Write it down
Important!
Select the right contact type
From the Actions menu you can create many different types of contacts in TrainingApp. When creating the
contacts in the next part, check all the available sub-menus and select the most specific type.
City Hollywood
State California
State California
Best practice
Regenerate the data dictionary
Regenerating the data dictionary after making data model changes is a best practice because it creates current
documentation for the data model. In addition, the build process for the data dictionary can identify issues beyond
schema validation such as referential integrity in the data model.
Write it down
On the Details screen for the Law Firm, in the Additional Info section, review the available fields. Next, review the
available fields in the Additional Info section for the Autobody Repair Shop. Which fields differ between the Law
Firm and the Autobody Repair Shop?
Write it down
After stopping the server from Guidewire Studio, are you able to navigate in the TrainingApp web application?
What is the browser error?
Stop
Solution
To open Guidewire Studio, SHIFT + Right click on C:\GW10\TrainingApp and select Open command
window here from the context menu.
To start TrainingApp in debug mode, either (1) click on the Debug icon or (2) from the menu select Run
→ Debug ‘Server’
OR
3. To verify that you are running TrainingApp, verify that the Debug Console tab shows *****
ContactManager ready *****
What are the two ways that you can run TrainingApp from Guidewire Studio?
From the Run menu, select Run 'Server' or select Debug 'Server'. Alternatively click on the Play or Debug
buttons.
Solution
1. Log in to TrainingApp
Write it down
1. How many contacts have the last name Smith?
Solution
Write it down
1. On the Details screen for the Law Firm, in the Additional Info section, review the available fields.
Next, review the available fields in the Additional Info section for the Autobody Repair Shop. Which
fields differ between the Law Firm and the Autobody Repair Shop?
The Law Firm has a Specialty field whereas the Autobody Repair Shop has a License field.
4. After stopping the server from Guidewire Studio, are you able to navigate in the TrainingApp web
application? What is the browser error?
It is not possible to continue navigating the TrainingApp web application. The browser shows an error
that says the webpage is not available.
In this lab, you will review basic concepts introduced in the Introduction to Data Model lesson by using the Data
Dictionary.
Tools
genDataDictionary
Open a command window from the root directory of the Guidewire application. In the command window, enter
gwb genDataDictionary
Find
Open the Data Dictionary
The Data Dictionary documents the entities and typelists in the Guidewire application including both base
application and customer extensions. To open the Data Dictionary, open
…\build\dictionary\data\index.html in a recommended web browser.
Write it down
Hint
You can make use of the browser’s text search functionality to assist in finding the
answers for many of these questions
2. For the ABContact entity, describe the datatype for the EmailAddress1 field.
3. ABContact has a Tax ID field. Is the Tax IDs field used to store a social security number
(SSN), an employer ID number (EIN), or both?
4. Name one typekey field in ABContact where the field name is identical to the name of the
related typelist.
5. Name one typekey field in ABContact where the field name is NOT identical to the name
of the related typelist.
6. Name one field on ABContact which is not stored in the database. What type of field is
this?
7. Which has more arrays: the Group entity or the Role entity?
Hint
Use the browser’s text search functionality
The easiest way to answer questions 4, 5 and 6 is by using the browser’s Find functionality. Use the
CTRL + F keystroke in the browser and enter typekey or virtual property or derived property as your
search keyword and all the matches will be highlighted in the page. This will help you identify possible
answers to some of the following questions.
Stop
Solution
Write it down
The Data Dictionary is a set of linked documentation in HTML. It describes all the data entities and
typelists that make up the data model. The Data Dictionary also lists all attributes and fields for the
data entities and extension entities.
2. For the ABContact entity, describe the datatype for the EmailAddress1 field.
varchar(60)
3. ABContact has a Tax ID field. Is the Tax IDs field used to store a social security number (SSN), an
employer ID number (EIN), or both?
Both – based on the description: Tax ID for the contact (SSN or EIN).
4. Name one typekey field in ABContact where the field name is identical to the name of the
related typelist.
5. Name one typekey field in ABContact where the field name is NOT identical to the name of the
related typelist.
6. Name one field on ABContact which is not stored in the database. What type of field is this?
7. Which has more arrays: the Group entity or the Role entity?
10 – From the main page of the Data Dictionary click the All Fields link. Scroll down to the
Organization attribute (green color) and count the entities below it.
In this exercise your job is to make the necessary data model changes to meet customer requirements. As
a configuration developer, you will use the Entity Editor in Guidewire Studio to modify the TrainingApp
data model. You will implement the user interface changes later in a later lesson.
Prerequisites
For this exercise, use TrainingApp, Guidewire Studio, and a supported web browser.
http://localhost:8880/ab/ContactManager.do 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.
You will use the Entity Editor to modify the existing ABContact.etx Entity Extension and use the column
element to add new data fields to the ABContact base application entity.
Review the field definitions received from the business analysts. This table below summarizes the
requirements for each field. Note: The Contact Tier field is missing from this list, because it has already been
added by one of our fellow configuration developers.
Important!
Read carefully.
For each new entity element, remember to set the nullok attribute to true if not specifically defined to be false.
When required, add an element description and specify column parameters.
Best practice
Use _Ext in entity field name
Notice that every field in the table above has an _Ext suffix. For fields that are added to a base application
entity, Guidewire recommends that the field name should end with _Ext. This is to prevent potential conflicts
during the upgrade to the next version of the Guidewire application.
2. Navigate to ABContact.etx
4. Validate your changes in Guidewire Studio and generate the Java class
Either click on the validate icon in the Entity Editor or use CTRL + S to save your changes
If the code generation was successful (no errors shown in the Codegen tool window) then open the
generated Java class and verify you can find your newly added fields
As a configuration developer, you want to be able to extend base application Typelists so you can add new
Typecodes as needed. In this exercise, you will create an extension for the CustomerServiceTier Typelist and use
the Typelist Editor to define three new Typecodes.
Best practice
Use intervals when defining priorities
Guidewire recommends using intervals when defining priorities. E.g.: 10, 20, 30 This enables you to insert a new
value between two existing values without renumbering the other priorities. E.g. you can insert a new Typecode in
a later release with the priority 15
Best Practice
Naming typecodes
For typecodes that are added to a base application typelist, Guidewire recommends that the typecode’s code
should end with _Ext. This is to prevent potential conflicts during the upgrade to the next version of the Guidewire
application.
Activity
Verify the work you have done
Regenerating the data dictionary is not required. Regenerating the data dictionary is a best practice because it
creates current documentation for the data model. In addition, the build process for the data dictionary can identify
issues beyond schema validation such as referential integrity in the data model.
Best practice
Regenerate the Data Dictionary
Regenerating the data dictionary is not required. Regenerating the data dictionary is a best practice because it
creates current documentation for the data model. In addition, the build process for the data dictionary can identify
issues beyond schema validation such as referential integrity in the data model.
Solution
8. Right click on the CustomerRating_Ext column and add select Add New… columnParam to add a
columnParam with the following details:
9. Right click on the CustomerRating_Ext column again and add select Add New… columnParam to add
a second columnParam with the following details:
Screenshot of the ABContact.etx extension, with the new column
10. Add the new IsStrategicPartner_Ext column with the following details:
12. If the code generation was successful (no errors shown in the codegen tool window) then open the
generated Java class and verify you can find your newly added fields.
Use CTRL + SHIFT + N to search for the Java class. Note that the Java class is in the
configuration\generated\entity package.
The simplest way to locate the new properties is searching for them using the CTRL + F shortcut. For example,
we are searching for WebAddress_Ext in the following screenshot:
Solution
2. Add Typecodes by clicking the typecode button (the icon with the green plus icon)
In this lab, you will first explore the tools available for investigating the architecture of the user interface. Then,
you will use the PCF Editor in Guidewire Studio to modify the order of widgets in a PCF file. Finally, you will
deploy and verify your changes.
Prerequisites
For this exercise, use TrainingApp 10.0, Guidewire Studio 10.0, and a supported web browser.
http://localhost:8880/ab/ContactManager.do 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.
As a configuration developer, you need to understand how to explore the PCF structure, so you can easily find
and navigate to the widgets you need to modify.
In this exercise, you will explore the page structure of the summary page using the internal tools and the PCF
Editor.
1. Question: Review the file structure in the dialog. What is the parent PCF of the FlagEntriesLV.pcf?
3. Question: Review the Page Widget Structure. Compare the id and renderId values of the Screen
widget. How does the renderId value differ from the id value?
4. Question: Review the ABContactSummaryPage.pcf structure in the Structure tab. What is the parent
widget of the Toolbar widget?
Keyboard shortcut
Open Location Information
If you are running an application project with internal tools enabled, you can view the location information with
ALT + SHIFT + I in a separate browser window. The window details the file structure and details the hierarchy
of the location, screen, and any child container widgets. For each location and container widget, the name of the
file in which it is referenced is listed. Location Info is also useful when Studio is not running.
Keyboard shortcut
Open Widget Inspector
If you are running an application project with internal tools enabled, you can view the widget information with ALT
+ SHIFT + W in a separate browser window. The Widget Inspector shows all the PCF files and widgets
referenced in the active application browser window except for the workspace area. The Widget Inspector also
shows the available variables and their current values.
Keyboard shortcut
Open a PCF file in Studio from the Browser
If you are running an open application project in Guidewire Studio and if internal tools are enabled, you can
automatically open the location being viewed in the application. Use the ALT + SHIFT + E keystroke in the
browser.
As a configuration developer, you want to be able to open and modify existing PCF files.
In this exercise, you will modify the ABContactSummaryDV.pcf file that you have already open in the PCF
Editor in Guidewire Studio.
Activity
Verify the work you have done
Keyboard shortcut
Reload PCF changes without restarting the Server
If you are running an open application project in Guidewire Studio and if internal tools are enabled, you can reload
all the page configuration files and display keys for the server.
Important: If you reload PCF files while in edit mode, you may experience unpredictable results. For the current
location, where there is a data modification in progress, the new PCFs may not be reloaded. Therefore, Guidewire
recommends reloading PCF files while in read-only mode as it provides for more predictable results.
Stop
Solution
Exact details on how to complete the exercise
2. Question: Review the file structure in the dialog. What is the parent PCF of the FlagEntriesLV.pcf?
4. Question: Review the Page Include Structure. What is the value of anABContact variable?
"William Andy"
5. Question: Review the Page Widget Structure. Compare the id and renderId values of the Screen
widget. How does the renderId value differ from the id value?
renderId includes the id of the page in which to render the screen, whereas id simply gives the id of
the screen
Generally speaking the id simply gives the id of the widget, whereas renderId includes the id of the
widget and the concatenation of all the parent ids.
6. Question: Review the ABContactSummaryPage.pcf structure in the Structure tab. What is the parent
widget of the Toolbar widget?
ABContactSummaryScreen
8. Question: Review the ABContactSummaryDV.pcf in the canvas. How are you able to distinguish
included sections from the widgets specified in the file itself?
Included sections are colored purple (the color varies depending on how deep the files are nested),
whereas widgets that are in the file have a gray background.
1. Move Created On widget below Assigned User widget. You can drag the Created On to its new
position.
Remember: Dark green lines are places where the widget could be placed; and the light green line is where
the widget will be placed.
From the Toolbox, add an input divider between Assigned User and Public ID
Atomic widgets
An insurance company wants to extend TrainingApp functionality by capturing more details about each
contact. The complete requirement will be implemented over multiple modules. Recall that you have
already implemented the required data model changes in the previous Extending Base Application
Entities lesson.
In this exercise your job is to make the necessary user interface changes to meet customer requirements.
As a configuration developer you will use the PCF Editor in Guidewire Studio to modify the TrainingApp UI.
In this module, you will first practice the DOT notation. Next, you will review the requirements. Finally, you
will configure the appropriate PCF file to display the fields and deploy your changes.
Prerequisites
For this exercise, use TrainingApp 10.0, Guidewire Studio 10.0, and a supported web browser.
http://localhost:8880/ab/ContactManager.do 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.
As a configuration developer, you need to understand how to work with the dot notation. In this exercise, you
will use the data dictionary to determine how to reference entities, fields, and properties using dot notation.
For an object named "anABContact" that is of the type ABContact, identify the correct dot notation syntax for
the following:
6. Assuming that anABContact is a legal venue, the type of court for anABContact.
Stop
As a configuration developer, you want to be able to find fields in the data dictionary and determine their data
model type. As a configuration developer, you want to be able to determine the appropriate widget and Gosu data
type based on the data model type of a field.
Recommended Recommended
Data type
widget(s) in a Detail widget(s) in a List Data type (Gosu)
(Data Model)
View View
Recommended Recommended
Data type
widget(s) in a Detail widget(s) in a List Data type (Gosu)
(Data Model)
View View
3. Use the Data Dictionary and the Widget reference table to complete the following table Note: All the
fields are defined on ABContact entity
4 Customer Yes
Rating
5 Strategic Yes
Partner
6 Last Yes
Courtesy
Contact
7 Fraud No
Investigation
Number
8 Web Yes
Address
Stop
As a configuration developer, you want to create atomic widgets; bind some of those atomic widgets to entity
fields to display data from the database; and define user-friendly labels.
3. Log in to TrainingApp
Log in as Alice Applegate.
In the search results list view, navigate to the William Andy contact.
Keyboard shortcut
Open a PCF file in Studio from the Browser
If you are running an open application project in Guidewire Studio and if internal tools are enabled, you can
automatically open the location being viewed in the application. Use the ALT + SHIFT + E keystroke in the
browser.
Best practices
Adhere to Best practices
Guidewire recommends PCF file should not contain "hard coded" display text. Benefits of display keys:
The recommended naming convention for customer display keys, is to use a standard prefix such as "Ext". Use
the following syntax to reference a display key:
DisplayKey.get(“NameOfTheKey”)
Hint
View or modify a Display Key value
To view the value, just simply hold down the CRTL key and hover over the Display Key with your mouse. To
modify the value, just simply hold down the CTRL key and left click on the Display Key with your mouse. In
general, the same methods work the same way for other elements in Studio, such as entity fields, Gosu
variables, PCF file references, etc.
Hint
Hover over for tooltips
Simply hover over the PCF element (or property) in the toolbox (or property window) to see the PCF
documentation about what that element (or property) does.
Activity
Verify the work you have done
Keyboard shortcut
Reload PCF changes without restarting the Server
If you are running an open application project in Guidewire Studio and if internal tools are enabled, you can reload
all the page configuration files and display keys for the server.
Important: If you reload PCF files while in edit mode, you may experience unpredictable results. For the current
location, where there is a data modification in progress, the new PCFs may not be reloaded. Therefore, Guidewire
recommends reloading PCF files while in read-only mode as it provides for more predictable results.
In this exercise, you will use the PCF Format Reference to investigate various widget properties.
Use the Quick Jump drop-down list to select the TextInput widget.
Review the widget properties.
Requirement: When a user attempts to modify the Is Verified widget value, a dialog box opens. The dialog
box asks the user to confirm the change.
1. Question: What is the name of the attribute (property) for a BooleanRadioInput that displays a
confirmation message in a dialog box?
Requirement: The label for the Evaluation Date must be in bold in the user interface.
2. Question: What is the name of the attribute (property) for a DateInput that allows a configurator to
implement a bold style for the label?
Requirement: When a user hovers over a Legacy Code text input widget with their mouse cursor, the user
interface displays, "The code must come from the legacy claim system."
3. Question: What is the name of the attribute (property) for a TextInput that displays this message?
Stop
Solution
anABContact.CreateTime
anABContact.TaxStatus
anABContact.PrimaryAddress.City
anABContact.Buildings_Ext
(anABContact as ABCompany).NumberOfEmployees
6. Assuming that anABContact is a legal venue, the type of court for anABContact.
(anABContact as ABLegalVenue).VenueType
Solution
Solution
1. Call the get() function of the DisplayKey class in the label property.
2. Enter the name for the display key in the get() function as a String parameter (between double
quotes).
4. Then enter the text value for the locale and click OK
To delete the existing label, right click on it and select Delete from the context menu.
6. Drag and drop widgets inside the existing Input Column
Label widget for Contact Analysis label:
Solution
Requirement: When a user attempts to modify the Is Verified widget value, a dialog box opens. The dialog box
asks the user to confirm the change.
1. Question: What is the name of the attribute (property) for a BooleanRadioInput that displays a confirmation
message in a dialog box?
showConfirmMessage
Requirement: The label for the Evaluation Date must be in bold in the user interface.
2. Question: What is the name of the attribute (property) for a DateInput that allows a configurator to implement
a bold style for the label?
boldLabel
Requirement: When a user hovers over a Legacy Code text input widget with their mouse cursor, the user
interface displays, "The code must come from the legacy claim system."
3. Question: What is the name of the attribute (property) for a TextInput that displays this message?
helpText
Detail Views
In the Extending Base Application Entities lesson, we made certain data model changes to collect
additional analytical information about the contact; and in the Atomic Widgets lessons we configured the
Analysis tab to display those fields, so the users can view and edit them.
We received the following message from the Business Analysts: “The Analysis tab on the Summary screen
looks great. Nice job! We did some further analysis and concluded that we want to see the same UI screen
layout when we navigate to the Analysis link in the sidebar too. (See wireframe below.) Please note that
this functionality will be most likely extended in the future. If that happens, the UI layout must change at
both places the same way.”
In this module, you will create a reusable Detail View Panel. Next, you will move widgets from an existing
PCF file that you modified in a previous lab to your new file. You will then reference your Detail View Panel
in various PCF files. Last, you will add a Toolbar with Edit Buttons to make the Analysis page editable.
Prerequisites
For this exercise, use TrainingApp 10.0, Guidewire Studio 10.0, and a supported web browser.
http://localhost:8880/ab/ContactManager.do 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.
As a configuration developer, you want to create a reusable Detail View Panel and reference it from different
PCF files.
From the TrainingApp folder, open a command window and start Guidewire Studio for TrainingApp. Note:
Alternatively, use the Start TrainingApp Studio shortcut.
Hint
Required variables vs variables
The required variables tab defines the input parameters for a container, while the variables tab defines local
variables to store values temporarily. (E.g. storing the result of an expensive function call to use it at multiple
places in the PCF.)
1. Go back to ABContactSummaryCV.pcf
Delete the existing inline Detail Panel Widget.
Hint
Panel Ref
Include a panel (such as a DetailView, ListView, PanelSet or CardView, etc.) and (optionally) supply it with title,
toolbar or instructional text. The def property must be configured using the following format:
The number of arguments depends on the number of required variables the included panel has.
1. Navigate to ABContactAnalysisPage.pcf
Delete the existing inline Detail Panel Widget.
Activity
Verify the work you have done
1. Log in to TrainingApp
Log in as Alice Applegate.
2. Reload the PCF changes
In TrainingApp, reload the changes to the PCF file(s).
3. View the Analysis card for William Andy
Search for William Andy.
In the search results list view, navigate to the William Andy contact.
Click the Analysis card tab.
Verify that you see the Contact Analysis detail view panel.
Icon for stop, consisting of two crossed flags marking the end of a lab.
Stop
1. Navigate to ABContactAnalysisPage
2. Add a Toolbar with Edit Buttons
In the canvas, add a Toolbar with Edit Buttons (Edit|Update|Cancel) to the top-level container widget.
Activity
Verify the work you have done
1. Log in to TrainingApp
Log in as Alice Applegate.
Stop
Solution
Cut the whole Input Column - containing all the widgets - from the Analysis tab…
…and paste it in the ABContactAnalysisDV that you created in the previous step.
Solution
1. Go back to ABContactSummaryCV.pcf
Delete the existing inline Detail Panel Widget
Solution
1. Navigate to ABContactAnalysisPage.pcf
Delete the existing inline Detail Panel Widget.
Solution
1. Navigate to ABContactAnalysisPage
2. Add a Toolbar with Edit Buttons
In the canvas, add a Toolbar
Solution
1. Question: In the sidebar menu, click Summary for the William Andy contact. Next, select the Analysis
card.
Click Edit. Why is it possible to edit the Contact Analysis details on the Summary page?
Stop
Introduction to 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
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 10.0, Guidewire Studio 10.0, and a supported web browser.
http://localhost:8880/ab/ContactManager.do 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.
1. Question: What is the name of the destination PCF file? What is the entry point signature?
Stop
Figure 1 Source
Figure 2 Destination
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:
ABCompanyDetailsPage.go(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
Verify if you click on the Albertson’s link the application displays the Details page of Albertson’s
“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?
Stop
1. Modify the Primary Contact widget so that it links to the person’s Details page.
Figure 1 Source
Figure 2 Destination
Hint
Troubleshooting “You do not have the permission required to perform this action:
ABCompanyDetailsPage”
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. You will have to configure the available property to fix this:
Activity
Verify the work you have done
Verify if you click the link on the Primary Contact the application displays the Details page of William Andy
Stop
Solution
1. Question: What is the name of the destination PCF file? What is the entry point signature?
ABCompanyDetailsPage.pcf
ABCompanyDetailsPage(anABContact : ABContact)
ABContactDetailsPersonDV.pcf
ABCompanyDetailsPage.go((anABContact as ABPerson).Employer)
Solution
1. Question: What is the name of the destination PCF file? What is the entry point signature?
ABContactDetailsCompanyDV.pcf
ABPersonDetailsPage.go((anABContact as ABCompany).PrimaryContact)
Introduction to Gosu
As a configuration developer, you have to be familiar with the basic Gosu syntax and language features. In this
lab, you will write Gosu code in Gosu Scratchpad to print to the debug console details about specific contacts in
TrainingApp.
Prerequisites
For this exercise, use TrainingApp 10.0, Guidewire Studio 10.0, and a supported web browser.
http://localhost:8880/ab/ContactManager.do 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 API
PublicID
PublicID is a field on almost every Guidewire data model entity that stores a unique identifier value. Unlike the
"ID" field, PublicID is a writeable string. It is usually used to identify business objects as they are known to
external systems.
1. Question: Navigate to the Summary page of the following company: Burlingame Saab. On the
Summary page, what is the Public ID for Burlingame Saab?
2. Question: Navigate to the Summary page of the following doctor: Rebecca Stevens. On the
Summary page, what is the Public ID for Rebecca Stevens?
In the second part of the exercise, you will open Gosu Scratchpad. Then, you will write and run Gosu code to
print to the debug console details about specific contacts in TrainingApp.
Activity
Verify the work you have done
Stop
In this exercise, you will write Gosu code in Gosu Scratchpad to retrieve the objects in an entity data model
array. Finally, you will print different details of the bank accounts to the server log.
1. Question: Navigate to the Summary page of the following contact: Eric Andy. On the Summary
page, what is the Public ID for Eric Andy? Go to the Bank accounts card on the Details page and
verify that the contact has 2 bank accounts: ACME Credit Union – checking and savings accounts.
2. Question: Navigate to the Summary page of the following contact: William Andy. On the Summary
page, what is the Public ID for William Andy? Go to the Bank accounts card on the Details page and
verify that the contact has 2 bank accounts: SUCCEED Credit Union – checking and National Bank -
savings accounts.
In the second part of the exercise, you will open Gosu Scratchpad. Then, you will write and run Gosu code to
print to the debug console details about specific contacts in TrainingApp.
Activity
Verify the work you have done
Stop
Solution
1. Question: Navigate to the Summary page of the following company: Burlingame Saab. On the
Summary page, what is the Public ID for Burlingame Saab?
ab:78
2. Question: Navigate to the Summary page of the following doctor: Rebecca Stevens. On the Summary
page, what is the Public ID for Rebecca Stevens?
ab:70
Solution
uses trainingapp.base.QueryUtil
//before running the code, replace this with the contact's PublicID
var publicID = "ReplaceThisWithThePublicIDOfTheContact"
//Requirement 1/A
print(contact.DisplayName + " was created " + contact.CreateTime + ".")
//Requirement 1/B
if(contact.PrimaryAddress != null) {
print("Primary address state is " + contact.PrimaryAddress.State + ".")
}
//Requirement 1/C
var isStrategicPartner = contact.IsStrategicPartner_Ext ? " and is a strategic partner" : " and is NOT
a strategic partner."
print("The contact is of the subtype " + contact.Subtype.DisplayName + isStrategicPartner)
//Requirement 1/D
if(contact typeis ABDoctor) {
var doctorCategory = contact.DoctorCategory != null ? contact.DoctorCategory.DisplayName : "NOT set"
var doctorSpecialty = contact.DoctorSpecialty != null ? contact.DoctorSpecialty.DisplayName : "NOT
set"
print("Doctor category is " + doctorCategory + " and doctor specialty is " + doctorSpecialty + ".")
} else { //Requirement 1/E
print("Contact is NOT of the type " + ABDoctor.Type.DisplayName + ".")
}
Solution
1. Question: Navigate to the Summary page of the following contact: Eric Andy. On the Summary
page, what is the Public ID for Eric Andy? Go to the Bank accounts card on the Details page and
verify that the contact has 2 bank accounts: ACME Credit Union – checking and savings accounts.
ab:98
2. Question: Navigate to the Summary page of the following contact: William Andy. On the Summary
page, what is the Public ID for William Andy? Go to the Bank accounts card on the Details page and
verify that the contact has 2 bank accounts: SUCCEED Credit Union – checking and National Bank -
savings accounts.
ab:5
Solution
uses trainingapp.base.QueryUtil
if (person != null) {
print(person.DisplayName + " has " + person.BankAccounts.length + " bank accounts.")
if (person.BankAccounts.length > 0) {
print(person.DisplayName + " has: ")
} else {
print("No person found for PublicID: " + personID)
}
}
Gosu Rules
An insurance company wants to ensure that every ABDoctor has a value specified for the doctor specialty
field in the application. TrainingApp users can continue creating ABDoctors without specifying a doctor
specialty, but the application should automatically create a reminder for the users that they will have to
enter this information later.
The business analysts sent us the following wireframe and user story:
“Every time an ABDoctor entity is saved to the database (created or modified) and it doesn’t have a
specified doctor specialty, TrainingApp should create a new Flag Entry to notify the users.” – Insurance
company business analysts
In this exercise you will create a new Gosu Rule to implement this requirement. No Data Model or UI
changes are required to meet the requirement.
Prerequisites
For this exercise, use TrainingApp 10.0, Guidewire Studio 10.0, and a supported web browser.
http://localhost:8880/ab/ContactManager.do 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.
As a configuration developer, you want to be able to outline Gosu Rules based on generic business
requirements.
“Every time an ABDoctor entity is saved to the database (created or modified) and it doesn’t have a specified
doctor specialty, TrainingApp should create a new Flag Entry to notify the users.“ – Insurance company
business analysts
1. Question: Which one of the 3 Rule Set Categories in TrainingApp is the best to implement the
requirement: EventMessage, Preupdate or Validation?
Review
What is a Rule Set Category
A Rule Set Category is a collection of Rule Sets that have the following 2 things in common:
Review
What is a Rule Set?
A Rule Set combines many individual rules into a useful set to consider as a group. A Rule Set defines the root
entity type:
o All the Rules in the set will be attached to the same the triggering entity (root entity)
1.
2.
Stop
As a configuration developer, you want to create new Gosu Rules. In this exercise, you will first create a
preupdate rule that creates a flag entry for a contact of the type ABDoctor that does not have a defined doctor
specialty. Then, you will verify the execution of your rule.
Important!
Gosu Rules are within transaction scope. This means you don’t need to manually create, commit or rollback
transactions (bundles) in Gosu Rules. However, if an exception is raised in your Rule, then all the other
changes made by different Rules will be rolled back and the exception will propagate back to the caller (which
in this example is the UI).
Activity
Verify the work you have done
Stop
Solution
1. Question: Which of the 3 Rule Set Categories in TrainingApp is the best to implement the
requirement: EventMessage, Preupdate or Validation?
Preupdate
2. Question: Which existing Rule Set in the Rule Set Category will be used? What is the Root entity
type?
Solution
1. To create the rule, right click on the ABContactPreupdate Rule Set and select New Rule. Important:
make sure that you do not create the rule in the ABContactContactPreupdate because you will have to
delete and recreate it later.
2. Specify the rule name, then drag and drop it to the logically correct position between ABPU4000 -
Subtype ABLawFirm and Contact Created History Event rules.
Note: You also have the option to copy and paste it from below. However, it is recommended that you type the
code in based on the screenshot.
Important: please make sure that you copy and paste the sections individually without the parts highlighted in
dark gray.
USES:
uses gw.api.util.DateUtil
aBContact.addToFlagEntries(aFlagEntry)
END
Solution 2
Note: You could also use two rules (parent-child) to implement this requirement. Recall the benefit of this is that
the children can share the parent rule’s condition, so we don’t have to duplicate it.
Note: You also have the option to copy and paste it from below. However, it is recommended that you type the
code in based on the screenshot.
Important: please make sure that you copy and paste the sections individually without the parts highlighted in
dark gray.
USES:
END
Note: You also have the option to copy and paste it from below. However, it is recommended that you type the
code in based on the screenshot.
Important: please make sure that you copy and paste the sections individually without the parts highlighted in
dark gray.
USES:
uses gw.api.util.DateUtil
aBContact.addToFlagEntries(aFlagEntry)
END
Enhancements
At the insurance company, business requirements necessitate that all contacts of the type ABContact
should receive a courtesy call once every six months. This information needs to appear with contact
analysis details. In addition, business requirements require that there is easy way to upgrade contacts to
the level of strategic partner. We have just received the following wireframe and user stories from the
business analysts:
“At our insurance company, we want our end users to be able to see the recommended Next Courtesy
Contact date in the UI. This date should be calculated automatically and the users shouldn’t be able to edit
it. We also want the Strategic Partner field to be read-only because we want to automatically calculate the
customer rating when a contact a becomes a strategic partner. To achieve this, add a new button that will
calculate the customer rating and perform the upgrade.” – Insurance company business analysts
In this lab, you will create a Gosu enhancement for the ABContact entity and make related changes for
various PCF Files.
Prerequisites
For this exercise, use TrainingApp 10.0, Guidewire Studio 10.0, and a supported web browser.
http://localhost:8880/ab/ContactManager.do 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.
As a configuration developer, you want to use atomic widgets to display enhancement properties and to invoke
enhancement functions. In this exercise, you will modify the ABContactAnalysisDV.pcf file to display the value of
the getter property. Next, you will modify the ABContactAnalysisPage.pcf file. You will add a toolbar button to the
toolbar. You will configure the button to call the enhancement method.
Review
How to work with atomic widgets
Note: If needed, revisit the Atomic Widgets lesson for examples, tips and keyboard shortcuts.
1. Modify ABContactAnalysisDV
In Studio, open ABContactAnalysisDV.pcf.
Modify the Strategic Partner widget to be read-only.
To display Next Courtesy Contact, add the appropriate read-only input widget below Last Courtesy
Contact.
Create a displaykey for the widget's label property that reads Next Courtesy Contact.
Configure the widget to display the enhancement property value.
2. Modify ABContactAnalysisPage
In Studio, open ABContactAnalysisPage.pcf.
In the existing toolbar, add a toolbar button.
Create a displaykey for the button's label property that reads Upgrade to Strategic Partner.
Configure the toolbar button so that it calls the upgradeToStrategicPartner() method when clicked.
Configure the button so that it is only clickable when the contact is not a strategic partner and when the
page is in edit mode.
Hint
No special syntax is required to reference entity enhancement elements
Examples:
Guidewire API
Test if the Location is in edit more or not.
CurrentLocation is an implicit object that represents the currently displayed location in the browser and it is
available to use in every PCF file. You could use it to determine if the location - that the end user is looking at –
is in edit mode or read-only mode.
Syntax: CurrentLocation.InEditMode
This expression:
Guidewire API
Making a widget clickable or not clickable based on a condition
Most atomic widgets have the available property. This can be set to a Boolean expression which, if false,
grays out the widget and all its children. For example, to disable an action in read-only mode, you can set
available=CurrentLocation.InEditMode || <action-available-condition>
or
Activity
Verify the work you have done
Verify that the Next Courtesy Contact field shows a date that is six (6) months from today's date.
Solution
Create an enhancement for the ABContact entity that conveys that this enhancement relates to analysis.
if(this.LastCourtesyContact_Ext != null) {
nextCourtesyDate = this.LastCourtesyContact_Ext.addMonths(6)
}
return nextCourtesyDate
}
if (this.CustomerRating_Ext == null) {
this.CustomerRating_Ext = 25
} else if (this.CustomerRating_Ext >= 0 and this.CustomerRating_Ext <= 989.9) {
this.CustomerRating_Ext += 10
} else {
this.CustomerRating_Ext = 999.9
}
}
Solution
1. Modify ABContactAnalysisDV
In Studio, open ABContactAnalysisDV.pcf. Use CTRL + SHIFT + N shortcut in Studio to search for the
PCF file:
Add the appropriate read-only input widget below Last Courtesy Contact.
Create a displaykey for the widget's label property that reads Next Courtesy Contact.
Configure the widget to display the enhancement property value.
2. Modify ABContactAnalysisPage
In Studio, open ABContactAnalysisPage.pcf.
In the existing toolbar, add a toolbar button.
Create a displaykey for the button's label property that reads Upgrade to Strategic Partner.
Configure the toolbar button so that it calls the upgradeToStrategicPartner() method when clicked.
Configure the button so that it is only clickable when the contact is not a strategic partner and when the
page is in edit mode.
User Story: An insurance company wants to be able to "cascade" the ABCompany's email address to all
employees who do not have an individual email address.
Bug Description: This user story has already been implemented, but it is not working correctly. If I click on
the ‘Cascade Email Address’ button then the application cascades the company’s email address to all
employees and not only to the ones that do not have an email address already. This results in overriding
the person’s email address which is not the desired behavior. Please fix it ASAP.
Priority: High
Screenshots:
In this lab, you will debug a PCF method to identify a bug. Then, you will modify the PCF method and invoke
the code generation. Finally, you will deploy the fixed PCF file and re-test the user story.
Prerequisites
For this exercise, use TrainingApp 10.0, Guidewire Studio 10.0, and a supported web browser.
http://localhost:8880/ab/ContactManager.do 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.
Verify that Albertson’s has 4 employees as you can see it in Figure 1 above. Restore the development
database if Albertson’s has less than 4 employees or if all the employees have an email address.
From Studio, if your server is not already running, start the server using Debug 'Server'.
Review the Debug console for errors and verify that the application is running in the Debug console.
2. Locate the function called by the Cascade Email Address button
Log in to TrainingApp as Alice Applegate and go to the Details screen of Albertson’s.
Open the PCF file in Studio and identify the function specified in the action property of the Cascade Email
Address button.
1. Question: What is the name of the method called by the Cascade Email Address button?
2. Go to the function declaration and verify it is a PCF function. CTRL + Left click on the function name.
Verify that the Code tab opens in the PCF file
Guidewire API
The featured Guidewire API reference.
PCF methods are plain old Gosu functions defined in PCF files. The syntax is the same regardless where you
define the function (PCF file, Enhancement or Gosu class). However, the semantics is slightly different: a PCF
method…
o …is local (private) in the PCF file that defines it (not even referenced files can access it)
o …cannot be debugged at the place of definition (you have to open the generated
<PCFFileName>Expressions.gs file after code generation, locate the method and put a breakpoint
there)
o …is called from a widget property (e.g.: action, value, available, editable, etc.)
PCF methods are defined on the Code tab of the main PCF Element – container or location – and have direct
access to the root object(s).
Why would you write code in a PCF file as opposed to an Enhancement or Gosu class? Because the logic the
function implements is tied to one or more widgets in that PCF file and it is not needed anywhere else. For
example:
3. Open the appropriate Expressions.gs file and use the debugger to identify the issue
Use a breakpoint, the Variables pane and ‘Step over’ button
Stop
Reference
PCF file code generation
Remember, PCF files support both incremental and bulk code generation.
o Save the changed (CTRL + S) PCF file or select Build menu → Make the project to kick off incremental
code generation.
o Select CodeGen menu → Generate Page Configuration Classes or Build menu → Rebuild project to
kick off bulk code generation.
o The .gs file is a Gosu class that represents the PCF type.
o The .pcfc is a binary file that describes the PCF file for the new PCF runtime.
Kick off the code generation process by saving the file (CTRL + S).
Activity
Verify the work you have done
Stop
Solution
1. Question: What is the name of the method called by the Cascade Email Address button?
cascadeCompanyMainEmailAddress()
3. Open the appropriate Expressions.gs file and use the debugger to identify the issue
Use a breakpoint, the Variables pane and ‘Step over’ button
The highlighted line in the above screenshot will be executed, even though we can see that the
EmailAddress1 field of the oneEmployee is already set to [email protected]. Suggested
solution: put the line in an if statement and execute it only if the oneEmployee.EmailAddress1 is null.
Solution
You also have the option to copy and paste it from below. However, it is recommended that you type the code in.
function cascadeCompanyMainEmailAddress() {
for(oneEmployee in employees) {
if(oneEmployee.EmailAddress1 == null) {
oneEmployee.EmailAddress1 = companyMainEmailAddress
}
}
}
}
Tips
Important!
Semicolon is allowed but ignored
Compiler determines end of statements based on syntax, thus no terminator required. Semicolon is allowed but
ignored. The Guidewire recommendation is to NOT use semicolons. Guidewire also recommends using carriage
returns and white space to make it clear to others reading the code where a given statement ends.
Important!
Gosu is case sensitive
Refer to variables, types and symbols using the exact same case every time, otherwise the application won’t compile.
Hint
{ and }
In Gosu, each opening '{' must have a matching '}'. Moving the flashing cursor after the '{' or '}' highlights the pairs, so
it’s easier to identify any errors.
Hint
How can I easily determine the type of Gosu elements (variables, properties, function return types) in a
Gosu editor?
Hint
How can I use the code completion feature in a Gosu editor?
Move your flashing cursor after the dot character and hit CTRL + SPACE This will display the smart help. Typing will
filter and narrow the list of suggestions. Just hit enter to select the property or function from the list.
Basics
Primitive types cannot hold the null // declaring non-primitive with null
value. (null is a special value that value
means empty) var i2 : Integer = null
Primitive types can be coerced to
// non-primitive type is coerced to
non-primitive versions or back again
in Gosu. During the conversion the primitive type
null value will be converted to the // null value will be converted to 0
default value of the primitive type (0 i = i2
print("Hello World")
Print Important: never use it in
message production, use Loggers instead
print( message/value to
print)
lines
Multiple lines comment:
comment */
Highlight the text in Studio and use
the CTRL + SHIFT + / keystroke
//****Variable declaration****
Variable var variableName = var variableToStoreANumber : int
declaration initialValue var variableToStoreACharacterSequence
: String
var variableName : Type var anAdjudicator : ABAdjudicator
var anAddress : Address
var variableName : Type =
// Declaring a variable with type and
initialValue
initial value
var booleanVariable : boolean = true
// Declaring variables with initial
value - the type isn't required.
// Gosu is statically typed, but uses
type inference to eliminate the vast
majority of syntax
// overhead usually involved with
static typing
//a Number
var myVar = 5
//a String
var myStringVariable = "Hello World"
// Assigning new value to a variable
'=' is the assignment operator
myVar = 8
// Printing out the variable
print(myVar)
var numberA = 9
If-elseif-else There could be multiple else if var numberB = 7
statement statements.
if(numberA > numberB) {
print("NumberA is greater than
numberB")
if(condition) {
} else if(numberA == numberB) {
print("Number A and NumberB are
block of code
equal")
} else if(condition) { } else {
print("NumberA is less than
block of code numberB")
}
} else {
block of code
var numberA = 9
Ternary Similar to if-else, but can only return var numberB = 7
operator expressions and cannot execute
statements // Expressing the previous IF-ELSE
with the ternary operator: the true
condition ? valueiftrue : and false cases MUST return a value,
valueiffalse
cannot call void functions there,
e.g. print()
var result = numberA > numberB ?
"NumberA is greater than numberB" :
"NumberA is NOT greater than numberB"
print(result)
uses gw.api.util.StringUtil
Uses To use types and namespaces in uses gw.api.util.DateUtil
operator Gosu without fully qualifying the full uses gw.api.util.Math
class name including the package,
use the Gosu uses operator. var currentDate =
DateUtil.currentDate()
You can type in the class name and var randomNumber = Math.random(1000)
method and Studio will try to resolve var output =
the fully qualified name for you if the
StringUtil.formatDate(currentDate,
package or namespace has not been
already declared. Use ALT+ENTER to "YYYY-MM-DD")
see the Import Class options. if (randomNumber > 500) {
print (currentDate + " " +
randomNumber + " " + output )
}
ta.QueryUtil.findXXX(public anABContact =
ID) ta.QueryUtil.findPerson("ab:5")
var todayDate =
DateUtil.currentDate()
print(todayDate) // long format
print("Today is: " + todayDate) //
short format
print("Today is: " +
todayDate.toString()) // long format
// The printed format of typecodes
Working The application reformats typecodes and dates depends on how we print
with and dates when concatenated with a them (concatenating? DisplayName?
typecodes String. Code?)
and dates print(anABContact.PrimaryAddress.Stat
as string e) // long format
print(anABContact.PrimaryAddress.Stat
e.Code) // short format
print("This is the state of the
primary address: " +
anABContact.PrimaryAddress.State) //
short format
print("This is the state of the
primary address: " +
anABContact.PrimaryAddress.State.Disp
layName) // long format
var todayDate =
DateUtil.currentDate()
print(todayDate) // long format
print("Today is: " + todayDate) //
short format
print("Today is: " +
todayDate.toString()) // long format
// The following code can cause a
Null Safe variable?.method() NullPointerException if either the
invocation list or
// the first element in the list is
null. We can address this by
// using the null-safe invocation
operator ?.:
var aList :
java.util.LinkedList<String> = null
if(aList?.get(0)?.isEmpty()) {
print("The first string is empty")
}
Working Typekey fields are defined in ETI, Important: the following code is not
with EIX and ETX files. They always get complete and cannot be executed in Gosu
typekey their values from the associated Scratchpad as presented here.
fields typelist.
if(note.ContactNoteType ==
Testing for equality: ContactNoteType.TC_GENERAL) {
print("This is a general contact
entity.typekeyfield == note")
Typelist.TC_Typecode }
class Card {
Class A class is a template to create
definition objects. A class can have properties }
and functions. The class could
extend another class and implement
any number of interfaces.
class ClassName {
class Card {
Variables Instance variable definitions usually
start with _ var _suit : String
var _rank : String
The default visibility for instance var _isFaceUp : Boolean
variables is private
}
Visibility levels:
- private
- internal
- protected
- public
class Card {
Properties Note: Same syntax can be used in
Enhancements var _suit : String
var _rank : String
Getter: var _isFaceUp : Boolean
property get PropertyName()
property get Suit() : String {
: Type {
return this._suit
return }
this._propertyName
property set Suit( newSuiteValue :
} String ) {
this._suit = newSuiteValue
}
Setter: }
this._propertyName =
newValue
class Card {
Properties There is a shorter way to expose
shortcut properties using the as keyword var _suit : String as Suite
var _rank : String as Rank
var _isFaceUp : Boolean as IsFaceUp
class Card {
Read-only var _variableName : Type as
Properties readonly PropertyName var _suit : String as readonly
shortcut Suite
class Card {
Function function functionName(
[parameters] ) : returnType var _suit : String as Suite
{ var _rank : String as Rank
var _isFaceUp : Boolean as IsFaceUp
}
function turnFaceDown() : void {
Notes:
this._isFaceUp = false
- the same function syntax
}
can be used in }
Enhancements and PCF
files as well // Invoke a function
- void keyword is optional var king = new Card()
king.turnFaceDown()
- default visibility is public
}
class MyStringUtil {
Notes:
// Utility class
- the same function syntax
static function countSpaces(line:
can be used in String): int {
Enhancements and PCF var count = 0
for (ch in line) {
files as well if (ch == ' ') {
- void keyword is optional count++
}
}
return count
}
class Card {
Creating var variableName = new
and Type() { var _suit : String as Suite
initializing var _rank : String as Rank
new object :propertyName = var _isFaceUp : Boolean as IsFaceUp
initialValue,
function turnFaceDown() : void {
:propertyName =
initialValue,… this._isFaceUp = false
}
}
}
heartKing.turnFaceDown()
aBContact.addToContactNotes(note)
Example List
TrainingApp has at least one example of virtually every objective in the InsuranceSuite 9.0 Fundamentals –
Kickstart and InsuranceSuite 9.0 Fundamentals – Essentials courses. To find an example of a specific type of
configuration, in Settings, select Example List. The Example List page organizes examples alphabetically
within a functionality group: Data Model, User Interface, Gosu, and Cross-Section Functionality.
Gradle
Gradle
Gradle is an open source build automation system based on a Groovy DSL (Domain Specific Language). It is a
very flexible general purpose build tool. Gradle has three phases of build development: initialization,
configuration and execution. You can add source sets and add dependency configurations easily. Gradle
supports incremental builds. It intelligently determines which parts of the build tree are up-to-date so that any
tasks dependent upon those parts will not need to be re-executed.InsuranceSuite 9.0 applications implement
the Gradle wrapper. The Gradle wrapper executes the required Gradle build on machines where Gradle is not
installed. Using the Gradle wrapper enforces the usage of a particular Gradle version thus minimizing support
issues.
Read me: All the commands below should be executed from Command Prompt (Command line) pointing to the
project root. Follow these steps to quickly open a command prompt from the project root: SHIFT + right click on
C:\GW9\TrainingApp and select ‘Open command window here’ from the context menu. This works the
same way in all the other Guidewire InsuranceSuite 9.0 applications (PolicyCenter, BillingCenter, ClaimCenter
and ContactManager).
Studio productivity
Studio
Keystroke Description
SHIFT + SHIFT Search Everywhere – Guidewire Studio makes it possible to look for any item of the
(double shift) source code in a single action. In the popup window that opens, start typing the search
string to narrow the suggestion list. It is also possible to configure the scope of the
search everywhere. In the dialog, click the gear. Turn on or off the desired search
scopes.
CTRL + SHIFT + N To open any file in the editor quickly. (Navigate to file)
CTRL + SHIFT + F To initiate a text search in the specified path. (Find in path)
CTRL + Q Shows the Gosu documentation of a function or property. Use it when the cursor is
flashing between two letters in the function/property name.
Guidewire Application
Application URL
TrainingApp http://localhost:8880/ab
BilingCenter http://localhost:8580/bc
ClaimCenter http://localhost:8080/cc
ContactManager http://localhost:8280/ab
PolicyCenter http://localhost:8180/pc
These shortcuts and tools are in the platform, thus they work in all of the Guidewire InsuranceSuite
9.0 applications. (PolicyCenter, BillingCenter, ClaimCenter and ContactManager)
Read me: Use this shortcuts in the browser! These keystrokes work only if the
EnableInternalDebugTools parameter is set to true in the config.xml file.
Keystroke Description
ALT + SHIFT + To reload PCF and displaykey changes without restarting the Server
L
If you are running an open application project in Guidewire Studio and if internal tools are
enabled, you can reload all the page configuration files and display keys for the server.
Important: If you reload PCF files while in edit mode, you may experience unpredictable
results. For the current location, where there is a data modification in progress, the new
PCFs may not be reloaded. Therefore, Guidewire recommends reloading PCF files while
in read-only mode as it provides for more predictable results.
You can perform different development tasks from the Internal Tools tab (important: this
should be disabled in production!)
Data Model
ETI A single Guidewire or custom entity declaration from New custom ETI file names should end
scratch. The name of the file corresponds to the name of with a suffix. E.g.:
the entity being declared. This entity could be a top-level
entity or a subtype. Interaction_Ext.eti, MedicalCase_Ext,
PhoneCall_Ext, etc
EIX A single Guidewire entity extension. The name of the file EIX files neither created nor modified by
corresponds to the name of the Guidewire entity being configuration developers.
extended.
ETX A single Guidewire or custom entity extension. The name An ETX file has the exact same name
of the file corresponds to the name of the entity being as the entity (ETI file) that it extends.
extended. E.g.: ABContact.eti + ABContact.etx,
Claim.eti + Claim.etx
Base application entities are read-only to prevent any
conflicts during upgrade to the next version of the Fields in the ETX file should end with a
Guidewire application. The concepts of an Entity suffix. E.g.: WebAddress_Ext,
extension allows customers to safely add new fields to IsStrategicPartner_Ext fields in
base application entities or to override certain attributes of ABContact.etx
existing base application entity fields. An entity can have
at most 1 ETX file.
These elements could be used in the ETI or ETX files to define new data fields or relationship
fields in the entity.
<column> Defines a field that stores a single data value. If the datatype is varchar, the <column>
must have a <columParam> subelement
to specify the size.
<array> An array defines a set of additional entities of An array requires a reverse foreignkey
the same type to associate with the main because the array is virtual and
entity. maintained in code. The code assembles
the array by executing queries against
The application automatically generates the database. In order to do this, the
addToArrayName(newObject) and application must be able to query for all
removeFromArrayName(object) functions members of a given array. It can do this
on the parent entity to add and remove only if each member has a foreign key
elements. referencing its parent.
<typekey> A typekey field is an entity defined field It is often rendered as a dropdown in the
associated with a specific typelist. Referenced UI.
typelist contains typecodes whose values are
the only possible value for the typekey field. A <typekey> can have <typefilter>
typekey can point to exactly one value in a associated to it. A typefilter further limits
typelist. the set of possible values for the
typekey. It allows the typekey to get its
possible values only from a specific
subset of all the typelist values.
<column- It allows configuration developers to override It can override the following attributes:
override> certain data fields on read-only base createhistogram, default, nullok, size,
application entities (defined by the <column> supportsLinguisticSearch, type.
element). It can only be used in ETX files.
The overridden attribute should be less
restrictive, otherwise it would result in
potential data loss. If the overridden
attribute is more restrictive then typically
the database table structure needs to be
updated manually.
This table helps you identify the correct atomic widget type based on the data type of the field.
The third column also tells you what should be specified as the value in the valueType attribute
of the atomic widget.
TypeKey Input
typekey TypeKey Cell typekey.TypelistName
TypeKey Radio Button Input
This table summarizes the main characteristics of the different locations. Locations define the
navigation. Every Location has at least one entrypoint that defines the required input parameters
for the location.
Location
collection of Pages go() First child Page Screen area
Group
push()
In InsuranceSuite 9.0, Guidewire Studio makes the process of code generation explicit and the generated
code itself accessible. Internal code generators process resources like PCFs, entities and typelists in order to
produce Gosu and Java classes.
There are two types of code generators: incremental and bulk. Both are supported, but incremental code
generation is not an option for all resource types.
Incremental code generators process one or more changed resources files in isolation without the need to
read all similar resources.
Bulk code generators cannot process individual resources files in isolation from the whole set. Bulk code
generators are invoked explicitly and, to process the set of resources as a whole, they take longer.
From Codegen menu You can invoke individual code generators Invoked this
using one of the menu items. Studio way, all code
reports any errors in the Codegen tool generators run
window. in bulk mode,
meaning
Studio
processes all
the relevant
resources.
During project rebuild Studio invokes the code generators in bulk Bulk mode
mode on all resources. Studio reports
errors in the Messages tool window.
For Data Model entities only you can also click on the validate icon. This invokes Only an
the associated incremental
code code
generator for generator is
the current invoked for the
entity. Studio open entity.
reports any
errors in the
Codegen tool
window.
PCF files Studio supports incremental The code generation of the PCF files results in the
code generation for PCF files. following:
ETI / ETX / TTI / TTX Studio supports incremental For all Entities and Typelists Studio generates Java
files code generation for Entities classes.
and Typelists.
XSD / WSDL and GX Studio performs bulk code Studio creates Java classes in schema-dependent
Model files generation for XSD / WSDL packages.
and GX Model files.
Deployment
Guidewire Studio’s incremental and bulk code generation plays a significant role in how developers prepare to
deploy resources in a local development environment. Code generation creates the classes required for
compilation and runtime.
Deploying Gosu changes in a local development environment, only works if the DCEVM (Dynamic Code
Evolution Virtual Machine) is installed on your development machine.
How to restore the database? The database becomes corrupted if the database upgrade fails for any reason.
This will prevent the server from starting. In development environments it is usually safe to just simply drop the
database and restore it to its initial state. Remember, if you drop the database you just only loose the data
(contacts that you might have created) and not your configuration. Your database configuration is in the Data
Model, defined by the entities and typelists.
Server fails to start/restart and server logs shows error message: java.net.BindException:
Address already in use: bind
You have been waiting forever for the server log to show the **** [ApplicationName] ready **** message?
Sometimes the server doesn’t start/restart successfully. This could be because of any configuration error in the
project; or because there is another server instance already running.
If you see multiple lines starting with the ‘at’ word in your server log, that means there was an error. For
example:
First, always make sure that you can see enough information in your server log to be able to correctly identify
the issue. You can always just simply resize the Debug tool window by hovering over the top and dragging it.
Then start scrolling up in the server log, to the line just right before the first ‘at …..’. That line identifies the
issue. For example, in our case it’s a java.net.BindException: Address already in use: bind:
This usually means another server instance is already running. Notice that on the left hand side the resume,
pause and stop icons are inactive, indicating that the server didn’t start.
Also notice there are two server tabs at the top of the Debug window! Select the first tab, and you will see that
the icons on the left hand side are active:
This means a server instance is already running from Studio. Click on the stop button to stop it and then you
will be able to start the server the usual way.
Note: The second server tab (failed) stays open even after successfully restarting the server. To avoid
confusion in the future, just right click on the second tab and select Close tab.
(Sometimes the same error could happen if a third party software is blocking the same port. If that is the case,
please ask your Guidewire Instructor to help you.)