TUTORIAL/Creating a Context Diagram


Once you have created a Papyrus Project you have to apply the ProblemFrames-Profile to the model. In the Outline select the root element of the model (1), in the Properties window select the Profile-tab (2), click the apply registered profile... button (3) and in the popup window select ProblemFrames (4) and click OK.

After you've done that you are ready to proceed.

 

Open the *.di2 file if not yet open. In the Palette (1) (It may be hidden but you can open it by clicking the small arrow on the strip on the right) click Package (2) and place it in the working area.

After that select the placed package Package_0 (3) and in the Properties->General->Name (4) give it a descriptive name.

 

Next still in the Properties select the Profile-tab (1) and under Applied stereotypes click the plus button (2). In the popup find the ContextDiagram stereotype (3) and add it.

 

Next in the Palette click on Class and place it inside the package that you already created.

 

In the Properties under General-tab (1) you can set the name (2).

 

Under ProfileĀ  (1) you can apply the appropriate stereotype (2), e.g., Machine, LexicalDomain etc. (3).
Repeat these steps for all remaining classes.

 

Next create connections between the classes. In the Palette click on Association (1), click inside one of the classes (2) and then click on another class (3). Repeat the procedure to place further connections (4 - 5).
Tip: to cancel the action hit Esc on the keyboard.

You can set the name of the Associations and apply connection stereotypes in the same way as for classes.

 

Additional options need to be changed to display the connections the way we want them. Under Properties->General locate Qualifiers and UNcheck isNavigable (see red line).

 

Under Appearance (1) check Show Name and UNcheck the rest.

 

You can add descriptions to items like classes, associations etc. by selecting the element and under Properties->Profile (1) select and expand an applied stereotype, select the description property (2) and on the right side click the plus button (3) to enter the property value (4).

A list with all the descriptions is created automatically every time you run the ModelGenerator. The list is placed inĀ  a *.uml.glossary.csv file.
Tip: the file is recreated/ overwritten with new information by the ModelGenerator so any manual changes in the file will be lost!

 

When done with the ContextDiagram you are ready to run the ModelGenerator and validate the model with the Validator.

In the Navigator right click the *.uml file and select model Generator.

 

Once finished you will see if the generator has found any errors (red entries) or has warnings (yellow entries).

 

When you fixed found errors, run the ModelGenerator again, then proceed to validating.

In the Navigator right-click the *.uml file and select Validate Now. In the popup select the steps A1 (Context Diagram) and general and click OK.

 

You will see if any inconsistencies were found.
A successful validation yields End Result true.
Errors are indicated by red entries. White entries denote the location of the errors.