Creating events table and compiling PeopleSoft JAR files

The first of the two required JAR files, which will be named PSFTCI.jar, must be manually built and compiled.

PeopleSoft connector polls the PeopleSoft Enterprise server at specified intervals for events. When the connector detects an event, it converts the event data into a business object and sends it to the client application. To use this scenario, you must create a custom event project in PeopleSoft Enterprise server.

Event store

The event store is a table that holds events that represent data changes until the polling connector can process them. The connector uses the event store to keep track of event entities. To use inbound processing, you must use PeopleTools Application Designer to create a custom project for event notification. The custom project creates the event store the connector needs for inbound processing. 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. In each poll call, a configured number of events are processed by the connector. 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. As events are retrieved from the event store and processed, the status of the event changes to reflect its state, as shown in the following table.

Table 1. Event status values
Status short name Description Event Table Value
Error processing event An error occurred during event processing. -1
Ready for poll 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

I. To create the events table

Ensure that the following steps are met for configuring and compiling the PeopleSoft JAR files.
  • Creating Events Table
  • Add the trigger to WBI_CUSTOMER_COMP component
  • Create the Java™ API for Component Interface
  1. Copy WBI_CUST_PROJ project located at <Cast Iron Installation directory>\etc\peoplesoft\scripts to a temp directory (C:\Projects) on the machine where the PeopleTools runs.
  2. Log on to the PeopleSoft application designer, and select Tools > Copy Project > From File.
  3. Browse to C:\Projects directory. From the Select Project from the List Below, double-click WBI_CUST_PROJ.
  4. In the Copy From File dialog, click Copy. Wait for the operation to complete.
  5. Select WBI_CUST_PROJ in the left panel, and then select Build > Project from the main menu.
  6. In the Build panel, select the following check boxes:
    • Create Tables
    • Create Views
    • Create Trigger
    • Run and build script
  7. Click Build, to begin to build the project.
  8. Click Close, to exit the Build Progress dialog.
  9. In the Build Log view of the application designer, check the log messages to confirm that three records were processed correctly.
  10. Select File > Save All to save the changes.
  11. To configure the user security for the Component Interfaces, log onto PeopleSoft Web Client with the URL: http://localhost/psp/ps/?cmd=login.
  12. Go to PeopleTools > Security > Permissions & Roles > Permission Lists.
  13. Specify PTPT1200 in the edit box of begins with and click Search.
  14. Go to the Component Interfaces tab, click + to add the Component Interface WBI_CUSTOMER_COMP_INTERFACE.
  15. Click Edit of WBI_CUSTOMER_COMP_INTERFACE.
  16. Select Full Access for all methods and click OK.
  17. Go back to the Component Interfaces tab, click + to add the Component Interface IBM_EVENT_CI.
  18. Click Edit of IBM_EVENT_CI.
  19. Select Full Access for all methods and click OK.
  20. Go back to the Component Interfaces tab and press Save button to save the changes.

II. To add triggers

  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 panel.
  4. 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 = "WbiCustomerCompInterface";
    &KEYLIST1 = "WBI_CUSTOMER.WBI_CUSTOMER_ID"; /* Check if Component Changed before calling function*/ If ComponentChanged() And %UserId &lt;> "C" 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.
  6. To ensure the trigger that was created in the steps above can work well, you need to do some initialization work. Connect to the database that PeopleTools uses, and run the following SQL statement:
    $ insert into PS_IBM_FETCH_ID values(1000);
    $ commit;

III. To create the Java API for Component Interface

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.
  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 Build 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. Click OK. Check the target directory to make sure the Java files are generated correctly.
  5. Copy the generated Java files to C:\Temp directory, then copy psjoa.jar file from <PeopleTools_HOME>\web\psjoa to C:\Temp directory.
  6. Enter directory as 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

These two JAR files psjoa.jar and PSFTCI.jar would be used by PeopleSoft connector to access the PeopleSoft Enterprise application.




Feedback | Notices


Timestamp icon Last updated: Thursday, December 17, 2015


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/Peoplesoft_compiling_jars.html