Previous Contents Index DocHome Next |
iPlanet Application Server Enterprise Connector for PeopleSoft Developer's Guide |
Chapter 4 Programming Examples
To program for iPlanet Application Server Enterprise Connector for PeopleSoft, you must know how to acquire Unified Integration Framework (UIF) objects and execute functions by using function objects. You also need to know how to use servlets with the iPlanet Application Server Enterprise Connector for PeopleSoft to access functions on a PeopleSoft EIS. This chapter includes the following information:
PeopleSoft Samples
PeopleSoft Samples
The PeopleSoft Samples provided show the general flow of a connector program.
Note You must build the message definition, described in Building Message Definitions", before running samples on either NT or Solaris. Ensure that iPlanet Web Server and iPlanet Application Server are up and running.
Activation
The PeopleSoft sample consist of servlets which activate PeopleSoft programs that access the Peoplesoft management system.You must have set up the environment before activating the samples. See Post Installation Issues in Chapter 2 of the iPlanet Application Server Enterprise Connector for PeopleSoft Administrator's Guide.
To Run the Peoplesoft Samples on NT
Select Programs>iPlanet Application Server 6.0>PEOPLESOFT Connector 6.0 - Start Worker Process.
Select Programs>iPlanet Application Server 6.0>PEOPLESOFT Connector 6.0 - Sample Applications.
Click on the link "To Start The Simple Sample - ProcessMsg Demo" to activate the sample shown in Figure 4-1.
- The PeopleSoft sample script is displayed with links to the samples.
Figure 4-1    PeopleSoft Customer Details Samples ![]()
To run the Employee Details Sample on Solaris
From <iPlanet Install directory>/ias/APPS/bin, type:
Start your browser.
- ./startpsftworker.sh start
Enter the following URL: <host name>:<web server port>/psftSamples.
Click on: To Start The ProcessMsg Demo link
- The PSFT Employee Details Samples appears, showing links to the ProcessMsg and SearchDialog samples.
Type in the information in the text fields, or accept the default values, and click on Execute.
- The Employee Details samples opening screen appears.
Figure 4-2    startForm.jsp ![]()
After the data finishes processing the ProcessMsg End Form appears.
Figure 4-3    Employee's Details. ![]()
Code Example
This is a fully operational example. You can use it as a model for building your own application.The code listings for the Process Message and Search Dialog samples are detailed in Code Example 4-1 and Code Example 4-2.
Search Dialog Demo Code Examples
Building Message Definitions
Message Definitions are the metadata, which describe the format of data associated with a particular PeopleSoft panel. This section includes the procedures for building your own message definitions. You must build the message definition before you run a sample.For more information on PeopleSoft application development, go to the PeopleSoft web site at:
http://www.peoplesoft.com/en/us/products/technology/index.html
You build message definitions by using the following procedures:
To Create a Project
To Define a New Employee Record Field
To Add Existing Fields To Your Project
To Define The Record And Build A Search Dialog Box
To Set the Record Field Properties
To Define a Panel Group For This Panel
To Define a New Business Process
To Specify the Message Agent Field Map
Select Start > Programs > PeopleSoft 7.5 > Application Designer.
Select Oracle from the drop-down list in the Connection Type list box.
- The PeopleSoft Signon screen appears.
![]()
Type in your Operator ID and Password and click on the OK button.
- Accept the default PSOR in the Database Name dialog box.
Select File > New.
- The PeopleSoft Application Designer window appears.
Select Tool > Options.
Select When Object is modified and saved from the Insert Object into Project radio button group.
- The Options dialog box appears.
![]()
Select Do not insert related objects with current object radio button from the Related Objects Options radio button group.
To Define a New Employee Record Field
You must include the new field, EMPL_RCD, to run the samples.
Select File > New > Field.
Select Number from the drop-down list and click OK.
- The New Field drop-down list box appears.
![]()
Dismiss the dialog box.
Select File > Save As and type EMPL_RCD in the Save Name As field of the dialog box.
![]()
Click OK to save the new field.
Select File > Save Project As.
Type DEMO_PROJECT in the Save Name As text box and then click OK.
![]()
To Add Existing Fields To Your Project
Select File > Open.
Select Field from the Object Type drop-down list box.
Type EMPLID into the Name text field.
Double-click the EMPLID field to open the field definition dialog box.
- A list of all fields that start with that prefix appear. If there is only one field with the prefix, the field definition dialog box opens.
![]()
Press <F7> to insert the currently selected object into the project.
Close the Open Object dialog box.
Repeat the procedure starting with step 1 to add the following fields to the project.
EMPL_RCD
- Your screen should look like this when you finish inserting all the necessary fields.
![]()
To Define The Record And Build A Search Dialog Box
Select File > New.
Select Record from the Object Type drop-down list box.
Drag-and-drop the EMPLID field to the new record.
![]()
Drag-and-drop all the other designated fields to the record in the order shown in the following figure.
Select File > Save As.
- When you are finished your record should look like this.
![]()
To Set the Record Field Properties
Select the EMPLID field and then click the right mouse button to display the list box.
![]()
Choose Record Field Properties to display the Record Field properties dialog box.
![]()
Mark the following check boxes:
Click OK.
Continue selecting each field in turn until the record field properties have been specified for each field according to the following table.
Table 4-1 Message Definition Options
Note
To Set the Edit Field Options
Note These edit options must be set only for the SETID_DEPT and DEPTID fields.
Select the SEPTID_DEPT field and then click the right mouse button to display the list box.
Choose Record Field Properties to display the Record Field properties dialog box.
Select the Edit tab to display the Record Field properties Edit dialog box.
![]()
Select the Edit options as specified inTable 4-2.
Table 4-2 Record Field Properties Edit Options
Select Tools > DataAdministration > Set_TableSpace.
Click on Set_TableSpace to display the Select Tools data administrator.
![]()
Click on Set_TableSpace to display the Change Space dialog box.
![]()
Select the record you built.
Select Build > Current Object to display the Build dialog box.
![]()
Create Tables check box
To build the new record, click the Build button.
Execute-and-build-script button.
- The Create Indexes check box is automatically selected also.
- Check that there are no error messages in the Output window.
![]()
- If there are error messages, consult your PeopleSoft documentation.
Select File > New.
Select Panel from the Object Type drop-down list box.
Drag-and-drop the fields from the new record that you built onto the panel.
Double-click the EMPLID field, the Panel Field Properties dialog box is displayed.
- The field prompt display sequence will be the same as the sequence that the fields were dragged-and-dropped.
![]()
![]()
Click the Use tab to display the Field Use Options dialog box. Mark the Display Only check box.
Click OK.
Double-click the National ID Type field to display the Panel Field Properties dialog box.
Mark the Related Display Field check box.
Double-click the NID Short Desc. field to display the Panel Field Properties dialog box.
Mark the Display Control Field check box and then select National ID Type Field from the Related Control Field list.
In the Save As dialog box, type in the Panel name and then click OK.
![]()
To Define a Panel Group For This Panel
Select File>New.
Select Panel Group from the Object Type drop-down list box.
Drag-and-drop the EMPL_DETAILS panel to the Panel Group window.
![]()
Click on the Use tab.
- The Panel Group Properties dialog box is displayed.
![]()
From the Search record drop-down menu, select the Record you defined in the previous step.
Accept the default Actions: Add and Update/Display, and the default 3-Tier Execution Location.
In the Save As dialog box, type the Panel Group name,
Select File > New.
Select Menu from the Object Type drop-down list box and then click OK.
Double-click on the broken-line box on the menu bar.
![]()
- The Menu bar is displayed.
![]()
- The Bar Item Properties dialog box is displayed.
![]()
Type Use in the Name and Label text boxes and then click OK.
Drag -and drop the panel group to the menu item.
- The Menu bar now displays a new Bar item: Use.
Select File > Save As.
![]()
Type the Menu name in the Save As dialog box, and click OK.
![]()
To Define a New Business Process
Select File > New > Business Process and click OK.
- The Business Process workspace and toolbar appears.
![]()
Select the Activity icon by clicking with the left-mouse button.
When the Activity is at the location you want, click the left-mouse button to display the Activity Choice dialog box.
Select the Create New Activity radio button and click OK.
![]()
- An Activity tool appears on the worksheet.
![]()
Select the Activity tool and then click the right-mouse button.
Type the activity definition in the Name text box and then press the tab key on you keyboard; the name is automatically copied to the Icon Description. text box.
- The Activity Definition dialog box appears.
Click OK.
![]()
- Do not leave spaces in the activity definition name.
- Type the name of the business process into the text box of the Save As dialog box.
![]()
Click OK to create a business process.
Double-click the activity.
Left click on the Other App icon.
- A business process palette appears.
Position the cursor in the worksheet.
Click the right-mouse button to display the Message Agent Definition dialog box.
![]()
Type in the Message Agent Definition name.
![]()
Click the Attribute button and select the fields from the Message Attribute dialog box drop-down lists.
- Do not leave spaces within the Message Agent Definition name.
Click OK.
![]()
Click the Level Mapping button and select the following radio buttons and checkbox
- You need to build a new message for each action.
![]()
Click OK.
To Specify the Message Agent Field Map
Click on the Field Mapping button on the Message Agent Definition dialog box.
Type in the Field name.
- For each field you must select the source Record, the Field name, and Input and/or Output.
![]()
Select the record from the Record list box.
The following table is the end result of the complete process.
- EmplId and OperClass must be selected from the Search Record.
- All other records must be selected from the appropriate source record.
Note When you define a Message Definition that is used to add a record, the key field must have in the Map When drop-down list box Input.
![]()
To Give Authorization To The Panel
Select Go > PeopleTools > Security Administrator.
Select File > Open.
![]()
.
![]()
Select ALLPANLS and click OK.
![]()
Click the Insert-Menu-Name button on the tool bar to display the Insert Name panel.
![]()
- The Select Menu Items panel appears.
![]()
Open the Business Process folder.
Double-click the Business Process that you created.
Double-click on the Business Process to display the Activities.
![]()
![]()
Click on the Step icon on the Business Process palette.
Position the cursor on the worksheet and click the left-mouse button.
![]()
Click the right-mouse button to open the Step Definition panel.
![]()
Click the Attribute button.
![]()
Note You need to build a new step for each action.
Previous Contents Index DocHome Next
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.
Last Updated November 03, 2000