<array>

An array defines a set of additional entities of the same type to associate with the main entity. For example, a Policy entity includes an array of Document entities.

Attributes of <array>

The <array> element contains the following attributes:

<array>  attribute          

Description

Default

arrayentity

Required. The name of the entity that makes up the array.

None

arrayfield

Optional. Name of the field in the array table that is the foreign key back to this table. However, you do not need to define a value if the array entity has exactly one foreign key back to this entity.

Note that even if you define only one foreign key explicitly, additional foreign keys may be created implicitly. For example, CreateUserID is automatically added to an editable entity. In that case, arrayfield would be required because there is more than one foreign key.

None

cascadeDelete

If the cascadeDelete attribute is true, the array container is retireable, and you delete the array container; then PolicyCenter deletes (or retires) the array elements also. If this scenario applies but the array container is not retireable, then PolicyCenter deletes the array elements.

Important: Whether the cascadeDelete attribute is true or false, if the entity containing the array is not retireable, deleting an instance of that entity also deletes the objects inside the array. This behavior occurs even if the array objects themselves are retireable in order to preserve the array objects' referential integrity. For this reason, Guidewire recommends that you avoid placing an array of retireable objects inside an entity that is not retireable.

false

deprecated

If true, then PolicyCenter marks the item as deprecated in the Data Dictionary and places a Deprecated annotation on it in the Guidewire Studio API Reference.

If you deprecate an item, use the description to explain why.

See Data entity subelements for more information.

false

desc

A description of the purpose and use of the array.

None

exportable

Unused.

getterScriptability

See Data objects and scriptability for information.

all

ignoreForEvents

This attribute has complex, non-intuitive interactions with data entity relationships. See Interactions of ignoreForEvents attribute with data entity relationships for information on how to use and configure it.

false

name

Required. The name of the property corresponding to this array.

None

owner

If true, then the entity containing the array owns the objects in the array. The owner attribute has the following behavior:

  • If true (an owned array), then the method isFieldChanged returns true if a child element of the array has changed. If false (a non-owned array), then the method isFieldChanged returns false if a child element of the array has changed. In either case, isFieldChanged returns true if any child elements are added to or removed from the array, regardless of the value of the owner attribute.
  • If true and you delete the owning object, PolicyCenter deletes (or retires) the array items as well. In this case, PolicyCenter deletes the array items notwithstanding a value of false for the cascadeDelete attribute. However, see the important note following this description.
  • If true, then if you update the contents of the array, then PolicyCenter considers the owner as updated as well. This behavior can result in side effects. For example, notwithstanding a value of false for the triggersValidation attribute, the behavior can trigger validation.
  • If true, then child array elements are copied along with the parent when the parent copied, such as with the copy method.
  • If true, the effects of the owner attribute override the effects of false values for the cascadeDelete and triggersValidation attributes.
Important: Whether the owner attribute is true or false, if the entity containing the array is not retireable, deleting an instance of that entity also deletes the objects inside the array. This behavior occurs even if the array objects themselves are retireable in order to preserve the array objects' referential integrity. For this reason, Guidewire recommends that you avoid placing an array of retireable objects inside an entity that is not retireable.
Note: The owner attribute must have a value of true if the corresponding array permits concurrent changes to its values. PolicyCenter applies an optimistic locking approach for concurrent changes to array values. A true value for the owner attribute results in PolicyCenter notifying the array of concurrent changes or additions to the array children. The notification is in the form of a concurrent data change exception (CDCE) in the user interface.

false

requiredmatch

One of the following values

  • all – There must be at least one matching row in the array for every row from this table. For example, there must be at least one check payee for every check.
  • none – There is no requirement for matching rows.
  • nonretired – There must be at least one matching row for every non-retired row from this table.

None

setterScriptability

See Data objects and scriptability for information.

all

triggersValidation

Whether changes to the entity pointed to by this array trigger validation. Changes to the array that trigger validation include:

  • The addition of an object to the array.
  • The removal of an object from the array.
  • The modification of an object in the array.

See the discussion of this attribute that follows this table.

false

If set to true, the triggersValidation attribute can trigger additional PolicyCenter processing. Exactly what happens depends on several different factors:

  • If the parent entity for the array is validatable, any modification to the array triggers the execution of the Preupdate and Validation rules on the parent entity. Validation occurs whenever PolicyCenter attempts to commit a bundle that contains the parent entity. For an entity to be validatable, it must implement the Validatable delegate.
  • If the parent entity has preupdate rules, but no validation rules, then PolicyCenter executes the preupdate rules on the commit bundle. This is the case only if configuration parameter UseOldStylePreUpdate is set to true, which is the default. If UseOldStylePreUpdate is set to false, PolicyCenter invokes the IPreUpdateHandler plugin on the commit bundle instead. Then, PolicyCenter executes the logic defined in the plugin on the commit bundle.
  • If the parent entity has validation rules, but no preupdate rules, then PolicyCenter executes the validation rules on the commit bundle.
  • If the parent entity has neither preupdate nor validation rules then the following occurs:
  1. In the case of UseOldStylePreUpdate=true, PolicyCenter does nothing.
  2. In the case of UseOldStylePreUpdate=false, PolicyCenter calls the IPreUpdateHandler plugin on the commit bundle.

Subelements of <array>

The <array> element contains the following subelements:

<array>  subelement    

Description

array-association

This subelement contains the following attributes:

  • hasContains (default = false)
  • hasGetter (default = true)
  • hasSetter (default = false)
  • valueField (default = ID)

It also contains the following subelements of its own, each of which can exist, at most, one time:

  • constant-map
  • subtype-map
  • typelist-map

See Typelist mapping associative arrays for more information.

fulldescription

See <fulldescription>.

link-association

This subelement contains the following attributes:

  • hasGetter (default = true)
  • hasSetter (default = false)
  • valueField (default = ID)

It also contains the following subelements of its own, each of which can exist, at most, one time:

  • constant-map
  • subtype-map
  • typelist-map

See Subtype mapping associative arrays for more information.

tag

See <tag>.