General Structure & Best Practices

Sequence of Transaction Elements

The general sequence of the transaction elements should be as follows (follow the links for more information on best practices for configuring these elements):

  1. EffectiveDate

  2. Allocations (if applicable)

  3. Valuation (if applicable)

  4. Suspense

  5. ValuesBlock

  6. Withholding

  7. AllowComments

  8. Transitions

  9. MultiSuspense

  10. Address

  11. Fields

  12. Events

  13. MultiFields

  14. Math

  15. Assignments (if applicable)

  16. Spawns

Syntax and Configuration Standards for Transaction Elements

EffectiveDate

The EffectiveDate element should be the first tag in a transaction.

The EffectiveDate of spawned transactions, when that spawned activity is only ever SYSTEM generated, should be Disabled.

Allocations (if applicable)

Allocation order of elements should be:

Suspense

Use the OVERRIDABLE attribute to allow users to bypass suspense requirements.

Withholding

When withholding is needed, use the <Withholding> </Withholding> tags instead of creating fields for withholding.

Valuation

Do not include the <Valuation> tag in a transaction, if valuation is not necessary.

Fields

  1. The order of field tags is:

  2. The <DefaultValue> tag and the <Calculated> tag may not be present at the same time. Use one or the other. 

  3. If a field is hidden, do not include a <Disabled> tag.

  4. If a field is disabled, do not include a <Hidden> tag.

  5. If a field is required, do not include <Hidden> and <Disabled> tags.

  6. If a field is either hidden or disabled, do not include a <Required> tag.

  7. If a field is not hidden, do not include <Hidden> tag.

  8. If a field is not disabled, do not include <Disabled> tag.

  9. Hidden fields that are independent of other fields should be placed at the end of the <Fields> section.  

    Note: An exception would be when the value of a hidden field is needed as a source of data in a non-hidden field.  

  10. The Required element applies only to the following screens: 
  11. The Required element is not valid if the DataType is Identifier or Check.

  12. Validation for required fields is performed when a screen is saved (or submitted). If a required field is blank or null it fails validation, and any validation specified by the Validation element is not performed.

  13. If a user is prevented by the security configuration from entering data in a required field, the screen will not pass validation when submitted.

  14. Suggestions for field names are listed below. This applies to MathVariable names as well.

  15. Do not use spaces or underscores.

    Example: DateOfBirth not Date_of_Birth.

  16. Do not abbreviate unless the resulting word is extremely long. In that case, abbreviate but retain the meaning of word.  

    Examples: PolicyAnniversary not PolAnniv. NextMonRemainIssueChg for NextMonthaversaryRemainingIssueCharge.  

  17. Add abbreviated words to the Data Dictionary so that the meaning remains clear.

  18. Field name and display value should be the same if possible.

    Example: <Name>IssueDate</Name>, <Display>Issue Date</Display> not <Display>Date of Issue</Display>

  19. Filler fields should have a DataType value of Blank, and no Display element.

  20. Combo boxes and radio buttons:

  21. Fields of DataType TextArea are available for all screens supporting the <Fields> element. Note the following:
  22. Avoid having the same value for the <Name> tag for more than one <Field>. If multiple fields have the same name, the display, recording of the field value and action/events on the field will not be able to differentiate between the multiple instances.

Math

  1. General Math best practices:

  2. When defining MathVariable names, the following practices are recommended:

  3. When defining the TYPE for a MathVariable use:

  4. When using TYPE=”FUNCTION”, do not use double quotes around the parameters.

  5. The use of Blank is not needed in a conditional expression where blank is a previously defined field. Instead use two single quotes (i.e., '').

  6. Use Data Dictionary defined field names for consistency across products.

  7. Use Valuation:Policy to retrieve values from valuation when possible.

    When trying to retrieve CashValue from PolicyValues use TYPE=”FIELD” Valuation:Policy:CashValue.

  8. Capitalize the words AND and OR when writing SQL. Use sentence case And and Or when configuring anything other than SQL statements. 

  9. When you need to obtain the XML data for the current activity, use the following configuration to help performance:

    <MathVariable VARIABLENAME="ThisPendingActivityXML" TYPE="SQL">
    SELECT XMLData FROM AsActivity WHERE ActivityGUID = '[Activity:ActivityGUID]'
    </MathVariable>
  10. If a data value is already defined as a field, don’t use a SQL to retrieve the value again from the database. Since this value is already a <Field>, change to TYPE=”FIELD” and reference the data by the name of the field.

Spawns

  1. Pass spawn fields in the same sequence as they are configured in the transaction that is being spawned.

  2. Any GUID fields passed as spawn fields should be disabled in the spawned transaction.

  3. Spawned transactions should use SPAWNCODE=”01” if the spawned transaction is effective on the same day as the spawning transaction.  

  4. See AsCode for other spawn code values.

  5. The DataTypes in spawn fields must match the corresponding data types in the receiving fields.