Skip Headers

Agile Product Lifecycle Management Import/Export Guide Release 9.3.3 E39290-01 |
| Contents

Previous | Next |

# 4 Validating Source Data before Importing

Import Validation is an important feature, because it facilitates and speeds up importing data into PLM data bases by ensuring the import data is in compliance with Agile PLM server rules and can be imported. Invoking Validation does not import any data; it only checks it for compliance with server rules. This chapter provides the necessary referential and procedural information plus use case examples.

## 4.1 Source Data Validation Extent and Scope

Source data validation support includes the PLM file types, objects, tables, and facilities described below. When you invoke this feature, Import will generate a report displaying errors that it encountered during the validation process. Using this report, you can make the necessary corrections and then import the data into the PLM database.

### 4.1.1 Supported File Types and Objects

Source import validation is applicable to aXML, PDX, CSV (delimited text files), and Excel source files. For CSV and Excel formats, you must provide a mapping definition similar to import. For aXML and PDX, there is no need for a mapping definition Source Data Validation because Import will provide the default mapping settings.

Validation is performed on data fields belonging to objects in the following groups:

- Parsing and Validation Options

- Business Rule Options

- Default Types

- Autonumber Sources

Note: Users performing data validation must have the Delete object privilege. This is necessary because data validation will create non-existing objects before validating data and once data validation is complete, it will delete all generated objects. During this process, Agile PLM will issue a single warning stating the user does not have the delete object privilege.

### 4.1.2 Importing Objects when Using Validate

This feature enables verifying the intended content can be imported. To accomplish this function, actual objects are created in Agile PLM which are then checked and given an existing Autonumber in Agile PLM. The drawbacks on using existing Autonumbers are, some installations have limited available numbers and this practice leads Agile to burn many numbers that never used on real objects. To using existing Autonumbers in Agile PLM, the Import function supports Setting Default AutoNumber Sources on page 61.

### 4.1.3 Supported Tables

Validation is performed on data in the following classes and tables:

- Item

  - Title Block

  - Page Two

  - Page Three

  - Bill of material

  - Approved Manufacturer List

  - Relationship

  - Attachments

- Manufacturer

  - Cover Page

  - Page Two

  - Page Three

  - Relationships

  - Attachments

- Manufacturer Part

  - Cover Page

  - Page Two

  - Page Three

  - Relationships

  - Attachments

- Part Group

  - Cover Page

  - Page Two

  - Page Three

  - Relationships

  - Attachments

- Product Service Requests (PSR)

  - Affected Item

  - Cover Page

  - Page Two

  - Page Three

  - Related PSR

  - Relationships

  - Attachments

- Quality Change Requests (QCR)

  - Affected Items

  - Cover Page

  - Page Two

  - Page Three

  - Relationships

  - Attachments

### 4.1.4 Validation Support for Agile SDK and Agile Integration Services

Agile Integration Services (AIS) and Agile Software Developer Kit (SDK) also support source data validation.

- AIS - Provides a new operation called importer.ValidateData to validate source import data.

- SDK - Provides two interfaces called IImportManager.importData() and IImportManager.validateData() to perform import and validation.

### 4.1.5 Validation Results Log File

An XML Document Type Definition (DTD) file is embedded in the import.log to provide the following post validation information:

- Classified and sorted according to severity

  1. Note

  2. Warning

  3. Error

  4. Fatal

- A summarized validation report that displays the number of warnings, errors, and fatal errors that were encountered during the validation process.

#### 4.1.5.1 Sample Validation Log File Output

    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE import-log [
    <!ELEMENT import-log (begin-import,(note|warning|error|fatal)*,validate-summary?,record-summary*,end-import)>
    <!ELEMENT begin-import (#PCDATA)>
    <!ATTLIST begin-import timestamp CDATA #REQUIRED>
    <!ELEMENT note (#PCDATA)>
    <!ATTLIST note
         context CDATA     #IMPLIED
         line CDATA     #IMPLIED
         type CDATA     #IMPLIED
    >
    <!ELEMENT warning (#PCDATA)>
    <!ATTLIST warning
         context CDATA     #IMPLIED
         line CDATA     #IMPLIED
         type CDATA     #IMPLIED
    >
    <!ELEMENT error (#PCDATA)>
    <!ATTLIST error
         context CDATA     #IMPLIED
         line CDATA     #IMPLIED
         type CDATA     #IMPLIED
    >
    <!ELEMENT fatal (#PCDATA)>
    <!ATTLIST fatal
         context CDATA     #IMPLIED
         line CDATA     #IMPLIED
         type CDATA     #IMPLIED
    >
    <!ELEMENT validate-summary EMPTY>
    <!ATTLIST validate-summary
         warning NMTOKEN #REQUIRED
         error NMTOKEN #REQUIRED
         fatal CDATA #REQUIRED
    >
    <!ELEMENT record-summary EMPTY>
    <!ATTLIST record-summary
         accepted NMTOKEN #REQUIRED
         ignored NMTOKEN #REQUIRED
         import-type CDATA #REQUIRED
         rejected NMTOKEN #REQUIRED
    >
    <!ELEMENT end-import (#PCDATA)>
    <!ATTLIST end-import
         fatal NMTOKEN #REQUIRED
         timestamp CDATA #REQUIRED
    >]>
    <import-log>
    <begin-import timestamp="27/04/2007 07:45:49 AM BST">Begin validate.</begin-import>
    <note line="6">Value for property &apos;Title Block.Number&apos; changed during Case validation; value &apos;a2&apos; became &apos;A2&apos;.</note>
    <note line="6">Value for property &apos;BOM.Item Number&apos; changed during Case validation; value &apos;a2&apos; became &apos;A2&apos;.</note>
    <error type="com.agile.imp.pc.adapter.ImportProductContentAPIException" line="7" context="Part - Number: A2; BOM: Item Number: A21">Could not process the BOM and/or AML for item &apos;A2&apos; - BOM/AML/Attachments will be rejected:
    Reference designator/quantity mismatch: There are 10 reference designators and quantity is 5.</error>
    <error type="com.agile.imp.pc.adapter.ImportProductContentAPIException" line="5" context="Part - Number: A12; BOM: Item Number: A123">Could not process the BOM and/or AML for item &apos;A12&apos; - BOM/AML/Attachments will be rejected:
    Reference designator/quantity mismatch: There are 8 reference designators and quantity is 5.</error>
    <error type="com.agile.imp.pc.adapter.ImportProductContentAPIException" line="4" context="Part - Number: A1; BOM: Item Number: A12">Could not process the BOM and/or AML for item &apos;A1&apos; - BOM/AML/Attachments will be rejected:
    Reference designator/quantity mismatch: There are 7 reference designators and quantity is 3.</error>
    <error type="com.agile.imp.pc.adapter.ImportProductContentAPIException" line="3" context="Part - Number: A0; BOM: Item Number: A1">Could not process the BOM and/or AML for item &apos;A0&apos; - BOM/AML/Attachments will be rejected:
    Reference designator/quantity mismatch: There are 6 reference designators and quantity is 2.</error>
    <validate-summary warning="0" error="4" fatal="0"/>
    <end-import timestamp="27/04/2007 07:45:50 AM BST" fatal="false">Complete validate.</end-import>
    </import-log>

## 4.2 Data Validation Procedures and Examples

When you invoke the Import Wizard, it will open in the Import Source page. To validate source data, you must select the option group using the Preferences dialog. The following procedure and example describe the Preferences dialog and validating a source aXML file.

To view parameters and settings in each group:

1. In Agile PLM, select Tools >Import. The Import Wizard opens in the Import Source page.

2. Click Preferences. The Specify Preferences Settings dialog opens in the Parsing and Validation Options group and displays the data elements that you can set for this group.

3. Using the drop-down list, you can view and set the data elements for Business Rule Options, Default Types, and AutoNumber Sources.

### 4.2.1 A Data Validation Example

The following procedure is an example of validating a source aXML file for compliance with BOM and AML requirements. The steps are similar to those documented in Setting the Selective Remove Option on page 51 and Selectively Accepting/Rejecting Non-Existing Objects after Validation on page 47.

To validate a source aXML data file:

1. In Agile PLM, select Tools and Settings >Import. The Import Wizard opens in the Import Source page.

2. Use Browse to select the Import source, and select an aXML file.

3. Click Preferences and select Business Rule. The other options that you can select are Parsing and Validation, Default Types, and Autonumber Sources.

4. In the Business Rule page, set Change Mode to Authoring (it is also applicable to the Redline mode). Click Save.

5. Click Next. The Specify File Content page opens. Click Next.

6. Choose Item > Bill of Material > Approved Manufacturer List.

7. Click Next. The Select Change order and Mapping page opens.

8. Click Validate. The validation results are displayed on the screen.