Including data from subentities

Many times, you want to include information from subentities of the current entity in its Entity Name. For example, this happens often with Contacts related to the current entity. Guidewire recommends that you do one of the following to include data from a subentity. (The two options are mutually exclusive. You must do one or the other.)

Option 1: Use the DisplayName for a subentity

To use the DisplayName value for a subentity, you must set the value of Use Entity Name to true on the variable definition. For example, for Contacts, you must set the value to true through an explicit Denorm column, such as Exposure.ClaimantDenorm.

To illustrate:

Name

Entity Path

Use Entity Name?

claimantDisplayName

Exposure.ClaimantDenorm

true

incidentDisplayName

Exposure.Incident

true

Option 2: Reference fields on the subentity

It is possible that you do not want to use the Entity Name as defined for the subentity's type. If so, then you need to set up variables in the table to obtain the fields from the subentity that you need. To illustrate:

Name

Entity Path

Use Entity Name?

claimantFirstName

Exposure.ClaimantDenorm.FirstName

false

claimantLastName

Exposure.ClaimantDenorm.LastName

false

severity

Exposure.Incident.Severity

false

incidentDesc

Exposure.Incident.Description

false

You can then use these variables in Gosu code (in the text editor) to include the Claimant and Incident information in the entity name for Exposure.

Guidewire recommendations

Do not end an Entity Path value with an entity foreign key, without setting the Use Entity Name value to true. Otherwise, PolicyCenter loads the entire entity being referenced into memory. In actuality, you probably only need a couple fields from the entity to construct your entity name. Instead, you one of the approaches described in one of the previous steps.

Denormalized columns

Within the PolicyCenter data model, it is possible for a column to end in Denorm for (at least) two different reasons:

  • The column contains a direct foreign key to a particular Contact (for example, as in Claim.InsuredDenorm.)
  • The original column is of type String and the column attribute supportsLinguisticSearch is set to true. In this case, the denormalized column contains a normalized version of the string for searching, sorting, and indexing. Thus, the Contact entity definition uses LastNameDenorm and FirstNameDenorm as the sort columns in the definition for the Contact entity name. It then uses LastName and FirstName in the variables' entity paths for eventual inclusion in the entity name string.