Value kind records whether an Attribute value is assigned initially or computed from an expression. It makes the distinction explicit because an Attribute Reference can represent either case. section 11.1.1
The property supports two choices and corresponding Domain IDE behavior:
- initially assigns a value during runtime initialization; this is the default for migrated attributes and newly added values. section 11.1.1 section 11.2
- computed as marks a value as derived from an expression, such as the rental price after discount. section 11.2
- The Domain IDE exposes both choices through a dropdown and initializes value kind to initially when the user adds a value. section 11.2
Migrating and editing an Attribute
An AST migration renames Data Attribute to Attribute, changes initial value to value, and sets value kind to initially. In the Domain IDE, a user can then change rental price after discount to computed as and construct its expression. section 11.1.1 section 11.2
Listing 11.1 The addition to the AST migration to set value kind
// ...other existing code...
if (value.concept === "Data Attribute") {
value.concept = "Attribute"
settings["value"] = settings["initial value"]
delete settings["initial value"]
settings["value kind"] = "initially" #1
}
// ...other existing code...
The migration explicitly assigns initially after moving the old initial value into the renamed value property. section 11.1.1
<span className="keyword ws-right">initially</span>
The keyword initially is the visible default value-kind choice in the projection. section 11.2
