Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To find Requirements without text


  1. Create a Smart Package.
  2. Open its Specification window and click three dots next to the Query property to edit it. The Query dialog opens.
  3. Click Create operation → Filter.

    Note

    If you cannot see the Filter operation under Operations, make sure the Expert mode is enabled.

  4. Select Input → Find.
  5. Select Find and set the Type to Requirement.
  6. Select Predicate → Operation from Model → IfThenElse.

    Note

    If you cannot see the IfThenElse operation, make sure the Apply Filter box is not checked.


  7. Select Condition → Reset.

  8. Select Condition → Operation from Model → isEmpty.
  9. Select Input → Metachain Navigation.
  10. Click Insert
  11. Under Metaclass or Stereotype, select Requirement, and under Property, select Text.

  12. Select Then → Boolean. Set the Value to true.

  13. Select Else → Script.

  14. Select the Contextual Variable arg1 → Reset.  
  15. Select the Contextual Variable arg1 → Metachain Navigation
  16. Set Parameter Name to "text".
  17. Click Insert
  18. Under Metaclass or Stereotype, select Requirement, and under Property, select Text.

  19. From the Language drop-down list, select Groovy.
  20. Insert the following script as the Body:

    Code Block
    languagegroovy
    text.size() > 0 ? text.iterator().next().trim().length() == 0 : false ; 

  21. Click OK. You can view the requirements without text nested under the Smart Package in the Containment tree.