MSC (Message Sequence Chart)
- MSC (Message Sequence Chart)
- MSC (Message Sequence Chart)
Goal of the MSC
Introduction
Message Sequence Chart (MSC) is a generic program allowing adding a dynamic dimension to a static graph.
The aim of the MSC is to be able to tell the story of objects and flows thanks to a temporal dimension.
It can be configured to be used in every arKItect data model and for any types of objects and flows.
We will see in this page how to configure MSC in your own data model with arKItect designer in order to customize it for your projects, then what are the different functionalities of the MSC object and how to use them.
Overview
Graph (static view) | MSC (dynamic view) |
---|---|
Comment : A MSC object is added in this graph and will provide a temporal dimension. | Comment : The arrows and texts in blue are comments to explain how to read it (for those who are new to MSC diagrams) :
|
How to configurate MSC in arKItect designer
As a reminder, to display the windows "rules" and "filters" : Rules and Filters
Pre-request : have an existing data model
We will explain how to add the MSC type in your data model with a simple example from which you will be able to do it in your own project.
To use the MSC, the minimum required in your data model is 1 type of object linked by 1 type of flow. So we consider a simple data model named "Functional Architecture" composed of 1 type of object (named "Function") linked with 1 type of flow (named "Flow"), see figure below.
Add MSC : overview
All you need to choose in order to configure the MSC are :
- What kind of object
- What kind of flow
Where you will enable MSC diagramming
To do this you will have to configure your arKItect data model :
- Rules
- Attributes
- Filters
1. Add MSC as an object in the Rules
Create the MSC object
In the window "Rules", click on the root of your data model ("add MSC in your data model" is this example) --> right click --> "Add Rule". A new window opens up, you have to complete different parts as suggested in the example (see sidebar in green) and then click on "Add".
You will obtain as results a new type named "MSC functions" :
Decide where you can create MSC
The fact to have the type "MSC Functions" under the root allow representing MSC objects only at the top level, i.e. to define the story of the top level functions.
It is the idea of MSC to tell the story of the place where you put the object MSC. Concretely, add the type "MSC Functions" under the root allow to your MSC displaying the top level functions and their sub-functions and flows.
You can also chose to add the object "MSC functions" as a sub-type of "Function" by drag & dropping the type "MSC Functions" to "Function" (see image below)
Doing this, it will be possible to create MSC at every level of the functions hierarchy.
In our example we only let the type "MSC Functions" under the root, not under Function.
2. Add MSC : attributes
Now that your type "MSC Functions" has been created, you have to configure 2 attributes.
Reminter : how to create an attribute
See the page : Defining Type Attributes
Configure the first attribute
Add a new memo attribute named "msc" to store the MSC containt, configurate in this way :
- Name : "msc" (nothing else!)
- Type : "MEMO"
- Check "read-only"
- Uncheck : "display in diagrams" : "name" ; "icon" ; "value" (you don't need to see this in your MSC object)
Click on "Add"
Note the name “msc” is reserved.
Configure the second attribute
Add a new program attribute to call MSC, configurate in this way :
- Name : "start msc" (or another name)
- Type : "Program"
- Check "read-only"
- Check "Default value"
- Uncheck "Object Modifiable"
- Click on "Edit" and add the code below :
Code for this example : | How customize the code for your project : |
---|---|
You have to initialize the program with the correct objects ("Function" and "flow" in this example)
Here is an other example with several objects and flows : |
- Click on "Add"
3. Add MSC objects in your filters
Now your new type of object "MSC Functions" is operational and you can add it in your diagram.
How to use the object MSC
In order to show the different features of MSC object, we will continue with the data model that we have instantiated above. We consider the view "Functional Architecture", where we have created 3 functions, 1 Flow and 1 object MSC as shown below:
Start and save MSC
- To launch the MSC view you can right click on the object "MSC Functions" then click on "start msc", or click on the object "MSC Functions" --> "properties" --> attribute "start msc (Program)" --> "Edit..." --> "Run".
This is the normal Man Machine interface in arKItect in order to launch a script. - To quit the MSC view you have to save it ("ctrl + S" or "File" --> "save") and then close the windows. If you close the window and forget to save before, a window pop-up will ask you if you want to save modifications before.
MSC view doesn't synchronize the modifications in real time with arKItect: your changes are taken into account when you save the diagram.
Overview of the MSC view
There is a synchronization between object of the dynamic diagram (MSC) and static diagram (IBD) :
In IBD (static diagram) | In MSC (dynamic diagram) | |
---|---|---|
Adding an element in a view adds it automatically in the other view ? | Yes, it is added in MSC after running program | Yes, it is added in IBD after save |
Renaming an element in a view renames it automatically in the other view ? | Yes, it is renamed in MSC after running program | Yes, it is renamed in IBD after save |
Deleting / removing an element in a view delete it automatically in the other view ? | Yes, it is deleted in MSC after running program and a note will specify which object has been deleted. | No, it is only removed in the MSC view by removing it from the graph |
In the MSC terminology, the objects (here "Functions") are named "Actors" and the flow still "Flow" or messages.
There are 4 parts in the MSC view :
- The graph : is where you build your MSC diagram. The MSC building can be automated under certain conditions.
- The Tree view : is a hierarchical description of objects available at the location the MSC object is defined.
- The Message list : is the list of flows/messages you can use in your MSC, available at the location of the MSC.
- The Toolbar : provides functions to duplicate flows, modify system options and graphical properties, undo / redo, zoom in / zoom out.
The graph
Add element
By right clickling on the graph and select "Add element", you can add a new element to display (mainly flows). This new element can already exists in arKItect or be created here.
The "Element Type" allow you chosing between :
- Simple : to add a flow linked to 1 or 2 actor(s).
- Loop : to create a loop with a flow linked to 1 or 2 actor(s) and a title to edit
- Opt (optionnal) : to create an optionnal flow linked to 1 or 2 actor(s) and a title to edit.
- Alt (alternative) : to create 2 alternatives flows (so 2 different flows) linked to 1 or 2 actor(s), separated by a dotted line and 2 titles to edit.
- Par (parallel) : to create 2 parallel flows (so 2 different flows) linked to 1 or 2 actor(s), separated by a dotted line and 2 titles to edit.
- Note left : to create a note at the left of an actor, with a title to edit.
- Note right : to create a note at the right of an actor, with a title to edit.
- Note over : to create a note between 2 actors, with a title to edit.
- State : to create a state on the life line of an actor, with a title to edit.
Modify element's order
To tell the story wished you have to modify the Actors' and Flows' order (once the elements needed have been added in the graph) moving the Actors ("right" and "left" on the toolbar or on your keyboard) and moving the Flows ("up" and "down" on the toolbar or on your keyboard) .
Modify Flows
Right click on the flow, "properties" allows modifying the Flows
- From which actor the Flow is produced
- To which actor the Flow is consumed
- And even to change the Flow to another existing
Rename, remove and duplicate
To rename or remove an Actor, right click on it on the graph and select "Rename..." or "Remove".
To rename, remove or duplicate a flow, right click on it of the graph and select "Rename..." or "Remove" or "Duplicate".
Expand and collapse
To expand or collapse an Actor, right click on it on the graph and select "Collapse" or "Expand".
When you add a sub-actor (for example "Function_2"), its parent ("Function_1" here) will be indicated at the top of the box and separated by a " / " (see image below).
Function "Function_2" expanded | Function "Function_2" collapsed | How to expand ? (same for collapse) |
---|---|---|
The Tree view
Under "add statement" are represented the objects (actors) where you have put the object MSC in the diagram IDB.
This window allows :
| How to read it ? |
---|---|
Function (name of the actor type) : Function_1 (name of the top level actor) Actor (classifier to list the sub-actors) Function (name of the actor type) : Function_2 (name of the sub-actor) Inbound (classifier to list the Flows consumed by "Function_2") Flow (name of the flow type) : Flow (name of the flow) Function (name of the actor type) : Function (name of the actor which produce the flow "Flow") Function (name of the actor type) : Function (name of the top level actor) Outbound (classifier to list the Flows produced by "Function") Flow (name of the flow type) : Flow (name of the flow) Function (name of the actor type) : Function_2 (name of the actor which consumes the flow "Flow") |
2. To select (double click) an element displays automatically the upper actors and flows | What is displayed in the graph and why ? |
---|---|
2.a. Actor "Function_1" is selected | 2.a. "Function_1" result
|
2.b. Actor "Function_2" is selected | 2.b. "Function_2" result Function_2 is selected and so its upper element in the Tree view "Function_1" also is. Nevertheless, Function_2 being a sub-actor of Function_1 |
2.c. Flow "Flow" is selected | 2.c. "Flow" result "Flow" is selected and so its upper elements in the Tree view "Function_1" and "Function_2" also are. As a consequence the function "Function_2" |
2.d. Function "Function" producing "Flow" is selected | 2.d. "Function" producing "Flow" result
|
Message list
You can select "simple", "Alt", Par" or "Loop" and then add flows in graph by drag & dropping them.
The flows proposed are both those from arKItect and those created in the MSC view (they are displayed in the message list after saving)
Toolbar
The main functionalities are :
- Undo-redo : it works until you save.
- Plain UML : to configurate your style.
- Edit --> duplicate selected object : to duplicate FLows ; clear : to remove all Actors and Flows.
- Setting --> options : everything is configurable in the MSC view (style, graphical properties, ...)
- Zoom in, zoom out
MSC view doesn't synchronize the modifications in real time with arKItect: your changes are taken into account when you save the diagram.
How to automatically create MSC
Produce MSC from current diagram
There is a possibility to generate MSC automatically from a diagram with every objects and links of this diagram. To do this, change the code adding " appType=u'FC' " at the corresponding line (see example below).
Produce MSC from chains
One specific case is to generate MSC automatically from a Functional Chain or an Allocation Chain, the configuration being a bit different and the MSC view having some additionnal special features.
To know more about it : 3.1.c. Functional Chains