Friday, March 20, 2009
Tuesday, March 10, 2009
PeopleSoft HTTP Error Log
<PS_HOME>\webserv\<web-application>\applications\peoplesoft\PSIGW\errorLog.html
PeopleSoft Integration Broker and TCP Monitor (tcpmon v1.1)
PeopleSoft Integration Broker and TCP Monitor (tcpmon v1.1)
No one can refute the benefit of using tcpmon when testing a web-service. I was trying WS-Security stuff on PeopleSoft Campus solutions when I wanted to see the actual WS-Security xml elements in SOAP Header.
And I decided to use the TCPMonitor as no PeopleSoft component was showing me the complete SOAP message.
Following is a proof of concept where in I have implemented a small mock application using PeopleSoft Integration Broker and two PSFT nodes.
Since I wanted to use two PeopleSoft node only but still use HTTPTARGET connector (hope you know that if 2 PeopleSoft nodes communicate over PSFTTARGET connector target then you would rather see the cryptic JOLT string in tcpmon) I had to use build the web-service and WSDL in service provider node and in local ie service requester I used WSDL_NODE provided by PeopleSoft node with Gateway ID=LOCAL and Connector ID= “” and provided the Target URL in Routing.
Node
Requester Service Operation
Requester Routing
Primary URL: http://localhost:8080/PSIGW/PeopleSoftServiceListeningConnector
TCPMonitor
Request XML
Response XML
Friday, February 20, 2009
PeopleSoft Integration Broker – Message Schema PT8.49 Vs PT8.5
In PeopleTools 8.49 we used the DMS scripts to import export the message schemas. While in PeopleTools 8.5 used the new Message Schema definition in App Designer to place the message schema into the app designer project definition itself.
PT8.49 import/export scripts <PT_HOME>\scripts psibmsgschema_imp.dms and psibmsgschema_exp.dms
Thursday, February 12, 2009
Thursday, January 22, 2009
SYS/SYSTEM password reset for SAMPLE database
- Delete the passord file.
C:\oracle\product\10.2.0\db_1\database\PWDsample.ora - Create the password file again. Using ORAPWD utilityWhen you invoke this password file creation utility without supplying any parameters, you receive a message indicating the proper use of the command as shown in the following sample output:> orapwdUsage: orapwd file=
password= entries= force= wherefile - name of password file (mand),password - password for SYS (mand),entries - maximum number of distinct DBAs and OPERs (opt),force - whether to overwrite existing file (opt)There are no spaces around the equal-to (=) character.The following command creates a password file named acct.pwd that allows up to 30 privileged users with different passwords. In this example, the file is initially created with the password secret for users connecting as SYS.orapwd FILE=acct.pwd PASSWORD=secret ENTRIES=30The parameters in the ORAPWD utility are described in the sections that follow.FILE This parameter sets the name of the password file being created. You must specify the full path name for the file. The contents of this file are encrypted, and the file cannot be read directly. This parameter is mandatory.The types of filenames allowed for the password file are operating system specific. Some operating systems require the password file to adhere to a specific format and be located in a specific directory. Other operating systems allow the use of environment variables to specify the name and location of the password file. For name and location information for the Unix and Linux operating systems, see Administrator's Reference for UNIX-Based Operating Systems. For Windows, see Platform Guide for Microsoft Windows. For other operating systems, see your operating system documentation.If you are running multiple instances of Oracle Database using Oracle Real Application Clusters, the environment variable for each instance should point to the same password file.Caution:It is critically important to the security of your system that you protect your password file and the environment variables that identify the location of the password file. Any user with access to these could potentially compromise the security of the connection.PASSWORD This parameter sets the password for user SYS. If you issue the ALTER USER statement to change the password for SYS after connecting to the database, both the password stored in the data dictionary and the password stored in the password file are updated. This parameter is mandatory.Note:You cannot change the password for SYS if REMOTE_LOGIN_PASSWORDFILE is set to SHARED. An error message is issued if you attempt to do so.ENTRIES This parameter specifies the number of entries that you require the password file to accept. This number corresponds to the number of distinct users allowed to connect to the database as SYSDBA or SYSOPER. The actual number of allowable entries can be higher than the number of users, because the ORAPWD utility continues to assign password entries until an operating system block is filled. For example, if your operating system block size is 512 bytes, it holds four password entries. The number of password entries allocated is always a multiple of four.Entries can be reused as users are added to and removed from the password file. If you intend to specify REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE, and to allow the granting of SYSDBA and SYSOPER privileges to users, this parameter is required.Caution:When you exceed the allocated number of password entries, you must create a new password file. To avoid this necessity, allocate a number of entries that is larger than you think you will ever need.FORCE This parameter, if set to Y, enables you to overwrite an existing password file. An error is returned if a password file of the same name already exists and this parameter is omitted or set to N.
Tuesday, January 6, 2009
Set *Correction* mode for a PeopleSoftComponent.
Push Button or Hyperlink
Tuesday, December 23, 2008
Operating System Authentication Enabled at Installation
When you install Oracle Database, a special Windows local group called ORA_DBA is created (if it does not already exist from an earlier Oracle Database installation), and your Windows username is automatically added to it. Members of local group ORA_DBA automatically receive the SYSDBA privilege.
Membership in ORA_DBA enables you to:
Connect to local Oracle Database servers without a password with the command.
- CONNECT / AS SYSDBA
Connect to remote Oracle Database servers without a password with the command
- CONNECT /@net_service_name AS SYSDBA where net_service_name is the net service name of the remote Oracle Database server
Perform database administration procedures such as starting and shutting down local databases
Add additional Windows users to ORA_DBA, enabling them to have the SYSDBA privilege.
Monday, December 1, 2008
SyntaxDate(date_num)
Description
The Date function takes a number in the form YYYYMMDD and returns a corresponding Date value. If the date is invalid, Date displays an error message.
Warning! Make sure that you pass a four-digit year in the year parameter of this function. Two-digit values are interpreted literally: 93, for example, represents the year 93 AD.
Returns
Returns a date equal to the date specified in date_num.
Example
Set the temporary variable &HIREDate to a date field containing the date July 1, 1997:&HIREDate = Date(19970701);
Sunday, August 31, 2008
PeopleSoft Application
You can view the XML message for a service operation only when your login id has the required permissions. Here’s how we set it.
For testing I provide PTPT1000 as the permission list.
Monday, July 28, 2008
Downcasting class variable
If the downcast operator is to be used in the context of further object expressions (such as references to other members using dot notation) then the downcast must be enclosed in parentheses to emphasize that the downcast happens before the member reference.
class Fruit
property number FruitCount;
end-class;
class Banana extends Fruit
property number BananaCount;
end-class;
In the following code example, first the variables are assigned. All the variable assignments are legal, for Banana is a subtype of Fruit.
local Banana &MyBanana = Create Banana();
local Fruit &MyFruit = &MyBanana; /* okay, Banana is a subtype of Fruit */
local number &Num = &MyBanana.BananaCount;
The next two lines of code don't produce an error, as &MyFruit is currently a Banana at runtime.
&MyBanana = &MyFruit as Banana;
&Num = (&MyFruit as Banana).BananaCount; /* same as &MyBanana.BananaCount */
In the next lines of code, we're reassigning &MyFruit to be of type Fruit, that is, of the superclass Fruit. When you try to reassign &MyFruit as Banana, &MyBanana is assigned as Null, because &MyFruit is no longer of type Banana.
&MyFruit = Create Fruit();
&MyBanana = &MyFruit as Banana; /* assigns Null - &MyFruit isn't a Banana */
Field.LongTranslateValue
You cannot access the &VALUE = &MYFIELD.LongTranslateValue; unless you have the following set as the record field properties.
Without the edits being set the above LongTranslateValue property will return the small translate value.
Friday, May 23, 2008
PeopleTools Page Design
Important SQLs
- MicroSsoft SQL Server
Top few rows from a table, following will select
first 301 rows from a table.
SELECT
DISTINCT TOP 301 RUN_CNTL_ID,
LANGUAGE_CD
FROM
PS_PRCSRUNCNTL
WHERE
OPRID='PS'
AND
UPPER(RUN_CNTL_ID)
LIKE UPPER('%act')
- Oracle
Escape characters used in data. Select * From STUDENTS Where STU_NAME Like '%\_%' Escape '\'
- Delete duplicate rows
Delete From CLIENT_MASTER
Where ROWID NOT IN
( Select min (ROWID)
From CLIENT_MASTER
Group By CLIENT_NO, NAME, BAL_DUE )
- In Oracle/PLSQL, the NVL function lets you substitute a value when a null value is encountered.
Select
ID, FIRST_NAME, LAST_NAME, NVL(PHONE, 'Unknown Phone Number') As Phone From CUSTOMER

Tuesday, April 22, 2008
Test Score Post in Campus Solutions
Here's the location to set that.
Navigation : Root --> Set Up SACR --> Security --> Secure Student Administration --> User ID --> Test ID Security.
Code extending the SOA framework to chunck a container based message when the message size exceeds Integration Broker max message size limit.
import SAD_CRM_INTEGRATION:SAD_TEST_POST_CRM:SAD_TEST_POST_CRM_AP;
Component Rowset &rsSadHeaderCrm, &rsSadApSus, &rsSccNameValue;
Component SAD_CRM_INTEGRATION:SAD_TEST_POST_CRM:SAD_TEST_POST_CRM_AP &oSadTestPostCRMAP;
Local number &i, &j;
Local Message &response;
&oSadTestPostCRMAP = create SAD_CRM_INTEGRATION:SAD_TEST_POST_CRM:SAD_TEST_POST_CRM_AP( Null, "SAD", "SAD_TEST_POST_CRM_AP");
&oSadTestPostCRMAP.rsSAD_HEADER_CRM = &rsSadHeaderCrm;
&oSadTestPostCRMAP.rsSAD_TEST_POST_AP_PART = &rsSadApSus;
&oSadTestPostCRMAP.rsSAD_TEST_POST_NAME_VAL_PART = &rsSccNameValue;
&response = &oSadTestPostCRMAP.execute();
If &oSadTestPostCRMAP.moduleError = Null Then
Exit (1); /* exit (1) to skip roll back action */
Else
MessageBox(%MsgStyle_OK, "", 99999, 999, "*** Post to CRM Integration Error ***");
MessageBox(%MsgStyle_OK, "", 99999, 999, &oSadTestPostCRMAP.moduleError.ToString( False));
If (&oSadTestPostCRMAP.moduleError.MessageSetNumber = 14099 And
&oSadTestPostCRMAP.moduleError.MessageNumber = 7) Then
MessageBox(%MsgStyle_OK, "", 99999, 999, "Attempting Secondary Burst of 100 transactions");
Local Rowset &rs100SadHeaderCrm, &rs100SadApSus, &rs100SadBioPrsSus, &rsSadBioPrsSus;
Local number &numberOfRowSet;
&rs100SadHeaderCrm = CreateRowset(&rsSadHeaderCrm);
&rs100SadApSus = CreateRowset(&rsSadApSus);
&rsSadHeaderCrm(1).CopyTo(&rs100SadHeaderCrm(1));
&rsSadBioPrsSus = &rsSadHeaderCrm(1).GetRowset(Scroll.SAD_BIO_PRS_SUS);
&rs100SadBioPrsSus = &rs100SadHeaderCrm(1).GetRowset(Scroll.SAD_BIO_PRS_SUS);
&i = 1;
While &i <= &rsSadBioPrsSus.ActiveRowCount
&j = 1;
&rs100SadBioPrsSus.Flush();
&rs100SadApSus.Flush();
For &j = 1 To 2
If &i > &rsSadBioPrsSus.ActiveRowCount Then
Break;
End-If;
If &j <> 1 Then
&rs100SadBioPrsSus.InsertRow(&rs100SadBioPrsSus.ActiveRowCount);
&rs100SadApSus.InsertRow(&rs100SadApSus.ActiveRowCount);
End-If;
&rsSadBioPrsSus(&i).CopyTo(&rs100SadBioPrsSus(&rs100SadBioPrsSus.ActiveRowCount));
&numberOfRowSet = 1;
While &numberOfRowSet <= &rsSadBioPrsSus(&i).ChildCount
&rsSadBioPrsSus(&i).GetRowset(&numberOfRowSet).CopyTo(&rs100SadBioPrsSus(&rs100SadBioPrsSus.ActiveRowCount).GetRowset(&numberOfRowSet));
&numberOfRowSet = &numberOfRowSet + 1;
End-While;
&rsSadApSus(&i).CopyTo(&rs100SadApSus(&rs100SadApSus.ActiveRowCount));
&numberOfRowSet = 1;
While &numberOfRowSet <= &rsSadApSus(&i).ChildCount
&rsSadApSus(&i).GetRowset(&numberOfRowSet).CopyTo(&rs100SadApSus(&rs100SadApSus.ActiveRowCount).GetRowset(&numberOfRowSet));
&numberOfRowSet = &numberOfRowSet + 1;
End-While;
&i = &i + 1;
End-For;
&oSadTestPostCRMAP.rsSAD_HEADER_CRM = &rs100SadHeaderCrm;
&oSadTestPostCRMAP.rsSAD_TEST_POST_AP_PART = &rs100SadApSus;
&oSadTestPostCRMAP.rsSAD_TEST_POST_NAME_VAL_PART = &rsSccNameValue;
&oSadTestPostCRMAP.moduleError = Null;
&response = &oSadTestPostCRMAP.execute();
If &oSadTestPostCRMAP.moduleError <> Null And
(&oSadTestPostCRMAP.moduleError.MessageSetNumber = 14099 And
&oSadTestPostCRMAP.moduleError.MessageNumber = 7) Then
MessageBox(%MsgStyle_OK, "", 99999, 999, "*** Secondary Burst too large ***");
Exit (0); /* Return 0 to call Rollback Action */
End-If;
End-While;
End-If;
End-If;
Find component link in PeopleSoft Applications for a given record or Page Name
/*********************************************************************/
/* This SQL can be used to find out were a page or a component */
/* is registered. */
/* IMPORTANT: This script is intended to run on MSSQL Server Only */
/* Written by Daniel Beaulne 01/23/2002 */
/*********************************************************************/
SET NOCOUNT ON
declare @PortalName as CHAR(50)
declare @ParentObjName as CHAR(50)
declare @PageName as CHAR(50)
declare @ComponentName as CHAR(50)
declare @MenuName as CHAR(50)
declare @ObjName as CHAR(50)
declare @ObjLabel as CHAR(100)
declare @Path as char(1000)
declare @Path2 as char(1000)
declare @PortalURL as char(1000)
declare @SiteURL as char(200)
DECLARE @PRICE_SET_ID CHAR(10)
declare @WhereStr char(100)
declare @Market as CHAR(10)
/*---------------------------------------------------------------*/
/* Change the value for the following variables. */
/* Site: Enter the base URL for your site. */
/* Page/Component: Enter one or the other to find its references.*/
/* IF a pagename is entered, the componentname is ignored */
/*---------------------------------------------------------------*/
set @SiteURL = 'http://localhost/psp/ps/?cmd=login' /* for example http://dbeaulne110599/psp/ps' */
set @PageName = 'SAD_TEST_SCTY'
set @ComponentName ='ORGANIZATIONS'
/*-----------------------------------------------------------*/
if @PageName <> ''
begin
DECLARE PageCursor CURSOR FOR
SELECT M.MENUNAME, M.PNLGRPNAME, M.MARKET
FROM PSPNLGROUP PG, PSMENUITEM M
WHERE PG.PNLNAME = @PageName
AND PG.PNLGRPNAME = M.PNLGRPNAME
print 'Navigation for page ' + @PageName
print ' '
end
else
begin
DECLARE PageCursor CURSOR FOR
SELECT DISTINCT M.MENUNAME, M.PNLGRPNAME, M.MARKET
FROM PSPNLGROUP PG, PSMENUITEM M
WHERE PG.PNLGRPNAME = @ComponentName
AND PG.PNLGRPNAME = M.PNLGRPNAME
print 'Navigation for component ' + @ComponentName
print ' '
end
OPEN PageCursor
FETCH NEXT FROM PageCursor INTO @MenuName, @ComponentName, @Market
WHILE @@FETCH_STATUS = 0
BEGIN
if rtrim(@ComponentName) <> ''
begin
DECLARE ComponentCursor CURSOR FOR
SELECT PORTAL_NAME, PORTAL_PRNTOBJNAME, PORTAL_OBJNAME, PORTAL_LABEL, '/' + rtrim(PORTAL_NAME) + '/' + rtrim(PORTAL_CNTPRV_NAM) + '/' + cast(PORTAL_URLTEXT as char(1000))
FROM PSPRSMDEFN
WHERE PORTAL_URLTEXT like '%/' + rtrim(@MenuName) + '.' + rtrim(@ComponentName) + '.' + rtrim(@Market) +'%'
and PORTAL_REFTYPE = 'C'
OPEN ComponentCursor
FETCH NEXT FROM ComponentCursor INTO @PortalName, @ParentObjName, @ObjName, @ObjLabel, @PortalURL
while @@FETCH_STATUS = 0
begin
SET @Path = @ObjLabel
SET @Path2 = @ObjName
SET @ObjName = @ParentObjName
while @ObjName <> ' '
BEGIN
select @ObjLabel = PORTAL_LABEL, @ParentObjName = PORTAL_PRNTOBJNAME from PSPRSMDEFN where PORTAL_NAME = @PortalName AND PORTAL_OBJNAME = @ObjName
SET @Path = rtrim(@ObjLabel) + ' --> ' + @Path
SET @Path2 = rtrim(@ObjName) + ' --> ' + @Path2
SET @ObjName = @ParentObjName
END
PRINT '---------------------------------------------------------------------------------------------------------------'
PRINT 'Menu : ' + @MenuName
PRINT ' '
PRINT 'Component : ' + @ComponentName
PRINT ' '
PRINT 'Market : ' + @Market
PRINT ' '
PRINT 'Portal : ' + @PortalName
PRINT ' '
PRINT 'Navigation : ' + @Path
PRINT ' '
PRINT 'CREF : ' + @Path2
PRINT ' '
PRINT 'URL : ' + rtrim(@SiteURL) + rtrim(@PortalURL)
PRINT '---------------------------------------------------------------------------------------------------------------'
PRINT ' '
PRINT ' '
FETCH NEXT FROM ComponentCursor INTO @PortalName, @ParentObjName, @ObjName, @ObjLabel, @PortalURL
end
CLOSE ComponentCursor
DEALLOCATE ComponentCursor
end
FETCH NEXT FROM PageCursor INTO @MenuName, @ComponentName, @Market
end
CLOSE PageCursor
DEALLOCATE PageCursor
Monday, April 7, 2008
Saturday, April 5, 2008
Shared Disk Partition XP & Vista
1. Right click the shared disk partition.
2. Select Properties.
3. Selet Security Tab
4. Here you got to add "Everyone" text in the list of "Group or username"
Friday, April 4, 2008
PeopleSoft Development Environment Setup
My personal experience says that you need to have exact same configuration as shown belows, however you can select your own free port but including analytic server and Event Notification server process cannot be run.
PeopleSoft Application Engine Programming
PeopleSoft Application Engine
You use PeopleSoft Application Engine to develop batch or online programs that perform high-volume, background processing against your data.
While PeopleSoft Application Engine does not generate, parse, or understand SQL, it does execute SQL (Meta-SQL) that you provide.
It's a Structured framework or shell for executing SQL.
PeopleSoft Application Engine is designed to help you develop, test, and run background SQL processing programs (programs which do not require user intervention). PeopleSoft Application Engine offers you an alternative to writing COBOL, or SQR (Structured Query Reporter) programs for background SQL processing.
PeopleSoft Application Engine comprises two distinct components—a designer where you define your batch program and the runtime environment where you run and monitor your program.
In PeopleSoft Application Engine, a program is a set of
- SQL statements,
- Log Statements,
- PeopleCode, and
- Program control actions that enable looping and conditional logic.
You can use PeopleSoft Application Engine for straight, row-by-row processing, but the most efficient Application Engine programs are written to perform set-based processing.
Application Engine Program Elements
A PeopleSoft Application Engine program comprises the set of processes to execute a given task, and is made up of several key elements:
- Sections.
- Steps.
- Used to execute a PeopleCode command or log a message,
- Typically you use a step to execute a SQL statement or to call another section.
- Actions.
- The SQL or PeopleCode that a step executes are the actions within the step.
- Do Actions
- Do actions contain a SQL Select statement designed to return results on which subsequent actions depend.
- Do While
- Do When
- Do Select
- Do Unitl
- Do actions contain a SQL Select statement designed to return results on which subsequent actions depend.
- SQL
- The SQL action differs from the Do actions, which also contain SQL, in that the SQL action does not control the flow of the program.
- Update
- Delete
- Insert
- Select
- The SQL action differs from the Do actions, which also contain SQL, in that the SQL action does not control the flow of the program.
- PeopleCode
- Most importantly, PeopleCode provides access to the PeopleSoft integration technologies such as PeopleSoft Integration Broker , Component Interfaces, Business Interlinks, and file processing.
- PeopleCode for setting If, Then, Else logic constructs.
- Performing data preparation tasks
- Building dynamic portions of SQL statements.
- Enables you to set state record variables dynamically.
- Any PeopleCode operations that manipulate pages will not run successfully. (Even if you invoke your Application Engine program online from a record or a page using the CallAppEngine PeopleCode function, the Application Engine PeopleCode still does not have direct access to component buffers.)
- You can use the CallAppEngine PeopleCode function, or you can define global variables.
- With a PeopleCode action, there is only one property that you can specify—On Return.
- Determines how your Application Engine program reacts based on the return of your PeopleCode program. The On Return setting takes effect if your PeopleCode program issues a “return 1” or “exit 1.” You can use the True keyword in place of a non-zero numeric return.
- Abort: The program issues an error and exits immediately.
- Break: The program exits the current step and section, and control returns to the calling step.
- Skip Step: The program exits the current step, and continues processing at the next step in the section. If this is the last step in the section, the calling step resumes control of the processing.
- Log Message
- You use a Log Message action to write a message to the message log based on a condition in your program.
- When a user views the messages using the Application Engine Message Log page, the system retrieves the appropriate message string from the message catalog based on the user’s language preference.
- Note. You can also use MessageBox PeopleCode to populate PS_MESSAGE_LOG instead of using the Log Message action. This enables you to easily record errors encountered within Application Engine PeopleCode programs.
- Call Section
- You can also insert an action that calls another section either in same or different app engine program. (Static or Dynamic)
- The called section can be in the same program as the calling section, or it can be in an external program.
- This enables you to chunk your program into more maintainable & reusable pieces.
- Do Actions
- The SQL or PeopleCode that a step executes are the actions within the step.
Note. PeopleSoft Application Engine supports up to 99 levels of nested Call Section actions. For example, the first called section can call a second, which can call a third, and so on, up to 99 calls.
- State records.
- A state record is a PeopleSoft record that must be created and maintained by the Application Engine developer.
- Working storage for your Application Engine program.
- Used to pass values from one action to another.(Place to store variables)<!--[endif]-->
- Either a physical record or a work record. (Naming convention XXX_AET)
- Any number of state records can be associated with a program. (Max 200)
- Physical state records must be keyed by process instance.
- There is only one row in the state record for each process instance.
- After the program completes successfully, PeopleSoft Application Engine deletes the corresponding row in the state record.
- Multiple programs can use the same state record, and each program has its own row based on the unique process instance key.
- %Select inserts data
- %Bind retrieves data
- Default state record is inheritable in call stack for external app engine calls.
- You can have up to 200 state records associated with a particular Application Engine program. However, only one record can be the default state record.
You use the %Select construct to pass variables to the state record, and you use the %Bind construct to retrieve or reference the variables. Typically, when you use %Bind to provide a value for a field or a Where condition, the type of field in the state record that you reference with %Bind must match the field type of the corresponding database field used in the SQL statement. In the case of an external call to a section in another program, if the called program has its own default state record defined, then PeopleSoft Application Engine uses that default state record to resolve the %Bind(fieldname). Otherwise, the called program inherits the calling program's default state record. You must use the Date, Time, and DateTime output wrappers in the Select list that populates the state record fields.
Example
Consider the following sample statement:
%SELECT(BUSINESS_UNIT,CUST_ID)
SELECT BUSINESS_UNIT, CUST_ID
FROM PS_CUST_DATA
WHERE PROCESS_INSTANCE = %BIND(PROCESS_INSTANCE)
The following steps illustrate the execution of the previous statement:
1. Resolve bind variables.
The string %Bind(PROCESS_INSTANCE) is replaced with the value of the state record field called PROCESS_INSTANCE.
2. Execute the SQL Select statement.
3. Perform a SQL Fetch statement.
If a row is returned, the state record fields BUSINESS_UNIT and CUST_ID are updated with the results. If the Fetch statement does not return any rows, all fields in the %Select construct retain their prior values.
Example 1)
Main Record
Data in main record
State Record
App Engine Program in "Program Flow" view
DoSelect SQL
SQLAction - SQL
Run Request
Result data in main record
APP_ENG_PROG.log
PeopleTools 8.48.06 - Application Engine
Copyright (c) 1988-2007 PeopleSoft, Inc.
All Rights Reserved
Application Engine program APP_ENG_PROG ended normally
End
Remember the following when inserting actions:
- You cannot have more than one action of a specific type within the same step.
- You cannot have a SQL action and a Call Section action within the same step.
- You can only define XSLT type actions for programs defined as Transformation types (see the program properties).
At runtime, the system evaluates actions by type and executes them within a strict hierarchy. For example, if both a Do When and PeopleCode action exist within a given step, PeopleSoft Application Engine always executes the Do When first.
The following diagram depicts the sequence and level of execution for each type of action:
As you add actions to a step in the definition view, the actions are initially inserted after the selected definition (the owning step or a prior action). However, following a save request or a refresh of the view, the designer reorders all actions to match the execution hierarchy. This feature helps you visualize the sequence in which each step of your program logic executes.
Application Engine Program Types
There are five types of Application Engine programs. You specify the type in the Program Properties dialog box for your program definition.
The types are:
- Standard, which is a normal entry-point program.
- Upgrade Only, which is used in PeopleSoft upgrade utilities.
- Import Only, which is used by PeopleSoft import utilities.
- Daemon Only, a type of program used as a daemon process.
- Within a daemon group, programs are invoked sequentially,
- The programs contained in a daemon group should be quick programs that scan information to find events.
- When an event is discovered, the daemon program can use the ProcessRequest class to invoke programs that are not of the daemon type.
- These non-daemon type Application Engine programs can execute in parallel.
- For that reason, do not include application-specific processing in a PSDAEMON type program.
- Transform Only, a program type used to support Extensible Stylesheet Language Transformations (XSLT).
Testing Application Engine Programs
After creating or modifying your program, you can test it while in PeopleSoft Application Designer in two-tier mode. You use the Run Request dialog box:
',escape('Run Request dialog box'))"> Run Request dialog box
To run an Application Engine program in two-tier mode:
1. Select Edit, Run Program from the PeopleSoft Application Designer toolbar.
The Run Request dialog box appears.
2. Enter appropriate values.
When you click OK, these values are passed as runtime parameters to the initiated PeopleSoft Application Engine runtime executable.
| Run Control ID | Enter the run control ID of the program that you are testing. |
| Run Minimized | Select to have the window of the requested process minimized when it is submitted to run. |
| Output Log to File | Select to write the output log to a file. |
| Log File Name | Specify the log file name (enabled only when Output Log to File is selected). |
| Process Instance | Specify the process instance for this run request, or use the default value of zero if an instance number is not needed. |
3. Click OK.
Setting General Properties
Access the Program Properties dialog box and select the General tab. You can specify identification values for your Application Engine program.
| Owner ID | (Optional) Enter the owner ID for the program. The owner ID is a way to identify which definitions are owned by which PeopleSoft applications, such as PeopleSoft General Ledger, Accounts Receivables, and so on. The values in the drop-down list box are Translate table values associated with the OBJECTOWNERID field. |
Setting State Record Properties
Select the State Records tab.
| Qualify Search | Enter any wildcard characters or complete table names to limit the results that appear in the record list. By default, the Record List box contains all record names that end with the extension AET. This extension identifies the record as an Application Engine record. |
| Get List | Click to populate the Record List box. |
| Record List | This text box contains the results of your state record search. |
| Selected | Select state records for use with a particular program. Click Add to include selected records from the record list into the selected list. Click Remove to remove selected records from the selected list. Indicate which state record to act as the default state record by selecting its check box. For your default state record, you need to reference only fieldnames in your PeopleCode and SQL (for the active program). When you reference a non-default state record, you do so by using recname.fieldname. |
Specifying Temporary Tables
Select the Temp Tables tab.
Temporary tables store intermediate results during a program run.
Note. You must have already defined required temporary tables in your database prior to associating them with an Application Engine program.
| Enter any wildcard characters or complete table names to limit the results that appear in the record list. By default, the Record List box contains only records that are of type Temporary Table. You apply this attribute when you create the record in PeopleSoft Application Designer. | |
| Click to populate the Record List box. | |
| This text box contains the results of your search for temporary tables. | |
| Selected | Select temporary tables for use with a particular program. Click Add to include selected records that appear in the record list. Click Remove to exclude selected records that appear in the selected list. |
| Enter the number of physical tables to be created for each dedicated table for this program during the SQL Build procedure in PeopleSoft Application Designer. Typically, you would set this number to equal the maximum number of parallel program runs that you anticipate. For instance if you expect up to five instances of the same program to run simultaneously, then you would set the instance count to 5. | |
| Insert Selected List into Project | If the active Application Engine program definition belongs to a project, select to include the dedicated temporary tables for this program within the same project. |
| Control how an Application Engine program behaves if an instance of its specified dedicated temporary tables is not available. If you select Continue, then PeopleSoft Application Engine uses the base version, or nondedicated version, of the temporary tables. If you select Abort, then the program exits with an error message. |
Note. If the table is keyed by PROCESS_INSTANCE, and the application SQL includes the process instance in the Where clause, then the table can be shared by multiple processes. The best performance, however, occurs when a program runs against a dedicated temporary table instance.
Note. You must set the instance count on the Temp Tables tab prior to building the tables in PeopleSoft Application Designer.
Setting Advanced Properties
| Disable Restart | Select to disable the built-in restart capabilities for a particular program. |
| In some cases, you may want a program to contain only a collection, or library, of common routines (in the form of callable sections) that you do not want to run as a standalone program. When sections are defined as public, other programs can call the sections, or routines, that exist in the library at runtime. Because this type of program is not designed to run as a standalone program, it does not require the MAIN section, or initial entry point. Select this check box to rename or remove any existing MAIN section. Note. An application library is the appropriate location to store a collection of shared Application Engine program sections. Libraries are not intended for storing a specific SQL action within a section. To share common SQL, use the SQL repository. | |
| Batch Only | Select for batch-only programs. Batch-only programs are not executed from the CallAppEngine PeopleCode function. Any dedicated temporary table used for batch-only programs do not have online instances created. |
| Specify the default message set value for this program. The system uses this message set value for all Log Message actions where the message set isn’t specified. | |
| Select from: · Standard: Used by standard entry-point programs. · Upgrade Only: Used by PeopleSoft upgrade utilities only. · Import Only: Used by PeopleSoft import utilities only · Daemon Only: Use for daemon-type programs. · Transform Only: Support for XSLT programs. |
Specifying Call Section Actions
Use the Call Section action to call another section defined in an Application Engine program. You can call a local section defined within your current program, and you can make external calls to a section defined in another Application Engine program.
The external section you intend to call must have its access property set to Public. If a section’s access property is set to Private, that section can be called only from within the same program. By default, a section’s access property is Private. If you attempt to make a call to a section that does not allow external calls, you receive an error message at runtime.
Note. You can call only programs that reside within the same database as the calling program.
Because you can call sections defined in the current program or within external programs, you must first specify the program ID of the program containing the section you intend to call.
The default value is (current). If you call a section defined in another program, make sure that you first select the appropriate external program from the Program ID drop-down list box. The drop-down list box contains the names of all program definitions that currently exist in the database.
Select from names defined in the program that appears in the Program ID list box. To call a section that is defined in an external program, select the program name in the Program ID edit box prior to selecting the section name.
Also use the Call Section action to call an entire external program. First select the program ID, then select section name MAIN. At runtime, this call executes the entire program defined by the value in the Program ID field.
Note. PeopleSoft Application Designer does not prevent you from calling the main section of the current program or the current section. For instance, Section1 can contain a step that has a local call section reference for Section1. This enables recursive calls, and should therefore be used with caution.
Use the AE_APPLID and AE_SECTION fields in the state record to execute different sections depending on the conditions a program encounters during runtime.
These two fields must be defined on the default state record for the program. If AE_APPLID is not present or is blank (at runtime), the current program is substituted for the AE_APPLID value. If AE_SECTION is not present or is blank, an error occurs.
When issuing a dynamic call, both the section and the program ID must be dynamically set. You enable a dynamic call by first having your program store different section names in the AE_SECTION field, and different program names in AE_APPLID field. The values you insert in these fields are normally based on various conditions met within your program. You then create a Call Section action that calls the section name defined in the state record field by selecting the Dynamic check box.
Selecting Dynamic automatically populates the AE_SECTION field with the symbolic value %Section, and the Program ID field with the symbolic value %AEAPPLID. At runtime, the program calls the section name stored in AE_SECTION that belongs to the program name defined by AE_APPLID.
Program Properties of Called Sections
When you call a section defined in an external program, the current program (the program containing the defined call section) defines the properties that apply to the running process. Suppose tracing is enabled for the current program, but tracing is disabled for the called program section. In this case, the called program has the trace option enabled at runtime because it inherits the calling program's properties.
For example, if program A calls program B, and program B calls program C, then the properties of A apply to both programs B and C. The calling program always controls the properties for the called program. In this case, program A controls the properties for program B, and because program B inherits the properties of program A, when program B calls program C, program A’s properties also apply to program C.
Note. Although program properties are inherited, state records do not follow this inheritance model.
State Records of Called Programs
When you call a program from another program, the called program’s default state record becomes active until processing returns to the initial program. However, all of the state records associated with both programs are available. State records that are common between the two programs share values. To communicate between the two programs, or share %BIND variables, define the same state records in both programs.


