InsuranceNow
Developer Guide
Your complete practical reference for implementing InsuranceNow configurations. Decision maps, file references, Velocity patterns, and real-world scenarios with solutions.
Everything boils down to one question: "What is the business asking for, and what part of the system controls that?"
| If the requirement is about⦠| Category | Go to |
|---|---|---|
| New fields, dropdowns, tabs, labels, tiles on screen | UI | list.xml / .html tile / tab.xml / sp-policy.xml |
| Who can add, edit, view, approve something | Security | authority-set.xml + authority-role.xml |
| Blocking users, warning users, requiring approval | Rules | validation.vtl / approval.vtl |
| New forms, auto-attaching forms, printing data | Forms | form.xml / form-selection.vtl / section.vtl |
| Tasks, notifications, inbox items, workflow | Workflow | task.xml / review.vtl / TaskTemplateIdRef |
| Coverages, cancellation, AI types, questions, payment plans | Product | sub-type.xml / state.xml / ai.xml / question.xml |
| What You Want to Do | File to Change | Location |
|---|---|---|
| UI / SCREEN CHANGES | ||
| Add a dropdown value | list.xml |
β¦/ca/v01_00_00/ or β¦/cw/v01_00_00/ |
| Add a new field to screen | valuation.html (or relevant .html tile) |
β¦/homeowners/model/tileset/tile/ |
| Store new field in database | sp-policy.xml + dto-sp-policy.xml |
β¦/homeowners/model/bean/ |
| Add a new navigation tab | tab.xml |
β¦/iic/homeowners/ca/v01_00_00/ |
| Add a new note type | note.xml |
β¦/uw/quote/model/template/ or β¦/uw/app/model/template/ |
| Add an attachment type | attachment.xml |
β¦/uw/quote/model/template/ |
| Register note/attachment to product | template.xml |
β¦/homeowners/cw/v01_00_00/ |
| SECURITY / AUTHORITY | ||
| Define a new permission | authority-set.xml |
β¦/common/shared/model/template/ |
| Set who gets the permission | authority-role.xml |
β¦/common/shared/model/template/ |
| BUSINESS RULES | ||
| Block user (ERROR) | validation.vtl |
β¦/homeowners/ca/v01_00_00/rule/ |
| Warn user (WARNING) | validation.vtl |
β¦/homeowners/ca/v01_00_00/rule/ |
| Require approval (APPROVAL) | approval.vtl |
β¦/homeowners/cw/v01_00_00/rule/ |
| Auto-attach forms based on data | form-selection.vtl |
β¦/homeowners/ca/v01_00_00/rule/ |
| FORMS & DOCUMENTS | ||
| Register a form exists | form.xml |
β¦/homeowners/cw/v01_00_00/ |
| Define how form renders | form.xml |
β¦/uw/policy/model/template/ |
| Create form data trigger file | myform.vtl (doc) |
β¦/uw/policy/model/formset/doc/ |
| Create form data mapping | myform.vtl (section) |
β¦/uw/policy/model/formset/section/ |
| WORKFLOW / TASKS | ||
| Define a new task type | task.xml |
β¦/uw/quote/model/template/ or β¦/uw/app/model/template/ |
| Auto-create task on event | TaskTemplateIdRef on attachment |
attachment.xml |
| Change task name/description | task.xml |
Find existing bean, edit Name and Description |
| PRODUCT CONFIGURATION | ||
| New coverage (UW policy) | sub-type.xml |
β¦/homeowners/ca/v01_00_00/ |
| New coverage (Claims) | line.xml |
β¦/claims/β¦/homeowners/ca/v01_00_00/ |
| Cancel / non-renewal reasons | state.xml |
β¦/homeowners/ca/v01_00_00/ |
| Additional interest types | ai.xml |
β¦/homeowners/ca/v01_00_00/ |
| Underwriting questions | question.xml |
β¦/homeowners/ca/v01_00_00/ |
| Payment plans | term.xml + .payplan.xml |
β¦/ca/v01_00_00/ + β¦/ar/model/payplan/ |
β Yes:
sp-policy.xml + dto-sp-policy.xml + .html tileβ Yes:
.html tile / tab.xml / list.xmlβ Block:
validation.vtl (ERROR)β Warn:
validation.vtl (WARNING)β Escalate:
approval.vtl (APPROVAL)β Yes:
authority-set.xml (define) + authority-role.xml (assign values)β Coverage:
sub-type.xmlβ Cancel:
state.xmlβ AI:
ai.xmlβ Questions:
question.xmlNever start from scratch. Always find the closest existing example in the file, copy it, and modify it for your requirement.
References (all start with $)
## Model Bean
$Application
## Bean + method call
$Application.gets("ApplicationNumber")
## Renderer
$ValidationRenderer
## Your own variable
$myPolicy
## Safe (silent on error)
$!insuredName
## Unsafe (prints error text)
$insuredName
Directives (all start with #)
## Set a variable
#set( $insured = $Application.getBean("Insured") )
## If statement
#if( $value == 'Yes' )
## do something
#elseif( $value == 'No' )
## do something else
#else
## fallback
#end
## Loop through a list
#foreach( $risk in $risks )
$risk.gets("Description")
#end
## Single line comment
## This won't appear in output
## Multi-line comment
#*
This entire block
is a comment
*#
Operators
## AND
$a && $b
## OR
$a || $b
## Equals (use for strings)
$a.equals("value")
## Equals (case insensitive)
$a.equalsIgnoreCase("value")
## NOT
!$a
## Empty check
$a.equals("")
## Compare numbers (use StringRenderer!)
$StringRenderer.greaterThan($a, "500000")
$StringRenderer.lessThan($a, "1000")
Coding Standards
## Naming: beans = PascalCase
$BasicPolicy, $InsuredName
## Naming: your variables = camelCase
$myPolicy, $riskBuilding
## File names: lower-case-with-dashes
ca-homeowners-validation.vtl
## Reset loop variables before loop
#set( $limit = "" )
#foreach( $cov in $coverages )
## process
#end
## Use ## instead of blank lines
##
##Check roof type
#set( $roof = $building.gets("RoofCd") )
Model Beans are the data objects in InsuranceNow. Think of them as a filing cabinet β beans are the drawers, and methods are the handles to open them. Hierarchy Search = searches entire tree. Child Search = searches only direct children.
## Get a string field value
$BasicPolicy.gets("PolicyNumber")
## Get with default if null
$BasicPolicy.gets("PolicyNumber", "Not Found")
## Get a date field
$BasicPolicy.getDate("EffectiveDt")
## Get an integer
$BasicPolicy.getValueInt("RenewedFromPolicyRef")
## Get first child bean by name
$Application.getBean("BasicPolicy")
## Get bean matching field value
$Policy.getBean("AI", "InterestTypeCd", "Mortgagee")
## Hierarchy search by field value
$Application.findBeanByFieldValue(
"Building", "BldgNumber", "1")
## Get parent bean
$coverage.getParentBean()
## Get all child beans by name
$Line.getBeans("Coverage")
## Get ALL descendants by name
$Application.getAllBeans("Risk")
## Find all matching field value
$Application.findBeansByFieldValue(
"Risk", "Status", "Active")
## Get beans sorted
$Line.getBeansSorted(
"Risk", "RiskNumber", "ascending")
## Get Building from Application
#set( $risk = $application.findBeanByFieldValue(
"Risk", "Status", "Active") )
#set( $building = $risk.getBean("Building") )
## Get Question Reply
#set( $reply = $application.getBean("QuestionReplies")
.getBean("QuestionReply", "QuestionName", "MyQ") )
#set( $answer = $reply.gets("ReplyText") )
## Get Coverage A Limit
#set( $covA = $application.getBean("Line")
.getBean("Coverage", "CoverageCd", "CovA") )
#set( $limit = $covA.gets("Limit1") )
| Renderer | What it does | Most Used Methods |
|---|---|---|
$ValidationRenderer |
Throw errors, warnings, approvals | addValidationError($app, "Validation", "ERROR", "msg") |
$UserRenderer |
Check user authority attributes | getAuthorityAttributeValue($user, "AttrId", $todayDt) |
$StringRenderer |
Format and compare text/numbers | formatMoney, formatDate, greaterThan, lessThan, isTrue, addMoney |
$NumberRenderer |
Precise decimal math | addBigDecimal, subtractBigDecimal, multiplyBigDecimal, roundToScale |
$DateRenderer |
Date calculations and comparisons | greaterThan, lessThan, diffDays, advanceDate, getAge |
$AddressRenderer |
Format addresses | buildAddress($addr, "Mailing", 3, 32) |
$CoverageRenderer |
Check and manage coverages | isActive($application, "CovA"), clearSystemCoverages |
$FormRenderer |
Attach/remove forms | attachForm($app, "IHO-11"), clearSystemForms, deleteClearedSystemForms |
$PrintRenderer |
Control print output | setForm("my-form"), section("UWPolicy::formset::section::my.vtl") |
$AIRenderer |
Manage Additional Interests | getAdditionalInterest($app, "Mortgagee"), getActiveAdditionalInterests |
$WorkflowRenderer |
Manage tasks | createTask($data, "TaskId", $app), updateTaskStatus |
$BeanRenderer |
Advanced bean searches | findBeanByFieldValueAndStatus, sortBeans |
$ClaimRenderer |
Basic claim info | getClaimNumber, getOpenClaimants, isAClaim, isALossNotice |
$ClaimantTransactionRenderer |
Claims financial details | getFeatures, hasFeature, getFeatureLimits, getReserves, sumPaidAmt |
Error Types Reference
$ValidationRenderer.addValidationError(
$application,
"Validation",
"ERROR",
"Year Built is required"
)
$ValidationRenderer.addValidationError(
$application,
"Validation",
"WARNING",
"Property is older than 75 years"
)
$ValidationRenderer.addValidationError(
$application,
"Approval",
"APPROVAL",
"Bungalows must be approved"
)
| ERROR | validation.vtl |
| WARNING | validation.vtl |
| APPROVAL | approval.vtl |
- UI change β adding a value to a dropdown
- CA-specific β use the CA folder's list.xml, not countrywide
- Find existing
roof-typecoderef and add new option inside it
<coderef name="roof-type">
<options key="all">
<!-- existing options stay -->
<option name="Thatch" value="Thatch"/>
<option name="Woodshake" value="Woodshake"/>
<option name="Shingle" value="Shingle"/>
<option name="Asphalt" value="Asphalt"/>
<!-- NEW option -->
<option name="Cedar Shake" value="CedarShake"/>
</options>
</coderef>
- Restart server
- Open CA Homeowners quote β Dwelling tab
- Check Roof Type dropdown β "Cedar Shake" should appear
- New data to store β sp-policy.xml + dto-sp-policy.xml
- New field on screen β valuation.html tile
- Yes/No dropdown already exists in system as UW::underwriting::yes-no::all
- Restart required because data model changes need server restart
<Class name="Building" extends="Building">
<!-- existing fields stay untouched -->
<Field name="SecuritySystemInd" type="String">Security System Indicator</Field>
</Class>
<Class name="DTOBuilding" extends="DTOBuilding">
<!-- existing fields stay untouched -->
<Field name="SecuritySystemInd" type="String">Security System Indicator</Field>
</Class>
<tr>
<td class="label">
<span>Security System</span>
</td>
<td>
<select data-bean="Building"
data-field="SecuritySystemInd"
data-list="UW::underwriting::yes-no::all">
<option value="">Select...</option>
</select>
</td>
</tr>
UW::underwriting::yes-no::all is a standard Yes/No list already in the system. You don't need to create it.
- Restart server (model bean changes ALWAYS require restart)
- Open CA Homeowners quote β Dwelling tab
- Verify "Security System" dropdown appears
- Select "Yes" β Save β Re-open β Verify it saved correctly
- WARNING β user can continue β validation.vtl
- Get Year Built field from Building bean
- Use StringRenderer.lessThan to compare numbers (never use < directly on strings)
- Check the field isn't empty first before comparing
##Check for old property
#set( $risk = $application.findBeanByFieldValue("Risk", "Status", "Active") )
#set( $building = $risk.getBean("Building") )
#set( $yearBuilt = $building.gets("YearBuilt") )
#if( !$yearBuilt.equals("") )
#if( $StringRenderer.lessThan($yearBuilt, "1950") )
$ValidationRenderer.addValidationError($application, "Validation", "WARNING",
"Property is older than 75 years β inspection may be required")
#end
#end
- Restart server
- Open CA Homeowners quote β Enter Year Built = 1940 β Save
- Verify orange WARNING appears at top of screen
- Verify you can still click Issue (WARNING doesn't block)
- ERROR β blocks completely β validation.vtl
- Use equalsIgnoreCase to avoid case sensitivity issues
- The value in data will be the value= attribute from list.xml, not the display name
##Check for ineligible roof type
#set( $risk = $application.findBeanByFieldValue("Risk", "Status", "Active") )
#set( $building = $risk.getBean("Building") )
#set( $roofType = $building.gets("RoofCd") )
#if( $roofType.equalsIgnoreCase("Thatch") )
$ValidationRenderer.addValidationError($application, "Validation", "ERROR",
"Thatch roofs are not eligible for coverage")
#end
The value stored in the database is the value= attribute from list.xml, NOT the display name=. So if your list has value="Thatch", compare against "Thatch" not "Cedar Shake".
- Restart server
- Open CA Homeowners quote β Select Roof Type = Thatch β Save
- Verify RED ERROR appears
- Verify you CANNOT click Issue β button is blocked
- APPROVAL rule β approval.vtl
- Need new authority attribute β authority-set.xml
- Set values per role β authority-role.xml
- Both conditions must be true: CovA > 500000 AND user does NOT have authority
<!-- Add inside PolicyApprovals AuthorityAttributeSet -->
<AuthorityAttribute id='ApproveLargeHome'
Name='Approve Large Home Coverage A'
Description='Allow user to issue policies with Coverage A over $500,000'
AttributeTypeCd='Rule'
DataTypeCd='YesNo'
DefaultValue='No'/>
<!-- Inside PolicyAgent AuthorityRoleSet for PolicyApprovals -->
<AuthorityRoleAttribute AuthorityAttributeIdRef='ApproveLargeHome' Value='No'/>
<!-- Inside PolicyUnderwriter AuthorityRoleSet for PolicyApprovals -->
<AuthorityRoleAttribute AuthorityAttributeIdRef='ApproveLargeHome' Value='Yes'/>
## At TOP of file β declare authority attribute
#set( $approveLargeHome = $UserRenderer.getAuthorityAttributeValue(
$user, "ApproveLargeHome", $todayDt) )
##
##Check for large Coverage A
#set( $covA = $application.getBean("Line").getBean("Coverage", "CoverageCd", "CovA") )
#set( $covALimit = $covA.gets("Limit1") )
#if( !$covALimit.equals("") )
#if( $StringRenderer.greaterThan($covALimit, "500000")
&& $approveLargeHome.equalsIgnoreCase("No") )
$ValidationRenderer.addValidationError($application, "Approval", "APPROVAL",
"Coverage A over $500,000 requires underwriter approval")
#end
#end
- Restart server
- Log in as agent β Create quote β Set CovA = $600,000 β Try to issue
- Verify "Submit for Approval" button appears instead of "Issue"
- Log in as underwriter β Approve it
- Log back as agent β Verify policy can now be issued
- New note type β note.xml in BOTH quote and app folders
- Register in template.xml so product includes it
- Security values reference authority attributes (Add and View)
- Must define those authority attributes in authority-set.xml and assign in authority-role.xml
<NoteTemplate id='QuoteUWDecisionNote0001' Name='Underwriting Decision'
PriorityCd='2' CategoryCd='General'
Description='Underwriting Decision for $!InsuredName.gets("CommercialName")'
StickyInd='No' AttachmentCd='Prohibited' DeactivationDt='29991231'>
<SecurityAttributes>
<SecurityAttribute TypeCd='Add' Value='UWDecisionNote-Add'/>
<SecurityAttribute TypeCd='Edit' Value='No'/>
<SecurityAttribute TypeCd='View' Value='UWDecisionNote-View'/>
<SecurityAttribute TypeCd='Delete' Value='No'/>
</SecurityAttributes>
<TagTemplate id='Underwriting' Name='Underwriting' AttachmentMethodCd='Optional'/>
</NoteTemplate>
<!-- Same content but id = 'ApplicationUWDecisionNote0001' -->
<NoteTemplate id='ApplicationUWDecisionNote0001' Name='Underwriting Decision'
PriorityCd='2' CategoryCd='General'
Description='Underwriting Decision for $!InsuredName.gets("CommercialName")'
StickyInd='No' AttachmentCd='Prohibited' DeactivationDt='29991231'>
<!-- Same SecurityAttributes as above -->
</NoteTemplate>
<ProductTemplateFilter FilterTypeCd='Include' TemplateCd='QuoteUWDecisionNote0001'/>
<ProductTemplateFilter FilterTypeCd='Include' TemplateCd='ApplicationUWDecisionNote0001'/>
<!-- Inside NoteSecurity AuthorityAttributeSet -->
<AuthorityAttribute id='UWDecisionNote-Add'
Name='Add UW Decision Notes'
Description='Can add Underwriting Decision notes'
AttributeTypeCd='Edit' DataTypeCd='YesNo' DefaultValue='No'/>
<AuthorityAttribute id='UWDecisionNote-View'
Name='View UW Decision Notes'
Description='Can view Underwriting Decision notes'
AttributeTypeCd='Edit' DataTypeCd='YesNo' DefaultValue='No'/>
<!-- Inside PolicyAgent AuthorityRoleSet for NoteSecurity -->
<AuthorityRoleAttribute AuthorityAttributeIdRef='UWDecisionNote-Add' Value='No'/>
<AuthorityRoleAttribute AuthorityAttributeIdRef='UWDecisionNote-View' Value='Yes'/>
<!-- Inside PolicyUnderwriter AuthorityRoleSet for NoteSecurity -->
<AuthorityRoleAttribute AuthorityAttributeIdRef='UWDecisionNote-Add' Value='Yes'/>
<AuthorityRoleAttribute AuthorityAttributeIdRef='UWDecisionNote-View' Value='Yes'/>
- New task type β task.xml (quote folder)
- Auto-trigger on attachment β add TaskTemplateIdRef to the attachment template
- No vtl rule needed β the link between attachment and task is declarative in XML
<TaskTemplate
id='QuoteTask-ReviewSecuritySystem'
Name='Review Security System Documentation'
Priority='1'
PriorityOverrideInd='No'
Description='Review Security System documentation for $!InsuredName.gets("CommercialName")'
DescriptionOverrideInd='No'
DefaultOwner='%LicensedProduct%'
DefaultOwnerCd='User'
WorkDtDays='3'
WorkDtOverrideInd='No'
Text='Please review the attached Security System documentation'
CriticalDtDays='7'
CriticalDtBusinessInd='Yes'
CriticalDtInd='Yes'
WorkRequiredInd='Yes'
DeactivationDt='29991231'
TaskTypeCd='Automatic'
Category='Underwriting'>
</TaskTemplate>
<AttachmentTemplate id='XSecuritySystemAttachment0001'
Name='Security System'
CategoryCd='General'
Description='Security System Documentation'
TaskTemplateIdRef='QuoteTask-ReviewSecuritySystem'
DeactivationDt='29991231'>
<SecurityAttributes>
<SecurityAttribute TypeCd='Add' Value='Yes'/>
<SecurityAttribute TypeCd='Edit' Value='Yes'/>
<SecurityAttribute TypeCd='View' Value='Yes'/>
<SecurityAttribute TypeCd='Delete' Value='No'/>
</SecurityAttributes>
</AttachmentTemplate>
TaskTemplateIdRef on the attachment template is what wires the auto-trigger. When a user adds this attachment type, the system automatically creates the linked task. No vtl code needed.
- Auto-attach based on data conditions β form-selection.vtl
- Need to read Question replies for two questions
- Both conditions must be true (AND logic)
- Add inside the <Errors> block, after existing form attachments
## Add this INSIDE the <Errors> block
##
##Attach IHO-75 for In-Ground Pool
#set( $swimmingPoolReply = $application.getBean("QuestionReplies")
.getBean("QuestionReply", "QuestionName", "SwimmingPool") )
#set( $poolTypeReply = $application.getBean("QuestionReplies")
.getBean("QuestionReply", "QuestionName", "PoolType") )
#if( $swimmingPoolReply.gets("ReplyText").equalsIgnoreCase("Yes")
&& $poolTypeReply.gets("ReplyText").equalsIgnoreCase("In-Ground") )
$FormRenderer.attachForm($application, "IHO-75")
#end
Form selection files always follow this pattern: 1) Clear all system forms. 2) Always-attach forms. 3) Conditionally attach forms. 4) Delete cleared forms not reattached.
- Print data β create doc.vtl and section.vtl files
- Doc file = declares form and calls section
- Section file = pulls data from beans and maps to form fields
- XML tag names must EXACTLY match field names in the .xatw Adobe form file
<Document Template Name="iho-75"/>
$!PrintRenderer.section("UWPolicy::formset::section::iho-75.vtl")
##IHO-75 Pool Coverage Form Section File
##
##Get policy data
#set( $policyNumber = $BasicPolicy.gets("PolicyDisplayNumber") )
#set( $insuredName = $InsuredName.gets("CommercialName") )
##
##Get question reply values
#set( $poolTypeReply = $Policy.getBean("QuestionReplies")
.getBean("QuestionReply", "QuestionName", "PoolType") )
#set( $divingBoardReply = $Policy.getBean("QuestionReplies")
.getBean("QuestionReply", "QuestionName", "DivingBoard") )
##
#set( $poolType = $poolTypeReply.gets("ReplyText") )
#set( $divingBoard = $divingBoardReply.gets("ReplyText") )
##
##Map to form field names (must match .xatw field names exactly)
<iho75>
<POLICY_NUMBER>$policyNumber</POLICY_NUMBER>
<INSURED_NAME>$insuredName</INSURED_NAME>
<POOL_TYPE>$poolType</POOL_TYPE>
<DIVING_BOARD>$divingBoard</DIVING_BOARD>
</iho75>
The XML tag names like <POLICY_NUMBER> must exactly match the field names defined in the Adobe .xatw form template file. Open the .xatw file to verify the field names before writing your section file.
- Cancel reason β state.xml
- Need TWO beans: one for InUWPeriodInd=Yes, one for InUWPeriodInd=No
- Company-initiated β RequestedByCd="Company"
- Pro-rata β ProRateInd="Yes", ShortRateInd="No", PureFlatInd="No"
<!-- Add BOTH beans inside <ProductCancelReasons> -->
<!-- During UW Period -->
<ProductCancelReason
InUWPeriodInd="Yes"
ReasonCd="UninsurableAfterInspection"
ReasonDesc="Property deemed uninsurable after inspection"
Days="30"
FormRef="CXNotice"
MailProofCd="Post Office"
ProRateInd="Yes"
ShortRateInd="No"
PureFlatInd="No"
RequestedByCd="Company"
NSFInd="No"
DocumentTypeCd="Cancellation Notice"/>
<!-- Outside UW Period -->
<ProductCancelReason
InUWPeriodInd="No"
ReasonCd="UninsurableAfterInspection"
ReasonDesc="Property deemed uninsurable after inspection"
Days="30"
FormRef="CXNotice"
MailProofCd="Post Office"
ProRateInd="Yes"
ShortRateInd="No"
PureFlatInd="No"
RequestedByCd="Company"
NSFInd="No"
DocumentTypeCd="Cancellation Notice"/>
- Restart server
- Log in as admin β Open a bound CA Homeowners policy
- Go to Actions β Cancel Policy
- Verify "Property deemed uninsurable after inspection" appears in the dropdown
| Requirement Clue Words | Category | Files |
|---|---|---|
| "add option", "new value in dropdown" | UI | list.xml |
| "capture", "collect", "new field" | UI + Data | sp-policy + dto-sp-policy + .html |
| "show", "display", "tab", "section" | UI | .html tile / tab.xml |
| "only X can", "permission", "access" | Security | authority-set.xml + authority-role.xml |
| "must not", "cannot", "invalid", "required" | Rules β ERROR | validation.vtl |
| "should", "recommend", "advise" | Rules β WARNING | validation.vtl |
| "requires approval", "submit for review" | Rules β APPROVAL | approval.vtl + authority-set/role |
| "automatically attach", "auto-include form" | Forms | form-selection.vtl |
| "new form", "new document", "print" | Forms | form.xml + doc.vtl + section.vtl |
| "task", "inbox item", "notification" | Workflow | task.xml |
| "automatically create task", "trigger task" | Workflow | TaskTemplateIdRef in attachment.xml |
| "new coverage", "add coverage" | Product | sub-type.xml (UW) + line.xml (Claims) |
| "cancel reason", "cancellation" | Product | state.xml |
| "additional interest", "mortgagee", "loss payee" | Product | ai.xml |
| "question", "ask user", "collect answer" | Product | question.xml |
| "payment plan", "installment", "billing" | Product | term.xml + .payplan.xml |
## Policy number
$BasicPolicy.gets("PolicyDisplayNumber")
## Insured name
$InsuredName.gets("CommercialName")
## Effective date
$BasicPolicy.gets("EffectiveDt")
## Building bean
#set( $risk = $application.findBeanByFieldValue(
"Risk", "Status", "Active") )
#set( $building = $risk.getBean("Building") )
$building.gets("ConstructionCd")
## Coverage A limit
#set( $covA = $application.getBean("Line")
.getBean("Coverage", "CoverageCd", "CovA") )
$covA.gets("Limit1")
## Question reply
#set( $reply = $application.getBean("QuestionReplies")
.getBean("QuestionReply", "QuestionName", "MyQ") )
$reply.gets("ReplyText")
## Block β ERROR
$ValidationRenderer.addValidationError(
$application,
"Validation",
"ERROR",
"Your error message here")
## Warn β WARNING
$ValidationRenderer.addValidationError(
$application,
"Validation",
"WARNING",
"Your warning message here")
## Escalate β APPROVAL
$ValidationRenderer.addValidationError(
$application,
"Approval",
"APPROVAL",
"Your approval message here")
## Claim validation (use $claim not $application)
$ValidationRenderer.addValidationError(
$claim,
"Validation",
"ERROR",
"Claim error message")
## UW rules β use UserRenderer
#set( $myAttr = $UserRenderer
.getAuthorityAttributeValue(
$user,
"MyAttributeId",
$todayDt) )
#if( $myAttr.equalsIgnoreCase("No") )
$ValidationRenderer.addValidationError(...)
#end
## Claims rules β use ClaimProductRenderer
#set( $myAttr = $ClaimProductRenderer
.getAuthorityAttributeValue(
$claim.gets("ProductVersionIdRef"),
"MyAttributeId",
$user,
$todayDt) )
## Currency authority (e.g. HOMaxCoverageA)
#set( $maxAmt = $UserRenderer
.getAuthorityAttributeValue(
$user, "HOMaxCoverageA", $todayDt) )
#if( $StringRenderer.greaterThan($actual, $maxAmt) )
## requires approval
#end
## Standard form selection file structure
#set( $application = $bean )
## Step 1: Clear all system forms
$FormRenderer.clearSystemForms($application)
<Errors>
## Step 2: Always-attach forms
$FormRenderer.attachForm($application, "IHO-BASIC")
## Step 3: Conditionally attach
#if( $CoverageRenderer.isActive($application, "SPP") )
$FormRenderer.attachForm($application, "IHO-61")
#end
## Check Additional Interest
#set( $ai = $AIRenderer.getAdditionalInterest(
$application, "Mortgagee") )
#if( $ai.gets("InterestTypeCd").equals("Mortgagee") )
$FormRenderer.attachForm($application, "438BFUHO")
#end
</Errors>
## Step 4: Delete cleared unattached forms
$FormRenderer.deleteClearedSystemForms($application)
## Compare numbers (always use StringRenderer)
$StringRenderer.greaterThan($val, "500000")
$StringRenderer.lessThan($val, "1000")
$StringRenderer.greaterThanEqual($val, "0")
## Check Yes/No field
$StringRenderer.isTrue($building.gets("SwimmingPoolInd"))
## Format as money
$!StringRenderer.formatMoney($amt, true)
## Math with money values
#set( $total = $StringRenderer.addMoney($prem1, $prem2) )
## Compare dates
$DateRenderer.greaterThan($lossDt, $effectiveDt)
$DateRenderer.lessThan($todayDt, $lossDt)
$DateRenderer.diffDays($date1, $date2)
## Advance a date
#set( $future = $DateRenderer.advanceDate($todayDt, "30") )
## Standard section file template
##Get data
#set( $policyNum = $BasicPolicy.gets("PolicyDisplayNumber") )
#set( $insName = $InsuredName.gets("CommercialName") )
#set( $effDt = $BasicPolicy.gets("EffectiveDt") )
#set( $insAddr = $Insured.findBeanByFieldValue(
"Addr", "AddrTypeCd", "InsuredMailingAddr") )
##
##Map to form fields
<Pane_1>
<POLICY_NUMBER>$policyNum</POLICY_NUMBER>
<INSURED_NAME>$insName</INSURED_NAME>
<LETTER_DATE>$effDt</LETTER_DATE>
<INSURED_ADDR>
$!AddressRenderer.buildAddress($insAddr, "Mailing", 3, 32)
</INSURED_ADDR>
</Pane_1>
1. Identify the category β What TYPE of change is this? (UI / Security / Rule / Form / Task / Product)
2. Find the file β Use the file map above to identify which file(s) need to change.
3. Find an example β Look at what already exists in that file. Copy the closest existing example, then modify it. Never start from scratch.