Modeling parameters for operations

1. Creating parameter for operation

  1. At first we must have a Magik Examplar with method.
  2. Select method in exemplar and go to the Properties view.
  3. Select UML tab.

    UML tab

  4. In UML tab type parameter Name and press OK.

Parameters have two stereotypes gather and optional. We can change the names and stereotypes in Model Explorer view:

  1. Go to Model Explorer view and expand model.
  2. Navigate to exemplar > Owned methods
  3. Expand method and select Owned parameter.
  4. Go to Properties view
  5. Select Profile tab.
  6. Apply stereotype.

2. Meaning of parameter stereotypes

Name Function
gather Enables to insert many parameters. Must be applied on the last parameter. May occur once.
optional Used for mark optional parameter. Must be applied before gather. May occur once.

Related concepts
Modeling with stereotypes