Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Content layer
id1361711443
Content column
id1361711464
Content block
id1361711453

Prerequisites:


To create a Requirements Coverage by Design Elements Legend


  1. Create a Legend.
  2. Create a Legend Item named '0%-25%'.
  3. Right-click the Legend Item and open its Specification window
  4. Click three dots Image Modified next to the Elements by Condition property to edit it.
  5. In the Elements by Condition dialog, set the Element Type to Requirement.
  6. Rename Custom to Query.
  7. Select Create Operation > Operation from Model > All Leaf Requirements Owned Recursively.
    Image Modified
  8. Select Input > Reset.
    Image Modified
  9. Select Input > Contextual Variable.
    Image Modified
  10. Select All Leaf Requirements Owned Recursively > Edit > Copy.
    Image Modified
  11. Select the root node Query > Edit > Paste.
    Image Modified
  12. Select the copied operation > Use as... > Input of a New Filter.
    Image Modified
  13. Select Predicate > Nested Operation.
    Image Modified
  14. Select Body > Operation from Model > Not.
    Image Modified
  15. Select A > Reset.
    Image Modified
  16. Select A > Operation from Model > isEmpty.
    Image Modified
  17. Select Input > Simple Navigation. Select Satisfied By and set Is Applied to true, and Direction to Source To Target.
    Image Modified
  18. Select All Leaf Requirements Owned Recursively > Use as... > arg of a new Script.
  19. From the Language drop-down list, select Javascript Rhino.
  20. Insert the following script as the Body:

    Code Block
    languagejs
    titleJavaScript Rhino
    var lowerBound = arg3.name.slice(0,arg3.name.indexOf("%"))/100 
    var upperBound = arg3.name.slice(arg3.name.indexOf("-")+1,arg3.name.lastIndexOf("%"))/100 
    
    arg2.size()/arg1.size() > lowerBound && arg2.size()/arg1.size() <= upperBound

    Image Modified

  21. Drag-and-drop Filter onto Create parameter to create a second parameter for the Script.
    Image Modified
  22. Select Filter > Remove.
    Image Modified
  23. Select Create parameter > Element > select the Legend Item for which the expression is defined.
    Image ModifiedImage Modified

    Note

    If you cannot see the Legend Item, make sure the Search for option is set to Any Element.


  24. Clone the created Legend Item and rename the new items accordingly:
    1. 25%-50%
    2. 50%-75%
    3. 75%-100%

Image Modified