MagicDraw 18.3 Documentation

Skip to end of metadata
Go to start of metadata

To create a new operation

  1. Click Create operation on the left side of the dialog.
  2. Click the appropriate icon on the right side of the dialog to select a new operation type (see the descriptions in following table).

    If the Standard mode is on, switch to the Expert mode to make more operation types available.

Operations group

Click to create a new simple navigation operation.
This icon is available only when specifying members of a union or exclude operation, input collection for a filter operation, scope and type parameters for the find operation.

Standard / ExpertClick to create a new metachain navigation operation.
Standard / ExpertClick to create a new find operation.

Click to create a new filter operation and then specify both the input collection that you need to filter and the filter criteria.


Click to specify a new type test operation as a condition for selected filter operation. In other cases, the icon is not available.

The operation tests, whether the type of the element matches the given type or stereotype. If the types matches, it returns true, and if they not – false. You can also use this operation to check, if the element is an instance of the given classifier.

For this operation, you must specify the following parameters:

  • Element – a model element, which type you need to test.
  • Type – a type, stereotype, or classifier for testing the element.
  • Include Subtypes – true, if the inherited types, stereotypes, or classifiers of the selected Type parameter value should be included in the test; false, if not.


Click to specify a new nested operation.
Nested operation is an operation, whose body is a structured expression.
It is inline equivalent to defining an executable operation in the model as an Opaque Behavior with the StructuredExpression language and then using it.
Nested operation can be used as an argument to higher order operation calls, such as Filter . In simple operation calls it is not available.


Click to create a new union operation and then specify as many members for it as you need.


Click to create a new exclude operation and then specify both From and Excluded members for it.


Click to add a new operation from the model. You can select either one of the built-in operations, which are stored in standard/system profiles of your project, or a custom operation.



Click to create a new script operation, which language can be one of the following:

  • BeanShell
  • Groovy
  • Jython
  • JRuby
  • JavaScript
  • OCL 2.0

It can also be a reference to a java class (Binary).

Values group
ExpertClick to select an element from the model.
ExpertClick to create a String value.
ExpertClick to create a Boolean value.
ExpertClick to create a Integer value.
ExpertClick to create a Null value.
ExpertClick to create a collection of values.
Other group

Click to add an operation executing a specified expression.
Execute operation takes the supplied expression fragment and grafts it into the current expression tree for executing. Expression fragment is an XML string that can be dynamically fetched from any source, such as another tag.

The unique value of this operation is that the specified expression can be calculated dynamically instead of being fixed. As a result, the calculation to be executed can depend on the Contextual element.


Click to add an expression retrieving the contextual variable specified by name. Most common case is accessing the THIS variable, which stores the current Contextual element.
This is usually the starting point – argument for other operations – such as Simple Navigation or Metachain Navigation.

  • No labels