One of the predefined Custom type of attributes in SystemWeaver is Unique ID. It supports the creation of unique ID attribute values suitable for, e.g., requirement IDs, and the type is similar to Identity attribute. It builds on the use of two custom attributes - one that defines the context (AUIC) and one that defines the ID (AUID). The result is an ID that is more recognizable than a SystemWeaver ID. The original use case for Unique ID with Context is for requirement IDs.
In the below example, there are two contexts - Function and Component, and IDs will be added to the requirements.
Attributes of type Custom usually have special views connected to them that depend on a specific SID or SIDs being used. For this use case, depend on the usage of the Requirements Meta Model. As mentioned above, an alternative to Unique ID with Context is the standard Identity type attribute. Which attribute type you chose will depend on your use case and needs.
This article describes how to set up the Unique ID with Context attribute solution.
- Creating the Attributes
- Setting as Default Attributes
- Creating Unique ID Context Values
- Viewing ID Statistics
|Note: A Unique ID attribute sequence starts at 1 and it is not possible to restart the sequence value of an existing Unique ID sequence. If you wish to restart a series, consider changing to an Identity attribute. You can move the existing ID values from the AUID attribute to a String attribute to maintain the existing values, and then create the new Identity attribute. Identity attribute sequences can be restarted using a refactoring tool in the swArchitect client.|
- An installation of the SystemWeaver Architect client (swArchitect)
- An installation of the SystemWeaver Explorer client (swExplorer)
Creating the Attributes
The Unique ID concept actually builds on two attributes. If these are not already included in the meta model, use the swArchitect client to add them with the following settings.
Unique ID Context
- SID: AUIC
- Type: Custom, Array
Type: Custom, Single
Setting as Default Attributes
Next, the two attributes should be added to the correct item types as Default attributes. See Adding Default Attributes to Item Types.
Unique ID Context
Below are examples of two item types, "Software component" and "Design function", that have been assigned the Unique ID Context attribute as a default.
Each context will have its own series, e.g., Func-1, Func-2 and Comp-1, Comp-2.
An example of a "Design requirement" with the ID attribute set as a default attribute.
Creating Unique ID Context Values
The Unique ID context values are created using the swExplorer when standing on an item of the item type with Unique ID Context attribute. Once the above configuration is completed, users can begin setting Unique ID Context and ID Values.
Viewing ID Statistics
A list of all Unique ID Context series and the latest value used is contained in the Systems Variables report.