206520 p6 web services programming interface

33
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1 1

Upload: p6academy

Post on 09-Aug-2015

18 views

Category:

Business


5 download

TRANSCRIPT

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 121 1

An Introduction the P6 Web

Services Programming

InterfaceTanya Cranmer

Principal Technical Engineer

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 123 3

The following is intended to outline our general product direction. It is intended

for information purposes only, and may not be incorporated into any contract.

It is not a commitment to deliver any material, code, or functionality, and should

not be relied upon in making purchasing decisions. The development, release,

and timing of any features or functionality described for Oracle’s products remains

at the sole discretion of Oracle.

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 124 4

Program Agenda

P6 Web Services

P6 Event Notification

P6 Business Process Management (BPM) Integration

Q & A

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 125 5

P6 Web Services

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 126 6

P6 Web Services

P6 Web Services is an integration tool based on open standards such

as SOAP, XML and WSDL (Web Service Definition Language)

Web Services is platform and language independent

P6 Web Services can be used to

– Extend P6 functionality

– Create workflows

– Integrate with a wide variety of enterprise software applications running on

different hardware and operating system platforms

Overview

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 127 7

P6 Web Services

P6 EPPM Web Services are divided into four categories;

− Business Object Based Services - business object based services

provide create, read, update, and delete (CRUD) operations, depending on

the object

− Job Services – specialized operations like Scheduling

− Spread Service – services used to read time-phased unit and cost data

− Import and Export Services – services used to import and export projects

from and to XML

Overview

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 128 8

P6 Web Services

There are several layers of security

– Application security based on the P6 user name

– Transport layer security (SSL) for the SOAP messages

– Message level encryption which allows different parts of the SOAP

message to be encrypted

Overview

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 129 9

P6 Web Services

Client applications create a SOAP request message based on the

WSDL to the Web Services server

The Web Services server carries out the business operation and sends

back a SOAP response message

The client application reads the SOAP response and processes the

result

Process Flow

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1210 10

P6 Web ServicesProcess Flow

P6 Web Services deployed on Weblogic or Websphere

Client Application

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1211 11

P6 Web Services Sample WSDL

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1212 12

P6 Web Services Sample Java Code

private int createProject() throws Exception {

URL wsdlURL = new URL("http://localhost:8206/p6ws/services/ProjectService?wsdl");

ProjectService service = new ProjectService(wsdlURL);

ProjectPortType servicePort = service.getProjectPort();

Client client = ClientProxy.getClient(servicePort);

setCookieOrUserTokenData(client);

List<Project> projects = new ArrayList<Project>();

// Create project with required fields

Project proj = new Project();

proj.setParentEPSObjectId(3063);

proj.setId("WS-Demo");

proj.setName("WS-Demo");

projects.add(proj);

List<Integer> objIds = servicePort.createProjects(projects);

}

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1213 13

P6 Web Services Sample SOAP Request Message

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1">

<wsse:UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasi

<wsse:Username>admin</wsse:Username>

<wsse:Password Type=“http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText”>admin</wsse:Password>

</wsse:UsernameToken>

</wsse:Security>

</SOAP-ENV:Header>

<soap:Body>

<CreateProjects xmlns="http://xmlns.oracle.com/Primavera/P6/WS/Project/V2" xmlns:ns2="http://xmlns.oracle.com/Primavera/P6/WS/IntegrationFaultType/V1

<Project>

<Id>WS-Demo</Id>

<Name>WS-Demo</Name>

<ParentEPSObjectId>3063</ParentEPSObjectId>

</Project>

</CreateProjects>

</soap:Body>

</soap:Envelope>

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1214 14

P6 Web Services Sample SOAP Response Message

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP-ENV:Header>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<CreateProjectsResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/Primavera/P6/WS/Project/V2">

<ObjectId>5202</ObjectId>

</CreateProjectsResponse>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1215 15

P6 Web Services

The Web Services installation includes a Java demo application

The demo application is starting point when using learning P6 Web

Services

Demo

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1216 16

P6 Web Services

Oracle Project Portfolio Management Integration Pack For

Primavera P6 and JD Edwards EnterpriseOne - prebuilt integration

between P6 and E1

Primavera Risk Analysis Connector – P6 and Risk Analysis

integration

Primavera Portfolio Management Bridge – P6 and PPM integration

Existing Primavera Integrations

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1217 17

P6 Web Services

P6 Event Notification - used to create a workflow between software

components or applications

Oracle Business Process Management (BPM) – used to create

workflows involving human interaction

Features which Leverage Web Services

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1218 18

P6 Event Notification

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1219 19

P6 Event Notification

P6 Web Access, P6 Web Services and the P6 Integration API can

be configured to send event messages to a message queue (JMS

Queue)

Events sent to the JMS Queue can be read by other applications

Events are triggered when Business Objects, like Activities or

Resources, are created or updated

Events are also triggered by Special Operations like Scheduling

Overview

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1220 20

P6 Event Notification

Event messaging is a method of communication between software

components or applications

Allows multiple applications that are being built independently, with

different languages and platforms to communicate.

Messaging enables distributed communication that is loosely coupled

– the sender and the receiver do not have to be available at the same time in

order to communicate

– the sender and the receiver only need to know the message format

Messaging

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1221 21

P6 Event Notification

External components subscribe to a queue and wait for event

messages to be published

Event messages that are sent from P6 can be used to trigger

actions in other external systems

Event messages contain a limited amount of data and

therefore Web Services is often used in conjunction with Event

Notification

Messaging

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1222 22

P6 Event Notification Messaging

P6 Web Access (JMS Producer) Weblogic

Queue

External Application (JMS Consumer)

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1223 23

Configuring Event Notification in P6

Modify the application configuration

– Launch the Administration Application

– Configure the JMS Provider information under Directory Services

– Set the “Database/Instance/Eventing/Enabled” setting to true

– Configure the connection information for the JMS queue

– Enable the Business Objects and Special Operations which will trigger

Events

Setup

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1224 24

Configuring Event Notification in P6

47 Business Objects support create and update event notification

messages.

22 Special Operation events, like Scheduling, are triggered when the

operation terminates with a Completed, Failed, or Cancelled status

Refer to Using Events With P6 for detailed information

http://docs.oracle.com/cd/E25030_01/English/Integration_Docume

ntation/Event_Notification/Doc/index.htm

Setup

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1225 25

Configuring Event Notification in P6Setup

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1226 26

Configuring Event Notification in P6

Test the Connection in the Primavera Administrator

Test the Connection by Adding a New Activity in P6 Web Access

Sample P6 Event Message

<?xml version="1.0" encoding="UTF-8"?>

<MessagingObjects xmlns="http://xmlns.oracle.com/Primavera/P6/V8.2/Common/Event"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<ActivityCreated>

<Id>A100</Id>

<Name>event test</Name>

<ObjectId>136850</ObjectId>

<ProjectObjectId>4798</ProjectObjectId>

<WBSObjectId>30356</WBSObjectId>

</ActivityCreated>

</MessagingObjects>

Demo

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1227 27

P6 Business Process Management (BPM) Integration

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1228 28

BPM Integration

Used for P6 Workflows

Provides an integrated environment for developing, administering, and

using business applications centered around business processes

Combination of human and machine-based tasks

Use Web Services to add P6 tasks to the Workflow

Overview

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1229 29

BPM Integration

Demo

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1230 30

Resources

Knowledge Base article Master Note For Primavera Web

Services Installation And Common Technical Or Application

Issues (Doc ID 1147896.1)

Knowledge Base article Event Notification Sample Code (Doc ID

1288173.1)

Primavera Advisor Webcast Schedule and Archived recordings

(Doc ID 1456251.1)

The Java EE 6 Tutorial

http://download.oracle.com/javaee/6/tutorial/doc/index.html

Chapter 47 “The Java Message Service Concepts”

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1231 31

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1232 32

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1233 33