Deploying model components

 

Introduction

The deployment of a model component introduces us into the realm of model component usage, and is the first user-oriented phase of the model component life cycle (as opposed to the developer-oriented model component development and packaging phases).

 

Model components are deployed by users wishing to use them in their own projects.  When a model component has been deployed in a project, it and the model elements it contains appear in the explorer in gray, and are in read-only mode.  They are visible in the explorer and can be used transparently, but are not truly present in the project in which they have been deployed.

 

When the deployment command is run, no matter what the model element selected, the model component is always deployed at the project root.

 

If a model component depends on another model component, the other model component must be deployed first.

 

Model component deployment includes the following operations:

·         the selection of the model component to be deployed in your project

·         the resolution of any deployment issues detected

 

 

Selecting a model component to deploy

To deploy a model component, carry out the steps shown in the screenshots below.

 

Running the "Deploy model component" command

 

Steps:

1.      In your 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 of this window, enter the path of the model component you want to deploy in your project.  If you click on  icon, a file browser appears, in which you can browse to locate the model component of your choice.

 

 

The "Deploy a model component" window

Once you have selected the model component you want to deploy in your project, the "Deploy a model component" window displays related information in the "Model component information" section of the window, including important information on model component dependencies that must be respected.

 

The "Deploy a model component" window

 

Key:

1.      The "Path" field is used to select the model component to be deployed.  If you click on  icon, a file browser appears, in which you can browse to locate the model component of your choice.

2.      The "Name" field gives the name of the selected model component.

3.      The "Version" fields provide the version number of the selected model component.

4.      The "Description" field displays the description of the selected model component.

5.      The "Dependencies" field shows any dependencies that may exist between the selected model component and another model component.  If an existing dependency has been respected (in other words, if the other model component has already been deployed in its correct version in your project), the  icon appears next to the dependency itself.  However, if the dependency has not been respected (that is, if the other model component has either not yet been deployed in your project, or if its version number is not correct), the  icon appears.

6.      The "Warning" field provides information on any issues that you must resolve before continuing with the deployment of your model component.

 

 

Solving deployment issues

Three types of issue can arise during deployment:

1.      The "Root directory for generation" Objecteering Modeler parameter  has not been defined.  If external files have been included in the model component using the $(GenRoot) variable (please see "Developing model components"), this parameter must be defined, in order for the files to be deployed in the correct location.  To solve this problem, simply click on the  "MDAC options" icon in the toolbar, go into the "Directories" parameter set and define the "Root directory for generation" parameter.  You can then run the model component deployment operation again.

2.      Not all mandatory MDACs have been deployed in the project in which you want to deploy the model component.  If the model component you want to deploy includes note and tagged value types specific to a given MDAC, then this MDAC must be deployed in your project before you deploy the model component.  To solve this problem, simply run the "Tools/Deploy an MDAC" command, select the MDAC you need to deploy and launch the MDAC deployment operation.  You can then run the model component deployment operation again.

3.      A dependency existing between the model component you want to deploy and another model component has not been respected. Dependencies between model components are so-called strict dependencies, which means that a model component depends on a specific version of another model component, which must be deployed first in a project.  To solve this problem, simply first deploy the other model component (indicated in the "Dependencies" field) in your project, in the exact version stated, and then run the deployment operation for the model component you want to deploy again.

 

 

Launching the deployment operation

Once you have selected the model component to be deployed, and resolved any potential issues indicated in the "Warning" field, simply click on the "Deploy" button to launch the model component deployment operation.