Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Papyrus/UserGuide/ModelExecution/ActiveObjectController
Documentation under construction...
Contents
A Generic Controller for Active Objects
Introduction
Available since Papyrus 1.0, this component allows to control and to observe active objects behaviors and reactions easily.
Model example
This tutorial is based on a simple executable model which imports the library. It consists in two active classes, with classifier behavior. The first active class has the other one as a property and it classifier behavior starts the ActiveObjectController and registers it property. The second one has a reception for a signal and it classifier behavior is waiting for that signal.
The behaviors associated with those classes are specified by activity diagrams.
Importing the library
First of all, to use the library you need to import it. To do so, right click on the root object called model, then go to Import / Import Registered Package / Select ActiveObjectControllerModelLibrary.
There are a lot of libraries in this window, so you can filter by name to get that easier.
Registering active objects
To observe the reaction of an active object, you need to register it in the controller. To do so, in the parent’s classifier behavior you need to send a Register signal with the active object as attribute. Before that, you should start the controller with a CallBehaviorAction that it behavior is on the library.
Starting an execution
To start the execution, just follow the first tutorial on Moka. Cf 2.4.
But for the moment, there is a limit on the using. This framework works only with the PSCS and multithread execution engines, so you should make sure that one of them is selected.
Using the component
When the execution is started, the controller view is awake. Then, the active objects are on the objects list. When you select one of them, you’ll know if it has ports and which signals it could receive.
Moreover, you can show all signals containing in the model and try to use them. To do so, deselect the checkbox with “Hide signals without explicit receptions” label.
If a signal has attributes, you could edit them only if they are primitives (Integer, Boolean, etc…). The editor will shows you if the value that you will have entered is correct.
If everything is ok, the controller allows you to send the signal.
Observing system reactions
Under construction