Top Banner
Application Engine D. Sree lakshmi EnvyTee InfoSoutions
37
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 1. Application EngineD. Sree lakshmiEnvyTee InfoSoutions

2. Introduction to Application Engine. Structure & Flow of an Application Engine Program. Executing Application Engine Programs Difference b/n AE and SQR 3. Application Engine is used for BATCH or ONLINE processingwhere you have a large (or small) amount of data that needs to beprocessed without user intervention.Technical Definition: An AE program is a set of SQL statements, People Code, and ProgramControl Actions defined in Application Designer that performs abusiness process. 4. Application Engine programs reside completely within your database. No Compilation required. Database Flexibility. Does not generate SQL or PeopleCode. Built in Re-Start Logic. Mostly used for SET based processing. PeopleCode can be written. AE program can be called from People Code. 5. Program Sections Steps o Actions 6. Section Name (e.g. MAIN, etc) and Description Market Platform Effective Date and Status Auto Commit and Access Type 7. Section Name (e.g. MAIN, etc) and Description Market Platform Effective Date Effective Status : Active & Inactive Auto Commit Access Type 8. A Step represents the smallest unit of work that can be committed in a program. When you first create a program, you have a default MAIN Section and Step,initially named Step01. All programs require at least one Section, all Sections should contain at least oneStep, and all Steps should contain at least one Action. 9. Commit After Default Later After StepOn Error Abort Ignore SuppressFrequency 10. Contains all the code of Application Engine Program. There are eight types of Actions that you can include within a Step, and a Stepcan contain multiple Actions. You can only include one of each Action type within a single Step. The only mutually exclusive Actions within a single Step are Call Section andSQL Statement. 11. Program Flow ActionsProgram Flow Actions are used to control the execution of your program. Withthese Action types you can control the execution of subsequent Sections, Action(s),or SQL statements depending on the results of a "Do" SQL statement in the form ofa SELECT.Below are the four types of Program Flow Actions Do When Do While Do Select Do Until 12. The DO When Action is a SELECT statement that allows subsequent actionsto be executed if any rows of data are returned. This Action is similar to a COBOL "IF" statement. A DO When statement runs before any other actions in the Step. If the DO When statement returns any rows, the next Action will be executed.If the Do When conditions are not met, the remaining Actions within that Stepare not executed. Your program executes a DO When Action only once when the owning Stepexecutes.www.itwisesolutions.com 13. The DO Select Action is a SELECT statement that executes subsequent Actionsonce for every row of data that the Do Select returns. DO Select can execute a SQL statement for each row returned from theSELECT statement. The subsequent Actions within the Step are executed in aloop based on the results of the SELECT statement. 14. 2.Do Select Type : Select/Fetch Performs a Fetch for each iteration of the loop to get each row fromthe SELECT. Re-Select It opens a cursor and fetches the first row. Restartable It performs a Fetch on each iteration of the loop to get each row from the SELECT. It can be Restarted. 15. Use a Do Until if you want the "processing actions" to execute at least once, and toexecute over and over until a certain condition is true, such as until a SELECTreturns some rows. 16. PeopleCode Actions allow you to take advantage of IF-THEN logic, messaging, FileLayouts, Component Interface and various other features all from within your ApplicationEngine programs.Configurable PropertiesOn Return :If your PeopleCode program provides a false result, you can have Application Enginerespond by doing one of the following: 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. 17. Use this Action if you want to perform the following SQL commands on multiple rows: UPDATE INSERT DELETE SELECT 18. Configurable Properties2.No RowsIn the event that the SQL (INSERT, UPDATE, and DELETE) associated with the SQLAction does not return any rows, you need to specify what your Application Engineprogram should do. Abort The program terminates. Section Break Application Engine exits the current Section immediately, and control returns to the calling Step. Continue The program continues processing. Skip Step Application Engine exits the current Step immediately and moves on to the next Step. 19. Use the Call Section Action to Call Another Section defined in an ApplicationEngine program. You can call a (local) Section defined within your current program, otherwiseSection MAIN would be the only Section executed. Also you can make external calls to a Section defined in another ApplicationEngine program. The external Section you intend to call must have its Access property set to Public. If a Sections Access property is set to Private, that Section can only be called fromwithin the same program. Call Section is the only supported way to call Application Engine programs orSections from other Application Engine programs or Sections. 20. Use this type of Action to write a message to the Message Log. The Message Log refers to the PeopleTools table PS_MESSAGE_LOG where execution messages reside.Configurable Properties Message Set Identifies a message set within the Message Catalog. Number Identifies a particular message within a Message Set. Parameters A list of comma-delimited values to substitute for %1, %2, and so on markers in the message text. 21. The Application Engine State Record is the method by which you allocate variablesfor your Application Engine program. It is also the method by which Section, Steps, and Actions pass values tosubsequent program steps. You can think of State Records in Application Engine as global variables withoutscope limiting rules. Only one record can be the default State Record Record Types as SQL and Derived/Work Records Process Instance is the only key Field and is used for maintaining session Notice the _AET naming convention 22. PeopleSoft batch applications employ the technique of SET processing, and setprocessing (in most cases) involves extensive use of temporary tables. Temp Tables are used to store transient or intermediate results Improve performance Any Program 23. Making batch temp tablesparallel processing awareo Instance count is thenumber of concurrentinstanceso Batch Temp tables = Sumof the instance count foreach program a table isusedo Naming conventionPS_NAME_TMPnn 24. Set processing is a SQL technique used to process groups, or sets, of rows atone time rather than processing each row individually 25. Application Engine has the built-in ability to save a program state and restartwhere it stopped processing in the case of an abend. 26. To invoke or run an Application Engine program: Process Scheduler People Code Command Line 27. CallAppEngine To call a particular Application Engine program synchronously from a page using PeopleCode, you need to use the CallAppEngine() function in your SavePreChange or SavePostChange PeopleCode. The basic syntax for CallAppEngine() is as follows:CallAppEngine(applid [, statereclist ]); 28. ApplicationPush ButtonAE Run Engine ProcessProcess Process SchedulerCommandPeoplecode Call PSAE.exeLogonExecuteRetrieve AE Program AE Constructs Definitions PSPeoplecodeDatabase Program Files Issue AE programSQL 29. Restart Facility Inbuilt Tool Graphical User Interface