Setting up the Adaplet

You can load the sample data used by the standard adaplet, and use MQL to create a server and vault.

All connected federations must be represented in 3DSpace by Server objects so that OIDs can be generated that indicate the federation to which an object belongs. Be sure that a Server has been created for the existing federation before adding one for the other federation.


Before you begin:
  • If you intend to build a custom mxff library, you must use an installation that agrees in terms of both OS and bit-ness (32-bit or 64-bit) with the target server.
  • The shared library, libmxff.dll (Windows) or libmxff.so (UNIX), is installed in the INSTALL_DIR/ARCH/code/bin/ directory of the 3DEXPERIENCE Platform or 3DSpace Service. The shared library must be in place on all client machines, including 3DSpace servers and remote clients connected via a loose coupling. If Oracle is not your platform database and you will use the standard adaplet, include the Oracle client libraries when installing the 3DSpace clients (either the Studio Modeling Platform or the Server). Alternatively, you can get the Oracle client libraries directly from Oracle.
  1. To load the sample data for the human resources database, run the scott.mql script located in the INSTALL_DIR/samples/mxff/ directory.

    The sample map file (scott.map) is placed in INSTALL_DIR/samples/mxff/, when the Studio Federation Toolkit is installed. The business definitions are provided via an MQL script (scott.mql).

    The scott.mql script creates objects such as “type Department.” The script fails if those objects already exist in the database. The script is intended to run against an empty database or one that does not have the same object definitions. If there is a conflict with the existing database, change the names in the scott.mql script and rerun it. You might also need to make similar adjustments in the mapping file (sample.map ).

    This script adds the required attributes, types, policies, and relationships, as well as a Person, scott, who owns all the objects.

    For more information, see Data Model of the Sample Database and Oracle Sample Table Structures.

  2. If you want to prevent duplicates throughout all vaults, execute this MQL command:

    modify uniquekey mxTNR global;

    If you want to prevent duplicates within the vault, execute this MQL command:

    modify uniquekey mxTNR !global;

  3. Using MQL, use this command description as a guide to create the server. The table describes how to assign values to the parameters in the command.

    Note: If the schemas to be connected are in the same Oracle instance, set MX_USE_SCHEMA_NAMES to true in enovia.ini (previously matrix.ini) and do not create an additional 3DSpace Service. If this is the case, use schema NAME instead of server NAME in the mapping file.
    add server NAME [ADD_ITEM {ADD_ITEM}]
    where ADD_ITEM is:
    description VALUE
    user USER_NAME
    password PASSWORD
    connect CONNECT_STRING
    timezone TIMEZONE
    [!|not]foreign
    [!|not]hidden
    property NAME [valueSTRING]
    property NAME to ADMIN[valueSTRING]
    
    where ADMIN is:
    TYPE NAME

    Server ClauseDescription
    NAMEEach server must have a unique name in the database. The server name is used as the name of the Oracle link and must conform to Oracle naming conventions. Spaces are not allowed. Server names cannot begin with a number, but can contain numbers. Consult Oracle documentation for naming conventions. You can include the federation name in the server name.
    descriptionGeneral information about the purpose of the server.
    usernameUse the Oracle User created for use by the adaplet. Schema owners on both sides must have the create link privilege. The 3DSpace user and the remote database user must already be defined in Oracle with the role CONNECT. If the remote database does not support the CONNECT privilege, the remote user must have at least the basic privileges to work with their tables plus CREATE DATABASE LINK.
    passwordUse the password associated with the Oracle user.
    connect Use the default Oracle database Alias in the Connect String text box. To check this and confirm the Connect String entry, see the MQL Concepts.
    timezoneFor more information, see the MQL Concepts.

    Note: Ensure that a server exists for EVERY federation, including the “Main Matrix” federation. To create this default login Server, use the parameters from the matrix-r connection file.

  4. Use this command description to as a guide to create a vault. The table describes how to assign values to the parameters in the command.

    Note: Prior to defining values, the database administrator (DBA) must define the names of tablespaces and their associated storage.
    add vault NAME [ADD_ITEM {ADD_ITEM}]
    
    where ADD_ITEM is:
    description VALUE
    file MAPFILENAME
    [!|not]hiddenindexspace SPACE
    interface LIBRARYFULLPATH
    map STRING
    property NAME [to ADMINTYPE NAME] [value STRING]
    server SERVERNAME
    tablespace SPACE

    Server ClauseDescription
    NAME Each vault must have a unique name in the database. The name can be up to 128 characters and can contain spaces.
    descriptionGeneral information about the vault.
    fileDefines the map or parameters filename for foreign or external vaults, respectively. The scott.map file is placed in the ENOVIA_INSTALL/api/mxff/ directory when the Studio Federation Toolkit is installed.
    indexspaceSpecifies the Oracle tablespace that stores the index and constraint information for the vault. If you do not specify a tablespace name, the default index tablespace is used.
    interfaceSpecifies the interface as one of the following:

    • UNIX: $MATRIXINSTALL/$MX_ARCH/code/bin/libmxff
    • Windows: %MATRIXINSTALL%/%MX_ARCH%/code/bin/libmxff

    Make sure that both the MX_ARCH and MATRIXHOME variables are set before attempting to create the foreign vault with the Interface field set in this manner.

    mapSpecify the map file with the file clause: add vault scott interface d:\matrix\intel_a\code\bin\libmxff file d:\matrix\samples\mxff\scott.map;

    For more information, see Mapping the Data.

    For more information about working with vaults, see the MQL Concepts. Each foreign vault must use a unique interface. The mxff library can be copied and renamed for different vaults.