To display Parameter Direction and Parameter Type in a single table cell


  1. Create a Generic Table.
  2. Set the Element Type to Parameter and Activity.
  3. Set the Scope to the Activity element which contains the Parameters.
  4. Click the Columns button and select New Custom ColumnExpression dialog opens.
  5. Set the Type as String.
  6. Select the Single Value check box.
  7. Select Create operation > Operation from Model > IfThenElse.

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

  8. Select Condition > Reset.
  9. Select Condition > Type Test.
  10. Select Condition and set the Type to Parameter.
  11. Select Then > Operation from ModelStringConcat.
  12. Select A > Reset.
  13. Select A > Script.
  14. Select A > arg1 > Remove.
  15. Select A > Create parameter > Metachain Navigation.
  16. Set the Parameter Name to direction.
  17. Click Insert
  18. Under Metaclass or Stereotype, select Parameter, and under Property, select Direction.
  19. Select A > Script. From the Language drop-down list, select Javascript Rhino.
  20. Insert the following script as the Body:

    Javascript Rhino
    direction != null && direction.size() > 0 ? direction.iterator().next().name + " : " : " : " ;

  21. Select B > Reset.
  22. Select B > Metachain Navigation.
  23. Click Insert
  24. Under Metaclass or Stereotype, select Parameter, and under Property, select Type.
  25. Click Insert again. 
  26. Under Metaclass or Stereotype, select Type, and under Property, select Name.
  27. Click OK.

Sample model

The model used in these examples is the Case Studies for Querying the Model sample model. To open this model, you need to download case studies for querying the model.mdzip