IBM WebSphere Adapter for PeopleSoft Enterprise 6.1.0

Quick Start Tutorials

December 17, 2007

Table of Contents

1.0 Introduction 4

1.1 Learning Objectives 4

1.2 Audience 4

1.3 Software prerequisites 4

2.0 Preparing to run through the tutorial 4

2.1 Configuration prerequisites 4

2.1.1 Importing the sample projects into PeopleTools 5

2.1.2 Adding the trigger to WBI_CUSTOMER_COMP component 8

2.1.3 Generating the Java API for Component Interfaces 10

2.1.4 Creating a J2C Authentication Alias in WPS 11

2.2 Extracting the sample files 16

3.0 Tutorial 1: Sending data to PeopleSoft Enterprise Application (outbound processing) 18

3.1 Configuration prerequisites 18

3.2 Configuring the adapter for outbound processing 18

3.2.1 Setting connection properties for the external service wizard 23

3.2.2 Selecting the business objects and services to be used with the adapter 23

3.2.3 Generating business object definitions and related artifacts 25

3.3 Deploying the module to the test environment 30

3.4 Testing the assembled adapter application 32

4.0 Tutorial 2: Receiving events from PeopleSoft Enterprise Application (inbound processing) 37

4.1 Configuration prerequisites 37

4.2 Configuring the adapter for inbound processing 37

4.2.1 Setting properties for the external service wizard 42

4.2.2 Selecting the business objects and services to be used with the adapter 42

4.2.3 Generating business object definitions and related artifacts 44

4.3 Deploying the module to the test environment 53

4.4 Testing the assembled adapter application 54

5.0 Troubleshooting 63

5.1.1 Improve the WPS trace level 63

5.1.2 Connection issues with PeopleSoft Enterprise Application 63

1.0  Introduction

The WebSphere Adapter for PeopleSoft Enterprise is a JCA 1.5 spec compliant J2EE component. It will enable bi-directional connectivity to a PeopleSoft Enterprise application. The clients can send outbound messages to the resource adapter via the Common Client Interface (CCI) defined by the JCA specification. The resource adapter will perform the appropriate operation on the data based on data content and operation specified in the Interaction Spec.

For inbound messages, the resource adapter uses the JCA message inflow contact. It will define a message listener interface and the endpoints or the message-driven beans should implement this interface. This will enable the endpoints to receive any subscribed events from the resource adapter.

To gain practical knowledge in setting up and deploying the adapter, complete one or more of the tutorials. Everything you need to complete each tutorial is contained in the tutorial. If you have performed the prerequisite tasks, you can complete each tutorial in under an hour.

1.1  Learning Objectives

After completing a tutorial, you should be able to perform the following tasks:

·  Create an adapter project in WebSphere Integration Developer.

·  Discover services and associated business objects from the enterprise information system (EIS) and make them part of the adapter project.

·  Create a deployable module that you install on WebSphere Process Server or WebSphere Enterprise Service Bus.

·  Test the module and validate the results.

1.2  Audience

These tutorials are for integration developers who design, assemble, test, and deploy business integration solutions.

1.3  Software prerequisites

To use these tutorials, you must have the following softwares installed:

·  WebSphere Integration Developer, version 6.1

·  WebSphere Process Server, version 6.1

·  PeopleTools, version 8.4x.

2.0  Preparing to run through the tutorial

2.1  Configuration prerequisites

Before doing any tutorial testing, please complete the following tasks:

·  Importing the sample projects into PeopleTools.

·  Adding the trigger to WBI_CUSTOMER_COMP component.

·  Creating the Java API for the Component Interfaces.

·  Creating a J2C authentication alias in WPS.

The detailed steps for these tasks will be introduced in the following sections.

2.1.1  Importing the sample projects into PeopleTools

Please perform the following steps to import WBI_CUST_PROJ project into PeopleTools and build it.

1.  Copy WBI_CUST_PROJ project from <WID_HOME>¥ ResourceAdapters\PeopleSoft_6.1.0.0__IF01\samples to a temp directory (C:¥Projects) on the machine where the PeopleTools runs.

2.  Log on the PeopleSoft Application Designer.

3.  Select Tools->Copy Project->From File.

4.  Browse to C:¥Projects directory. From the Select Project from the List Below list, double-click WBI_CUST_PROJ.

5.  In the Copy From File dialog, press Copy button. Wait for the operation to complete.

6.  Select WBI_CUST_PROJ in the left hand panel, and then select Build->Project from the main menu.

7.  In the Build panel, select the following check boxes:

a)  Create Tables

b)  Create Views

c)  Create Trigger

d)  Execute and build script

8.  Press Build button to begin to build the project.

9.  Press Close button to exit the Build Progress dialog.

10.  In the Build Log view of the Application Designer, check the log messages to confirm that 3 records were processed correctly.

11.  Select File->Save All to save the changes.

Repeat the above steps to import IBM_EVENT_V600 project into PeopleTools and build it.

Then we need to configure the user security for the Component Interfaces.

12.  Log into PeopleSoft Web Client with the URL: http://localhost/psp/ps/?cmd=login

13.  Go to PeopleTools->Security->Permissions & Roles->Permission Lists.

14.  Input the PTPT1200 to the edit box of begins with. Then press Search button.

15.  Go to the Component Interfaces tab, press button to add the Component Interface WBI_CUSTOMER_COMP_INTERFACE.

16.  Press the Edit button near to WBI_CUSTOMER_COMP_INTERFACE.

17.  Select Full Access for all methods. Then press OK.

18.  Go back to the Component Interfaces tab, press button to add the Component Interface IBM_EVENT_CI.

19.  Press the Edit button near to IBM_EVENT_CI..

20.  Select Full Access for all methods. Then press OK.

21.  Go back to the Component Interfaces tab. Press Save button to save the changes.

2.1.2  Adding the trigger to WBI_CUSTOMER_COMP component

For inbound operation, the adapter needs to retrieve the events from the IBM_EVENT_BC component. We will add a trigger to WBI_CUSTOMER_COMP component, so that the events can be generated automatically when the data are created or modified against this component.

Please perform the following steps to add a trigger:

1.  In PeopleSoft Application Designer, open WBI_CUST_PROJ project.

2.  In the left panel, right-click on WBI_CUSTOMER_COMP and select View PeopleCode.

3.  In the PeopleCode Edit window, select SavePostChange in the right list.

4.  Input the following PeopleCode into the edit window

Declare Function IBMPublishEvent PeopleCode IBM_FETCH_ID.IBM_NEXT_EVENT_ID FieldFormula;
Component string &BONAME1;
Component string &KEYLIST1;
&BONAME1 = "WbiCustomerCompInterfaceBG";
&KEYLIST1 = "WBI_CUSTOMER.WBI_CUSTOMER_ID";
/* Check if Component Changed before calling function*/
If ComponentChanged() And
%UserId > "CW" Then /* Publish this event to the IBM WebSphere IBM_EVENT_TBL for polling */
IBMPublishEvent(&BONAME1, &KEYLIST1);
End-If;

5.  Select File->Save All to save the changes.

Note: In the PeopleCode, the value of &BONAME1 should match the actual Business Object name that you generate in WebSphere Integration Developer during the tutorial 2. In this document, the business object name is “WbiCustomerCompInterfaceBG”. If it is different in your scenario, please modify the above PeopleSoftCode correspondingly.

To ensure the trigger that we created above can work well, we also need to do some initialization work. Connect to the database that the PeopleTools uses, and execute the following sql statement:

$ insert into PS_IBM_FETCH_ID values(1000);
$ commit;

2.1.3  Generating the Java API for Component Interfaces

The Component Interface API provides access to all of a Component Interface’s exposed objects and PeopleCode methods. You can manually generate these API using the Application Designer, and then compile them into a PSFTCI.jar file.

1.  In PeopleSoft Application Designer, open IBM_EVENT_CI Component Interface.

2.  Select Build->PeopleSoft API from the main menu.

3.  In the Build PeopleSoft API Bindings dialog, make sure only the Bulid check box under Java Classes is selected. Set the Target Directory for storing the generated java files.

In the Select API to Build list, select the following items:

CompIntfc.CompIntfcPropertyInfo
CompIntfc.CompIntfcPropertyInfoCollection
All beginning with CompIntfc.IBM_EVENT_CI
All beginning with CompIntfc.WBI_CUSTOMER_COMP_INTERFACE

4.  Press OK. Then check the target directory to make sure the java files are generated correctly.

5.  Copy the generated java files to a temp directory C:¥Temp, then copy psjoa.jar file from <PeopleTools_HOME>¥web¥psjoa to directory C:¥Temp.

6.  Enter directory C:¥Temp, and run the following commands to build the java files.

$ javac –classpath .¥psjoa.jar PeopleSoft\Generated\CompIntfc\*.java
$ jar" -cvf PSFTCI.jar PeopleSoft\Generated\CompIntfc\*.class

7.  These two jar files of psjoa.jar and PSFTCI.jar will be used by the adapter to access the PeopleSoft Enterprise Application in the later scenarios.

2.1.4  Creating a J2C Authentication Alias in WPS

Perform the following steps to create a J2C authentication alias in WPS, which will be used by the adapter to access the PeopleSoft Enterprise Application.

1.  Open WebSphere Integration Developer, switch to Business Integration perspective.

2.  Select Servers tab, then right-click on WebSphere Process v6.1 Server and select Start.

3.  After the server starts up, right-click on WebSphere Process v6.1 Server and select Run administrative console

4.  Log into the administrative console.

5.  Select Security-> Secure administration, application, and infrastructure.

6.  Under Authentication, select Java Authentication and Authorization Service->J2C authentication data.

7.  Press New button to create a new alias.

8.  Specify the properties with the following values.

Property / Value
Alias / PSFT_Alias
User ID / PS
Password / PS

As shown in the following screenshot.

9.  Press Save to save changes.

10.  Then navigate to J2C authentication data to check the alias that we created just now. It will be used during the later tutorials.

2.2  Extracting the sample files

Replicas of the artifacts that you create when using the external service wizard are provided as sample files for your reference. Use these files to verify that the files you create with the external service wizard are correct.

Some sample files are provided under “Sample” folder, their detailed contents are shown as below. You can create a temp folder and extract the archives:

File name / Description
Samples¥referencefiles¥Tutorial1.zip
TestOutbound¥ PeopleSoftOutboundInterface.import / Contains the SCA import for the resource adapter.
TestOutbound¥ PeopleSoftOutboundInterface.wsdl / Contains the SCA wsdl file for the resource adapter
TestOutbound¥ WbiCustomerCompInterfaceContainer.xsd / Business Object definition for the business object container.
TestOutbound¥ WbiCustomerCompInterfaceBG.xsd / Business Object definition for the business object graph.
TestOutbound¥ WbiCustomerCompInterface.xsd / Business Object definition for the Customer business object.
TestOutbound¥WbiAddress.xsd / Business Object definition for the Address business object.
TestOutbound¥WbiPhone.xsd / Business Object definition for the Phone business object.
Samples¥referencefiles¥Tutorial2.zip
TestInbound¥ PeopleSoftOutboundInterface.export / Contains the SCA export for the resource adapter.
TestInbound¥ PeopleSoftOutboundInterface.wsdl / Contains the SCA wsdl file for the resource adapter
TestInbound¥ WbiCustomerCompInterfaceBG.xsd / Business Object definition for the business object graph.
TestInbound¥ WbiCustomerCompInterface.xsd / Business Object definition for the Customer business object.
TestInbound¥WbiAddress.xsd / Business Object definition for the Address business object.
TestInbound¥WbiPhone.xsd / Business Object definition for the Phone business object.

3.0  Tutorial 1: Sending data to PeopleSoft Enterprise Application (outbound processing)

This tutorial demonstrates how WebSphere Adapter for PeopleSoft Enterprise to populate customer information into PeopleSoft Enterprise Application.

3.1  Configuration prerequisites

Before starting this tutorial, please perform the following tasks:

l  Ensure the jar files of psjoa.jar and PSFTCI.jar that we created in 2.1.3 section are put to directory D:¥PeopleSoft_QST.

l  Ensure the PeopleSoft Enterprise Application is running.

3.2  Configuring the adapter for outbound processing

Run the external service wizard to specify business objects, services, and configuration to be used in this tutorial.

To generate the business objects and related artifacts, please perform the following steps:

1.  Open WebSphere Integration Developer, create a new workspace named PeopleSoft_Outbound.

2.  Go to the Business Integration perspective, select File->New->External Service.

3.  In the New External Service panel, select Adapters. Then press Next.

4.  In the Select an Adapter panel, select IBM WebSphere Adapter for PeopleSoft Enterprise. Then press Next.

5.  In the Adapter Import panel, press Next.

6.  In the Required Files and Libraries panel, use Browse button to specify the location of psjoa.jar and PSFTCI.jar. Then press Next.

7.  In the Processing Direction panel, select Outbound. Then press Next.

3.2.1 Setting connection properties for the external service wizard

8.  In the Discovery Configuration panel, specify the connection properties for the external service wizard. Then press Next.

3.2.2  Selecting the business objects and services to be used with the adapter

9.  In the Object Discovery and Selection panel, select WBI_CUSTOMER_COMP_INTERFACE and add it to the Selected objects list. Then press Next.

10. In the Configure Composite Properties panel, accept the default settings, press Next.

3.2.3  Generating business object definitions and related artifacts

11. In the Service Generation and Deployment Configuration panel, specify the J2C Authentication Data Entry property to widNode/PSFT_Alias. Then press Next.

12. In the Service Location Properties panel, press New button.

13. In the Integration Project panel, select Create a module project. Then press Next.

14. In the Module panel, specify the Module Name property to TestOutbound. Then press Finish.

15. Go back to the Service Location Properties panel, press Finish.

16. Go back to the Business Integration perspective, select File->Save All to save the changes.

3.3  Deploying the module to the test environment

The result of running the external service wizard is an SCA module that contains an EIS import or export. Install this SCA module in WebSphere Integration Developer integration test client.

1.  Add the module you created earlier to the server using the server panel in WebSphere Integration Developer.

In the Servers tab, right-click on the WebSphere Process v6.1 Server, and then select Add and remove projects.

2.  Add the SCA module to the server.

In the Add and Remove projects panel, use Add button to add TestOutboundApp project into the Configured projects list. Then press Finish.

3.4  Testing the assembled adapter application

Test the assembled adapter application using the WebSphere Integration Developer integration test client:

Test the assembled adapter application using the WebSphere Integration Developer integration test client.

1.  Select the service you want to test, right-click on TestOutbound module and select Test -> Test Module.