This article describes in detail how to configure the PeopleSoft server for IBM App Connect Enterprise. We need to build two custom projects for Inbound & Outbound operations.
Creating custom event project for inbound in PeopleTools:
A sample event project, IBM_EVENT_V600, is provided in the link https://community.ibm.com/community/user/integration/viewdocument/configuring-peoples[…]rver-for-i?CommunityKey=77544459-9fda-40da-ae0b-fc8c76f0ce18
You can either copy and use the sample project, or you can create your own project using PeopleTools.
Steps to copy and build the project.
Open the PeopleSoft Tool Click on Tools >Copy Proj -> From File
Select Project and click on Select.
Build the entire project, selecting all create options.
Click on Build > Project
Click on “Yes”.
Select File > Save All to save the changes.
The copied project will look like this:
PeopleSoft code in the above screen can see here:
https://www.ibm.com/docs/en/app-connect/11.0.0?topic=properties-peoplecode-custom-event-project
Test and confirm that the Component Interface works, by using the Component Interface tester.
Double click on Component Interface (IBM_EVENT_CI) in the Project. Right click on the Component Interface name on right side panel Then select Test component interface.
Enter values for each filed & save.
Confirm, newly added record is existing in Component Interface:
To configure the user security for the Component Interfaces, log onto PeopleSoft Web Client with the URL: http://hostname:port/psp/ps/?cmd=login&languageCd=ENG&.
Component interface permissions are set at the permission list level in PeopleSoft security.
Go to PeopleTools > Security > Permissions & Roles > Permission Lists.
Specify PTPT1200 in the edit box of begins with and click Search.
Go to the Component Interfaces tab, click + to add the Component Interface IBM_EVENT_CI.
Click Edit of IBM_EVENT_CI. Select Full Access for all methods and click OK.
Go back to the Component Interfaces tab and press Save button to save the changes.
Creating custom project for Outbound in PeopleTools:
A sample project, WBI_CUST_PROJ, is provided in this link https://community.ibm.com/community/user/integration/viewdocument/configuring-peoples[…]rver-for-i?CommunityKey=77544459-9fda-40da-ae0b-fc8c76f0ce18 to perform outbound processing ..
- Log on to the PeopleSoft application designer and select Tools > Copy Project > From File.
- Browse and select WBI_CUST_PROJ.
- In the Copy From File dialog, click Copy. Wait for the operation to complete.
- Select WBI_CUST_PROJ in the left panel, and then select Build > Project from the main menu.
In the Build panel, select the following check boxes:
- Create Tables
- Create Views
- Create Trigger
- Alter Tables
- Run and build script
- Click Build, to begin to build the project.
- Click Close, to exit the Build Progress dialog.
- In the Build Log view of the application designer, check the log messages to confirm that three records were processed correctly.
- Select File > Save All to save the changes & Test Component Interface.
- To configure the user security for the Component Interfaces, log onto PeopleSoft Web Client with the URL: http://hostname:port/psp/ps/?cmd=login&languageCd=ENG&. Go to PeopleTools > Security > Permissions & Roles > Permission Lists.
- Specify PTPT1200 in the edit box of begins with and click Search.
- Go to the Component Interfaces tab, click + to add the Component Interface WBI_CUSTOMER_CI.
- Click Edit of WBI_CUSTOMER_CI.
- Select Full Access for all methods and click OK.
- In PeoplesoftTool, in the left panel, right-click on WBI_CUSTOMER_COMP and select View PeopleCode.
- In the PeopleCode edit window, select SavePostChange in the right panel.
- Type the following PeopleCode in the edit window.
Declare Function IBMPublishEvent PeopleCode IBM_FETCH_ID.IBM_NEXT_EVENT_ID FieldFormula;
Component string &BONAME1;
Component string &KEYLIST1;
&BONAME1 = "WbiCustomerCI";
&KEYLIST1 = "WBI_CUSTOMER.WBI_CUSTOMER_ID";
/* Check if Component Changed before calling function*/
If ComponentChanged() And %UserId <> "C" Then
/* Publish this event to the IBM WebSphere IBM_EVENT_TBL for polling */ IBMPublishEvent(&BONAME1; &KEYLIST1);
End-If;
The copied project will look like this:
Pseudo Code for the project is given at the end of this blog… You can do the changes in code if any modification is required.
Creating the component interface jar file:
The Component Interface API provides access to all the objects and PeopleCode methods. You can manually generate these API using the application designer, and then compile them to a PSFTCI.jar file.
In PeopleSoft application designer, open IBM_EVENT_CI Component Interface.
Select Build > PeopleSoft API from the main menu.
Select all APIs to build, Select the Target directory.
Make sure IBM_EVENT_CI and WBI_CUSTOMER_COMP_INTERFACE is there in the API List then Click Ok.
Check the target directory to make sure the Java files are generated correctly.
copy psjoa.jar file from <PeopleTools_HOME>\web\psjoa to the folder where we copied peoplesoftAPIs.. Here it is C:\Users\Administrator\Desktop\Praji-jars\Jars-ForBlog
Set CLASSPATH to JavaINstallDirectory/lib/tools.jar and psjoa.jar..
Compile the Component Interface Java files
javac *.java
Now we can see .class files are generated for each java files…
Create the component interface jar file using below command:
jar -cvf PSFTCI.jar PeopleSoft\Generated\CompIntfc\*.class
We can see PSFTCI.jar created under C:\Users\Administrator\Desktop\Praji-jars\Jars-ForBlog
These two JAR files psjoa.jar and PSFTCI.jar would be used by PeopleSoft connector to access the PeopleSoft Enterprise application.
Pseudo Code for IBM Custom Event Project:
************************************
Two PeopleCode functions are required to support inbound processing. If you create a custom event project in PeopleTools for inbound support, add the PeopleCode functions to the project.
The Custom event project PeopleCode contains the IBMPublishEvent and IBMPublishFutureDatedEvent functions that are used to publish events to the event table. Calls to these functions are made from the SavePostChange PeopleCode function in the PeopleSoft component of interest.
Each time a business object is created, updated, or deleted, the PeopleCode function used in the project and then added to the component interface inserts a new record in the event store, with the appropriate object name, keys, and status value.
During inbound processing, the connector polls the events from the event store at configured poll intervals. . When the connector detects an event, it converts the event data into a business object and sends it to the client application. The order of event processing is based on the ascending order of priority and the ascending order of the event time stamp. The events with the Ready for poll (0) status are picked up for polling in each poll cycle. The connector uses the object name and object key to retrieve the corresponding business object.
The adapter uses special processing for events that have status code (99), which indicates that they will occur in the future (IBMPublishFutureDatedEvent function). During a poll cycle, when the adapter retrieves events with a future status, the adapter compares the system time with the time stamp on each event. If the event time is earlier than or equal to the system time, the adapter processes the event and changes the event status to Ready for Poll (0).
If you want to the adapter to process future status events in the present time, use the function IBM_PUBLISH_EVENT instead of IBM_FUTURE_PUBLISH_EVENT. Doing so means that the event is identified as Ready to Poll (0) instead of Future (99).
As events are retrieved and processed from the event store, the status of the event changes to reflect the cycle, as shown in the following table:
|
Status short name
|
Description
|
Event table value
|
Error processing event
|
An error occurred during event processing.
|
-1
|
Ready for poll
|
The event has not yet been picked up by the adapter. The event is ready to be picked up.
|
0
|
Success
|
The event has been delivered to the event manager.
|
1
|
Deleted
|
The event has been processed successfully and is removed from the event store.
|
4
|
Future Events
|
These events should be processed at a future date.
|
99
|
References:
https://www.ibm.com/support/pages/system/files/support/swg/swgdocs.nsf/0/1e5be86ffe2a719885257386006f54fb/$FILE/PSFT_adapter_RAD_7.0.pdf
https://www.ibm.com/docs/en/search/peoplesoft?scope=SSTTDS_11.0.0