Issue 9887: Optional values and evaluation of defaults (uml2-rtf) Source: Adaptive (Mr. Pete Rivett, pete.rivett(at)adaptive.com) Nature: Uncategorized Issue Severity: Summary: 7.3.44 says that the defaultValue is "A ValueSpecification that is evaluated to give a default value for the Property when an object of the owning Classifier is instantiated." This makes it a bit pointless to have such as property as optional since it will always be set to its default value (though in theory the property could be explicitly unset - in which case it will not use the default value either. There is a need for dynamic evaluation of an expression associated with a Property if no value has been explicitly set. Proposed resolution: - if lower = 1 then defaultValue is assigned to the property when object is instantiated (and when the class is attached to an object using reclassify) - if lower = 0 then no assignment is made but the defaultValue (if present) is evaluated each time the property value is read: in effect it is acting as a derived property until a value is explicitly assigned. This behavior must also be included in the description of ReadStructurualFeatureAction (11.3.37) which does not mention default values at all. Resolution: Revised Text: Actions taken: July 6, 2006: received issue Discussion: End of Annotations:===== s is issue # 9887 Optional values and evaluation of defaults 7.3.44 says that the defaultValue is "A ValueSpecification that is evaluated to give a default value for the Property when an object of the owning Classifier is instantiated." This makes it a bit pointless to have such as property as optional since it will always be set to its default value (though in theory the property could be explicitly unset - in which case it will not use the default value either. There is a need for dynamic evaluation of an expression associated with a Property if no value has been explicitly set. Proposed resolution: - if lower = 1 then defaultValue is assigned to the property when object is instantiated (and when the class is attached to an object using reclassify) - if lower = 0 then no assignment is made but the defaultValue (if present) is evaluated each time the property value is read: in effect it is acting as a derived property until a value is explicitly assigned. This behavior must also be included in the description of ReadStructurualFeatureAction (11.3.37) which does not mention default values at all.