Configuring Adapter for X-PDM Foundation

You can configure the Adapter for X-PDM Foundation on 3DEXPERIENCE platform Server by editing files XPGAdapterConfig.properties, pdm-cust-config.xml and logback.xml.

Note: After editing all three files in server\STAGING\<enoviaapplicationname>\WEB-INF\classes\XPG you must regenerate the war file using war utility and re-deploying in application server.

  1. Configuring Adapter for X-PDM Foundation:

    The XPGAdapterConfig.properties contains options for E-BOM Exchanges.

    • Options specific to E-BOM Exchange:
      • The value of BOM_Type can be BOM, BOD and BOTH. These values are actually attribute values of part and works as a filter while exporting data.

        For example: For exporting parts from 3DEXPERIENCE platform to X-PDM having BOM_Type attribute set to value BOM, the value in XPGAdapterConfig.properties should be BOM_Type=BOM.

      • supportDoCLCMMapping: For collaborating EBOM document lifecycle set the flag supportDoCLCMMapping to true.

    • Options common for E-BOM Exchange, Engineering Exchange and Enterprise Exchange:

      • Local Gateway URL: The 3DEXPERIENCE platform Gateway server URL, to which events are sent through http or https.

        Local-Gateway-URL=http://<Local_Gateway_server_machine_name>:<port_number>/<Gateway_ war_file_deployment_name>

        Note: Gateway war file deployment name in application server and in 3DEXPERIENCE platform Gateway server url should be same.
      • xPDMSiteIDs: The list of site-ids or a single site-id of the X-PDM site with which the 3DEXPERIENCE platform server intends to exchange data. The value should be separated by comma incase of multiple values.

        For example:

        xPDMSiteIDs=XPDM1,XPDM2

        Note: The values of these site ids should match with the site ids configured with installation of 3DEXPERIENCE platform Gateway server.
  2. Configuring for custom data model (For E-BOM Exchange only)

    pdm-cust-config.xml file contains data model customization handling in Engineering BOM exchange scenario.

    For more information, see Configuring pdm-cust-config.xml For Customized Attributes.
  3. Configure Logging

    • Common for both E-BOM Exchange and Engineering Exchange:

      You can manage the Adapter for X-PDM Foundation logs through a standard logging system and control log levels and appenders.

      The Adapter for X-PDM Foundation logging relies on SLF4J Logback which is the default logging framework. You can change the log level by editing the logback.xml file generated at <3DEXPERIENCE Server Deployment >WEB-INF\classes of the application server.

      To activate the traces of Adapter for X-PDM Foundation, add the following element to the logback.xml file after the <appender>...</appender>.

      <logger name="XPG_INFRASTRUCTURE_SERVER_TRACES" level="LOG-LEVEL" />
      

      where,

      LOG-LEVEL must be one of the following:

      • ALL
      • TRACE
      • DEBUG
      • INFO
      • WARN
      • ERROR
      • OFF
      Note: It is recommended to use INFO as the default LOG-LEVEL.

      By default, the logs are generated in the log file of the 3DEXPERIENCE server. You can also define a dedicated appender for this logger.

    • Only for E-BOM Exchange:

      To activate traces for E-BOM event handler, insert the following in the logback.xml file used by the 3DEXPERIENCE server.

      <logger name="XPG_EBOM_TRACES" level="DEBUG"/>

      By default, , the logs are generated in the log file of the 3DEXPERIENCE server (<3DEXPERIENCE Server Installation>\server\logs\<3DEXPERIENCE Server logfile>.log).

      You can also generate logs in a different file, or files by defining a dedicated appender for this logger. Follow the below methods to generate logs:

      1. To generate logs to a dedicated event handler log file:

        <appender name="XPG_EBOM_EVENT" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file><3DEXPERIENCE Server Installation>\server\Apps\X-PDMXMLV6Connector\<3DEXPERIENCE version>\logs\event-handler.log </file>       
                 <append>true</append>
                 <layout class="ch.qos.logback.classic.PatternLayout">
                   <pattern> %X{eventid} %d %-5level [%logger{64}][%file] %m%n</pattern>
                 </layout>
                 <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
                   <level>debug</level>
                 </filter>
                 <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
                  <maxIndex>10</maxIndex>
                  <FileNamePattern><3DEXPERIENCE Server Installation>/server/Apps/X-PDMXMLV6Connector/<3DEXPERIENCE version>/logs/event-handler.log.%i</FileNamePattern>
                 </rollingPolicy>
                 <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
                  <MaxFileSize>25MB</MaxFileSize>
                 </triggeringPolicy>
         </appender>
        
          <logger name="XPG_EBOM_TRACES" level="DEBUG">
            <appender-ref ref="XPG_EBOM_EVENT" />
         </logger>

        where,

        • <3DEXPERIENCE Server Installation> is the path where the 3DEXPERIENCE Server is installed
        • <3DEXPERIENCE version> is the version of the 3DEXPERIENCE Server.

        The traces are generated in <3DEXPERIENCE Server Installation>\server\Apps\X-PDMXMLV6Connector\<3DEXPERIENCE version>\logs\event-handler.log

      2. To generate event handler logs in a separate file for each event:

        <appender name="XPG_EBOM_EVENT" class="ch.qos.logback.classic.sift.SiftingAppender">
          <discriminator>
              <key>eventid</key>
              <defaultValue>XPGAdaptor</defaultValue>
          </discriminator>
          <sift>
             <appender name="FILE-${eventid}" class="ch.qos.logback.core.FileAppender">
                <file><3DEXPERIENCE Server Installation>\server\Apps\X-PDMXMLV6Connector\<3DEXPERIENCE version>\logs\${eventid}.log</file>       
                <append>true</append>
                <layout class="ch.qos.logback.classic.PatternLayout">
                  <pattern> %X{eventid} %d %-5level[%logger{64}][%file] %m%n</pattern></layout>
              </appender>
            </sift>
          </appender>
          
          <logger name="XPG_EBOM_TRACES" level="DEBUG">
            <appender-ref ref="XPG_EBOM_EVENT" /> 
         </logger>

        where,

        • <3DEXPERIENCE Server Installation> is the path where the 3DEXPERIENCE server is installed
        • <3DEXPERIENCE version> is the version of the 3DEXPERIENCE server.

        The traces are generated in <3DEXPERIENCE Server Installation>\server\Apps\X-PDMXMLV6Connector\<3DEXPERIENCE version>\logs\<eventid>.log