03-TA80 CONF030 ExtendingEntities
03-TA80 CONF030 ExtendingEntities
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
• Entity Editor
© 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)
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
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 8
Lesson outline
• Entity Editor
© 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
© 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
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 11
Entity editor: Element tree pane
© 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
• Entity Editor
© 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
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 18
Step 2: Add elements and define attributes
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 19
Add subelements
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 21
Validate the schema
• Click Validate in the toolbar
© 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
• 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
• Entity Editor
© 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)
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 28
Step 2: Create an entity extension file (2)
© 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
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 30
Step 3: Add elements and define attributes
© 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
• 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?
© Guidewire Software, Inc. 2001-2013. All rights reserved. Do not distribute without permission. 36
Notices
Copyright © 2001-2013 Guidewire Software, Inc. All rights reserved.
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