<events>

If the <events> element appears within an entity, that entity and its descendant entities raise events. The names of the standard events are XXAdded, XXChanged, and XXRemoved, where XX is the name of the entity declaring the <events> element. A subtype or descendant of an event-aware entity can override the names of the standard events by declaring its own <events> element. The descendant can also add additional events.

If the <events> element does not appear in an entity or any of its ancestors, that entity does not raise any events.

Note: This element is not valid for a nonPersistentEntity.

Guidewire defines this element in the data model metadata files as the <events> XML subelement. There can be at most one <events> element in an entity. However, you can specify additional events through the use of <event> subelements. For example:

<events>
  <event>
  ...
</events>
Note: PolicyCenter automatically adds the EventAware delegate to any entity that contains the <events> element. This addition makes such an entity aware of events that it raises and that other entities raise.

Attributes of <events>

There are no attributes on the <events> element.

Subelements of <events>

The <events> element contains the following subelements.

<events>  subelement

Description

event

Defines an additional event to fire for the entity. Use multiple <event> elements to specify multiple events. This subelement contains the following attributes:

  • description (required = true)
  • name (required = true)

The <event> element requires each of these attributes.

Note that the event name is exposed as a public static constant field. For example, you might have an event named PersonalDataPurge on the ABContact data entity. Such an event is exposed publicly as a constant field on the ABContact class. The public class-level String constant is ABContact.PERSONALDATAPURGE_EVENT.