The swArchitect client provides a tool for changing the data dimension of an existing attribute. The operation changes the data dimension only. It does not complete any data changes. Those must be done separately.


Prerequisites

  • Assignment of the SW Architect role in the server
  • An installation of the SystemWeaver Architect client (swArchitect)
  • Familiarity with the attribute that will be changed and the data in the attribute


  1. In the swArchitect, navigate to the Refactorings tab. 
  2. Select Change Data Dimension in the left-hand menu.
  3. Use the browse button next to the Change Data Dimension of field to select the attribute type whose multiplicity you want to change. The Select Attribute dialog will display.
  4. Find and select the attribute you want to change and click OK. The Change Data Dimension of field will populate with the Name of the attribute, and the from field will be prepopulated with the current data dimension.
  5. Select the data dimension you want to change it to.
     


    In the below example, the "Category" attribute is currently set-up for a "Single" occurrence and will be changed to "Set" to allow multiple occurrences.

  6. Click Execute when you are ready to change the data dimension. To complete the refactoring, click OK in the Confirm dialog. 


    Users can now add multiple values.

Refactoring From "Single" to "Set" or "Array"

There is no risk of data loss for the following refactoring cases:

  • Single to Set
  • Single to Array
  • Array to Set


Refactoring From "Set" or "Array" to "Single"

We do NOT recommend changing data dimension from a higher occurrence to a lower one, i.e., "Set" or "Array" to "Single" unless you are confident that all objects with the attribute assigned contain a maximum of one (1) single value

Attributes that contain more than one value will not display values properly after the refactoring since the # of occurrences conflicts with the meta model. In this case, you must clean up the data to conform with the meta model. Otherwise, there is a risk of data loss.


Example Enumeration Attribute with "Set" Data Dimension That Contains Multiple Values

Before Refactoring to "Single"


After Refactoring to "Single" if Data is not Cleaned up


Tip: If needed, you can refactor back to "Single" to view the data, or select the correct value using the attribute editor. Simply reselect the Change Data Dimension refactoring option and reselect the attribute. Then, change from "Single" back to the original "Set" or "Array".