Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 7.8.0
Div
Classe2e-refDiv
Rp

In the activity diagram, you can call methods of imported classes with the Java adapter.

Multiexcerpt include
MultiExcerptNamejava_collections
PageWithExcerptINTERNAL:_examples_BRIDGE

In the following examples, the Java adapter is used to call method getProducts, which is a member method of class ProductList. It takes a number of product ids as input and returns an array of product objects.

Figure: Calling a Java Method with the Java Adapter

Image Removed

Generally, to class methods are called in an activity diagram by Call Operation Actions. You can select the imported Java method you want to call from the containment tree, and drag and drop in onto the diagram pane.
In the following examples, the Java adapter is used to call method getProducts, which is a member method of class ProductList. It takes a number of product ids as input and returns an array of product objects.

Image Modified

The action pins correspond to the parameters of the class operation. The Java adapter has one input and one output pin. Input pin list represents the input parameter of the Java method getProducts with exactly that same name, output pin return respectively represents the return value of the Java method.

Image Added

Also have a look at the development hints on Getting Started with the Java Adapter > Java Class Development Hints.