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):
Open the Component Interface CWEVENT_CI from the project window
and select PeopleSoft APIs from the Build menu.
In the Java(TM) Classes
panel:
Select the Build box
In the "Directory containing PeopleSoft package:" field,
enter the path for connector's dependencies directory (or the directory where all the PeopleSoft API
files reside for your implementation). This is usually:
Windows
%ProductDirS%\connectors\PeopleSoft\dependencies
End of Windows
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
Click OK.
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.
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.
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.