An item is the smallest "reusable" object in SystemWeaver. An item always has an item type and this is what determines, for example, which parts the item is allowed to have. Users will often recognize item types by their icon. This article describes how to create an Item type.
Prerequisites
- Familiar with the SystemWeaver meta model building blocks (e.g., Items, Parts and Attributes)
- Familiar with the SystemWeaver Architect interface
- Introduction to Meta Modelling in SystemWeaver
- Assignment of the SW Architect role in the server
- An installation of the SystemWeaver Architect client (swArchitect)
To get started, open the swArchitect application and go to the Metadata tab.
Item Type Inheritance
If you are just getting starting, you should know about item type inheritance. All item types that you create will actually be a sub-type of another which enables item type inheritance. This inheritance allows for different item types to have the same properties. For example, part types and attributes may be inherited from an item type to several different item types. The majority of item types created are sub-types of Item, however, one can also create sub-types of, e.g., an Abstract type used in your meta model.
Example
The example shows that most item types are sub-types of Item. There are also Abstract types that have sub-types as well.
Note: Do not confuse item type inheritance described above with item inheritance decribed below in Allowing Item Inheritance. |
Creating a Sub-type
Follow these steps to create a new item type in your meta model.
- Select the appropriate base item for your new item type in the item type structure to the left. This could be Item as shown below to the left which is most commonly the case, or it could be another item type in your existing meta model as in the example to the right.
- Regardless of which item you have selected, click Add sub type. The Enter SID and name dialog will display.
- Enter the following required information for the new item being created, and click OK when you are finished.
- SID: The unique identifier for the item. It can include letters, numbers and special characters (maximum length: 8 characters) although it is recommended that only letters (A-Z) and/or numbers (0-9) are used. The SID is used when configuring views, such as reports, graphs, grids, etc.
- Name: The name of the item type as seen by the users
Note: The Name can easily be changed later on, but changing the SID, although possible, is more complicated. |
The new item type will display in the Item Type structure to the left. It inherits the part type along with all of the parent's other properties, part types, attributes, icon, etc. Inherited Default attributes and Part types are highlighted yellow. If desired, additional ones can be added.
Users can now create items of the newly created item type.
Available Options
Adding an Icon
So that users can more easily identify item types in SystemWeaver, you can add an item type icon to each item type in your meta model. When creating a sub-type of an item type that has an icon, such as the folder icon for "Abstract Parameter Structures" in the above example, the new sub-type will inherit the icon. When sub-typing from Item, we recommend adding an icon to the new type. To add an icon to an item type, click on the icon browse button and select an available icon in the Change Icon dialog.
One can change the icon of any sub-type (even icons that are inherited) at any time. See How to Assign Icons to learn more.
Making a Type Abstract
In some cases, parent types that other item types inherit from should not be used by the users. To avoid users creating items of these types, they can be made abstract. The purpose of an abstract type is really to manage the properties of its (non-abstract) sub-types.
To make an item type abstract, select the item type, and check the Is abstract checkbox.
The type will now display in italics font style in the Type tree to the left. When this option is selected, users cannot create items of type "Abstract Parameter Structures" in the above example. However, its sub-types will still inherit properties from it.
Allowing Item Inheritance
The Inheritance enabled option allows users to have an item of a specific type inherit item properties, such as parts and attribute values, from another item. Check the Inheritance enabled checkbox to allow this.
Using the above example, a user can create a "Test system" item and have it inherit the values set in the "Color test" and "Test Dates" attributes as well as any "Test system" parts from another "Test system". This is done by setting a Base item to inherit from in the Properties view.
What's Next?
Once you have item types create, you can create part types.