Professional Documents
Culture Documents
API WhitePaper
API WhitePaper
White Paper
March 2006
© 1997 - 2006 Primavera Systems, Inc. All rights reserved. Unless otherwise noted, this software is the property of Primavera Systems, Inc.
(Primavera) and is entitled to copyright protection. Any reproduction in whole or in part is strictly prohibited.
While reasonable efforts have been made to ensure the accuracy of this document, Primavera assumes no liability resulting from any omission or
inaccuracies in this document or from use of the information obtained herein. Primavera reserves the right to make changes to any products
described herein to improve reliability, function, or design, and reserves the right to revise this document and to make changes from time to time
in content hereof with no obligation to notify any person of revisions or changes. Primavera does not assume any liability arising out of the
application or use of any product described herein; neither does it convey license under its patent rights or the rights of others.
Computer Software Copyrights: The Primavera software products described in this document may not be copied, reproduced, modified, or
distributed in any manner without Primavera's express written permission.
Use and Disclosure Restrictions: The software described in this document is the property of Primavera Systems. It is furnished under a license
agreement and may be used and/or disclosed only in accordance with the terms of the agreement.
US Government Rights: Use, duplication, or disclosure by the US Government is subject to restrictions set forth in the Primavera license
agreement and as provided in DFARS 227.7202-1(a) and 227.7202-3(a) (1995), DFARS 252.227-7013(c)(1)(ii) (OCT 1988), FAR 12.212(a)
(1995), FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable.
Trademarks: Primavera, Primavera sundial logo, Primavera Enterprise, Primavera Expedition, Primavera Methodology Manager, Primavera
Portfolio Analyst, Primavera Progress Reporter, Primavera Project Planner, P3, P3e, Primavera TeamPlay, Primavera TeamPlay Methodology
Manager, Primavera TeamPlay Portfolio Analyst, Primavera TeamPlay Project Manager, Primavera TeamPlay TeamPlayer, myPrimavera and
PrimeContract are either registered trademarks, trademarks, or service marks of Primavera Systems, Inc., in the United States and/or in other
countries. All other trademarks mentioned herein are the property of their respective owners.
ii
2.INTRODUCTION........................................................................................................................................ 2
3.ARCHITECTURE....................................................................................................................................... 2
4.DEPLOYMENT .......................................................................................................................................... 4
APPENDIX
………………………………………………………………………………………………………….6
GLOSSARY .......................................................................................................................................... 11
iii
To address this shift in technology as well as the scalability, performance and security
issues often associated with historical integration models--such as direct database
connections or ODBC driver access--Primavera exposed the core server and business
objects used by the “myPrimavera” web application (proven to be reliable and scalable)
as the Primavera Integration API. Now, deployment of custom solutions that utilize
proven Primavera technology is as easy as writing Java code that uses a few
Primavera-provided Java classes.
The ability to configure the Integration API to run as a standalone utility or through an
application server makes this robust tool flexible for any technical environment. Based
on the commonly used Java language, the IAPI can even utilize Java Remote Method
Invocation (RMI) technology (See Appendix A.3) behind the scenes to support
distributed solutions!
3. Architecture
The Integration API is based on the Primavera Business Rule Engine (BRE), a Java-based component of
the myPrimavera server that includes business objects and provides fundamental services, such as
connection pooling, caching, licensing, and security. The BRE provides these services with a high degree
of asynchronous and stateless behavior and also provides efficient scheduling of services and allocation
of resources.
When configured for “local mode” (standalone), the Primavera Integration API does not require an
application server to access and manipulate the Primavera business objects (unlike myPrimavera.) Local
mode is the easiest way to quickly create and test integration solutions with the Integration API. The
following diagram demonstrates the architecture when the Integration API is configured for “local mode”.
To configure the Integration API to leverage RMI for distributed systems use ”Remote Mode.” Deploying
the Integration API as a server component requires a JSP servlet engine--usually a J2EE application
server such as BEA WebLogic, IBM WebSphere, or Oracle 9iAS. The following diagram demonstrates
this configuration.
The following diagram shows how the Primavera Integration API with RMI relates to the Primavera suite:
Note that the myPrimavera server includes a presentation component to generate HTML, XML, and
images to allow people to share and manipulate business objects whereas the Integration API has an
integration component to allow remote programs to share and manipulate the same business objects.
The same licensing and application-level security used in myPrimavera is used in the Primavera
Integration API. Also, as RMI can be used with SSL, this solution is very secure and is possible to deploy
using a commercial web server.
More information on RMI, including deployment and interaction diagrams, can be found in sections A.2
and A.3 of the Appendix.
Client applications are determined to be in a particular mode of operation based on whether the server
classes can be found in the class path. Aside from specifying the URL of the server for remote mode,
client code is exactly the same regardless of whether remote or local mode is being used. This is
accomplished by hiding the network layer entirely from the client code, giving developers the ability to
write client code for the Primavera Integration API with no knowledge of RMI whatsoever.
A client JAR (Java Archive) file is included with the Primavera Integration API installation program to
provide core classes and utility classes used for interfacing with the server. Users of the Primavera
Integration API will need to write Java code that uses the client jar file provided by Primavera.
When using the Primavera Integration API, the client application must instantiate a session object,
providing information such as server URL (remote mode only), database instance identifier, user name
and password. This establishes communication with the server, which then allows direct access to all
global data (projects, resources, etc.).
For example, once login is successful and the session is established, the user is able to retrieve a
collection of projects and access the activities and resource assignments for a particular project in that
collection. Activities and resources can be added, assignments can be made, and the project can be
scheduled. For a complete list of supported functionality, see the work breakdown listed in the following
section.
The Primavera Integration API installation comes complete with a Programmer’s Reference and several
demo applications (all source code included) to help get started right away.
5. Included Functionality
The emphasis of the Primavera Integration API is to support core business objects. Although this
document has been updated to version 5.0, please note that details provided below are for information
purposes and may differ from the actual release. Please see documentation provided with the Primavera
Integration API release for complete information.
XML Export includes support for exporting every type of business object as Primavera XML. The fields to
be exported can be specified, allowing the client a detailed level of control over the generated XML.
Exporting of full projects is also supported, and includes a project and its related data (WBS, activities,
relationships, etc.) at one time. XML Import supports importing new or existing projects from XML files
that match the Primavera XML Schema. However, anything that is not in the full-project export, does not
get imported, even if it is in the schema (for example, Users). Note that read-only fields or business
objects do not get imported either, and the XMLImporter does not support importing Documents and
related business objects. The Primavera Business Object XML Schema Definition, or prmbo.xsd, can be
found in the Schema folder of your Integration API installation.
There are many XML technologies available today to assist in transforming XML files that may conform to
different schemas into Primavera XML
10
BRE (Business Rule Engine) – The infrastructure and business logic component of the myPrimavera
server.
HTTP (Hypertext Transfer Protocol) – The protocol for moving hypertext files across the Internet.
Requires a HTTP client program on one end, and an HTTP server program on the other end.
HTTP is the most important protocol used in the World Wide Web (WWW).
JAR (Java ARchive) – A file format used to bundle all components required by a Java application or
applet.
JDK (Java Development Kit) – A software development kit from Sun Microsystems that implements the
basic set of tools needed to write, test, and debug Java applications and applets.
JVM (Java Virtual Machine) – An interpreter between Java bytecode and a computer's operating system.
Using a JVM, Java code can be run on any number of different computer platforms, including
Windows and Unix.
ODBC (Open DataBase Connectivity) – A standard programming language interface used to connect to a
variety of data sources. ODBC's goal is to make it possible to access any data from any
application, regardless of which database management system (DBMS) is handling the data.
RMI (Remote Method Invocation) – A distributed object model for Java program to Java program, in
which the methods of remote objects written in the Java programming language can be invoked
from other Java virtual machines, possibly on different hosts.
RMI/IIOP – A version of RMI implemented to use the CORBA IIOP protocol. RMI over IIOP provides
interoperability with CORBA objects implemented in any language if all the remote interfaces are
originally defined as RMI interfaces.
SQL (Structured Query Language) – A type of programming language used to construct database
queries and perform updates and other maintenance on relational databases.
SSL (Secure Socket Layer) – A protocol for securing data transmission on the Internet using public-key
cryptography. SSL provides server authentication, data encryption, and data integrity for
client/server communications.
UML (Unified Modeling Language) – A general-purpose notational language for specifying and visualizing
complex software, especially large, object-oriented projects. UML standards are developed under
the auspices of the Open Management Group (OMG)
XML (eXtensible Markup Language) – A subset of the Standard Generalized Markup Language (SGML)
that provides a uniform method for describing and exchanging structured data in an open, text-
based format, and delivers this data by use of the standard HTTP protocol.
11