You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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.
  3. On the left side of the dialog, click Create operation and select Filter.

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

  4. Select Input parameter and set the value to Find.
  5. Next to Type, click three dots and select Requirement. Click OK.
  6. Set the Operation from Model as the Predicate.
  7. Select the IfThenElse built-in operation from the model. 

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

  8. Reset the Condition parameter.

  9. Set the Operation from Model as the Condition.
  10. Select the isEmpty built-in operation from the model. 
  11. Set the Metachain Navigation as the Input.
  12. Click Insert
  13. Under Metaclass or Stereotype, select Requirement, and under Property, select Text.

  14. Set the Boolean operation for Then and then change its value to true.

  15. Set the Script operation for Else.
  16. Reset the contextual variable and set the Metachain Navigation operation as the value. 
  17. Set Parameter Name to "text".
  18. Click Insert
  19. Under Metaclass or Stereotype, select Requirement, and under Property, select Text.

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

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

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