Previous | Table of Contents | Next
Problem – Managing Evolution of Type
Definition
Often business requirements change and the nature of attribute values for an entity are modified as a result. In some cases a new status or type is introduced. In others a change from mandatory to optional may be appropriate. When new attributes are introduced, some way must be found to fabricate the values for existing entities.
Solution
Type migration is addressed though definition of attribute mapping between type versions. This business rule pattern is identical to the Type Conversion pattern except that the same entity instance is involved in a Type Migration rule as opposed the creation of a new instance for a Type Conversion rule. The parameters identify each attribute that is changed along with the nature of the change (i.e. create, modify, or delete).
The personnel department for an organization maintains employee records. Union affiliation is tracked as an indicator and used for inclusion or exclusion from certain benefits programs. Recent organizational changes introduced several new unions into the organization and now eligibility for benefits programs must be based on which union an employee is affiliated with instead on just an indicator of union membership. Accordingly the attribute type is change from a Boolean to a code. All existing employees are assigned the default code of the original union. The domain for the new attribute type may be declared in a Domain business rule pattern.
Attribute |
Union indicator |
Operation |
Modify |
Source Type |
Boolean |
Target Type |
Code |
Mapping |
IF True |
The Type Migration business rule pattern maps a Type model element. This pattern is closely related to the Type Conversion business rule pattern. It also collaborates with the Domain business rule pattern to define new attribute types domains.
Previous | Table of Contents | Next