3.1.1.2.9 Triggers

A COMA server MAY<52> modify properties of entries automatically as the result of another property being modified; for example, to enforce configuration dependencies that a client might not have detected. Such behavior is known as a trigger. A property whose modification causes other properties to be modified is known as the triggering property of a trigger, and any properties so modified are known as triggered properties.

The following restrictions apply to triggers:

  • Some properties cannot be triggered; in other words, they MUST NOT be triggered. Properties that cannot be triggered are specified as such in the table definitions.

  • With the exception of internal properties, for which this document does not specify any restrictions on how they are used, a triggered property MUST be a property of the same entry as the triggering property.

  • A server MAY<53> apply multiple triggers in a write operation to a single entry. However, if multiple triggers modify the same triggered property, all triggers MUST cause an identical, idempotent modification to the triggered property. For example, multiple triggers might have the effect of setting a property to TRUE if more than one property has a configuration dependency on the property.

For the purposes of describing the behavior of the ICatalogTableWrite::WriteTable method (see section 3.1.4.9.1), the following additional restriction applies to how triggers are performed. If a write explicitly updates a property and the property is also triggered by an update to another property, the server MUST do one of the following:

  • The server MAY disallow such a write and fail the call, in which case the server SHOULD return TableDetailedError records, as specified in section 2.2.1.16, to indicate to the client why the write failed.

  • The server MAY<54> perform the modifications in a trigger-consistent order. A trigger-consistent order is defined as an order in which, for all triggers, the triggered properties are ordered before the triggering property. In other words, the trigger overwrites the explicit modification.