Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Content layer
id1361665834
Content column
id1361665845
Content block
id1361665835

To create the Second End Of Association operation for coloring Associations between a Block and a Use Case


  1. Create an Opaque Behavior named 'Second End Of Association'.
  2. Right-click the Opaque Behavior element and open its Specification window. Do one of the following:
    1. Click the plus sign next to the Owned Parameter property to edit it.

      Note

      If you cannot see the Owned Parameter property, make sure the Expert mode is enabled.


    2. On the left side menu, select Parameters > Create.
  3. In the Specification of Parameter window, set Name to AssociationType to Association, and Direction to in. Click Back.
  4. In the Opaque Behavior Specification window, click three dots  next to the Body and Language  property to edit it.
  5. In the Body and Language dialog, select Language > StructuredExpression.
  6. Click Create operation > Script.

    Note

    If you cannot see the Script operation, make sure the Expert mode is enabled.

  7. Set the Operation Name to ‘Second End’.
  8. From the Language drop-down list, select Javascript Rhino.
  9. Insert the following script as the Body:

    Code Block
    languagejs
    titleJavascript Rhino
    var isActor = arg1.iterator()
    isActor.next()
    isActor.next()

  10. Select Second End > arg1 > Reset.
  11. Select Second End > arg1 > Metachain Navigation.
  12. Click Insert.
  13. Under Metaclass or Stereotype, select Association, and under Property, select End Type.
  14. Click OK.
Content block
id1361665833

Excerpt Include
Case Studies for Querying the Model
Case Studies for Querying the Model
nopaneltrue