Tutorials : UML modeling for information system architecture : Module 1: Model with use cases : Lesson 1.7: Modify properties with USPROPS.TXT
  
Lesson 1.7: Modify properties with USPROPS.TXT
Modify properties in the USRPROPS.TXT file by adding a new definition file and then making the new definition the property of an existing Use Case definition.
One of the most powerful features of System Architect is that you can tailor and extend the underlying metamodel of information stored in a project encyclopedia, by adding, hiding, or re-keying properties of definitions. This work is done in a text file called USRPROPS.TXT. When an encyclopedia is loaded, USRPROPS.TXT is parsed along with a file called SAPROPS.CFG (the main System Architect properties file). USRPROPS.TXT overrides SAPROPS.CFG and properties are added, hidden, or re-keyed using a scripting language. Both files are housed in an encyclopedia's Files table.
You are going to add a new definition called Business Requirement, which has a number of properties, such as Benefit, Status, Difficulty, and so on to the Tutorial encyclopedia's USRPROPS.TXT file and then make the new definition the property of an existing Use Case definition.
1 Select Tools > Customize User Properties > Export USRPROPS.TXT (Encyclopedia).
2 In Export User Properties, select a target folder and click Save.
3 Now create a new definition called Business Requirement. In order to add a new definition in System Architect, rename one of the generic User definitions that is provided. The properties that you are creating are a simple text box, with various lengths.
4 Copy and paste the following code to USPROPS.TXT:
Rename Definition "User 1" To "Business Requirement"
DEFINITION "Business Requirement"
{
PROPERTY "Benefit"
{ EDIT Text LENGTH 50 }
PROPERTY "Status"
{ EDIT Text LENGTH 50 }
PROPERTY "Difficulty"
{ EDIT Text LENGTH 50 }
PROPERTY "Assigned to"
{ EDIT Text LENGTH 50 }
PROPERTY "Source Doc"
{ EDIT Text LENGTH 50 }
PROPERTY "Author"
{ EDIT Text LENGTH 50 }
PROPERTY "Revision"
{ EDIT Text LENGTH 50 }
PROPERTY "Date"
{ EDIT Text LENGTH 50 }
PROPERTY "Time"
{ EDIT Text LENGTH 50 }
PROPERTY "Reason"
{ EDIT Text LENGTH 100 }
}
You also want to make this new definition a property of an existing Use Case definition. You will add a new tab called Requirements and a new property that is a list of Business Requirements, described above.
5 Add the following code to USRPROPS.TXT:
Definition "Use Case"
{
CHAPTER "Requirements"
PROPERTY "Business Requirement"
{ ZOOMABLE EDIT ListOf "Business Requirement"
LENGTH 1200 DISPLAY { FORMAT List } ASGRID }
}
The above will display the requirements on a symbol and in the dialog they will be displayed in a grid structure.
6 Save and close the USRPROPS.TXT file.
7 Import USRPROPS.TXT from Tools > Customize User Properties > Import USRPROPS.TXT (Encyclopedia).
8 Reopen the encyclopedia (File > Open Encyclopedia) in order for the changes to take effect.
View the Changes that USRPROPS.TXT Made to the Tutorial Encyclopedia
9 Open up the Use Case diagram we looked at before (click on the UML tab in the explorer, and open the UML Use Case diagram Hotel Reservations Use Case Context.
10 Open the definition Make Reservation.
11 Select the tab labeled Requirements. Note that this entire tab was added through USRPROPS.TXT – if you create a new encyclopedia that does not have this USRPROPS.TXT, this tab would not exist.
Note Every encyclopedia contains an SAPROPS.CFG file and a USRPROPS.TXT file. As a user, you are instructed not to modify SAPROPS.CFG, but to make all modifications/additions you require to USRPROPS.TXT. New versions of System Architect will provide new SAPROPS.CFG files, but will never override your USRPROPS.TXT file. Changes you make to USRPROPS.TXT stay with you, and can become your corporate standard meta properties.
12 Enter a new Business Requirement: click in the Name cell, and then type Track Time of Reservation Request.
Adding a Business Requirement to the Use CaseMake Reservation
13 Click Define to open the full definition of this new requirement. Notice the properties of the requirement are the ones you asked for in USRPROPS.TXT.
14 Click OK to close all dialogs.