Update logic

The update logic is as follows.

For each attribute contained in the supplied attribute map:

  1. If the attribute name matches an existing attribute, attempt to overwrite its values field with the supplied values field.
  2. If the attribute does not exist yet, allowCreate is true, and its metadata are known, then create the attribute. This applies to global attribute metadata as well instance attributes (except flowcharts).
  3. If the value type or some other aspect of the attribute's metadata definition is not met, or one or more of the supplied values is invalid or out-of-range, throw InvalidAttributeException.
  4. Else throw AttributeNotFoundExceptionif the named attribute does not exist.
Note: In the event of an exception, none of the updates are committed.

This particular method does not support defining new custom attributes; use the createAttributeMetadata() method for that.

In all cases, the attribute update operation is subject to the usual security constraints and validation. It is the client's responsibility to determine which attributes are required by a particular component instance, the correct types, etc.