Application
Engine
•
What is it?
§ Integrated
PeopleSoft data manipulation tool
§ Program
shell that runs SQL
§ Can
include IF-THEN logic with PeopleCode 8
§ Next
generation alternative to SQR
·
“real time” enterprise
•
Features
§ Integrated
with Application Designer (debugging, migrating, development platform, etc.)
§ New developer
interface (intuitive)
§ Hybrid
programs PeopleCode 8\SQL
§ Easy App
Messaging and next generation integration
§ Extensive
use of data dictionary characteristics
·
Field length changes (upgrades + customizations)
·
Dynamic Edits (upgrades + customizations)
·
Dynamic Defaults (upgrades + customizations)
§ Common
restart and commit
Application
Engine: Uses
Application Engine: ROI
- Data Integration
- Integrate data between HRMS and Financials; Integrate data between Time & Labor and Project Costing; Message data to a third party
- Data Conversion
- Load data from XML, CSV, Fixed formats etc. Perform all edits, validations, staging, error reporting from App Engine
- Reports
- Create standard CSV reporting in order to provide flexible data manipulation to end users
- Data Processing
- Process data within a module; mass updates
Application Engine: ROI
- Code Sharing
- Re-use code across enterprise, take on other projects
- Delivered Logic
- Less logic = less coding = less consulting
- Upgrade Friendly
- Faster time to upgrade with fewer bugs
- Fully Integrated with the Application
- Use delivered App Messaging\Process Scheduler (less software purchases: EAI, Scheduling Software)
Comparison
of Tools: Example
- SQR
- File
Layout = Manual
- Hard
code mapping fields
- Field
changes = Manual
- Edits
= Manual
- Defaults
= Manual
- No
PeopleCode Execution
- App
Engine
- File
Layout = Object
- Dynamic
mapping
- Field
changes = Dynamic
- Edits
= Dynamic
- Defaults
= Dynamic
- PeopleCode
Execution = Component Interface
Advantages
•
Graphical Developer Interface
•
Encapsulation
•
Data Dictionary Integration
•
Enhanced SQL/Meta-SQL Support
•
Effective-Dating
•
Platform Flexibility
•
Reuse Business Logic
•
Upgrade Support
•
Built-In Restart Logic
Application Engine Program Structure
Application
Components
•
Program
•
Execution
always starts with the Section defined as “MAIN”
•
Program
name can be of 18 characters max
•
Sections
•
Composed
of one or more steps
•
First
section is always “MAIN”
•
Steps
•
Logical
groupings of actions
•
To
execute a SQL statement or to call another Section
•
Actions
•
Line
of Code
•
Unique
within step
•
Executed
in specific order
Message Catalog
Navigation > PeopleTools > Utilities > Administration > Message
Catalog
Messages can
be used in application engine programs
Application Engine Designer
•
Sections
•
Section
Name
•
Description
•
Market
•
Platform
•
Effective
Date
•
Effective
Status
•
Section
Type
•
Auto
Commit
•
Access
•
Comments
•
Steps
•
Step
Name
•
Step
Description
•
Commit
After
•
Frequency
•
On
Error
•
Active
•
Comments
•
Actions
•
Do
When
•
Do
While
•
Do
Select
•
People
Code
•
SQL
•
Call
Section
•
Log
Message
•
Do
Until
•
XSLT
•
Action
Execution Order
•
Program
Properties
•
Disable
Restart
•
Application
Library
•
Batch
Only
•
Message
Set
•
Program
Type
•
Testing
Application Engine Program
State
Records and Program Structure
•
Creating
State Record
•
First
Field must be PROCESS_INSTANCE
•
Additional
fields will be used as variables
•
Name
must end with AET
•
No
peoplecode fires on an AE state record
•
No
validation of translate values or prompt tables
•
Accessing
State Record
•
%SELECT
•
Required
at the beginning of any and all SELECT statements
%SELECT(field1, field1,
field3)
SELECT NAME, ADDRESS, CITY
FROM PS_PERSON_CONTACT
WHERE VENDOR_ID = ‘ACME’
•
%BIND
•
Can
be used anywhere in a SQL statement
SELECT
EMPL_CODE, EMPL_DESCR
FROM PS_EMPL_TBL
WHERE DEPT_ID = %BIND(FIELD1)
•
SQL
Action Properties
•
For
SQL Action, there are two properties that can be set
•
ReUse
•
Optimize
SQL components
•
No
Rows
•
Abort
•
Section
Break
•
Continue
•
Skip
Step
•
Using
Bind variable in Messages
•
Message
Catalog
•
%1
has changed Customer ID %2 to %3
•
Application
Engine Program
•
Message
Section – Step01 – Log Message
• %AEProgram,
%Bind(FROM_CUST_ID), %Bind(TO_CUST_ID)
•
Meta-SQL
Alternative
•
UPD_CUST_ID
UPDATE %P(1)
SET
CUSTOMER_ID = %P(2)
WHERE
CUSTOMER_ID = %P(3)
•
In
Application Engine Program
%Sql(UPD_CUST_ID,
PS_PSU_CUST_PROD,%Bind(TO_CUST_ID), %BIND(FROM_CUST_ID))
Testing
and Debugging
•
Application
Engine Testing
•
Process
Monitor
•
Parameters
•
Message
Log
•
View
Locks
•
Batch
Timings
•
Application
Engine Trace File
•
Step
•
SQL
•
Statement
Timings
•
Trace
files are placed in C:\TEMP\PS\<Database> directory
•
Application
Engine Debugger
•
Debug
To View the commands available, type a
? , then press ENTER
(Q)UIT
E(X)IT
(C)OMMIT
(B)REAK
(L)OOK
(M)ODIFY
(W)ATCH
(S)TEP OVER
STEP (I)NTO
STEP (O)UT OF
(G)O
(R)UN TO COMMIT
•
Application
Engine Debugger
•
Disable
Restart
•
Disable
Restart does NOT disable any COMMITs you have in your program. By selecting
Disable Restart – you are freeing AE of the responsibility to checkpoint your
application. COMMITs still occur.
People
Code in Application Engine Programs
•
People
Code can be used for:
•
Testing
for Conditions (If – then – else)
•
Computing
Capability
•
Complex
Business Rules (e.g. Tax Computations)
•
Dynamic
Calls
•
Add
AE_SECTION field in State Record.
•
Your
program store different section names in AE_SECTION field.
Set
Processing
•
What
is Set Processing?
•
Uses
SQL to process groups or sets of rows at one time
•
Eliminates
network round trip and database API overhead
•
Advantages
•
Improved
Performance
•
Minimized
(PeopleTools) SQL Overhead
•
Easy
Maintenance
•
Leveraging
the RDBMS
•
Set
Processing and Temporary Tables
•
Processing
Remains on the RDBMS Server
•
AE
supports a record type called Temporary Tables
•
Allows
concurrent processing
Temporary
Tables
•
Using
Temporary Tables for Parallel Processing
•
Multiple
instances of the same program running simultaneously
•
Reduce
risk of table contention and deadlocks
•
Parallel
Processing – Why?
•
Implementing
Parallel Processing
•
Define
Your Temporary Tables
•
Set
the Temporary Table Online Pool
•
Assign
Temporary Tables to your AE Program
•
Set
Temporary Table Batch Pool
•
Build/Rebuild
your Temporary Table Record
•
Code
%Table meta-SQL as references to Temporary Tables
Application
Engine Execution
•
Invoking
Application Engine Programs
•
Batch
•
Most
Typical Mode of Execution
•
Run
using Process Scheduler or AE Process Request Page
•
Asynchronous
Execution
•
Online
•
Executed
from a Page with CallAppEngine PeopleCode function
•
Synchronous
Execution
•
No
COMMITs are issued until the program completes
•
Manual
•
Use
Command Line
•
Use
for testing or manual restart
Application
Engine Process Definition
•
Process
Type
NAVIGATION > PeopleTools
> Process Scheduler > Process Types
•
Process
Definition
NAVIGATION > PeopleTools
> Process Scheduler > Process Definition > Process
•
Steps
to Add Application Engine Process
•
Step
1 – Design
•
Step
2 – Identify Initial Bind Variables
•
Step
3 – Determine Run Control Record
•
Step
4 – Build the Record
•
Step
5 – Determine the Run Control page
•
Step
6 – Place the Run Control Page on a Component
•
Step
7 – Use registration wizard to add component to a menu
•
Step
8 – Create a Process Definition
•
Step
9 – Test
PSDaemon
•
PSDAEMON
•
Runs
continuously when the Process Schedular is running
•
Intended
for recurrent jobs
•
To
check for files that have been loaded to the server
•
Daemon
Only Application Engine Program
•
To
poll the system for a condition and when the condition is true initiate a
process. Any application engine program that is designed to perform those tasks
can be enabled as a daemon only program.
•
Daemon
only programs can only run through the process scheduler psdaemon process.
•
Daemon
Groups
•
Daemon
Programs are processed through Daemon Procedure Group.
•
One
procedure group can run on a process scheduler
•
Setting
Daemon Process Options
•
Daemon
Group
•
Daemon
Sleep Time
•
Recycle
Count
•
Monitoring
a Daemon Process
•
Navigation
•
PeopleTools
•
Process
Schedular
•
Process
Monitor
•
Server
List Tab
•
Details
Performance
Measurement
•
Performance
– Big Picture
•
Performance
Layers
•
Hardware
•
Network
•
Operating
System
•
Database
•
Application
•
SQL
•
Performance
Overview
•
Performance
Measurement and Analysis
•
Recording
Trace Data
•
Evaluating
Trace Data
•
Performance
Tuning and Testing
•
Performance
Measurement and Analysis
•
AE
Trace
•
SQL
Trace
•
PeopleCode
Trace
•
Trace
Values Overview
Value Description
1 Step
Trace
2 SQL
Trace
128 Timings
Trace
256 PeopleCode
Detail Timings
•
Reading
AETrace Data
•
Batch
Timings From – TRACE parameter
•
SQL
Counts and Timings
•
Performance
Analysis
•
Compile
•
Count
•
Time
•
Execute
•
Count
•
Time
•
Fetch
•
Count
•
Time
Performance
Tuning
•
Testing/Tuning
Accuracy
•
Where
to Measure?
•
Where
to Focus Tuning first?
•
Hardware
•
Network
•
Operating
System
•
Database
•
Application
•
SQL
•
How
to Measure?
•
Tuning
Perspective
•
Application
Level Tuning Options
•
Set-based
processing vs. Row-based processing
•
Temporary
table usage and implementation
•
ReUse
and Bulk Insert options
•
COMMIT
structure and re-startablity
•
Program
structure and looping techniques
•
SQL
in a PeopleCode Action
•
Effect
of Indexes
•
Other
Database Tuning Factors to consider
•
PeopleCode
SQL vs. AE SQL
•
Commits
and Checkpoints
•
Bulk
Insert
•
Beyond
Application Level Tuning
•
Database
Level Tuning
•
Data
Volume and data value distribution
•
Database
memory buffer settings
•
Tablespaces
•
Impact
of Indexes
•
Indexes
and Application Engine