Customization of SysML Requirement Types

When you need to record system requirements, both functional and non-functional, requirement modeling will be helpful. Through requirement modeling, requirements are recorded and presented visually as boxes, with a name that summarize the requirement and a set of attributes that define the requirement. The default requirement 'box' allows specifying general attributes like ID, source, kind, verify method, risk and status. You may, however, define your own requirement types that contain attributes related to your domain.

April 8, 2010
User Rating: / 5
Views: 4,779
PDF Link Add comments
Edition: Standard or above (Edition comparison)

  1. Start VP-UML in a new workspace.
  2. Create a new project by selecting File > New Project from the main menu. Name the project as My System.
  3. We are going to record the requirements of two screens of a system - The registration screen and the login screen. Create two requirement diagrams for them. To create a requirement diagram, right click on Requirement Diagram in Diagram Navigator and select New Requirement Diagram from the popup menu. Name the diagram in the box at the top left corner of diagram.
    new requirement diagram
    We shall create two diagrams with names: The registration screen and The login screen. Stay at diagram The registration screen.
    diagrams created
  4. On the left hand side of the diagram you can see the diagram toolbar, where you can pickup a tool like a Requirement, a Model or a Test Case and click on the diagram to create a shape. Normally you will make use of the Requirement tool to create requirements. But in this tutorial, we are going to define our own types first. Select Tools > Configure Requirements from the main menu.
    create requirement menu
  5. The Configure Requirements dialog box appear, with the default requirement type requirement listing there. We need to create two types of requirement:
    Type Description
    User Interface A type of requirement which consists of properties about a screen design.
    Checking A type of requirement which consists of rules for validating input and the proper response to bad input.
  6. Create type User Interface first. Click Add at the bottom left of dialog box. In the Name field, enter User Interface.
    add text attribute
  7. What makes the type User Interface meaningful is its unique attributes (i.e. properties). For type User Interface, the following attributes are needed:
    Attribute Description
    description A description of the screen being documented.
    screen-id A unique and internal value for identifying the screen being documented.
    allow-reset Determine whether there is a Reset button for clearing fields on the screen.
    allow-cancel Determine whether there is a Cancel button to close the screen without proceeding.

    We need to define those properties above. Click Add at the right hand side of the dialog box and select Text Attribute from the popup menu.
  8. Enter description as name.
    name attribute
  9. Follow the previous steps to add text attribute screen-id.
    screen id added
  10. Now comes the third attribute allow-reset. We expect that this is an enumeration attribute which enables the selection Yes or No. Click Add and select Enumeration Attribute from the popup menu. Click on Edit Enumeration... below the attribute list.
    edit enum
  11. In the Edit Enumeration dialog box, click Add and enter Yes. Click Add again and enter No. This specify the two possible values, Yes or No, for this attribute. Click OK to go back to requirement configuration.
    edit enum
  12. With similar steps, create enumeration attribute allow-cancel with possible values - Yes and No (same as what we have done in previous steps for allow-reset).
    allow cancel added
  13. The four attributes are all defined. Besides defining requirement attributes, we can define the formatting attributes for fill, line and font styles. Let's try a different fill color. Click the ... button for Fill.
    edit fill
  14. In the Format Fill dialog box, select yellow and click OK.
    select color
  15. This ends the configuration of type User Interface. Follow step 6 to add another requirement type Checking. Here is a list of attributes:
    Attribute Description
    description A description of checking needed to perform
    policy Determine the action to take when a bad input is detected upon checking. We may allow user to try again, or just cancel the action immediately.
    allowed-attempts The number of attempt user can make.
  16. Follow step 7 and 8 to define attribute description. To define enumeration attribute policy, click Add and select Enumeration Value from the popup menu. Click Edit Enumeration.... In the Edit Enumeration dialog box, add the following values:
    Value
    cancel action for invalid entry
    allow re-try
  17. In most checking, we allow user to try again. Therefore, select allow re-try and check Default value at the bottom. Click OK to go back to requirement configuration.
    set default
  18. Now comes the final attribute - allowed attempts. It is an attribute that requires a numeric input. Therefore, click Add and select Integer Attribute. Enter allowed attempts as name.
    attributes added
  19. Requirement types are configured. Click OK to go back to diagram.
  20. We can now create requirements with defined types. In the diagram toolbar, expand the tool Requirement and select User Interface.
    select user interface
  21. Click on diagram to create a requirement. Name it as Register Form. You got a requirement like this:
    reg form req created
  22. Double click on the attribute description and enter Provide a page for user registration as description. Similarly, double click on screen-id and enter UI-001.
    text attribute set
  23. Remember allow-reset and allow-cancel are enumeration attribute? Double click on allow-reset, you can see that the value is restricted to either Yes or No, as defined. Select Yes.
    select enum
  24. Same for attribute allow-cancel. Choose Yes.
    reset cancel selected
  25. Now, make use of type Checking to specify a requirement for validating form input. Expand User Interface in diagram toolbar and select Checking. Click on diagram to create a requirement. Name it as Email Validation.
    email validation created
  26. Double click on attribute description and enter When submit, check and warn for bad email address. Example : address with '@' sign as description.
    desc entered
  27. It is fine to let user re-enter the correct email address. Therefore, just keep the policy as allow re-try. Leave allowed-attempts empty to indicate that there is no restriction on the number of attempts.
  28. Open diagram The login screen. Create the following requirements by following the step 20 to 27.
    <<User Interface>> Login Screen
    description Provide a page for login
    screen-id UI-002
    allow-reset No
    allow-cancel Yes
    <<Checking>> Empty Field Checking
    description When submit, warn if either or both user name and password fields are empty.
    policy allow re-try
    allowed-attempts  
    <<Checking>> Login Checking
    description When submit, verify and disallow invalid login.
    policy cancel action for invalid entry
    allowed-attempts  

    Finally, you should have a diagram like this:
    requirement diagram done

Rate this Article

Click on one of the stars below to rate this article from 1 (lowest) to 5 (highest).

You may be interested in

  1. Writing Effective Use Case
  2. UML Package Diagram
    Tagged:
  3. Draw Entity Relationship Diagram (ERD)
    Tagged:
  4. Produce UML Use Cases from Business Process Diagram (BPD)
  5. Draw UML Sequence Diagram with Keyboard
Tags of this article:

Comments (0)

Write comment

Rating

Comment

Enter the calculation result

security code