Agile Product Lifecycle Management: AIS Developer Guide
Agile Product Lifecycle Management: AIS Developer Guide
Agile Product Lifecycle Management: AIS Developer Guide
This software and related documentation are provided under a license agreement containing
restrictions on use and disclosure and are protected by intellectual property laws. Except as
expressly permitted in your license agreement or allowed by law, you may not use, copy,
reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish or
display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation
of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be
error-free. If you find any errors, please report them to us in writing.
If this software or related documentation is delivered to the U.S. Government or anyone licensing it
on behalf of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated
software, any programs installed on the hardware, and/or documentation, delivered to U.S.
Government end users are "commercial computer software" pursuant to the applicable Federal
Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication,
disclosure, modification, and adaptation of the programs, including any operating system, integrated
software, any programs installed on the hardware, and/or documentation, shall be subject to license
terms and license restrictions applicable to the programs. No other rights are granted to the U.S.
Government.
This software is developed for general use in a variety of information management applications. It is
not developed or intended for use in any inherently dangerous applications, including applications
which may create a risk of personal injury. If you use this software in dangerous applications, then
you shall be responsible to take all appropriate fail-safe, backup, redundancy and other measures
to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any liability for
any damages caused by use of this software in dangerous applications.
Oracle and Java are registered trademarks of Oracle Corporation and/or its affiliates. Other names
may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC
trademarks are used under license and are trademarks or registered trademarks of SPARC
International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or
registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open
Group.
This software or hardware and documentation may provide access to or information on content,
products and services from third parties. Oracle Corporation and its affiliates are not responsible for
and expressly disclaim all warranties of any kind with respect to third party content, products and
services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages
incurred due to your access to or use of third party content, products or services. The RMW product
includes software developed by the Visigoth Software Society.
CONTENTS
Copyright and Trademarks .............................................................................................................2
New in Release 9.3.2 Rev 3............................................................................................................8
New in Release 9.3.2 Rev 2 ................................................................................................ 8
New in Release 9.3.2 ........................................................................................................... 8
Chapter 1 ......................................................................................................................... 1
Introduction.................................................................................................................... 1
Chapter 2 ......................................................................................................................... 9
Chapter 3 ....................................................................................................................... 23
Importing Data............................................................................................................. 31
No t e To read the PDF files, you must use the free Adobe Acrobat Reader version 9.0 or later.
This program can be downloaded from the Adobe web site http://www.adobe.com.
No t e Oracle customers have access to electronic support through My Oracle Support. For
information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
Before calling Oracle Support about a problem with an Agile PLM manual, please have
the full part number, which is located on the title page.
Readme
Any last-minute information about Agile PLM can be found in the Readme file on the Oracle
Technology Network (OTN) web site http://www.oracle.com/technetwork/documentation/agile-
085940.html.
This documentation may contain links to Web sites of other companies or organizations that Oracle
does not own or control. Oracle neither evaluates nor makes any representations regarding the
accessibility of these web sites.
New in Release 9.3.2 Rev 3
The Import function supports importing Microsoft 2007-2010 Excel (XLSX) file format. For more
information, see Importing XLSX File Formats on page 41.
Resolved Issue
The issue with the add and update options which performed a complete replace is resolved in this
release. In this release, when you import a relationship with an add or update option, the code no
longer performs a complete replace and performs the specified add or update operation.
Export
These are the new tables that Export supports under User Groups. For descriptions and examples,
see Working with Tables in Export on page 27.
Functional Teams
Job Functions
Discussions
ActionItems
Import
These are the new tables that Import supports under User Groups. For descriptions and examples,
see Working with Tables in Import on page 38.
Job Functions
Discussions
ActionItems
Chapter 1
Introduction
This chapter includes the following:
Understanding AIS............................................................................................................................................... 1
Understanding AIS Web Services ....................................................................................................................... 4
Web Services Operations .................................................................................................................................... 5
Web Services Extensions .................................................................................................................................... 7
Security Considerations ....................................................................................................................................... 7
Understanding AIS
The Agile Integration Services (AIS) are a collection of predefined Web Services in the Agile
Integration Framework that enable communication between the Agile Application Server and
disparate systems including:
Enterprise Resource Planning (ERP) systems
Customer Resource Management (CRM) systems
Business-to-Business Integration systems (B2B)
Other Agile PLM systems and supply chain partners
Using AIS to exchange content with other systems simplifies the process for aggregating
unprocessed product content, and makes critical product content available in real time to other
systems. AIS Web Services also provide import and export capabilities that you can use to:
Make product content available to Enterprise Application Integration (EAI) systems
Share product content with product design, manufacturing planning, shop floor, and ERP and
CRM applications
Make product content available to B2B systems that can transfer Agile Application Server data
across corporate boundaries to external applications
Provide content to custom applications
Import product content data from ERP and other supply-chain applications
1
AIS Developer Guide
Key Features
Key features supported by AIS include:
Programmatic access to data - AIS supports programmatic access to data stored in Agile PLM
systems.
Programmatic validation of imported data- Using the Agile SDK methods, AIS enables checking
the imported data for compliance with server rules before they are actually imported.
Product content accessibility - AIS provides accessibility to Agile product content outside of
corporate firewalls using standard HTTP(S) technology.
Apache Axis support - Agile Web Service Extensions (WSX) are based on the Apache
eXtensible Interaction System (Axis) packages and Agile certifies client applications that use
the Axis package client.
No t e Export and Import attachment types are not compatible with the .Net attachment types.
Multiple output format support - AIS supports the aXML and Product Data eXchange (PDX) 1.0
formats (PDX is defined in Web Services Operations).
Internet Security safeguards - AIS communicates with XML-compliant applications using Internet-
standard communication and security protocols (HTTP and SSL), for a secure and firewall-
friendly interface.
Multilevel BOM support - AIS supports converting a multilevel BOM into individual parts data in
the XML format.
AIS Architecture
Connection to AIS is established using standard Web service invocation methodologies shown in
the following illustration.
AIS Folders
AIS documentation and source files for sample clients are in the AIS_samples.zip folder. You can
find this folder in Oracle Oracle Technology Network at:
http://www.oracle.com/technetwork/indexes/samplecode/agileplm-sample-520945.html. For more
information, contact your System Administrator, or refer to your Agile PLM installation Guide.
3
AIS Developer Guide
A Web service makes remote procedure calls (RPC) across the Internet. It uses:
HTTP(S) or other transport protocols such as HTTP to transport requests and responses.
Simple Object Access Protocol (SOAP) to communicate the request and response information.
Web Services have certain limitations of the technology as it exists today, for example, supported
software and specifications, problems using certain versions of applications or tools. In view of
these constraints, consider the following when developing Web service applications:
When developing Web service applications, avoid advanced operations such as distributed
garbage collection, object activation, or call by reference. SOAP as a simple mechanism for
handling data and requests over a transport medium is not designed to handle these
operations.
Web Services are network-based and are therefore affected by network traffic. The latency for
any Web service invocation can often be measured in hundreds of milliseconds. Thus, the
extent of functionality provided by the service must be significant enough to warrant making a
high-latency call.
Web Services do not work well with conversational programming languages. Thus, when
designing services that you want to expose, make the service as independent as possible from
these development tools.
No t e AIS Web services do not currently support UDDI or other service discovery layers.
5
AIS Developer Guide
No t e The value of the QPTLA is computed as the sum over recursive products starting from
the top of the BOM tree. exportPartlist calculates the QPTLA for each unique item-
revision pair, and returns the results in the Part Quantities element of the resulting aXML
output.
importData - A Web service operation that imports data into the Agile PLM system. The
importDataRequest element encapsulates all the information needed to request an import
operation. The source for the import data can be an Agile database, a third party Product Data
Management (PDM) system, or an Enterprise Resource Planning (ERP) system. The Agile
server stores information about customer-specific items. It also maintains the relationships that
assembly parts have with BOM components and that parent items have with approved
manufacturers.
importSupplierResponse - A Web service operation that imports an RFQ response from a
supplier. The response is associated with an existing RFQ in the Agile PLM system.
These Web service operations are invoked by submitting a properly formatted XML document to
AIS. The contents of the XML document define the parameters that determine how the operation
should be performed. For more information about using the prebuilt AIS Web Services, see Using
AIS Web Services on page 9.
Security Considerations
AIS communicates with XML-compliant applications using Internet-standard communication and
security protocols (HTTP and SSL). Communication between AIS and its clients (via the Web
server) may be encrypted via Secure Sockets Layer (SSL) and a server-side certificate, thus
providing authentication, privacy, and message integrity. Using standard Java cryptography
libraries, you can encrypt and decrypt files, create security keys, digitally sign a file, and verify a
digital signature.
User name and password security is enforced whenever a client attempts to invoke an Agile
Integration Service operation.
For more information about Java security and cryptography support, refer to the following Web
page: http://docs.oracle.com/javase/1.5.0/docs/guide/security/index.html.
7
Chapter 2
Overview .............................................................................................................................................................. 9
Checking Your AIS System ................................................................................................................................. 10
About AIS Java Samples ..................................................................................................................................... 10
Creating a Web Service Client ............................................................................................................................. 20
Overview
This chapter provides the following information:
Tools that you can use to develop client applications
Languages that can generate and process XML and process HTTP request/response
messages
General steps to access the prebuilt AIS Web Services (The examples in the AIS_sample
folder illustrate these steps.)
Tools
There is no single tool set to access Web Services. Tools that you choose are a function of the
environment that you use to develop your clients. Essentially, you need tools to enable generating
and processing XML files and HTTP request/response messages.
No t e Although AIS is based on Axis, which is a SOAP processor, you can use other
implementations of SOAP tools regardless of the source language to build Web service
clients.
This is a list of some of the Web sites where you can find more information about these
development tools:
Apache Axis - Open source SOAP implementation for Java. See the following Web site:
http://ws.apache.org/axis/
GlassFish Application Server - GlassFish is a complete Java EE 5 Application Server. See Java
Web Services Developer Pack at http://glassfish.java.net/public/downloadsindex.html.
Microsoft .Net - An XML Web Services platform for Microsoft Windows that can be used to
9
AIS Developer Guide
create Web service clients. See the following Web site for more information:
http://msdn.microsoft.com/en-us/netframework/
No t e AIS was only tested with Java. Other tools and environments such as VB .Net
should work, but AIS was not tested and is not supported for these tools and
environments (operability with .Net (Visual C#) was tested with an earlier version of
AIS).
SOAP::Lite for Perl - A Perl implementation of the SOAP protocol. See the following Web site:
http://www.soaplite.com/
The AIS samples provide comprehensive examples of how SOAP and Web service-related libraries
can make this process simple. The following sections illustrate using the ExportData sample in
Running the Java Samples on page 13 and the above steps in greater detail.
Important These AIS Java samples do not expose all AIS functionalities. They are only sample
clients. For example, they enable running only one query at a time, while AIS supports
runing multiple queries and then aggregating the results. You may choose to develop
AIS clients with additional functionality. The samples provide source code that you can
use to practice developing your own AIS clients. For more information about
functionalities supported by the Export and Import Web Services, refer to the Export
and Import XML Schema documentation in Agile PLM's Import/Export User Guide.
Before building and running the AIS samples, download the following required tools:
Java 2 SDK SE Version 1.5. You can download this software at:
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-
javase5-419410.html
The Apache Project's Ant build tool, version 1.6, available at: http://ant.apache.org/
Installing Ant
This section provides the instructions for installing Ant on Windows and on Solaris.
11
AIS Developer Guide
No t e If you generated client stubs for the AIS samples from the WSDL, they will run on any
other computer. Alternately, if you have the WSDL, you can use it to generate the client
stubs on another computer.
No t e Agile PLM requires username and password to build the Java samples. The makefile
execution will fail if the three parameters are not set.
This file contains all the necessary CLASSPATH initializations for the samples. For more
information, see the comments (in Javadoc) for each sample.
No t e If you are connecting to a secure URL that uses SSL, type the following command
instead: $ANT_HOME/bin/ant -
Dais.url=http://<hostname:port/virtualPath>/ws -
Dusername=<username> -Dpassword=<password target>. For descriptions of
hostname, port, virtualPath, username, password, and target, see the previous section.
To build the Java AIS samples on a server with Secure Sockets Layer (SSL) enabled:
1. Get the self-signed certificate from the server.
2. Install the self-signed certificate into your Java development environment.
3. Build the sample programs as described above by connecting to the server using HTTPS.
4. Run the sample programs as usual but include the command line parameter -P. For example:
runner importer.ImportData -P HTTPS <insert other parameters here>
No t e The Readme.txt file that is installed with the AIS samples includes more information
about obtaining a certificate, installing it in your Java environment, and building and
running the AIS samples on an SSL-enabled system.
5. After you build the samples, use the runner file in the AIS samples directory to run the samples.
This file contains all the necessary CLASSPATH initializations for the samples.
These files contain the necessary CLASSPATH initializations and you can use them to simplify the
process of invoking a sample application.
The invocations below will print out usage statements for each of the examples. You can use these
usage statements along with the additional documentation provided on the samples to determine
how to run the samples in a meaningful fashion.
To print out usage statements for the clients, type the following commands:
> runner export.ExportData
> runner export.ExportPartlist
> runner importer.ImportData
> runner importer.ImportSupplierResponse
> runner importer.ValidateData
export.ExportData Usage
Usage: export.ExportData <options>
13
AIS Developer Guide
The pre-defined types listed in export.xsd maps to Agile PLM classes, not subclasses. For example, the
predefined ECO object type actually maps to the Change Orders class, not the ECO subclass. If you specify -t ECO
when you run ExportData, objects of the Change Orders class will be exported, not objects of the ECO subclass.
Note If you want to use only your Agile PLM systems class names and subclass names for object types instead of the
predefined Export object types, you can modify the ExportData.java source code and disable pre-defined object
types by replacing the following lines of code:
try {
// Let's try to use a predefined type.
objType.setPredefined(ObjectTypes.fromString(type));
} catch (Exception ex) {
// Fall back to specifying a type by name (i.e., user-defined
type)
objType.setTypeName(type);
}
with this line:
objType.setTypeName(type);
-T timeout This is the time in minutes to wait for a response. The defaults to 15 minutes.
-u user This is the Agile PLM username.
No t e The export.ExportData client does not have an option to specify an items revision.
When you use the client to export items, the latest released revision is exported.
However, you can develop an AIS client that lets you specify a revision to export. For
more information, refer to the Export XML Schema documentation in Agile PLM's
Import/Export User Guide.
15
AIS Developer Guide
-t Manufacturer
No t e Substitute appropriate port numbers. For example, for Weblogic, use port 7001 and for
OAS, use port 7777. For readability, these examples use attribute name, such as [Title
Block.Number], instead of IDs. Agile strongly recommends using attribute IDs. If you use
attribute names, make sure they are fully qualified to avoid ambiguity.
export.ExportPartlist Usage
Usage: export.ExportPartlist <options>
Option Description
-c criteria This is the search criteria to locate objects you want to export. The ExportPartlist command exports data
only for items with AMLs (approved manufacturer parts and their associated manufacturers). The criteria you
specify must be formatted using the Agile SDK query language. For more information, refer to Agile SDK Developer
Guide.
-e virtual-path This is the Agile PLM virtual path. For example, if you access Agile Web Client via
http://www.sample.com/Agile/PLMServlet, the virtual path is Agile. When you install the Agile PLM system, the
default virtual path is Agile.
-f filter This is the predefined filter name or ID. If you have administrator privileges, you can define Agile PLM filters using
the Agile Java Client.
-F filter-flag This is the ad hoc filter flag. The valid values for this argument derive from the <filters> element shown in the Export
XML Schema documentation in Agile PLM's Import/Export User Guide. The filter flags correspond to child elements
with names ending in Filter, such as ChangeFilter and ItemFilter. The basic pattern for this option is filter-
name.attribute.value. filter-name corresponds to the name of the XML element, such as ItemFilter (the Filter suffix
may be omitted). attribute corresponds to name of the attribute being defined (for example, PageTwo). value
corresponds to the value for the attribute. If the attribute is a boolean, the value is optional and defaults to true.
For the Attachments attribute, the value Tables and Files causes the attachment table and all the referenced files
to be exported.
The filter flag should be a class filter such as PartFilter (or Part). For a complete list of filter types, see the Export
XML Schema Documentation in AIS Folders on page 3.
This is an example of a filter flag:
-F "Part.TitleBlock" "Part.Attachments.TableAndFiles"
"Part.BOM.Recurse"
-h host This is the Agile PLM server machine. The default is localhost.
-l port This is the port on which the Agile PLM server is listening. The default is 80.
-o output-file This is the output file name. The default is out.axml, or out.pdx.
-p password This is the users password.
-P protocol This is the URL protocol. Valid values are either HTTP (the default) or HTTPS.
-r revision This is the item revision to export.
-s site This is the manufacturing site for which data is extracted. If you do not specify a manufacturing site, data is
extracted for all sites.
-T timeout This is the time to wait for a response (in minutes). It defaults to15 minutes.
Option Description
importer.ImportData Usage
Usage: importer.ImportData <options>
Op t io n Des c rip ti o n
-a mapfile This is a previously saved mapping definition file.
-e virtual-path This is the Agile PLM virtual path. For example, if you access Agile Web Client via
http://www.sample.com/Agile/PLMServlet, the virtual path is Agile. When you install the Agile PLM
system, the default virtual path is Agile.
-f filetype This is the type of file that is imported. If this option is omitted, the client determines the filetype based
on the MIME type of the import source file.
-h host This is the Agile PLM server machine. The default is localhost.
-i input-file This is the source data file.
-l port This is the port on which the Agile PLM server is listening. The default is 80.
-m map A textual mapping definition. Arguments should take the form of <source-path>=<target-path>.
-n option This is the an import server option. Arguments take the form of <group>|<option>=<value>. Please
see the Import XML Schema documentation for more information on available options.
-o output-file This is the output file name. The default is log.xml.
-p password This is the users password.
-P protocol This is the URL protocol. Valid values are either HTTP (the default) or HTTPS.
-t type This is the type of import operation(s) to run. At least one type must be specified. The format of a type
argument is type[.<child-type>] (for example., items.bom, manufacturerParts.attachments, and
prices.priceLines). Please see the Import XML Schema documentation for a complete set of available
import types.
17
AIS Developer Guide
Op t io n Des c rip ti o n
-T timeout This is the time to wait for a response (in minutes). It defaults to 15 minutes.
-u user This is the Agile PLM username.
-x transform This is the a previously saved transformation definition file. For information on how to use the Import
wizard to create a transformation definition file, refer to Agile PLM Import and Export Guide.
DelimitedTextFile -o D:\SourceFiles\Baseline\new_bom.xml -n
"BusinessRuleOptions|ChangeMode=Authoring"
"BusinessRuleOptions|ReferenceDesignatorRangeCharacter=-"
"BusinessRuleOptions|ReferenceDesignatorDelimiterCharacter=,"
runner importer.ImportData -h agilesvr -u aisuser -p agile -l 7778 -i
D:\SourceFiles\Source\bom_Level.txt -a
D:\SourceFiles\Mapping\bom_Level.xml -t items.bom items.aml -f
DelimitedTextFile -o D:\SourceFiles\Baseline\bom_Level.xml -n
"BusinessRuleOptions|ChangeMode=Redline"
"Template|TemplateType=com.agile.imp.template.TemplateLevelFilter"
"BusinessRuleOptions|ChangeNumber=C00013"
runner importer.ImportData -h agilesvr -u aisuser -p agile -l 7778 -i
D:\SourceFiles\Source\Item\item_comma_category.txt -a
D:\SourceFiles\Mapping\Item\all_mapping_comma.xml -o
D:\SourceFiles\Baseline\all_mapping_comma.xml -t items -f
DelimitedTextFile -n "BusinessRuleOptions|ChangeMode=Authoring"
"TextParser|FieldDelimiter=," "TextParser|LocationOfHeaderRow=3"
"TextParser|FileEncoding=ISO8859_1"
"ParsingAndValidationOptions|MultilistDelimiterCharacter=;"
"ParsingAndValidationOptions|WhitespaceValidationAction=Reject"
"ParsingAndValidationOptions|CaseValidationAction=Convert"
"ParsingAndValidationOptions|LengthValidationAction=Reject"
"TextParser|TextQualifier='"
importer.ImportSupplierResponse Usage
Usage: importer.ImportSupplierResponse <options>
Op tio n Des c rip ti o n
-e virtual-path This is the Agile virtual path. For example, if you access Agile Web Client via
http://www.sample.com/Agile/PLMServlet, the virtual path is Agile. When you install the Agile PLM system,
the default virtual path is Agile.
-h host This is the Agile server machine. The default is localhost.
-i input-file This is the source data file.
-l port This is the port on which the Agile server is listening. The default is 80.
-o output-file This is the output file name. The default is log.xml.
-p password This is the users password.
-P protocol This is the URL protocol. Valid values are either HTTP (the default) or HTTPS.
-r RFQ-number This is the RFQ into which you are importing the suppliers response.
-s supplier-number This is the supplier number. It is needed only when a buyer imports an RFQ response for an off-line supplier.
If the supplier number is not specified, the import server retrieves the supplier number from the specified
input file.
-T timeout This is the time to wait for a response (in minutes). It defaults to 15 minutes.
-u user This is the Agile username.
19
AIS Developer Guide
importer.ValidateData Usage
Usage: importer.ValidateData <options>
The options are exactly the same as the importer.ImportData Web service. See the command
importer.ImportData Usage on page 17.
AIS provided samples that make use of Axis in order to connect with the AIS Web service engine.
Axis provides a WSDL2Java utility that you can use for this purpose; other Web-Service-aware
libraries will have their own client-side stub generation facility (for example, .Net includes a wsdl.exe
utility). In the case of the samples, the client-side stub generation occurs during the samples build
process. Within the build.xml file is the following Ant target:
<target name="generate-export-stubs" depends="init"
unless="exp-stubs.present">
<echo>Generating export Java client-side stubs from
WSDL...</echo>
<java fork="true"
classname="org.apache.axis.wsdl.WSDL2Java"
failonerror="true">
<classpath refid="build.classpath"/>
<arg line="-o ${built.scratch.dir}/gen"/>
<arg line="-p export"/>
<arg line="${ais.url}/Export?wsdl"/>
</java>
</target>
No t e Axis also includes an Ant task definition which you can use instead of the above <java>
task. For more information, visit the Axis Ant Tasks site by pasting this URL in your
browser http://ws.apache.org/axis/java/ant/ant.html
http://ws.apache.org/axis/java/ant/ant.html.
The above Ant target is responsible for generating the export-related client-side stubs. This
invocation retrieves the Export WSDL from ${ais.url}/Export?wsdl, generates Java code in
the export Java package, and places the source code within the ${built.scratch.dir}/gen
directory. For more information on the WSDL2Java utility, refer to Axis documentation on the Axis
Website at http://ws.apache.org/axis/.
Once the client-side stubs have been generated, the user can use the generated object definitions
in order to more easily generate the appropriate SOAP request. These stubs enable the user to
focus on the capabilities of the target Web service operation without the need to construct a valid
SOAP request. In the ExportData.java sample, you can see that the run method contains all the
code used to generate the SOAP request. However, instead of explicitly constructing a SOAP
request, the code is concerned with setting up a Java data structure, which will be provided as the
parameter to a stub method invocation. The code is more concerned with functionality than
formatting, which makes it easier to read, write, and maintain.
The details on how you point the stubs to the desired Web service engine and submit the request
will vary from code library to code library. Please consult the documentation for your Web-Service-
aware code library for more information.
21
Chapter 3
Exporting Data
This chapter includes the following:
This section illustrates how to format an XML request in order to use the exportData Web service
operation. For more information on the XML schema that describes an exportData request, see the
Export XML Schema documentation in AIS Folders on page 3. To view the information, select
documentation > schemas > export.htm
The exportDataRequest XML element describes the XML format you should use when
submitting an exportData request to AIS. This enables you to specify the following types of data:
Queries One or more queries that define what objects is exported.
Filters One or more filters that define what data from the selected objects is exported.
Formats The format that is used for the exported data.
Sites Manufacturing sites for which data should be exported. By default, data for all sites is
exported.
Export Approval Matrix data is exported.
Import Approval Matrix data is imported.
23
AIS Developer Guide
You can specify multiple queries at once, returning multiple result sets. More information on query
parameters can be found in the Agile API reference documentation. However, the following section
provides a brief introduction to the criteria syntax.
The value for the criteria parameter for the exportData and exportPartlist is a single string consisting
of one or more search conditions. Strings that appear within the search criteria should be enclosed
in single quotes (').
By default, the exportData Web service operation extracts information for all sites. If you specify a
manufacturing site, only the data associated with that site is exported. All objects that are not
associated with that manufacturing site are filtered out of the query results.
The following examples illustrate using exportData to extract all parts and documents in system and
exportPartList to extract only parts with AMLs.
Example: Using exportData to extract all parts and documents in the system
runner export.ExportData-h localhost -u admin -p agile -l 7001 -e
Agile -c "[Title Block.Number] is not null " -F "Item.TitleBlock" t
Item -o outpart.pdx
Example: Using exportPartlist to extract only parts with AMLs
runner export.ExportPartlist -h localhost -u admin -p agile -l 7001
-e Agile -c "[Title Block.Number] is not null " -F "Item.TitleBlock"
-o outpart.pdx
The following XML snippets illustrate different ways to specify a manufacturing site:
...
<site>
<site-name>Taipei</site-name>
</site>
...
<site>
<site-id>6</site-id>
</site>
...
<!--The following is optional since the default is all sites -->
<site>
<all/>
</site>
...
You can specify multiple filters and their effect is cumulative. The resulting filter is the combination
of all specified filters. For example, if one filter includes an items PageTwo information and a
separate filter includes the items History information, the effective filter includes both PageTwo and
History information.
Predefined Filters
Agile provides several predefined filters to refine query results. You can specify a predefined filter in
one of the following three different ways: -
By ID Specify the numeric ID of a defined filter with the Agile administrative data. This
information can be found using the Agile API to inspect the Agile administrative data. Use the
ID of a defined filter to reduce the risk of a name change that can adversely affect your code.
By name Specify the name of a defined filter found in the Agile administrative data. This is an
easy way to reference previously defined filter definitions.
By object type Specify different information sets for each type, from the set of available filters,
one for each object type.
No t e If you have administrator privileges to the Agile PLM system, you can define new filters.
Log into Agile Java Client and choose Admin > System Settings > Agile Contents Service >
Filters.
For more information on predefined filters, see the Export XML Schema documentation in AIS
Folders. To view the information, select documentation > schemas > export.html.
Ad Hoc Filters
Ad hoc filters are defined for a particular purpose and are not stored in the Agile PLM system. The
Export XML Schema defines several <filters> elements, such as ItemFilter, ChangeFilter,
ManufacturerFilter, and ManufacturerPartFilter. The general usage for ad hoc filters is to specify the
filter type, such as ItemFilter, and then supply boolean values for each table that you want
included by the filter. For example, the following ad hoc filter includes the TitleBlock and PageTwo
tables for items:
25
AIS Developer Guide
<filters>
<ItemFilter TitleBlock="true" PageTwo="true"/>
</filters>
Most tables require simple boolean values. However, other tables support enumerated values that
enable you to include the associated objects. For example, the BOM table supports the following
enumerated values for filters: DoNotInclude (the default), TableOnly, SingleLevel, and Recurse.
No t e The filter type that you specify depends on the output format. If you extract data to a
PDX file, the filter type should be a superclass filter such as ItemFilter or ChangeFilter. If
you extract data to an aXML file, the filter type should be a class filter such as PartFilter
or ECOFilter.
For more information on how to specify the supported formats, see the Export XML Schema
documentation in AIS Folders on page 3. To view the information, select documentation > schemas >
export.htm.
No t e To generate the above XML in PDF format, the code that is submitted to the stubs must
include at least one such parameter -c "[Title Block.Number] == '1000-02'
" -f "Default Part Filter" -t Item -s Taipei.
27
AIS Developer Guide
No t e The exportPartlist Web service exports data only for items with AMLs (approved
manufacturer parts and their associated manufacturers). Items without AMLs are
ignored.
An exportPartlist Example
The following is an example of the exportPartlistRequest element. It is a simple adaptation of
the previous exportData sample and demonstrates a complete exportPartlist Web service
operation request.
<exportPartlistRequest>
<queries>
<query>
<criteria>[Title Block.Number] == '1000-02'</criteria>
</query>
</queries>
<site>
<site-name>Taipei</site-name>
</site>
<filters>
<!--The following is a predefined filter specified by name-->
<filter-name>Default Part Filter</filter-name>
<!--The following is an ad hoc filter -->
<ItemFilter TitleBlock="true" PageTwo="true"
PageThree="true" History="true"
Attachments="TablesAndFiles"
BOM="Recurse" Changes="true"
WhereUsed="true"
AML="TableOnly" Site="true"/>
</filters>
</exportDataRequest>
The following entries are removed from the previous exportData sample to make this adaptation:
The query element does not include an objectType element. This is because the
exportPartlist Web service operation only queries against item objects.
The format element is not included in the exportPartlistRequest. This is because the
exportPartlist Web service operation only exports data in aXML format.
The preceding XML example is not a complete or valid SOAP request. Rather, this XML document
represents the contents of a SOAP request body. Generally, you do not need to generate the above
XML document manually. Instead, the client-side stubs generated by a Web-Service-aware code
library create an appropriately formatted XML document and place it within a SOAP request. The
above sample is an illustration of what the XML request generated by client-side stubs would
resemble.
No t e To generate the above XML in PDF format, the code that is submitted to the stubs must
include at least one such parameter -c "[Title Block.Number] == '1000-02'
" -f "Default Part Filter" -t Item -s Taipei.
29
Chapter 4
Importing Data
This chapter includes the following:
For more information on importing data into the Agile PLM system, refer to the Agile PLM
Import/Export User Guide.
validateData A Web service operation that validates source data with compliance rules
31
AIS Developer Guide
The importDataRequest XML element describes the XML format you must use when submitting
an importData request to AIS. It supports the following XML datastructure types:
<importDataRequest xsi:type="importDataRequestType">
...
</importDataRequest>
<importDataRequest xsi:type="importSupplierResponseRequestType">
...
</importDataRequest>
The following XML snippet illustrates how to specify a PDX data source that is sent along with the
SOAP request:
<importDataRequest xsi:type="importDataRequestType">
<dataSource>
<attachmentRef href="cid:E36C913548344EDA1B7FC20CEDCEDEB3"/>
typeIPC2571</type>
</dataSource>
...
In the above snippet, the value of the HREF attribute is not intuitive, but it is of the form expected
Depending on what you specify, the import server performs the desired import operations and
ignores data that is not relevant to the selected import operation. For more information on import
operations, see the Import XML Schema documentation in AIS Folders on page 3. To view the
information, select documentation > schemas > import.htm.
The following code snippet illustrates how to import manufacturers, manufacturer parts, and items.
For items, the BOM and AML tables are also imported.
...
<operations>
<manufacturers attachments="false"/>
<manufacturerParts attachments="false"/>
<items aml="true" bom="true" sites="false" attachments="false"/>
</operations>
33
AIS Developer Guide
...
For more information on these parameters, see the Import XML Schema documentation in AIS
Folders on page 3. To view the information, select documentation > schemas > import.htm.
The following snippet illustrates how to map a field from the incoming PDX package onto the Title
Block of an item.
...
<mapping>
<entry>
<source>/ProductDataeXchangePackage/Items/Item@itemIdentifier</sourc
e>
<target>Part.Title Block.Number</target>
</entry>
</mapping>
...
The following snippet illustrates how you can reference a previously defined mapping definition file.
...
<mapping>
<attachmentRef href="cid:E36C913548344EDA1B7FC20CEDCEBEEF"/>
</mapping>
...
In the above snippet, the HREF attribute which is generated by the stub is not very intuitive, but it is
of the form expected when referencing an attachment sent as part of the SOAP request.
No t e Agile PLM allows you to define an unlimited number of new flex fields for each type of
business object. Both the Agile Import wizard and AIS now support user-defined flex
fields. Therefore, you can import data to user-defined flex fields.
information on this parameter, see the Import XML Schema documentation in AIS Folders on page
3. To view the information, select documentation > schemas > import.htm.
The following snippet illustrates how to set several Business Rule and Parsing and Validation
options:
...
<options>
<BusinessRuleOptions>
<ChangeMode value="Authoring"/>
<MultiRowUpdateMode value="AddUpdateOnly"/>
</BusinessRuleOptions>
<ParsingAndValidationOptions>
<CaseValidationAction value="Convert"/>
</ParsingAndValidationOptions>
</options>
...
The following snippet illustrates how to set the ChangeMode, ChangeType, and
ChangeAutoNumber options in the aXML file.
...
<options>
<BusinessRuleOptions>
<ChangeMode value="Redline"/>
35
AIS Developer Guide
<ChangeType value="ECO"/>
<ChangeAutoNumber value="ECO AutoNumber"/>
<MultiRowUpdateMode value="AddUpdateOnly"/>
</BusinessRuleOptions>
<ParsingAndValidationOptions>
<CaseValidationAction value="Convert"/>
</ParsingAndValidationOptions>
</options>
...
The parameter in the client-side code that is submitted to generate this XML must contain:
-n "BusinessRuleOptions|ChangeMode=Redline"
"BusinessRuleOptions|ChangeType=ECO"
"BusinessRuleOptions|ChangeAutoNumber=ECO AutoNumber"
"BusinessRuleOptions|MultiRowUpdateMode=AddUpdateOnly"
"ParsingAndValidationOptions|CaseValidationAction=Convert"
An ImportData Example
The following is a complete example of invoking importDataRequest. It shows what a fully
configured importData operation request will resemble.
<importDataRequest xsi:type="importDataRequestType">
<dataSource>
<attachmentRef href="cid:E36C913548344EDA1B7FC20CEDCEDEB3"/>
<type>IPC2571</type>
</dataSource>
<operations>
<manufacturers attachments="false"/>
<manufacturerParts attachments="false"/>
<items aml="true" bom="true" sites="false" attachments="false"/>
</operations>
<mapping>
<attachmentRef href="cid:E36C913548344EDA1B7FC20CEDCEBEEF"/>
</mapping>
<options>
<BusinessRuleOptions>
<ChangeMode value="Authoring"/>
<MultiRowUpdateMode value="AddUpdateOnly"/>
</BusinessRuleOptions>
<ParsingAndValidationOptions>
<CaseValidationAction value="Convert"/>
</ParsingAndValidationOptions>
</options>
</importDataRequest>
The above XML document is not a complete or valid SOAP request. Rather, this XML document
represents the contents of a SOAP request body. Generally, you do not need to generate the above
XML document by manually. Instead, the client-side stubs generated by a Web-Service-aware code
library will usually create an appropriately formatted XML document and places it within a SOAP
request. The above sample is simply an illustration of what the XML request generated by client-
side stubs might look like.
Following is the client-side code that is submitted to generate this XML. For additional examples,
see importer.ImportData Usage on page 17.
runner importer.ImportData -p http -h localhost -e web -u admin -p
agile -l 8888 -f ExcelFile -i D: \source.xls -a D: \mapFile.xml -t
items.aml items.bom manufacturers manufacturerParts -n
"BusinessRuleOptions|ChangeMode=Authoring"
"BusinessRuleOptions|MultiRowUpdateMode=AddUpdateOnly"
"ParsingAndValidationOptions|CaseValidationAction=Convert"
37
AIS Developer Guide
RFQ Number - The alphanumeric identifier of the RFQ that is associated with the response.
Supplier Number - The supplier number is needed only when a buyer imports an RFQ response
for an off-line supplier. If the supplier number is not specified, the import server retrieves the
supplier number from the specified input file.
AIS_KFUNCTEAM2,Functional Team,Active,ActionItem2,admin
AIS_KFUNCTEAM3,Functional Team,Active,ActionItem3,admin
Solution
runner importer.ImportData -h server -l port -e virtualpath -u
username -p password -i D:\imp_actionitems.txt -f DelimitedTextFile
-t usergroups.actionitem -n "TextParser|FieldDelimiter=," -o
D:\result_action.xml -a D:\mapping_action.xml
No t e The upper limit for dates is todays date + 150 years. Date values later than that are
invalid and cannot be imported.
39
AIS Developer Guide
Dat e F o rm at Ex am p le
dd-MMM-yyyy 10-Jul-2001
EEEE, MMMM d, yyyy Thursday, June 25, 1998
EEEE, MMMM d, yyyy h:mm a Thursday, June 25, 1998 1:32 PM
EEEE, MMMM d, yyyy h:mm:ss a Thursday, June 25, 1998 1:32:19 PM
EEEE, MMMM d, yyyy h:mm:ss a z Thursday, June 25, 1998 1:32:19 PM GMT-05:00
MMMM d, yyyy June 25, 1998
MMMM d, yyyy h:mm a June 25, 1998 1:32 PM
MMMM d, yyyy h:mm:ss a June 25, 1998 1:32:19 PM
MMMM d, yyyy h:mm:ss a z June 25, 1998 1:32:19 PM GMT-05:00
MMM d, yyyy Jun 25, 1998
MMM d, yyyy h:mm a Jun 25, 1998 1:32 PM
MMM d, yyyy h:mm:ss a Jun 25, 1998 1:32:19 PM
MMM d, yyyy h:mm:ss a z Jun 25, 1998 1:32:19 PM GMT-05:00
M/d/yy 6/25/98
M/d/yy h:mm a 6/25/98 1:32 PM
M/d/yy h:mm:ss a 6/25/98 1:32:19 PM
M/d/yy h:mm:ss a z 6/25/98 1:32:19 PM GMT-05:00
The count of each letter such as M in the time pattern determines the format. For example, three
M characters indicate that the month is represented as text instead of a number; less than three
M characters means that the month is represented by a number.
For more information about Java date formats and time pattern syntax, see Oracle documentation
for the SimpleDateFormat and DateFormat classes at: http://docs.oracle.com/javase/1.5/docs/
where:
No t e Do not use three-character codes (such as PST or PDT) to specify time zones. Three-
character time zone codes are unreliable because some are used for multiple time
zones. Consequently, the Agile server might resolve a three-character time zone code to
an incorrect time zone.
41