This project is read-only.

Part 3 – Build the Supervisor notation

In this third part of the tutorial we will build a new visual notation for the workshop supervision. It will be used to associate workstations to worksheets and specify how the work is really chained.

Step 1: In the environment/workbenches directory, create the Supervision.view file and open it with your text editor.

Step 2: Type in or copy the following:

view "Supervision" {
  rules => Scenario {
  toolboxes {

Step 3: Type in or copy the following rules:

Scenario -> { Couple | <NextLink {@Couple simple} {@Couple arrow}> }* : free ;
Couple -> {
    [[] 10*10]
      [[] 10*10]
      [[] 10*10]
      [[] 10*10]
    [[] 10*10]
  [<0,10,10,0,140,0,150,10,150,80,140,90,10,90,0,80> |#D7D7D7|#000000:1]
}:stack ;

As seen in previous parts of the tutorial, we define in the Scenario a graph with Couple nodes and NextLink connectors. In the second rule, the “?” operator is used to specify its inner element is optional. From the user perspective, this operator will be rendered as a hot area where the user can drop an element of the specified kind.

Step 4: Type in or copy the following rules:

Worksheet -> {
    [<0,15,10,0,25,0,35,15> |#FFFFFF|#000000:1]
    [[] 15*15]
    <s "ID" 48*20>
    [[] 50*35 |#FFFFFF|#000000:1]
}:vertical ;

Workstation($color) -> { <s "ID" 40*20> [() 50*50 |$color|#000000:1] }:stack ;
AssemblyWorkstation -> Workstation(#E8B3E7) ;
WeldingWorkstation -> Workstation(#97A9FB) ;

We use template rule to simplify the writing of repetitive rules (different kind of workstations). Note that in this view, we have notational symbols named Worksheet, AssemblyWorkstation and WeldingWorkstation. Although they have the same name as previous symbols they have different visual definition in this view. With this view we demonstrate that it is possible for the same concept to have different visual representations in different notations.

Step 5: We build the toolboxes as follow:

toolbox "Elements" {
  element Couple "Couple"
toolbox "New Workstations" {
  element AssemblyWorkstation "Assembly"
  element WeldingWorkstation "Welding"
toolbox "New Worksheet" {
  element Worksheet "Worksheet"
toolbox "Connectors" {
  element NextLink "Link"

Step 6: Now we want the user to be able to reuse worksheets and workstations that have been created using the other notations. This is achieved with the concept of library. Add after the “toolboxes” block (in the “view” block) the following:

libraries {
  library AssemblyWorkstation "Assembly"
  library WeldingWorkstation "Welding"
  library Worksheet "Worksheet"

A library is similar to a toolbox. It lists all the existing notational elements of the specified kind. In our example, we define that the first library will list all the possible AssemblyWorkstation. The fact that the name of the element in this view is the same as in the first notation is not relevant. It is the same here for the sake of simplicity but this is not a constraint.

Step 7: Recompile the three visual notations:

> XOWLGMICompiler tutorial Layout.view Process.view Supervision.view

Step 8: Modify the environment/config.ini file to add the following lines adding our new visual notation to the workbench:

tutorial.view = supervision = Supervision
supervision.view = workbenches/Supervision.view.owl = workbenches/ = workbenches/
supervision.vv = workbenches/Supervision.transform.vv.owl

Step 9: Test in the environment.

Step 9.1: Create a new Workshop Layout diagram and add it a new Assembly Workstation. Set its ID (top data input) to “AW1” and its name (bottom data input) to “MyAssembly”.

Step 9.2: Create a new Manufacturing Process diagram and add a new Worksheet. Set its ID (left data input) to “W1”.

Step 9.3: Create a new Supervision diagram and add a new Couple.

In the Libraries under the toolboxes you should be able to see the following:

Step 9.4: Drag from the Assembly Library the AW1 workstation and add it to the Couple you created (drop zone on the left).

Step 9.5: Drag from the Worksheet Library the W1 worksheet and add it to the Couple (drop zone on the right). The complete couple should look like:

Step 9.6: To ensure the element in the three views are indeed the same, modify from the Supervision diagram the ID of the Workstation and verify it has been also modified in the original Workstation Layout diagram. Do the same with the Worksheet.


With the end of this part of the tutorial we completed the building of a complete set of Domain-Specific Modeling Languages that are integrated within a single environment. We can exchange information between the different languages. As a reference, you will find here the complete workbench produced by these three first parts of the tutorial. You may unzip it in your environment folder.

Last edited May 11, 2012 at 3:59 PM by lwouters, version 3


No comments yet.