Integration Broker Case Study (Fileoutput)

19 04 2009

Perface

It is from PeopleBooks that PeopleSoft Integration Borker facilitates exposing PeopleSoft business logic as services for PeopleSoft Applications to invoke, which means that IB (Integration Broker) helps PeopleSoft to work with other systems. The overview of the architecture is follow:

The integration process include configuring messaging systems as well as managing integration gateways, while we have the following items in the integration gateways:

  • Nodes
  • Messages
  • Queues (“Queue” is once called “Message Channel” in pervious PeopleSoft version.)
  • Services
  • Service Operations
  • Routings

I am able to give a general picture about the above items according to my understanding:

A service operation can develiery messages though a routing, while service operation is working in a queue. That’s it. Of course, there are also some pictures from PeopleBooks, which make out the mechanism.



These days, I was working on some IB in action to have a better understanding of it. There is an article,Using PeopleSoft Integration Broker, about how to get a fileoutput by using IB, but the tutorial is a little bit out of date. Now let us see how to make it work in our system.





PeopleCode Debug

17 04 2009

Sometime, we will need to investigate in PeopleCode for debug. Here is a short introduction for doing so.

1. Use Getfile to debug PeopleCode

We simply use a file to log the data and variables.  Here is a similar article about this (http://peoplesoftexperts.blogspot.com/2005/12/debug-peoplecode-using-getfile.html ), I am also writing the PeopleCode as the following:

/* Debug Part*/

SQLExec(“select sysdate from dual”, &ddate);

&DFILE = GetFile(“\\machine_name\Output\dfile.txt“, “A”, %FilePath_Absolute);

If &DFILE.IsOpen Then

&DFILE.WriteLine(&ddate | “Your Data”);

&DFILE.Close();

End-If;

/* Debug Part End*/

What we do is to put the code in the place,  we are going to debug.

2. Debug Mode in Application Desinger

It would be better to have an IDE to debug the application and code, which is provided by Application Designer. We can use its debug mode to do the job. Here is way to enable the debug mode for 3-tier (PIA). There is a detail How-to in PeopleBook System and Server Administration, Chapter 12, Chapter 12 Configuring Trace and Debug Settings: http://download.oracle.com/docs/cd/E05317_01/psft/acrobat/pt849svt-b0307.pdf

While the following is a brief:

1. Enable PC Debugger in PSADMIN

2. Set the PSDBGSRV Listener Port in PSADMIN and Enable the log.  Normally, it is 9500, for example in .cfg file:

  • Values for config section – PeopleCode Debugger
    PSDBGSRV Listener Port=9500
    DebuggerMsgLogEnable=1

3. Set Multiple PSAPPSRV Server Processes and Timeout to 0.  For example:

  • Values for config section – PSAPPSRV
    Min Instances=2
    Max Instances=2
    Service Timeout=0
    Recycle Count=0
    Allowed Consec Service Failures=0
    Max Fetch Size=5000
    Auto Select Prompts=1
    Tuxedo Queue Size=65535

4. Open the Configuration Manager to ensure the PSDBGSRV Listener Port is 9500 on the same machine of Application Server

5. Login to Browser (PIA) and Application designer in three tier (App Server) with same and unique UserId.

6. In application designer, start debugger. Enable “break at Start” or set “break points” and access Page / Component to be debug in browser.





PeopleSoft Record Notes I

17 04 2009

PeopleSoft is a database oriented application, which puts almost everything in the database.  We develop and update the metadata in database for the development. The following is the data structure as far as I know:

  • Field->Record->Page->Component->Menu

Let’s Start:

1. Field:

Fields are the lowest-level definition in PeopleSoft, in general we can think of them as the column definiation in a database. Namely, we can find the definition in a table called PSDBFIELD in PeopleSoft Database. And we have a PSRECFILED, which keeps the relationship information of Records and Fields.

Related Tables: PSDBFIELD, PSRECFILED

2. Record:

A collection of fields is a record, while the core in peoplesoft definitions is “Record”. Their definitions are stored in the table named PSRECDEFN. And we now have the following record types:

  • SQL Table
  • SQL View
  • A Derived Work Record (To store totals or buttons, messages or temp fields, only available during the session. No real table)
  • Sub Record (For SubPages and the one-to-many relationship)
  • Dynamic View
  • Query View
  • Temp Table

In order to create a standard record, such as SQL table, we will have to have the following operations:

  1. In PIA, PeopleTools->Utilities->Administration->Tablespace Utilities to define the tablespace
  2. Check PSTBLSPCCAT table for the new tablespace
  3. Define the tablespace in Database
  4. Create the record metadate in PSRECDEFN with Application Desinger
  5. Build record with SQL generated by Application Desinger




Install PeopleSoft Step By Step Part III

11 04 2009

5. PIA Setup:
• Use PIA Setup Wizard Program (PS_HOME\setup\PsMpPIAInstall\setup.exe) to create a PIA site
1. Setup your PIA site

2. Input your PS_HOME folder

3. Use WebLogic as the web server

4. Input WebLogic Application Home

5. Create a new domain with a domain name

6. The web server is for single server domain.

7. Specify a name for the web site.

8. Give the application server name and assign the port. (JSL Port should be the same as the one used in application server.)

9. Use the default User ID and Password for web profile. (The account is build in DB PSOPRDEFN)

10. Select your report repository location

11. Confirm your setting and parameters for PIA setup

6. PIA Service Startup:
• Find the web server startup file in PS_HOME\webserv\MyPeople\bin\startPIA.cmd
• Start your web server and be sure that Web Logic can connect your application server with JSL port
• Boot Your Application server with psadmin.exe (PS_HOME\appserv\psadmin.exe)

  • 1. Start PSADMIN
  • 2. Specify 1 for Application Server and press ENTER.
  • 3. Specify 1 for Administer a domain and press ENTER.
  • 4. Select the domain to administer and press ENTER.
  • 5. Specify 1 to boot this domain and press ENTER.
  • 6. Specify 1 to boot in serial mood and press ENTER

7. Testing:
• Open your web browser and input the local host IP address and HTTP port (http://127.0.0.1:80)

• Choose “default PeopleSoft logon page”

• Use PS/PS to log in





Install PeopleSoft Step By Step Part II

10 04 2009

3. 2-tiers Connection Configuration:
• Connect to testing DB with Oracle Client 10g Enterprise Manager (If the connection has been create with configuration Assistant when installing the Client, you can skip the step. Otherwise, you will need to setup a connection.)

• Use sysadm/sysadm to connect with data mover to the DB. (Choose the connection type as “Oracle” and database name is the connection name you have created in the above step.)
Signon

• Use the script to reset the password (PS_Home\scripts\resetpswd.dms)
The script will have the following commands:
UPDATE PSOPRDEFN SET OPERPSWD = OPRID, ENCRYPTED = 0;
UPDATE PSACCESSPRFL SET ACCESSID = ‘SYSADM’, ACCESSPSWD = ‘SYSADM’, ENCRYPTED = 0;
ENCRYPT_PASSWORD *;

• Check the internal parameter in DB (PSOPRDEFN; PSLOCK; PSDBOWNER; PSSTATUS PSACCESSPRFL), which should be the same as the one as your connection. Otherwise, you will have to setup a new Connection according to the parameter in DB or modify your DB’s parameter.

• Use People Tools Configuration Manager and setup connection:

  • Database Type: Oracle
  • Database Name: (Your Connection Name)
  • User ID: PS (for HRMS)
  • Connect ID: people
  • Connect Password: peop1e

2
• Use 2-tiers connection in Application Designer (PS/PS)
3

4. Application Server Setup:
• Use psadmin.exe (PS_HOME\appserv\psadmin.exe) to create a domain
1. Start PSADMIN
2. Specify 1 for Application Server and press ENTER.
3. Specify 2 to create a domain and press ENTER.
4. Input the name of the domain and press ENTER.
5. Select the template to use, choose 1 as developer and press ENTER.
6. Start to Configure the domain

• Select the number before the item you want to modify and press ENTER. Specify 13 to load the configuration. Configure the domain as the followings:

  • DBNAME: (Your Connection Name)
  • DBTYPE: ORACLE
  • UserId: PS
  • UserPswd: PS
  • ConnectID: people
  • ConnectPswd: peop1e
  • Jolt: Yes
  • JSL Port: 9000 (use an available port)

• Boot the Application Server.
1. Select 13 to load the configuration and press ENTER.
2. Specify q and press ENTER to exit to the top menu
3. Specify 1 to boot the domain and press ENTER
4. Specify 1 to boot in serial mood and press ENTER
5. The message will be shown after starting the server successfully. (Please be noted that JSL is available on it’s port.)

• Shutdown Application Server
1. Specify 2 and press ENTER to shutdown the server
2. Select 1 and press ENTER for normal shutdown





Install PeopleSoft Step By Step Part I

10 04 2009

It is a basic article about PS installation based on Oracle 10g in Win XP/2003. Let’s go though the process step by step:

1. Platform and Software Package:
• OS: Windows XP/2003
• PeopleSoft Package (download from http://edelivery.oracle.com): People Tools 8.49 (B42585-01 … B42581-01); WebLogic Server 9.2; BEA Tuxedo 9.1 for Windows
• Miscellaneous Software: Oracle Client 10g; Secure CRT 5.0.4

2. Software Installation:
• Oracle Client 10g Installation
1. Run “setup.exe”

2. Select Installation Type as “Administrator”

3. Choose the home folder for the software

4. Start to install the software

5. Use the configuration Assistant

6. Select Naming Methods as Local Naming

7. Input the SID in the remote Database

8. Select TCP to connect to the remote server

9. Input the name or IP of the remote server and port number of the database

10. Test the connection with sysadm/sysadm (be sure the connection works successfully)

11. Give a name of your net service and complete the installation

• Tuxedo 9.1 Installation
1. Use pstuxinstall.exe to start the install program

2. Set the parameters for Tuxedo 9.1    ——- BEA Home/The folder to install in/TListen Port (default is 3050)

3. Start to install and to complete the installation according to the message

• PeopleTools Installation
1. Unzip the package and run setup.exe

2. With Oracle Database using the code.

3. Select your programs to be installed

4. Choose the folder to install in

5. Select the 3rd party ERP connector, if there is no connector. Choose “No”

6. Set the connectivity Program Directory (Your Oracle Connector program in bin)

7. Enter the configuration for environment management

8. Confirm the above setting and parameters and finish the installation





PeopleSoft Module and Menu Query

7 04 2009

As it is known that PeopleSoft PIA pages and Menus’ definiation are stored in PSPRSMDEFN. We can also use some Hierarchical Queries in Oralce DB to trace a page with Portal_objname, Portal_prntobjname. Here is the example:
http://www.compshack.com/peoplesoft/queries/query-component-path-within-peoplesoft-portal

However, if we are going to reverse or iterate all the menus in PIA, we will properly meet the problems. There are some records in PSPRSMDEFN, which have the same Portal_objname and Portal_prntobjname. And your query will come down. Therefore, I use a level control for the query, here it is:

create table t1 as select PORTAL_OBJNAME, PORTAL_LABEL, portal_uri_seg1 || ‘.’ || portal_uri_seg2 || ‘.’ || portal_uri_seg3 as ps_module
from PSPRSMDEFN where portal_name=’EMPLOYEE’ and length(trim(portal_uri_seg3))>0;

alter table t1 modify portal_label varchar2(500);

declare
varlable PSPRSMDEFN.portal_objname%type;
varprntlable PSPRSMDEFN.portal_prntobjname%type;
varll varchar2(50);
varchane varchar2(500);
varint int;

CURSOR mycur is
select portal_objname from t1;

begin
if mycur%isopen = false then
open mycur;
end if;
fetch mycur into varlable;
varint :=1;
varchane := ”;
varprntlable :=varlable;
while mycur%found
loop
while varprntlable’PORTAL_ROOT_OBJECT’ and varint’ || varchane;
varint := varint +1;
end loop;
select portal_label into varll from PSPRSMDEFN
where portal_name=’EMPLOYEE’ and portal_objname=varprntlable and rownum=1;
varchane := varll || ‘>’ || varchane;
update t1 set portal_label=varchane where portal_objname=varlable;
fetch mycur into varlable;
varint :=1;
varchane := ”;
varprntlable :=varlable;
end loop;

close mycur;

end;

select * from t1;





PeopleSoft PeopleTools Meta-Tables (ZZ)

7 04 2009

This is an attempt to list PeopleSoft meta-tables along with some kind of description for every table. The list will be broken into categories (pages, records, components, and so forth). Please feel free to add to or correct the list, this is a wiki page, so jump in!

PeopleSoft Projects

PSPROJECTDEFN table stores information about projects created in Application Designer.
Try it out:

SELECT * FROM PSPROJECTDEFN
WHERE PROJECTNAME = ‘Your_Project_name’;

PSPROJECTITEM table stores objects inserted into your Application Designer project.
Try it out:

SELECT * FROM PSPROJECTITEM
WHERE PROJECTNAME = ‘Your_Project_name’;

Portal Structure

PSPRSMDEFN is a Portal Structure Definition table. A good example is to use this table to find portal path for a specific component. Take a closer look on how this is done!.

PSPRSMPERM: Shows the permission lists that are assigned to a portal registry structure (content reference). The permission list name is under field PORTAL_PERMNAME.

XLAT Tables

XLATTABLE: Stores translate values (PeopleSoft version prior to 8.4).
PSXLATDEFN: Stores all fields that have Xlat values. This table does not store any Xlat values.
PSXLATITEM: Stores fields with their actual translate values (PeopleSoft version 8.4 and above).

Record & Field Tables

PSRECDEFN: Stores informations about tables. One row for each table. Field count and record type are two fields that are stored on this table.

CASE RECTYPE
WHEN 0 THEN ‘Table’
WHEN 1 THEN ‘View’
WHEN 2 THEN ‘Derived’
WHEN 3 THEN ‘Sub Record’
WHEN 5 THEN ‘Dynamic View’
WHEN 6 THEN ‘Query View’
WHEN 7 THEN ‘Temporary Table’
ELSE TO_CHAR(RECTYPE)
END CASE

PSRECFIELD: Stores records with all their fields (sub-records are not expanded)

PSRECFIELDALL: Stores records with all their fields (sub-records are expanded)

PSINDEXDEFN: Contains 1 row per index defined for a table.

PSKEYDEFN: Containes 1 row per key field defined for an index.

PSDBFIELD: You got it, stores information about fields.

CASE FIELDTYPE
WHEN 0 THEN ‘Character’
WHEN 1 THEN ‘Long Character’
WHEN 2 THEN ‘Number’
WHEN 3 THEN ‘Signed Number’
WHEN 4 THEN ‘Date’
WHEN 5 THEN ‘Time’
WHEN 6 THEN ‘DateTime’
WHEN 8 THEN ‘Image’
WHEN 9 THEN ‘Image Reference’
ELSE TO_CHAR(FIELDTYPE)
END CASE

PSDBFLDLABL: Stores field label information.

Process Definition Table(s)

PS_PRCSDEFNPNL: Stores the process definition name, process type(sqr report, application engine…), and the component name associated with the process definition.

PS_PRCSDEFN: Process definitions table. The record stores processes that can run within the Process Scheduler. Security information such as components and process groups are also stored on this table.

Message Catalog Tables

PSMSGCATDEFN: Stores information about PeopleSoft message catalogs such as message set number, message number and the actual message text.

PSMSGCATLANG: language table.

– Example
SELECT * FROM PSMSGCATDEFN
WHERE LAST_UPDATE_DTTM  > TO_DATE(’03-DEC-07′, ‘DD-MON-YY’)
AND LAST_UPDATE_DTTM  < TO_DATE(’05-DEC-07′, ‘DD-MON-YY’)
ORDER BY MESSAGE_SET_NBR, MESSAGE_NBR;
– This will return messages that has been last update/added between 2 specific dates.

Previous PeopleSoft message catalog tables:
PS_MESSAGE_CATALOG: Stores information about PeopleSoft message catalogs such as message set number, message number and the actual message text.
MESSAGE_SET_TBL: Message set description table.

– Example
SELECT * FROM PS_MESSAGE_CATALOG
WHERE LAST_UPDATE_DTTM  > TO_DATE(’03-DEC-07′, ‘DD-MON-YY’)
AND LAST_UPDATE_DTTM  < TO_DATE(’05-DEC-07′, ‘DD-MON-YY’)
ORDER BY MESSAGE_SET_NBR, MESSAGE_NBR;
– This will return messages that has been last update/added between 2 specific dates.

Menu Tables

PSMENUDEFN: Store Menu related information. No related component info on this table.

PSMENUITEM: List the menu with all components attached to it.

Component Tables

PSPNLGRPDEFN: Stores component related information only.

PSPNLGROUP: This table will give you information regarding a specific component along with the names of pages attached to it.

Pages

PSPNLDEFN: Stores pages definitions.

PSPNLFIELD: Stores all items used by each page definition.

Security

PSPRSMPERM: Portal Structure Permissions.

PSAUTHITEM: Page Permissions. This table stores the information about the page level access for a permission list.

PSROLECLASS: Role Classes table. A many to many relationship table between Roles and Permission Lists.

PSROLEDEFN: This table stores information about Peoplesoft Role definitions. Users get permissions to PeopleSoft objects through Roles, which are assigned Permission Lists.

PSROLEUSER: This table stores information about the Users in Peoplesoft and the roles assigned to them.

PSCLASSDEFN: Permissions List definitions table. Permission list name can be found under Field Name CLASSID.

PSOPRDEFN: Users/Operator definition table. This table stores information about PeopleSoft users. This is the core table for User Profile Manager.

PSOPRCLS: Users/Operator and Perm list mapping Table. This table stores information about PeopleSoft users and the permission lists attached to those users.
A User gets these permission lists indirectly through the roles which are attached to the user

Here is an example query post that uses all of the above security tables!

URL Definitions

PSURLDEFN: Stores URL definitions. Here is the path to create URL definitions in PeopleSoft Root >> PeopleTools >> Utilities >> Administration >> URLs

Application Classes

PSAPPCLASSDEFN: Application Class Definitions table. You can use field PACKAGEROOT to search for a specific Application Package.

PeopleSoft Query Tables

PSQRYDEFN: Stores query related info.

PSQRYFIELD: Stores all fields used in a query (both the fields in the Select and Where clause).

PSQRYCRITERIA: Stores criteria query fields. You can get the name of the fields by joining the PSQRYFIELD table.

PSQRYEXPR: Stores query expressions.

PSQRYBIND: Stores query bind variables.

PSQRYRECORD: Stores all records used in all aspects of query creation

PSQRYSELECT: Stores all SELECT requirements by select type. Example would be sub select, join, ect.

PSQRYLINK: Stores the relationships to child queries.

PSQRYEXECLOG: Query run time log table that stores (only 8.4x and higher)

PSQRYSTATS: Query run time statistics table such as count of query execution, and date time of last execution (only in 8.4x and higher).

SQL Objects

PSSQLDEFN: Stores SQL object definitions.

PSSQLDESCR: Stores SQL objects descriptions, and description long.

PSSQLTEXTDEFN: Stores actual SQL text. You can filter by SQLTYPE field to get SQL objects of interest such as Views SQLs and Application Engine SQLs.

– When SQL type is:
0 = Stand alone SQL objects
1 = Application engine SQL
2 = Views SQLs

Application Engines

PSAEAPPLDEFN: Table that stores Application Engine program definitions.

PSAEAPPLSTATE: Stores application engine STATE records and a flag to indicate if the record is the default STATE record.

PSAESECTDEFN: Application engine section information and also stores last user id to update a specific section.

PSAESECTDTLDEFN: AE section along with descriptions and wither the section is active or not.

PSAEAPPLTEMPTBL: If your application engine uses Temp tables it will show on this record.

PSAESTEPDEFN: Steps in application engines are stored in this table.

PSAESTMTDEFN: Stores your application engine actions and along with their types, such as “Do Select” and so on.

PSAESTEPMSGDEFN: Application engine message action definition table.

AEREQUESTTBL: Application Engine request table behind the AE run control page.

AEREQUESTPARM: Application Engine request parameters table behind the AE run control page.

PeopleCode Tables

PSPCMNAME: PeopleCode Reference table.

PSPCMPROG: Store actual PeopleCode programs (actual code behind PeopleCode events).

Process Request Tables

PSPRCSQUE: This record contains the process request information to run a process request.

PSPRCSRQST: This record contains the process request information to run a process request.

PS_PMN_PRCSLIST: A view to list all process requests in the Process Monitor except for “Delete” (runstatus = 2) process requests.

Other Useful Tables

PSSTATUS: Stores PeopleSoft information such as PS Tools release version and the UNICODE_ENABLED boolean flag where a value of 1 indicates the DB is to be treated by Tools as a UNICODE DB.

PSCHGCTLLOCK: Description as explained by PeopleSoft “This table contains a a row for every object that is currently locked by any user. When the user requests to lock an object in the Application Designer, first this table is searched to see if the object is locked by another user. If it is not found, a row is inserted into the table. When the user requests to unlock an object, the row in this table is deleted.”
Visit this post to see how could you make use of this table.

PSMAPFIELD: Stores Field mapping of Activity
PS_PRCSRUNCNTL: Run Control record stores Run Control IDs created online.





PeopleSoft Developer’s Guide for PeopleTools and PeopleCode

6 04 2009

Just come to a very nice book named: PeopleSoft Developer’s Guide for PeopleTools and PeopleCode

* Install and configure PeopleSoft Pure Internet Architecture
* Work with PeopleCode components, objects, and classes
* Build pages and modules using the PeopleTools application designer
* Add HTML and Web elements in PeopleCode
* Implement code on the middle tier tools and work with process manager
* Execute powerful batch processes with application engine
*Generate detailed reports using Oracle XML Publisher and SQR
*Debug, secure, and optimize your PeopleSoft applications





SQR Learning Notes Part I

6 04 2009

Start SQR Programming:

I learned SQR by using PeopleBooks and “SQR in PeopleSoft and Other Applications“. We can run the Sqrw.exe in {PS_Home}\bin\sqr\ora\binw folder to open the UI of SQR tool. After setting the parameters and clicking ‘OK’, we can run the SQR report. Also we can use a command line to run the report:

sqrw report username/password@database Report Arguments (-F and -O, Flag -F defines the diectory where SQR will place the report output file. While Flag -O defines the log file.) Here is my setting for testing and learning:

sqrw.exe c:\sqr.sqr PS/PS@DMOHRMS9 -fc:\ -oc:\sqr.log

SQR Data Type:
SQR has the following tag for the definiations as I learned till now:

  • Database Column: &
  • Number: #
  • List: %
  • Document: @
  • String and Date: $
  • Remark: !

SQR Program Structure
Each program contains a main program and use the key word ‘Do’ to call its sub-program,

begin-program
xxxx
do xxxx ! call a sub-program
print ‘xxxx’ (1,1) !output to report
end-program

While the sub-progam uses the following way to have its definination.

begin-procedure
xxxx
end-procedure

There are also special program for heading and footing:

begin-heading num
end-heading

begin-footing num
end-footing

In addition, when a SQL query is needed, we will have the following form to call the query:

begin-select
column &variable
if/while process
position (+1) !define the position for a new row
from table
end-select








Follow

Get every new post delivered to your Inbox.