Book a Demo

Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Prev Next

Modeling Behavioral Features

When a system is in operation, Instances of the Blocks that have been defined as part of the architecture and detailed design are instantiated. At this time if a Block has a Classifier Behavior defined this behavior will typically begin and will continue operating until the Block is destroyed. Thus in the example of our Car Park System, when the system has been activated the Card Reader will begin operating and its prime behavior will come into effect. In addition to this a Block (even though fundamentally structural in nature) has behavioral features that will be called upon to carry out work. In summary, there are two fundamental definitions of behavior that are defined within the context of a Block, namely:

  • Classifier Behavior - the native behavior that is initiated when a Block is instantiated
  • Behavior Features - these are the Operations and Receptions (and their related Signals)

We will look at these different behaviors in the next sections of the Guide, but it is important to understand that they will work in unison, coordinated by system interactions that will ensure that the operations are called in sequence and that the Signals are received and acted upon by the Receptions.

A Blocks Classifier Behavior

A Block has the potential to do work, but by itself it is a somewhat latent entity and needs to be commanded into action by some type of call to its operations or by the receipt of a signal, state change or other behavioral trigger. A Block has a concept of its native or classifier behavior, as it is formally called. This diagram shows a Block in the Browser window that has a nested Activity that will be defined as the Classifier Behavior for the Block.

To select this behavior for the classifier behavior, open the Properties window and change the Classifier Behavior property by selecting the [...] icon and locating the appropriate Behavior (Activity) as indicated in this illustration.

Operations as Behavioral Features

Blocks can define operations essentially as the 'muscles' of the Block, as it is the operations that do most of the work required of the system. In Enterprise Architect an engineer can access the operations from a number of points in the user interface, but all of these points will open the Features window, which lists the operations on the 'Operations' tab as shown here:

The Features window is useful as a summary of all the structural and behavioral features, including Parts and Interaction Points owned by the Block. The easiest way to create an operation is to select the Block in a diagram or in the Browser window and click on the ribbon item:

     Design > Element > Editor > Features > Operations

Operations are simply created by selecting the 'Operations' tab and adding the name and other details in a row of the window. Any number of operations can be created, and each operation can define any number of parameters, which specify the inputs and outputs to the operation. Their importance will be discussed later in this section when we describe the relationship between Activity Parameters and Action Pins. Operations can also be displayed in a diagram, either on their own or with other features, each type of which is displayed in a separate compartment of the parent element.

There is a wide range of options that govern how the operations are displayed, including the ability not to display the entire compartment or to only display particular operations by suppressing others from display.

This will result in selected operations being hidden on the diagram, which is a very useful presentation device as it helps an engineer create a diagram focused on a particular aspect of the Block, suppressing or hiding irrelevant and distracting content. This diagram fragment shows the result of suppressing operations:

The same can be done for attributes at an element level, and a similar function is available to suppress particular operations, attributes and Tagged Values at a diagram level. An engineer might use the diagram-level function when there is a particular operation that appears on multiple Blocks and they want to suppress it for every element in the diagram.

Operations can be invoked in two modes, either synchronously or asynchronously, and can be initiated in a number of different ways depending on the type of behavior that is orchestrating the systems behavior, including:

  • A Call Operation Action (invocation of an Activity)
  • A Message as part of an Interaction (Sequence diagram)
  • A StateMachine

This means that the operation can be visualized in a range of SysML diagrams and will appear differently in different contexts. For example, in a Sequence diagram where messages are sent between instances of Blocks or other classifiers, the operation will appear as an annotation to one of the Block's incoming messages to show that the operation will be initialized as a result of the message.  Enterprise Architect allows an engineer to access the Block's operation list directly from this diagram and will also allow operations to be created directly from the diagram.

In the case of the Call Operation Action, the element's Pins must be aligned by type and name to the called operation's parameters; Enterprise Architect helps you visualize this mapping on a diagram, using the 'Link to Feature' facility.

Receptions as Behavioral Features

Receptions are another behavioral feature of a Block but, in contrast to an operation, Receptions can only be called asynchronously.  Receptions also work differently to operations in that an Operation Call specifically identifies an operation to be invoked, whereas the receipt of an instance of a Signal is deemed to be a request for any Reception of the receiving object that references that Signal or any direct or indirect generalization of it. In this way there is a level of indirection between the calling element and the Reception. A Reception has parameters corresponding to the attributes of the Signal referenced by the Reception, and these are considered as 'in' parameters of the Reception.

The easiest way to create a Reception is to click on the Block in a diagram or in the Browser window and select the ribbon item 'Design > Element > Editor > Receptions'.

To create a new Reception you must first have created the appropriate Signal to relate the Reception to. When you create the Reception you will be prompted to locate the appropriate Signal in the Browser window as shown here:

Receptions, like operations, can be displayed in a specialized compartment in a Block on a diagram. It is possible to customize the display and suppress all Receptions or configure which particular Receptions are displayed. In this screen capture the engineer has decided to make all Receptions visible, but each diagram and each Block within a diagram can be configured differently.