- Peoplesoft Functional
- Peoplesoft Technical
- Database (Oracle)
- Tips and Tricks
- Interview Questions
- Peoplesoft Functional Interview Questions
- Workforce Development Questions
- Workforce Administration Questions
- PS PayRoll
- Recruiting Questions
- Security Questions
- Benefits Questions
- Setup HRMS Questions
- Other Functional Questions
- Peoplesoft Technical Interview Questions
- PeopleCode Questions
- Component Interface Questions
- Application Engine Questions
- SQR Questions
- PeopleSoft Mixed Questions
- PeopleSoft Certification Exam Questions
- Security Questions
|PeopleSoft Technical articles - Application Engine|
A critical step in implementing parallel processing is to make sure that you’ve included all of the appropriate meta-SQL within the PeopleCode that your Application Engine program executes.
To reference a temp table (Online or Batch), you need to use:
You can reference any table with %Table, but only those records defined as Temporary Tables get replaced by Application Engine with a numbered instance of a Temporary Table from the Temporary Table pool.
For batch/dedicated Temporary Tables, when Application Engine resolves any %Table, it checks an internal array to see if a Temporary Table instance has already been chosen for the current record. If so, then Application Engine substitutes the chosen table name. If there are no more batch/dedicated instances available, then Application Engine uses the base table instance by default (if the Runtime option Continue has been chosen). Regardless of whether %Table is in PeopleCode SQL or in an Application Engine SQL Action, the program uses the same physical SQL table.
For synchronous calls to Application Engine, an available instance number will be selected at random according to internal rules. Synchronous refers to using the CallAppEngine PeopleCode function; all other methods that you use to invoke Application Engine programs are asynchronous which means the page is not “frozen” while the program runs to completion.
Populate your Temporary Table Process Instance with the Process Instance
All temporary tables should be keyed by Process Instance as a general rule. Also, if you have opted to use the “Continue” runtime option when batch/dedicated tables can’t be assigned, Process Instance is required as a key field. The current Process Instance is automatically put into the State record, but when you Insert rows into your Temporary Tables you must supply that Process Instance.
%ProcessInstance or %Bind(PROCESS_INSTANCE)
This meta-SQL returns the numeric (unquoted) Process Instance. The %PROCESSINSTANCE meta-SQL is more efficient and faster than using the %Bind(PROCESS_INSTANCE).
Note: The Process Instance value is always zero for programs initiated with CallAppEngine. This is because the program called with CallAppEngine runs “in process”, that is, it runs within the same unit of work as the component with which it is associated.
Clear Temporary Tables (%TruncateTable)
The Temporary Tables are truncated automatically at the end of processing. If the shared base table has been allocated because no batch/dedicated instances were available, then Application Engine performs a delete of rows by Process Instance instead of performing a truncate. In such a case, the PROCESS_INSTANCE is required as a high-level key.
You can perform additional deletes of Temporary Table results during the run, but you will need to include your own SQL Action that does a %TruncateTable.
|< Prev||Next >|