Building the API files for event processing

To build the CWEVENT_CI API files (required when the connector processes only events) or the Component Interface API files (required when the connector processes both events and requests):

  1. Open the Component Interface CWEVENT_CI from the project window and select PeopleSoft APIs from the Build menu.
  2. In the Java(TM) Classes panel:
  3. From the "Select APIs to Build:" field, select CWEVENT_CI and its associated collection. Figure 3 illustrates the screen within PeopleSoft.
    Figure 3. Building APIs
  4. Click OK.
  5. Compile any API files that you generate, and add them to PSFTCI.jar (if it exists) or create this file if it does not exist.
    Note:
    The start script or batch file is configured to search for these API files in a file named PSFTCI.jar in the \connectors\PeopleSoft\dependencies directory. After you compile these API classes, make a jar file that you name PSFTCI.jar. If you put this jar file in a different directory, change the start script or batch file to point to the correct location of these API classes.
  6. Place the cw_publish_events() function declaration and function call in the SavePostChg() PeopleCode for each Component associated with an event. For more information, see Sample PeopleCode declarations and function calls.
    Note:
    The function must be placed in the SavePostChg() of the Component and not of the Record.
  7. Define all parameters used in the function call and insert PeopleCode to check whether the Component has changed before making the function call. This code eliminates unnecessary calls to the function. Also add a check for %userid to prevent the connector from ping-ponging (that is, creating an endless loop in which the connector interprets a data change from a request as a new application event). For an example, see Sample PeopleCode declarations and function calls.

Copyright IBM Corporation 1997, 2004. All Rights Reserved.