Peoplesoft Development Overview Application Engine
Transcript of Peoplesoft Development Overview Application Engine
![Page 1: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/1.jpg)
PeopleSoft Development: Overview of Application Engine and the Query Tool
Presented by: Judi Doolittle (Judi Hotsinpller) and Barbara Sandoval
![Page 2: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/2.jpg)
Agenda• Introductions• Logistics• Application Engine (Morning Session)
– History– Program Structure– Properties– Action Types – Break 10 mins– MetaSQL and MetaVariables– Running an AE Program– Printing Options – Break 10 mins– Sample– Review of Take Home Exercise
![Page 3: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/3.jpg)
Agenda Continued
• Query Tool
![Page 4: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/4.jpg)
Introductions
• Instructor Introductions• Student Introductions
![Page 5: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/5.jpg)
Logistics
• Class Format• Restroom Location• Breaks
![Page 6: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/6.jpg)
Application Engine History
• Released with Version 8.0• Developed by PeopleSoft Coder
– Prior Tool – COBOL– Used for Batch Processing
• Application Engine Vs. SQR• Future
– Fusion– XML
![Page 7: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/7.jpg)
Application Engine Program Structure• Application Designer
![Page 8: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/8.jpg)
Application Engine Program Structure• Structure
– Section
– Steps
– Actions
![Page 9: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/9.jpg)
Application Engine Properties• General Tab
– Track changes– Document
• State Tab– State Record– Attributes
• Temp Tables Tab– Define– Set– Assign– For Batch Processing– Build/Rebuild– Meta SQL
• Advanced Tab
![Page 10: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/10.jpg)
General Tab
![Page 11: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/11.jpg)
State Tab
![Page 12: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/12.jpg)
Temp Tables Tab
![Page 13: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/13.jpg)
Advanced Tab
![Page 14: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/14.jpg)
Action Types• Do When• Do While• Do Select• PeopleCode• SQL• Call Section• Log Message• Do Until• XSLT—Only shows if it is specified as a
Transformation Program
![Page 15: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/15.jpg)
Do When
• It is comparable to an IF statement in other Languages
• When true returns one or more rows and continue with actions
• When false exits step
![Page 16: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/16.jpg)
Sample
![Page 17: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/17.jpg)
Do While• Executing step while SQL is true• To prevent an endless loop:
– Requires code in another action– The data must change to make the SQL false
• Example—Process sample to countSELECT ‘X’FROM PS_TEST_RECWHERE count < = %bind(totemp);– Other actions– Action that triggers the falseUPDATE PS_TEST_RECSET count = count + 1;
![Page 18: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/18.jpg)
Do While Example
![Page 19: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/19.jpg)
Do Select
• Loops through records one at a time• Used to populate State Record• Three Looping Rules
– Select/Fetch (Default)– ReSelect– ReStartable
• Example of Populating State Record%SELECT(year)SELECT yearFROM PS_RUN_CONTROL
![Page 20: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/20.jpg)
Do Select Example
![Page 21: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/21.jpg)
PeopleCode
• Reasons why PeopleCode Used:– Manipulate and Manipulation– Functions– Application Packages– Component Interface– Reuse Developed Code
• Refer to PeopleBooks for PeopleCode instruction
![Page 22: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/22.jpg)
PeopleCode Continued
• Unique to Application Engine– How to use State Record in PeopleCode– Example
PS_TEST_AET.YEAR
– Return Parameters• Exit(1) – causes set parameter to executed (Execution
can be ABORT, BREAK, or SKIP STEP)• Exit(0) –default will continue
![Page 23: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/23.jpg)
PeopleCode Continued
![Page 24: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/24.jpg)
SQL• SQL actions used for
– INSERT– UPDATE– DELETE
• Can be used with any of the Conditional Actions• Or by themselves• ExampleUPDATE PS_TEST_REC SET bonus = %bind(bonus)WHERE year = %bind(year)
![Page 25: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/25.jpg)
SQL Continued
![Page 26: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/26.jpg)
Call Section
• Allows you to Call another Section• Reason is for readability
![Page 27: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/27.jpg)
Call Section Continued• Example 1
![Page 28: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/28.jpg)
Call Section Continued• Example 2
![Page 29: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/29.jpg)
Call Section Continued• Example 2 Continued
![Page 30: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/30.jpg)
Log Message
• Writes Messages to the Log File• Messages stored in Message Catalog• Parameters can be provided as part of the
Message• To create a custom message use Message
Set > 20000
![Page 31: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/31.jpg)
Do Until
• Another Conditional Action• Processes Until Condition is False• Needs Another Action to make Condition
False• Difference between Do While and Do Until
– Do While pre-processes and checks condition prior to other actions
– Do Until post-processes and checks condition after other actions
![Page 32: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/32.jpg)
Do Until Continued
![Page 33: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/33.jpg)
How to Run
• Process Definition• .Bat File
![Page 34: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/34.jpg)
Process Definitions
![Page 35: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/35.jpg)
Process Definitions Continued
![Page 36: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/36.jpg)
.Bat File
\\ServerName\bin\client\winx86\PSAE.exe -CD database -CO USERID –CP PASSWORD –R RS_TEST_RUN_CONTROL –AI PS_TEST_AE
• Note your PSAE.exe location is unique to your enviroment
• Description of parameter is immediately following
• See PeopleBooks for a comprehensive list of Parameter values
![Page 37: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/37.jpg)
MetaSQL and MetaVariable
• Quick Definition– SQL Functions– Reserved Words– Some are Unique to Application Engine– Has to be in a SQL Statement– Within PeopleCode it can be used in the SQLExec
statement—not the most efficient– Can use in CREATESQL in PeopleCode
![Page 38: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/38.jpg)
%BIND
• This is only used in AE Programs• Retrieve fields from State Record• Example
INSERT INTO PS_TEST_REC(emplid, bonus)VALUES (%bind(emplid), %bind(bonus))
![Page 39: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/39.jpg)
%CURRENTDATEIN
• Returns current system date• Example
SELECT emplid, effdtFROM PS_JOBWHERE effdt < %CURRENTDATEIN
![Page 40: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/40.jpg)
%DATEIN
• Date variable is used as an input variable• Formats Date to Database Date
Specifications• Example
SELECT emplid, effdtFROM PS_JOBWHERE effdt < %DATEIN(‘2007-12-01’)
![Page 41: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/41.jpg)
%DATEOUT
• When selecting a date from the Database to ensure proper format
• Example%SELECT(emplid, effdt)SELECT emplid, %dateout(effdt)FROM PS_JOBWHERE effdt < %CURRENTDATEIN
![Page 42: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/42.jpg)
%OPERATORID
• Returns USERID of person running the Application Engine Program
• Helps you get the correct row from the RUNCNTL
• Example%SELECT(effdt, erncd, amount)SELECT %dateout(effdt), erncd, amountFROM PS_TEST_RUN_CONTROLWHERE oprid = %OPERATORID
![Page 43: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/43.jpg)
%RUNCONTROL
• Returns RUNCONTROLID that is being used to run the Application Engine Program
• Example%SELECT(effdt, erncd, amount)SELECT %dateout(effdt), erncd, amountFROM PS_TEST_RUN_CONTROLWHERE oprid = %OPERATORIDAND run_cntl_id = %RUNCONTROL
![Page 44: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/44.jpg)
%SELECT
• Used with a DoSelect• Stores you data in the AET record• Field Names must be valid Fields on the
State Record• Example
%SELECT(emplid, name)SELECT emplid, nameFROM PS_TEST_REC
![Page 45: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/45.jpg)
%SELECTALL
• %SELECTALL will select all the fields from the record
• If the field is a date it automatically uses the %DATEOUT
• ExampleLocal Record &testrec;&testrec = CreateRecord(PS_TEST_REC)CreateSQL(“%SELECTALL(:1)”, &testrec);
![Page 46: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/46.jpg)
Printing
• PeopleTools Delivers an Option to Print your AE Program
• Print in Flow Layout or• Print in Definition Mode
![Page 47: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/47.jpg)
Print Options
![Page 48: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/48.jpg)
Sample Report
![Page 49: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/49.jpg)
Advanced Topics
• Using Email• Input and Output Files
![Page 50: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/50.jpg)
Using Email
• Application Engine programs can send Emails– Used to notify when processes complete– Or fail– Also to send Notifications to Employees
• Send Mail Function– Used within PeopleCode– ExampleSENDMAIL(0, &EMAIL, “”, “”, &SUBJECT, &TEXT);– For more Options refer to PeopleBooks
![Page 51: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/51.jpg)
Input and Output Files
• For interfacing with other Applications• Excel, Access, and Text Files• Process
– Declare a Global Variable– Path and Filename need to be Explicitly Defined
![Page 52: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/52.jpg)
Delivered Functions
• GetFile– This will open a file for read, write or update– Example
GetFile(&path|&filename, “W”, %FilePath_Absolute)
• FileName.Open– This will check to see if the file is open– Example
If &InFile.Open Then …
![Page 53: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/53.jpg)
Delivered Functions Continued
• Filename.Writeline– This will write to the file.– Example
&Outfile.WriteLine(&string);
• Filename.Readline– This will read from the file.– Example
While &Infile.Readline ….End-While
![Page 54: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/54.jpg)
Sample Program
• Walk through Handout
![Page 55: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/55.jpg)
Discussion Time
• Questions and Answers• Workshop
![Page 56: Peoplesoft Development Overview Application Engine](https://reader030.fdocuments.net/reader030/viewer/2022020115/54501108af7959bd668b4758/html5/thumbnails/56.jpg)
Query Tool