RADE |
Data Model Customizer for ENOVIA |
Customizing the People ModelerCustomizing ENOVIA People with DMC (publishing on UNIX) |
Use Case |
AbstractThis article aims at presenting a comprehensive customization sample on ENOVIA People. |
People, Organization and Security is a set of tools and
methods designed to help the ENOVIA database administrator determine
which end users of ENOVIA Lifecycle Applications can work on which
project, and specify which functions users will be able to use, and under
which conditions. Furthermore, the tools allow the user to define security
mechanisms for controlling access to ENOVIA objects manipulated using
ENOVIA Lifecycle Applications. The need of P&O customization can be met in several cases:
By customizing P&O objects, you can add security concepts, or modify those already put in place. Such a modification is really sensitive, consequently, the full customization is divided into 2 processes. The first part will deal with the design of the future application. The second part will be executed only by an ENOVIA administrator, to prevent you from losing any information. Indeed, the administrator must verify whether the customization agrees with his recommendations before deploying it. If the model turns out to be valid with the contents of the database, the administrator will update the database. As this task is critical, before updating tables, a backup of the database is performed. Therefore, if an error occurs, the design is still safe, and it is just necessary to execute the second process. |
[Top]
For example, a class called MyPerson deriving from the RscPerson class will represent the business concept of a “person” in the usual P&O sense in place of the RscPerson class. Hence, at runtime, every “person” will be an instance of MyPerson instead of RscPerson. Meanwhile the behavioral model of this “person” will not be changed. In particular, the inherited relationships of the RscPerson with the other native classes will not change and cannot be overridden. It is also true for
RscOrg
,RscRole
andRscProject
classes.The role of the new classes deriving from
RscObject
is to represent business concepts that are not currently accounted for by the P&O data model. The administration management of instances of those classes will be done through the usual P&O tools i.e.VPMPeopleEdit
andVPMPeopleImport
by the P&O administrator. These P&O tools provide the ability of creating, modifying and deleting instances of new classes. During ENOVIA LCA runtime, the only possible entry point to account for those instances is through the Data Group conditions linked to the Privileges of the logged user. These conditions may contain reference to the new classes via the provided context variablesSecurity attributes on classes outside the P&O data domain can be added by derivation as proposed by the current RADE tools. Hence, only those classes that are currently CAA derivable can support some extra security attributes. The role of these security attributes is to be used in the evaluation of the Data Group conditions linked to the Privileges of the logged user to manage the access rights to the instances of the customized class.
![]() |
Usually, class relationships in metadata files can be managed in many different manners. As far as P&O customization is concerned, NOT ALL types of links are allowed:
|
Another consequence of the P&O customization
RscPerson
customization, the
admin user has to be migrated.[Top]
If you have never tried to customize a People modeler, create a database structured like the one shown in the graphic below.
Now, you want to associate to each project a list of implied technologies, and a list of contracts. The context will now establish relations with customized projects, original roles, and customized persons. Each person contains a list of authorized technologies.
[Top]
This step aims at designing the customization and generating the associated metadata file. Everybody can take part to this step. There is no risk for the database. The associated UML schema lists the different relations between objects, and their attributes. In fact, these UML representations will appear in several windows. They are gathered below to provide you with a global model.
[Top]
File
menu, select New->Ot
her->UML
Project
. Click
Next>
.
Next
> and
Finish
.Navigator
view, right-click your project and select
Open as a DMC Project
. Open a DMC
Project
window, select the tool level and click
Next>
.Close
in the Initializing tools
window.Add
and select your prerequisite frameworks. Click
Finish
.Close
in the Installing Prereqs
window.[Top]
File
menu, select New->Ot
her->DMC
Elements->New LCA Customization
. Click
Next>
.
Application Name
field,
MyPeople in this example.
in the Customize LCA
application field and select People
. The list of the Use
Package is automatically updated with the Use Package corresponding to the
application.
Finish
. The wizard
creates a new workspace.[Top]
- In the
Navigator
view, expand the MyPeople node and double-click the .emx file.- From the
File
menu, selectNew->Ot
her->DMC Elements->New Modeler Object
. ClickNext>
.- Enter the name of the new Modeler Object, Contract in this example.
Unlike other modelers, you can create new objects. So, we will present the 2 cases allowed by RADE tools. Keep in mind that RADE tools are generic tools, and you must always check that the change you are performing is granted by People customization rules. Build a new class (ex Contract): To build a new class, you must proceed as if you were customizing the class
RscObject
. At the opposite of basic customizable classes,RscObject
can be derived several times, and is not replaced by the new class created. Thus,RscObject
provides only the structure and a behavior for new classes, in order that they can be interpreted correctly by ENOVIA.
- Select the RscObject in the
Super Class
list.
- Click
Insert
to add any attribute to your Contract.- Optional: Add a new index by using the second
Insert
button.- In this sample, we create a list of STRING as reference to partners.
- Click
OK
to finish the command.
- Enter the name of the new Modeler Object : CustoProject.
- Select the RscProject in the Combo Box.
- Click
Insert
to add any attribute to your CustoProject.- You can also add a new index by using the second
Insert
button.- Click
OK
to finish the command.
[Top]
DMC Project->Generate VPM Dictionary
file
.
The wizard creates MyPeople.metadata under the directory MyPeople/CNext/code/dictionary.
DMC Project->Publish
VPM Dictionary file in database
.
![]() |
MyPeople/CNext/reffiles/DBMS/ddl
.[Top]
Bear in mind that this step is really sensitive. And a bad customization could have your ENOVIA server crashed. So at this step, only an ENOVIA database administrators are allowed to publish modifications to the database, after checking the customization.
To prevent you from losing any information, a backup of your database is REQUIRED before publishing the customization to the database. If any of the following steps failed then return to this backup step and restore your database.
[Top]
Now it is time to modify the ENOVIA database. To do so:
Steps to follow:
Set-up the ENOVIA runtime environment with the catstart command
on Unix:
$ENOVIA_INSTALL_PATH/$OSDS/code/command/catstart -run ksh -env $EnvName
-direnv $EnvDir
on Windows:
%ENOVIA_INSTALL_PATH%\intel_a\code\bin\catstart -run cmd -env %EnvName%
-direnv %EnvDir%
Where:
ENOVIA_INSTALL_PATH is the location where you installed the ENOVIA CD.
OSDS is the Unix operating system tag (eg. aix_a).
EnvName is the name of the ENOVIA environment (Default is: ENOVIA_LCA.V5Rxx.Bxx)
EnvDir is the environment folder containing the EnvName.txt file.
Export the following variables:
ENOVApplicationPath | The location where your customization is stored |
ENOVDBAPSSD | The password of the ENOVIA DBA administrator |
For example:
on Unix:
export ENOVApplicationPath=/u/users/fya/MSDEV/E__TMP_WSCUSTOPEOPLE
export ENOVDBAPSSD=fya
on Windows:
set ENOVApplicationPath=C:\users\fya\MSDEV\E__TMP_WSCUSTOPEOPLE
set ENOVDBAPSSD=fya
![]() |
All other needed parameters are stored in a file CAAPeopleVariables located in ENOVApplicationPath. You cannot go on if this file has not been generated using RADE tools during the first part of the publish operation (simulation mode). You may change the backup/deployment directory referred to by the variable ENOVSavePath to the location of your choice (the default being /tmp on Unix and C:\tmp on Windows) by editing this file. |
WARNING: Particular cases
This is happening whenever the workspace containing the P&O customization (i.e. ENOVApplicationPath) requires a workspace containing any other modeler customizations (Product, Conf, etc.) that itself requires the ENOVIA installation path. In these cases, the CATInstallPath contains a concatenation of all the required workspaces that prevents the P&O publication script from working properly. To avoid this useless concatenation, one supplementary environment variable is required, named ENOVInstallPath. This environment variable needs to be set equal to the ENOVIA installation path only.
For example:
on Unix:
export ENOVInstallPath=$ENOVIA_INSTALL_PATH/$OSDS
on Windows:
set ENOVInstallPath=%ENOVIA_INSTALL_PATH%\intel_a
Where:
ENOVIA_INSTALL_PATH is the location where you installed the ENOVIA CD.
OSDS is the Unix operating system tag (eg. aix_a).
3. Launch the script:
on Unix:
$ENOVIA_INSTALL_PATH/$OSDS/code/command/CAAPublishPnOModel.sh
on Windows:
%ENOVIA_INSTALL_PATH%\intel_a\code\command\CAAPublishPnOModel.bat
You have to know that 4 sub-steps are performed while the script is processed:
on Unix:
on Windows:
Special Note about the Windows .bat file:
It is possible that some steps will not be performed on Windows XP because some subroutine labels declared in the .bat file are not recognized. In this case the whole publication process has to be done again until all steps are correctly performed. Examples of such labels are :DoVPMPeopleImport, :DoLoadAdmin, etc.
Remember that at the end of the publishing process all old records have to be re-imported into the database. This import step is not included in the publishing script: Use the VPMPeopleImport tool to re-import your P&O data after the publishing process. Therefore, you have to retrieve the file AllPnOObjectBeforeCusto stored at the temporary location (/tmp or ENOVSavePath if you modified the default location) and run:
on Unix:
$ENOVIA_INSTALL_PATH/$OSDS/code/command/catstart -run "VPMPeopleImport
/tmp/AllPnOObjectBeforeCusto"
-direnv $EnvDir -env $EnvName
on Windows:
%ENOVIA_INSTALL_PATH%\intel_a\code\bin\catstart -run "VPMPeopleImport
C:\tmp\AllPnOObjectBeforeCusto"
-direnv %EnvDir% -env %EnvName%
where:
)
Note that during the publishing process, VPMPeopleCusto has generated a file called VPMPeopleCusto.import in the directory called ENOVSavePath which can be used to check that the import functionality is correct in the new customized database and environment. This import file contains dummy entities and attributes of each customized type that can be imported with VPMPeopleImport as described above. If this import process is OK then you can safely import AllPnOObjectBeforeCusto.
Now, let's take a look at the People customization by launching VPMPeopleEdit, within the customization environment :
On Unix:
$ENOVIA_INSTALL_PATH/$OSDS/code/command/catstart -run "VPMPeopleEdit"
-direnv $EnvDir -env $EnvName
On Windows
%ENOVIA_INSTALL_PATH%\intel_a\code\bin\catstart -run "VPMPeopleEdit"
-direnv %EnvDir% -env %EnvName%
where :
)
[Top]
In VPMPeopleEdit, by default, customized entities and attributes will appear as defined in the generated file VPMPeopleCusto.CATNls. The names of the entities and attributes will correspond to the names given while customizing People.
So, to modify these names, edit VPMPeopleCusto.CATNls (located in the customization folder under CNext/resources/msgcatalog):
Old names will be replaced by preferred names.
[Top]
Now it is time to test your customization with ENOVIA client.
To use this customization, you must launch ENOVIA server within the environment of the customization. So refer the location where your customization is built on the server, as followed :
On Unix
$ENOVIA_INSTALL_PATH/$OSDS/code/command/enoviastart
-direnv $EnvDir -env $EnvName
-object "-sdirenv $SrvEnvDir -senv $SrvEnvName"On Windows
%ENOVIA_INSTALL_PATH%\intel_a\code\bin\enovia
-direnv %EnvDir% -env %EnvName%
where :
- ENOVIA_INSTALL_PATH is the location where you installed the ENOVIA client.
- OSDS is the client operating system tag (eg. solaris_a, aix_a, hpux_b).
- EnvDir is the client environment folder containing the EnvName.txt file
- EnvName is the name of the ENOVIA client environment ( Default is : ENOVIA_LCA.V5Rxx.Bxx
)
- SrvEnvDir is the server environment folder containing the EnvName.txt file.
- SrvEnvName is the name of the customization environment ( Default is : WorkspaceEnv
)
[Top]
Once your People Customization has been published and tested in your development environment, it is time to deploy it on the production environment.
As for publishing, there is a special process to follow to successfully deploy your People Customization:
Let's detail these steps.
1. Make a database backup
![]() |
To prevent you from losing any information, a backup of
your database is REQUIRED before deploying the customization to the
database. If any of the following steps fail, then return to this backup step and restore your database. |
2. Export People data
This step is REQUIRED. |
A DROP of the old tables is necessary and the People data are entirely deleted. So to restore the People data, an export is required to prepare the last step, which consists in importing these saved data back to the new tables.
On your ENOVIA server installation, run
$ENOVIA_INSTALL_PATH/$OSDS/code/command/catstart -run "VPMPeopleImport
-export
/tmp/AllPnOObjectBeforeCusto"
-direnv $EnvDir -env $EnvName
where :
This will save the People data in a file named AllPnOObjectBeforeCusto (you may set the file name and directory at any suitable locations; temporary directories shown above are for illustration purpose only).
3. Launch the deployment shell: CAADeployPnOCusto.sh
![]() |
The shell CAADeployPnOCusto works nearly like DeployRadeCusto
except that the People data will be entirely deleted. Be sure you have done step 2 before running the deployment shell. |
The deployment shell will:
First, check the prerequisites for the deployment:
![]() |
|
Then:
3.1 - From the UNIX command line, type: cd $ENOVIA_INSTALL_PATH/$OSDS/code/command
where:
3.2 - Create a command file containing all the parameters you will need to run the deployment script. The parameters should all wrap continuously as one line.
![]() |
Because the command line contains the user/password of the LCA admin, maintain the confidentiality of this command file. |
3.3 - The command line is as follows:
./CAADeployPnOCusto.sh ...
-DBVendor | ORACLE or DB2 |
-DBName | The name of your database |
-DBAdmHome | The home directory of Oracle Id or the DB2 instance ID |
-TbsName | The tablespace name used by ENOVIA LCA for its database tables |
-IdxTbsName | The tablespace name used by ENOVIA LCA for its indexes |
-TableOwner | The ID that is creator/owner of database tables |
-AdmUsr | The ENOVIA LCA administrative user ID ( often the same as TableOwner ) |
-AdmPwd | The AdmUser password |
-DBAID | The database administrator ID |
-DBAPwd | The database administrator password |
-EnvDir | The full directory path to the CATEnv directory |
-EnvName | The name of the "ENOVIA_LCA~" file in CATEnv directory without the ".sh" |
-InitRADECustoDir | The ENOVSavePath directory of the publish |
-RADECustoDir | The directory where you want to deploy the customization |
For command line help with this script, simply type: CAADeployPnOCusto.sh <return>
from the UNIX command line and it will return some help text.
Here are two sample executable files, one for Oracle and one for DB2
DB2 :
./CAADeployPnOCusto.sh -DBVendor DB2 -DBName ENOVRADE -DBAID db2adm7 -DBAPwd
db2adm7 -DBAdmHome /home/data/db2adm7 -TbsName TBS1_8K -IdxTbsName TBS1_8K
-TableOwner EV5ADM -AdmUsr ev5adm -AdmPwd EV5ADM -EnvDir /CATEnv -EnvName
ENOVIA_LCA.V5R11.B11 -InitRADECustoDir /home/data/ev5adm/MSDEV/CustoOutput
-RADECustoDir /home/data/vpm5adm/RADECusto
ORACLE:
./CAADeployPnOCusto.sh -DBVendor ORACLE -DBName ORARADE -DBAID ora7
-DBAPwd ora7 -DBAdmHome /home/oracle/8.1.7 -TbsName TBS1_8K -IdxTbsName TBS1_8K
-TableOwner EV5ADM -AdmUsr ev5adm -AdmPwd EV5ADM -EnvDir /CATEnv -EnvName
ENOVIA_LCA.V5R11.B11 -InitRADECustoDir /home/data/ev5adm/MSDEV/CustoOutput
-RADECustoDir /home/data/vpm5adm/RADECusto
3.4 - Run the file script from the UNIX command line. Information status messages appears. Some steps will take several minutes, during which no additional messages will appear.
3.5 - Run ./catstart -run "VPMPeopleEdit" -env
$EnvName
-direnv
$EnvDir
to test your deployment
where :
4. Re-import People data
![]() |
This step is REQUIRED. |
To restore the People data that have been saved at step 2, import them back to the database using the backup file AllPnOObjectBeforeCusto.
On your ENOVIA server installation, run
$ENOVIA_INSTALL_PATH/$OSDS/code/command/catstart -run "VPMPeopleImport
/tmp/AllPnOObjectBeforeCusto"
-direnv $EnvDir -env $EnvName
where :
Be sure to re-import the right file generated at step 2 (in particular check its name and directory if you did not follow the examples).
This step ends the deployment of a People customization.
[Top]
Migrating a People customization from release N to release N+1 is just like any other customization migrations plus the peculiarities of the People customization publication. Refer to the use case "Migrating an Existing Customization" and strictly follow the provided instructions.
Then, you will have to perform a specific People publication of your migrated workspace, just as it is exposed in the present documentation. To know more, see Publishing Process. This completes the migration of your People customization.
[Top]
Version: 1 [Mar 2004] | Document created |
Version: 2 [Dec 2004] | Document updated |
Version: 3 [Apr 2005] | Document updated |
Version: 4 [Oct 2005] | Document updated for Migration and Deployment |
Version: 5 [March 2006] | Document updated |
Version: 6 [Sept 2007] | Document updated for Deployment |
[Top] |
Copyright © 2006, Dassault Systèmes. All rights reserved.