Using P6 Event Notification Messaging With Web Services

Post on 18-Apr-2015

70 views 6 download

Transcript of Using P6 Event Notification Messaging With Web Services

1

2

Oracle Premier Support Comprehensive Coverage enhanced by Proactive Support features

Service and Support

Quickly diagnose and resolve issues

Expert technical support

Rapid-response field service

Lifetime Support

Tools and Resources

Get the most of your Oracle products with

proactive features

Oracle knowledgebase

Product health checks

My Oracle Support

Product Innovation

Keep pace with change and capitalize on new

opportunities

Updates

New releases

Tools to assist with patching and upgrades

3

Perceived Value of Proactive Services

Nine out of ten (93%) respondents worldwide agree it is important for IT providers to invest in product and service Innovation.

IDG Research Services "The Future of IT Services and Support.”Base: 308 Total; 100 U.S..; 100 EMEA; 100 APAC Jan. 2010.

<Insert Picture Here>

Using P6 Event Notification Messaging with Web Services

Tanya Cranmer Mark HaasSenior Technical Support Engineer Senior Technical Support Engineer

5

<Insert Picture Here>

Program Agenda

• Part 1 – P6 Event Notification Feature– P6 Event Notification Overview– Java Message Service (JMS) API– Configuring Event Notification in P6

• Part 2 – Examples of Consuming Events– Sample Code - Create a JMS Client– P6 Web Services Overview– Sample Code - Process the event messages using P6

Web Services

6

Part 1 – P6 Event Notification Feature

7

P6 Event Notification Overview

• P6 Web Access, P6 Web Services and the P6 Integration API can be configured to send event messages to a message queue (JMS Queue)

• Messages sent to the JMS Queue can be read by programs written using the Java programming language (JMS client)

• Events are triggered when Business Objects, like Activities or Resources, are created or updated

• Events are also triggered by Special Operations like Scheduling

8

P6 Event Notification Overview P6 Business Objects and Special Operations

• Fifteen P6 Business Objects support create and update event notification messages.

• Special Operation events, like Scheduling, are triggered when the operation terminates with a Completed, Failed, or Cancelled status

• Refer to Knowledge Base article Overview of event notification in P6 version 7 (Doc ID 914141.1) for more details on support Business Objects and Special Operations

9

P6 Event Notification Overview P6 Business Objects and Special Operations

10

Java Message Service (JMS) APIOverview

• JMS is an industry messaging standard that has been widely adopted and makes it easier to write application components that create, send, receive messages

• The JMS API defines a common set of interfaces that allow programs written in the Java programming language to communicate with different messaging implementations (ie Weblogic or Apache ActiveMQ)

11

Java Message Service (JMS) API Overview

• 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

12

P6 Event Notification Overview P6 Business Objects and Special Operations

• Two types of messaging models : point-to-point and publish/subscribe– Point-to-Point Messaging (PTP)

• each message has only one consumer• queues retain all messages sent to them until the messages are

consumed or until the messages expire• consumer acknowledges the successful processing of a

message

13

Java Message Service (JMS) APIMessaging Models

– Publish/Subscribe Messaging (pub/sub)• each message can have multiple consumers• a client that subscribes to a topic can consume only

messages published after the client has created a subscription

14

Java Message Service (JMS) API (cont’d)Terminology

• JMS Provider – used to manage sessions and queues

• ie. Weblogic and Apache ActiveMQ

• JMS Connection Factories – used to create a connection to a JMS

Provider– encapsulates a set of connection

configuration parameters

• JMS Connections– a connection with a JMS provider

• JMS Sessions– a context for producing and consuming

messages

15

Java Message Service (JMS) API (cont’d)Terminology

• JMS Message Producers– an object that is created by a session and

used for sending messages to a destination (queue or topic)

• JMS Message Consumers– an object that is created by a session and

used for receiving messages sent to a destination

• JMS Destinations – target of messages produced and source

of messages consumed– in the PTP messaging domain,

destinations are queues– in the pub/sub messaging domain,

destinations are topics

16

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 • Refer to Knowledge Base article How To Enable Event

Notification In P6 version 7.0 (P6 v7) (Doc ID 914008.1)

17

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/V7/Common/Event" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<ActivityCreated>

<Id>A1000</Id>

<Name>event test 1</Name>

<ObjectId>80859</ObjectId>

<ProjectObjectId>605</ProjectObjectId>

<WBSObjectId>6768</WBSObjectId>

</ActivityCreated>

</MessagingObjects>

18

Part 2 – Examples of Consuming Events

19

Sample CodeCreate a JMS client

1.Create a Reference to the JMS Provider ConnectionFactory

2.Create Connection

3.Create Session

4.Create a Reference to the JMS Provider Destination (Queue)

5.Create a Consumer to read event messages

6.Start Connection

7.Wait for messages

20

Sample CodeCreate a JMS client

P6 Web Access (JMS Producer) Weblogic

QueueWS

Event Notification Demo Application (JMS Consumer)

21

P6 Web Services Overview

• P6 Web Services is an integration tool based on open standards such as SOAP, XML and WSDL (Web Service Definition Language)

• External client programs use P6 Web Services by creating a SOAP request and sending it to the application server

• 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.

22

P6 Web Services Overview

Primavera P6 Web Services deployed on

Jboss, Weblogic or Websphere

23

P6 Web Services OverviewSample WSDL

24

P6 Web Services OverviewSample Java Code

private void readProjectCodeTypes() throws Exception

{

URL wsdlURL = new URL("http://192.168.1.3:7001/p6ws/services/ProjectCodeTypeService?wsdl");

com.primavera.ws.p6.code.ProjectCodeTypeService service = new com.primavera.ws.p6.code.ProjectCodeTypeService(wsdlURL);

ProjectCodeTypePortType servicePort = service.getProjectCodeTypePort();

Client client = ClientProxy.getClient(servicePort);

setCookieOrUserTokenData(client);

List<ProjectCodeTypeFieldType> fields = new ArrayList<ProjectCodeTypeFieldType>();

fields.add(ProjectCodeTypeFieldType.OBJECT_ID);

fields.add(ProjectCodeTypeFieldType.NAME);

fields.add(ProjectCodeTypeFieldType.IS_SECURE_CODE);

List<ProjectCodeType> projCodeTypes = servicePort.readProjectCodeTypes(fields, null, null);

}

25

P6 Web Services OverviewSample SOAP Request Message

26

P6 Web Services Overview Sample SOAP Response Message

27

Sample CodeCreate Audit Log Using Event Messages and P6 Web Services

• Process ResourceAssignmentCreated event– Use P6 Web Services to retrieve additional information about

the new Resource Assignment such as Create User, Create Date, Resource Id, Resource Name and Activity Name

– Log events to a file

28

Sample Code Use Event Notification to Trigger a Change to an Activity

• Process a ActivityCreated event– Use P6 Web Services to retrieve additional information about the

new Activity such as Create User, Create Date and Project Id– Log events to a file– Use P6 Web Services to add a Code to the new Activity

29

Sample Code Use Event Notification to Trigger a Special Operation

• Process a ScheduleInvoked event– If Schedule job successfully completed then use P6 Web

Services to Summarize the Project

30

Resources

• The Java EE 6 Tutorial http://download.oracle.com/javaee/6/tutorial/doc/index.html Chapter 30 “The Java Message Service Concepts”

• Knowledge Base article Master Note For Primavera Web Services Installation And Common Technical Or Application Issues (Doc ID 1147896.1)

• Knowledge Base article Overview of event notification in P6 version 7 (Doc ID 914141.1)

• Knowledge Base article How To Enable Event Notification In P6 version 7.0 (P6 v7) (Doc ID 914008.1)

31

Resources

• Knowledge Base article Event Notification Sample Code (Doc ID 1288173.1) –the sample code used in this demo

32

Oracle Proactive Support DeliversMeeting the capabilities required by CIOs

Desired Capability* My Oracle Support Feature

Proactive Automated Health Checks /Alerts

Security & Product AlertsHealth Checks & Risk Analysis for Oracle Sun systems

Automated Service Requests

Automated Patch Management & Provisioning

Patch Advice & Recommendations Patch Planning

Embedded & Automated Configuration Management

System configurations linked toService Requests and Alerts

Configuration History & Compare

Online Knowledge Management My Oracle Support Knowledge Base:over 900,000 articles

Collaborative Online Communities My Oracle Support Communities:185+ communities, 230,000+ members

* IDG Research Services "The Future of IT Services and Support.”Base: 308 Total; 100 U.S..; 100 EMEA; 100 APAC Jan. 2010.

33

Other Great Support Sessions this week at Collab11 MONDAY TUESDAY Early TUESDAY Later Wednesday Early Wednesday Later

Upgrading to Oracle Database 11g Release 2Mon @ 10:30

SUN Support and Patching StrategiesTues @ 8:00

Meet your Support Engineers: Come meet the faces behind the SR;sTues @ 3:15

Using P6 Event Notification Messaging with Web Services in PrimaveraWed @ 8:00

E-Business Suite Best Practices for Patching & Maintaining Release 12Wed @ 1:00

Proactive Support Best Practices (A.K.A. How to Get Proactive)  Mon @ 2:30

Supporting Oracle product data hub:  Master Data Management (PIM) Tue @ 9:15

Hyperion Support and Best PracticesTue @ 3:15

JDE Upgrade or Best PracticesWed @ 9:15

Leveraging Oracle Technology within your Contract Management Environment Wed @ 2:15

Best Practices of PeopleSoft Enterprise HCM 9.1Mon @ 9:15

Best Practices for Supporting and Upgrading Siebel CRMTues @ 12:30

Working Effectively with Primavera SupportWed @ 3:15

Concepts and Best Practices for the Risk Register in Primavera Risk AnalysisWed @ 9:15a,

PeopleSoft Upgrade and Best Practices  Wed @ 2:15

Best Way to set up Board Integration-PS/HRMon @ 1:15

Troubleshooting Recruiting Solutions Integration Issues PS/HRMon @ 10:30

Exadata Support and Best PracticesTues @ 4:30

Middleware Upgrade or Best Practices Wed @ 10:30

Oracle E-Business Suite Diagnostics & Health ChecksWed @ 4:30