0% found this document useful (0 votes)
166 views37 pages

03-TA80 CONF030 ExtendingEntities

The document discusses entity extensions in Guidewire applications. It explains the different types of entities, how to edit and create entity extensions, and how customer entity extensions work. The document also covers custom entities and how they relate to Gosu classes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
166 views37 pages

03-TA80 CONF030 ExtendingEntities

The document discusses entity extensions in Guidewire applications. It explains the different types of entities, how to edit and create entity extensions, and how customer entity extensions work. The document also covers custom entities and how they relate to Gosu classes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Extending Entities

December 20, 2013

© Guidewire Software, Inc. 2001-2013. All rights reserved.


Do not distribute without permission.
Lesson objectives
• By the end of this lesson, you should be able to:
- Distinguish between platform, application, and customer entities
- Edit an entity extension
- Create an entity extension

This lesson uses the notes section for additional explanation and information.
To view the notes in PowerPoint, select View  Normal or View  Notes Page.
When printing notes, select Note Pages and Print hidden slides.
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 2
Lesson outline

• Base application entities

• Entity Editor

• Edit an entity extension

• Create an entity extension

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 3
Entities in applications
ClaimCenter PolicyCenter BillingCenter • Application
entities are
specific to
application
- Claim
Claim Policy Producer
- Policy
- Producer

• Platform
entities are
common to all
Guidewire
Activity User
applications
- Activity
- User
Guidewire Platform
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 4
Entity files
ClaimCenter PolicyCenter BillingCenter • Entities are
XML files
- Entity (ETI)
- Internal entity
extension (EIX)
- Entity extension
eti eti eti (ETX)

etx etx etx


• Revert to base
- base.zip
contains all
application and
platform files
eti eix
base.zip
Guidewire Platform
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 5
Customer entity extensions
ClaimCenter PolicyCenter BillingCenter • Customers can
create and edit
etx etx etx
entity extension
(ETX) files
Activity.etx Policy.etx Producer.etx

Claim Policy Producer • Application entity


extension
examples
- Policy.etx
- Producer.etx

Activity User
• Platform entity
extension
example:
- Activity.etx
Guidewire Platform
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 6
Custom entities and Gosu classes
configuration application server
ABContact ABContact
eti
ID Fields
Name ID
ABContact.eti FaxPhone Name
FaxPhone
WebAddress_Ext
WebAddress_Ext
etx ...

ABContact.etx

ab_abcontact
table row
database

anABContact
Coverage read from database instance
of Gosu
save to database class
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 7
Project view entity files
…\metadata\entity\ …\extensions\entity

• Read-only files • Editable files


eti eti
- Entity (ETI) - Entity (ETI)
- Internal entity eix - Entity extension etx
extension (EIX) (ETX)

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 8
Lesson outline

• Base application entities

• Entity Editor

• Edit an entity extension

• Create an entity extension

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 9
Entity editor
• View, define and edit an
entity, entity extension, or
internal entity extension
- \extensions\entity\
- ETI and ETX files
- \metadata\entity\
- ETI and EIX files

• View file as XML


• Consists of
- Editor toolbar
- Element tree pane
- Attribute pane

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 10
Entity editor: Toolbar reference

Icon Description
Edit Add an element; Drop-down list is schema aware

Duplicate selected element


Delete selected element
Override selected element
View Filter elements by file
Actions

Persist sort order


Collapse nested elements
Expand nested elements

Navigate Navigate to supertype and/or subtype


Click link to navigate to extension

Validate Validate entity

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 11
Entity editor: Element tree pane

• Displays hierarchy of XML elements


- Elements merged from underlying
base entity are read-only
- Sortable columns

• Context menu is schema aware


- Add new elements as siblings and children
- Remove, cut, copy, and paste elements
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 12
Adding elements
• Toolbar • Context menu
- Select option in dropdown - Add new…
- Click + to add more of same - Select option in menu

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 13
Common elements to add
• Common elements for
entity extension, entity,
subtype, subtype extension
are:
- <array …/>
- Define array entity and field
- <column …/>
- Define data field with defined
data type
- Bit, datetime, integer, varchar
- <foreignkey …/>
- Define foreign key field and
entity
• Xml tab shows read-only - <typekey …/>
view of elements - Define typekey and related
typelist
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 14
Entity editor: Attribute pane
• Name Value columns
- For selected element, define
attributes
• Schema aware values
- Boolean controls
- Dropdown lists

• Attribute styling
- Bold for required; Black for
editable
- Grayed-out for non-editable
- Overridden, Inherited,
Internal, Default
• Set nullok= true in most
cases as default is false
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 15
Lesson outline

• Base application entities

• Entity Editor

• Edit an entity extension

• Create an entity extension

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 16
Steps to edit an entity extension
1. Navigate to the entity extension
2. Add elements (and subelements) and specify attribute
values
3. Optionally regenerate the dictionary
4. Deploy the extension entity

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 17
Step 1: Navigate to the entity extension

• Navigate to an entity in …\Extensions\Entity\


- Project View or using CTRL+N

• Verify that you have


selected an
entity extension file (ETX)
- Top element reads entity (extension)
- XML is <extension />

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 18
Step 2: Add elements and define attributes

• Toolbar to add an element for a field, e.g., <column />


• Define element attributes
- Name is the name of the field; Use _Ext for field name ending
- Type is the data type
- Nullok defaults to false, so set to true in most cases

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 19
Add subelements

• Use the toolbar to add a columnParam


- Some elements require subelements based on the element and
attribute definition and in many cases the subelments are optional
- Add columnParam child element to a column of type varchar to
specify size, e.g., varchar(60)
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 20
Column and columnParam
Strings Decimal numbers

• Columns used to store • Columns used to store


Strings numbers with decimal
• Declare type as varchar values
• Requires column parameter • Declare type as decimal
- Size defines length of the • Requires two column
string in characters parameters
- Precision is the total length of
decimal
- Scale is the number of digits
right of the decimal point

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 21
Validate the schema
• Click Validate in the toolbar

• Red highlight indicates schema violation warning


• Schema violations explained in pane below editor

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 22
Step 3: Optionally regenerate dictionary
• gwXX regen-dictionary
• Process builds entire entity model including base and
custom entities
• Identifies errors in the data model beyond Entity Editor
schema validation

C:\Guidewire\TrainingApp\bin>gwta regen-dictionary
regen-entity-model-xml:
====================================================
= Running main class:
com.guidewire.tools.dictionary.data.EntityModelXmlTool
[java] --- Guidewire Entity Model In Xml ---

ERROR Errors found in ABContact
ERROR Attribute 'value' in element 'columnParam' is required.
ERROR ColumnIsValid - The column "WebAddress_Ext" on entity
"ABContact" declares an invalid data type, "varchar". null

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 23
Step 4: Deploy the entity extension
Restart Server • bin command window
- gwXX dev-stop

• Entity Extension - gwXX dev-start

• Or, Guidewire Studio


- Run  Stop
- Run 'Server' or Debug 'Server'

• During start-up
- If autoupgrade=true in
database-config.xml, then
Guidewire attempts to
etx upgrade the database
according to the changes in
the data model
Entity Extension

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 24
Lesson outline

• Base application entities

• Entity Editor

• Edit an entity extension

• Create an entity extension

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 25
Steps to create an entity extension
1. Navigate to the entity
2. Create an entity extension file
3. Add elements (and subelements) and specify attribute
values
4. Optionally regenerate the dictionary
5. Deploy the extension entity

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 26
Step 1: Navigate to the entity (1)

• Navigate to an entity in …\Metadata\Entity\


- Project View or using CTRL+N

• Studio will open an existing extension first


- If an existing extension already exists, STOP
- Do NOT create a new extension; edit existing extension instead!

• Verify that you have selected an entity file (ETI)


- Not EIX or ETX
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 27
Step 2: Create an entity extension file (1)
• Project View  Context menu  New  Entity Extension
• Do NOT enter filename suffix; Click OK

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 28
Step 2: Create an entity extension file (2)

• Unable to click OK? Click Cancel


- Grayed out path shows that an entity extension (ETX) file already
exists!
• Navigate to the entity (CTRL+N)
- Studio automatically opens the extension file first!
- Edit the extension in the Entity Editor

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 29
Step 2: Create an entity extension file (3)
• For an entity (ETI) in …\Extensions\Entity\
- NOT possible to create
entity extension (ETX)
- Edit the ETI file directly
in the Entity Editor

• For an entity extension (ETX) in …\Extensions\Entity


- Do NOT create an
extension for an extension
- Click Cancel
- Edit the ETX file directly
in the Entity Editor

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 30
Step 3: Add elements and define attributes

• Toolbar to add an element for a field, e.g., <column />


• Define element attributes
- Name is the name of the field
- Use _Ext for field name ending
- Type is the data type
- Nullok defaults to false, so set to true in most cases
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 31
Validate the schema
• Click Validate in the toolbar

• Red highlight indicates schema violation warning


• Schema violations explained in pane below editor

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 32
Step 4: Optionally regenerate dictionary
• gwXX regen-dictionary
• Process builds entire entity model including base and
custom entities
• Identifies errors in the data model beyond Entity Editor
schema validation

C:\Guidewire\TrainingApp\bin>gwta regen-dictionary
regen-entity-model-xml:
====================================================
= Running main class:
com.guidewire.tools.dictionary.data.EntityModelXmlTool
[java] --- Guidewire Entity Model In Xml ---

ERROR Errors found in OfficalID
ERROR NoTwoColumnsWithTheSameName property "IsValidOfficialID_Ext"
found for entity "OfficialID"

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 33
Step 5: Deploy the entity extension
Restart Server • bin command window
- gwXX dev-stop

• Entity Extension - gwXX dev-start

• Or, Guidewire Studio


- Run  Stop
- Run 'Server' or Debug 'Server'

• During start-up
- If autoupgrade=true in
database-config.xml, then
Guidewire attempts to
etx upgrade the database
according to the changes in
the data model
Entity Extension

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 34
Lesson objectives review
• You should now be able to:
- Distinguish between platform, application, and customer entities
- Edit an entity extension
- Create an entity extension

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 35
Review questions
1. How many ETX files can a given entity have?
2. What is the primary element of an ETX file?
3. What datatype do you enter for fields that will store….
a) String values?
b) Boolean values?
c) Numbers with decimal values?

4. Which datatypes require columnParam subelements?


5. Under what circumstances would you want to regenerate
the Data Dictionary?
6. When does a Guidewire application actually modify the
physical structure of the database?

© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 36
Notices
Copyright © 2001-2013 Guidewire Software, Inc. All rights reserved.

Guidewire, Guidewire Software, Guidewire ClaimCenter, Guidewire PolicyCenter,


Guidewire BillingCenter, Guidewire Reinsurance Management, Guidewire
ContactManager, Guidewire Vendor Data Management, Guidewire Client Data
Management, Guidewire Rating Management, Guidewire InsuranceSuite, Guidewire
ContactCenter, Guidewire Studio, Guidewire Product Designer, Guidewire Live, Guidewire
ExampleCenter, Gosu, Deliver Insurance Your Way, and the Guidewire logo are
trademarks, service marks, or registered trademarks of Guidewire Software, Inc. in the
United States and/or other countries. Guidewire products are protected by one or more
United States patents.

This material is Guidewire proprietary and confidential. The contents of this material,
including product architecture details and APIs, are considered confidential and are fully
protected by customer licensing confidentiality agreements and signed Non-Disclosure
Agreements (NDAs).

This file and the contents herein are the property of Guidewire Software, Inc. Use of this
course material is restricted to students officially registered in this specific Guidewire-
instructed course, or for other use expressly authorized by Guidewire. Replication or
distribution of this course material in electronic, paper, or other format is prohibited without
express permission from Guidewire.
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 37

You might also like