Developer Reference v1.0

InsuranceNow
Developer Guide

Your complete practical reference for implementing InsuranceNow configurations. Decision maps, file references, Velocity patterns, and real-world scenarios with solutions.

10
Scenarios
30+
File References
50+
Code Examples
πŸ—ΊοΈ
The Master Decision Map
SECTION 01 β€” Where to start with any requirement
Core Truth

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
πŸ“
Complete File Map
SECTION 02 β€” What file controls what
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/
❓
The 5 Questions Framework
SECTION 03 β€” Ask these in order when a requirement arrives
Q1 New Data to Store?
Does this require storing a new piece of information in the database that doesn't exist today?

β†’ Yes: sp-policy.xml + dto-sp-policy.xml + .html tile
Q2 Screen Change?
Does the user need to see something differently β€” new field, new dropdown option, new tab, renamed label?

β†’ Yes: .html tile / tab.xml / list.xml
Q3 Business Rule?
Does the system need to stop, warn, or escalate based on data the user enters?

β†’ Block: validation.vtl (ERROR)
β†’ Warn: validation.vtl (WARNING)
β†’ Escalate: approval.vtl (APPROVAL)
Q4 Access Control?
Should only certain roles be able to do something (add, edit, view, approve)?

β†’ Yes: authority-set.xml (define) + authority-role.xml (assign values)
Q5 Product Config?
Is this about coverages, cancel reasons, AI types, questions, or pay plans?

β†’ Coverage: sub-type.xml
β†’ Cancel: state.xml
β†’ AI: ai.xml
β†’ Questions: question.xml
Golden Rule

Never start from scratch. Always find the closest existing example in the file, copy it, and modify it for your requirement.

⚑
Velocity Basics
SECTION 04 β€” The scripting language used in .vtl rule and form files

References (all start with $)

References
## 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 #)

Directives
## 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

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

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 Bean Methods
SECTION 05 β€” How to navigate and read data
Concept

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.

Getting Field Values
## 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")
Getting Single Beans
## 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()
Getting Multiple Beans
## 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")
Common Data Paths
## 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") )
πŸ”§
Renderers Quick Reference
SECTION 06 β€” Pre-built Java tools you call from Velocity
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

ERROR
Blocks all processing. User cannot proceed until the error is fixed.

$ValidationRenderer.addValidationError(
  $application,
  "Validation",
  "ERROR",
  "Year Built is required"
)
WARNING
Warns the user but allows processing to continue.

$ValidationRenderer.addValidationError(
  $application,
  "Validation",
  "WARNING",
  "Property is older than 75 years"
)
APPROVAL
Changes Issue button to Submit for Approval. Routes to underwriter.

$ValidationRenderer.addValidationError(
  $application,
  "Approval",
  "APPROVAL",
  "Bungalows must be approved"
)
File Location for Each Type
ERRORvalidation.vtl
WARNINGvalidation.vtl
APPROVALapproval.vtl
🎯
Real-World Scenarios & Solutions
SECTIONS S1–S10 β€” Requirements with full worked solutions
SCENARIO 01
Add a New Dropdown Value
UI
"We need to add 'Cedar Shake' as a new roof type option in the California Homeowners product."
  • UI change β€” adding a value to a dropdown
  • CA-specific β†’ use the CA folder's list.xml, not countrywide
  • Find existing roof-type coderef and add new option inside it
πŸ“„ FILE TO CHANGE
custSTART/src/com/iscs/start/uw/common/product/model/template/iic/homeowners/ca/v01_00_00/list.xml
<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>
  1. Restart server
  2. Open CA Homeowners quote β†’ Dwelling tab
  3. Check Roof Type dropdown β€” "Cedar Shake" should appear
SCENARIO 02
Add a New Field to the Screen
UI + Data Model
"We need to capture whether the property has a home security system. Add a Yes/No dropdown called 'Security System' on the Dwelling tile, and store the answer."
  • 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
πŸ“„ FILE 1 OF 3 β€” Add to data model
custSTART/src/com/iscs/start/homeowners/model/bean/sp-policy.xml
<Class name="Building" extends="Building">
  <!-- existing fields stay untouched -->
  <Field name="SecuritySystemInd" type="String">Security System Indicator</Field>
</Class>
πŸ“„ FILE 2 OF 3 β€” Add to DTO
custSTART/src/com/iscs/start/homeowners/model/bean/dto-sp-policy.xml
<Class name="DTOBuilding" extends="DTOBuilding">
  <!-- existing fields stay untouched -->
  <Field name="SecuritySystemInd" type="String">Security System Indicator</Field>
</Class>
πŸ“„ FILE 3 OF 3 β€” Add field to screen
custSTART/src/com/iscs/start/homeowners/model/tileset/tile/valuation.html
<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>
Important

UW::underwriting::yes-no::all is a standard Yes/No list already in the system. You don't need to create it.

  1. Restart server (model bean changes ALWAYS require restart)
  2. Open CA Homeowners quote β†’ Dwelling tab
  3. Verify "Security System" dropdown appears
  4. Select "Yes" β†’ Save β†’ Re-open β†’ Verify it saved correctly
SCENARIO 03
Validation Warning Rule
Rules β€” WARNING
"If the Year Built is before 1950, show a WARNING saying 'Property is older than 75 years β€” inspection may be required.' The agent should still be able to issue the policy."
  • 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
πŸ“„ FILE TO CHANGE
custSTART/src/com/iscs/start/uw/common/product/model/template/iic/homeowners/ca/v01_00_00/rule/validation.vtl
##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
  1. Restart server
  2. Open CA Homeowners quote β†’ Enter Year Built = 1940 β†’ Save
  3. Verify orange WARNING appears at top of screen
  4. Verify you can still click Issue (WARNING doesn't block)
SCENARIO 04
Validation Error β€” Block User
Rules β€” ERROR
"If the applicant selects 'Thatch' as the roof type, show an ERROR and prevent issuing the policy. Message: 'Thatch roofs are not eligible for coverage.'"
  • 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
πŸ“„ FILE TO CHANGE
custSTART/src/com/iscs/start/uw/common/product/model/template/iic/homeowners/ca/v01_00_00/rule/validation.vtl
##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
Tip

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".

  1. Restart server
  2. Open CA Homeowners quote β†’ Select Roof Type = Thatch β†’ Save
  3. Verify RED ERROR appears
  4. Verify you CANNOT click Issue β€” button is blocked
SCENARIO 05
Approval Rule with Authority Check
Rules β€” APPROVAL + Security
"If Coverage A is over $500,000, the policy must be submitted for underwriter approval. But if the agent has the 'ApproveLargeHome' authority attribute set to Yes, they can issue it directly."
  • 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
πŸ“„ FILE 1 OF 3 β€” Define the authority attribute
custSTART/src/com/iscs/start/common/shared/model/template/authority-set.xml
<!-- 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'/>
πŸ“„ FILE 2 OF 3 β€” Assign role values
custSTART/src/com/iscs/start/common/shared/model/template/authority-role.xml
<!-- Inside PolicyAgent AuthorityRoleSet for PolicyApprovals -->
<AuthorityRoleAttribute AuthorityAttributeIdRef='ApproveLargeHome' Value='No'/>

<!-- Inside PolicyUnderwriter AuthorityRoleSet for PolicyApprovals -->
<AuthorityRoleAttribute AuthorityAttributeIdRef='ApproveLargeHome' Value='Yes'/>
πŸ“„ FILE 3 OF 3 β€” Write the approval rule
custSTART/src/com/iscs/start/uw/common/product/model/template/iic/homeowners/cw/v01_00_00/rule/approval.vtl
## 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
  1. Restart server
  2. Log in as agent β†’ Create quote β†’ Set CovA = $600,000 β†’ Try to issue
  3. Verify "Submit for Approval" button appears instead of "Issue"
  4. Log in as underwriter β†’ Approve it
  5. Log back as agent β†’ Verify policy can now be issued
SCENARIO 06
New Note Type with Security
Template + Security
"Add a new note type called 'Underwriting Decision' on both Quote and Application. Only underwriters can add it, but agents can view it. No attachments allowed."
  • 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
πŸ“„ FILE 1 β€” Quote note.xml
custSTART/src/com/iscs/start/uw/quote/model/template/note.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>
πŸ“„ FILE 2 β€” App note.xml (same but different id)
custSTART/src/com/iscs/start/uw/app/model/template/note.xml
<!-- 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>
πŸ“„ FILE 3 β€” Register in template.xml
custSTART/src/com/iscs/start/uw/common/product/model/template/iic/homeowners/cw/v01_00_00/template.xml
<ProductTemplateFilter FilterTypeCd='Include' TemplateCd='QuoteUWDecisionNote0001'/>
<ProductTemplateFilter FilterTypeCd='Include' TemplateCd='ApplicationUWDecisionNote0001'/>
πŸ“„ FILE 4 β€” Define authority attributes
custSTART/src/com/iscs/start/common/shared/model/template/authority-set.xml
<!-- 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'/>
πŸ“„ FILE 5 β€” Set values per role
custSTART/src/com/iscs/start/common/shared/model/template/authority-role.xml
<!-- 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'/>
SCENARIO 07
Auto-Triggered Task on Attachment
Workflow
"When an agent adds a 'Security System' attachment to a quote, automatically create a task called 'Review Security System Documentation' and assign it to the underwriting group."
  • 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
πŸ“„ FILE 1 β€” Define the task in task.xml
custSTART/src/com/iscs/start/uw/quote/model/template/task.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>
πŸ“„ FILE 2 β€” Link task to attachment via TaskTemplateIdRef
custSTART/src/com/iscs/start/uw/quote/model/template/attachment.xml
<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>
Key Insight

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.

SCENARIO 08
Form Auto-Attach Based on Data
Forms
"Form IHO-75 should automatically attach to every CA Homeowners policy that has an in-ground pool (SwimmingPool question = Yes AND PoolType = In-Ground)."
  • 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
πŸ“„ FILE TO CHANGE
custSTART/src/com/iscs/start/uw/common/product/model/template/iic/homeowners/ca/v01_00_00/rule/ca-homeowners-rule-form-selection.vtl
## 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
The Full Form Selection Pattern

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.

SCENARIO 09
Print Data on a Form
Forms β€” Print
"When IHO-75 prints, it should show: Policy Number, Insured Name, Pool Type, and whether there is a diving board."
  • 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
πŸ“„ FILE 1 OF 2 β€” Doc file (trigger)
custSTART/src/com/iscs/start/uw/policy/model/formset/doc/iho-75.vtl
<Document Template Name="iho-75"/>
$!PrintRenderer.section("UWPolicy::formset::section::iho-75.vtl")
πŸ“„ FILE 2 OF 2 β€” Section file (data mapping)
custSTART/src/com/iscs/start/uw/policy/model/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>
Critical

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.

SCENARIO 10
New Cancellation Reason
Product Config
"Add a new cancellation reason: 'Property deemed uninsurable after inspection'. Applies both inside and outside UW period. Company-initiated, 30-day notice, pro-rata return premium."
  • 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"
πŸ“„ FILE TO CHANGE
custSTART/src/com/iscs/start/uw/common/product/model/template/iic/homeowners/ca/v01_00_00/state.xml
<!-- 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"/>
  1. Restart server
  2. Log in as admin β†’ Open a bound CA Homeowners policy
  3. Go to Actions β†’ Cancel Policy
  4. Verify "Property deemed uninsurable after inspection" appears in the dropdown
πŸ”
Pattern Recognition Guide
QUICK REFERENCE β€” Clue words to file types
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
πŸ“‹
Velocity Cheat Sheet
QUICK REFERENCE β€” Copy-paste ready patterns
Get Data β€” Common Patterns
## 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")
Validation Errors
## 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")
Authority Checks
## 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
Form Selection Pattern
## 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)
String & Number Comparisons
## 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") )
Print Section β€” Data Mapping
## 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>
When You're Stuck β€” 3 Steps

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.