RADE

Data Model Customizer for ENOVIA

Customizing the Document Modeler

Use Case

Abstract

This article presents a comprehensive customization example on ENOVIA People.


Principle

The Document modeler belongs to those modelers that require rigor and knowledge of the model composition.
Document customization will not be as simple as an Action one. It is quite understandable owing to its complexity.

These restrictions are summed up in the graphic below.

You can also customize tables of contents if needed. To do this, just respect the same restrictions as documents ones, and inherit from VPMTOCMaster and VPMTOCVersion.

You are going to customize a Document with a new customized table of contents.

[Top]

Creating a UML Project

  1. From the File menu, select New->Other->UML Project. Click Next>.
  2. Enter the name of the UML project. Click Next> and Finish.
  3. In the Navigator view, right-click your project and select Open as a DMC Project.
  4. In the Open a DMC Project window, select the tool level and click Next>.
  5. Click Close in the Initializing tools window.
  6. Click Add and select your prerequisite frameworks. Click Finish.
  7. Click Close in the Installing Prereqs window.

[Top]

Creating a Document Customization

  1. From the File menu, select New->Other->DMC Elements->New LCA Customization. Click Next>.
  2. Enter the name of the application in the Application Name field, MyDocument in this example.
  3. Click ... in the Customize LCA Application field. The Select a framework dialog box opens.

  1. Select Document. The list of the Use Package is automatically updated with the Use Package corresponding to the application.
  2. Enter the name of your new customization and click OK
  3. Click Finish. The wizard creates a new workspace.

[Top]

Creating a Modeler Object

Remember you have to customize five classes to create a Document  customization.

  1. Expand the MyDocument node and double-click MyDocument.emx.
  2. From the File menu, select Other->DMC elements->New Modeler Object. Click Next>. The New Modeler Object window opens.
  3. Enter the class name in the Class name field, MyDocMaster in this example.
  4. Select the Super class, VPMTPDocumentMaster, in the list. Click Next>.
  5. Click Insert in the Attributes field to add the IsAXMLDoc attribute to your MyDocMaster.
  6. Enter ISaXMLDoc in the Name field and select Boolean in the list. Click Finish when done.
  7. Click Insert in the Attributes field to add the MyAttr1 attribute to your MyDocMaster.
  8. Enter MyAttr1 in the Name field and select Double in the list. Click Finish when done.
  9. Optional: Add a new index using the second Insert button.
  10. Click OK to finish the command.

 

Repeat these operations for:

  • VPMDocSecuredFile
  • VPMDocumentIteration
  • VPMDocumentRevision
  • VPMDocumentIterationFormat
  • VPMTOCMaster
  • VPMTOCVersion
VPMTOCMaster and VPMTOCVersion must be derived only if you want to customize a Table of Contents.

You should now discover new UML schemas  describing  your customization. These UML representations will appear in several windows. Below they are gathered to show the global model.

 

Now, let's prepare ENOVIA execution. Original class names are imposed, and linked together by their names. But now, by customizing the modeler, we have decide to use new class  
names. ENOVIA can not guess the name of these customized classes and therefore, if link are not recreated, ENOVIA can not use these raw data (in particular, saves will not work).
So have a look to the followings steps:

The goal of this step is only to overload the original link to take into account our new customized class.
In this modeler, we have to overload four (or five if we customize TOC) relationships.                   

  1. So, select MyDocSecuredFile in the UML Diagram. Right-click the class, and select Add UML->Attribute.
  2. Enter the name of the new attribute (the name of this attribute MUST be: V_iterationformat) and edit it in the Properties view.

  3. In the Properties view, select the Stereotypes tab, click Add Stereotypes and check RADE_AttributeRelation.

  4. In the Stereotype Properties, you need to enter the name of the pointed class as RADE_AttributeObjectRef. Here enter MyDocFormat as follows:

  1. And repeat this operation for the relationships presented in the following schema:

[Top]

Generating the Dictionary File

  1. From the DMC Project menu, select Generate VPM Dictionary file.

The wizard creates MyDocument.metadata under the directory MyDocument/CNext/code/dictionary. Close Close IBM Rational Software Architect or IBM Rational Software Modeler..

[Top]

Publishing Enovia Data

  1. Select DMC Project->Publish VPM Dictionary file in Database.

[Top]

Check if the settings are correctly valuated and click OK to start the Publish command to finish the scenario.

Testing in ENOVIA

Now it is time to test your customization. To use this customization, launch ENOVIA within the environment of the customization. To do so, indicate the location where your customization is built on the server, as follows:

$ENOVIA_INSTALL_PATH$/$OS$/code/bin/CATSTART -run "ENOVIA.exe" -env $EnvName$ -direnv $EnvDir$ -object "-senv $sEnvName$ -sdirenv $sEnvDir$"

where :

Now we can use our new customized document in ENOVIA.

We can also create a new customized TOC to which we will add new documents :

 

[Top]


History

Version: 1 [Mar 2004] Document created
Version: 2 [March 2006] Document updated
[Top]

Copyright © 1994-2006, Dassault Systèmes. All rights reserved.