Example

 

Introduction

In this example, we are going to work on the "Newton" integration project, which is going to build an application based on two model components, "Data" and "GUI".  Each of these model components has been built by a separate team, using its own teamwork environment.

 

As shown in the illustration below, a class belonging to the "Newton" integration project is going to use the "MainWindow" class contained in the "GUI" model component, which itself depends on the "Data" model component.

 

Diagram of our example

 

 

Deploying model components in the "Newton" integration project

Since we are going to be working on the "Newton" integration project, the first step in our example is to deploy the "Data" and "GUI" model components in the "Newton" project.

 

Since the "GUI" model component depends on the "Data" model component, the "Data" model component must be installed first and the "GUI" model component second.

 

Deploying the "Data" component in your project

 

Steps:

1.      In the "Newton" integration project, right-click on any model element to open the context menu.

2.      Run the "MDACs/Model components/Deploy model component" command.  The "Deploy a model component" window then appears.

3.      In the "Path" field, select the "data" model component.  If you click on  icon, a file browser appears, in which you can browse to locate this model component.

4.      Click on "Deploy".

 

Repeat this operation to deploy the "GUI" model component.  As you can see, when the "GUI" model component is selected, the "Dependency" field in the "Deploy model component" field shows a message indicating that model component dependency has been respected (this message is indicated by the  icon).

 

 

Result of the deployment operations

After the "Data" and "GUI" model components have been deployed in the "Newton" integration project, the "Newton" integration project contains the two model components, along with all the model elements they contain (as shown below).  Both the model components and the elements contained therein appear in gray in the explorer, thereby making them easily distinguishable from model elements directly belonging to the "Newton" integration project itself.

 

Our project after deployment of the "Data" and "GUI" model components

 

 

Using a model component element in our project

The model components that have just been deployed, and the elements they have imported into the integration project, are in read-only mode and appear in gray in the explorer, indicating that they are not truly present in the "Newton" integration project, but can be used transparently like any other model element.

 

We are now going to continue by making the "MyApplication" class in our integration project use the "MainWindow" class provided by the "GUI" model component (as shown below).

 

Creating a use link to the "MainWindow" class provided by the "GUI" model component

 

Steps:

1.      In the explorer, select the "MyApplication" class.  This class immediately appears in the fast link editor.

2.      Click on the  icon on the bottom left of the fast link editor, to choose the use view.

3.      Click on the  icon on the bottom right of the fast link editor to "freeze" your selection, thereby activating the edit mode.

4.      In the explorer, select the "MainWindow" class, and drag and drop it to the right of the "MyApplication" class in the fast link editor.

 

The "Newton" integration project is now ready, and the build process can now begin (generation, compilation and linking).