Scan services

 

Purpose

It is always possible and not discouraged to browse metamodel meta-associations using the usual J navigation mechanism.  Scan services provide a uniform way to browse a model, by using the most commonly used paths.

 

Scan services skip other uninteresting intermediate metaclasses, such as metaclasses representing links ("Use", "Communication", "Realization").

 

 

Usage

Most metaclasses have scan services.  Any time you wish to browse, please consult the origin metaclass, and see if the required service is present.

 

All scan services return sets, even if there can exist only one single related element.

 

This is practical for diffusing messages to the result, even if nothing is returned.

 

 

Example

We want to know the UseCases that cooperate with an Actor.  We first have to look at the "Actor" documentation.  We can get this result in the usual way, by browsing the associated "Communication" occurrences, and then the UseCases associated with these occurrences.

 

Scan services will provide the result through the following simple instruction:

cooperatingUseCase = myActor.getCooperatingUseCases();