The 3 common ways to pass a trace parameter are the following:
There are two types of Variables mainly in Application Engine Peoplecode, they are:
We can pass data between steps in three different ways, they are:
The Syntax for CallAppEngine is as below:
CallAppEngine (applid [, state record]);
so that Application Engine can table references to the assigned Temporary Table instance dynamically at runtime.
Sql and callsection.
Program Level:
Section Level Section type:
Step Level Add an order by clauseThe only restriction for batch runs occurs when you have restart enabled, and you are inside a Do Select that is of the Select/Fetch type (instead of “Re-select” or “Restartable”). with select/Fetch, all commits inside the loop are ignored, including the commit frequency if it’s set.
In general, the types are:
Application Engine can be execute with a single click on Push Button, by using the following:
As following:
Run control parameters passed to each instance of the AE program enable it to identify which input rows “belong” to it, and each program instance inserts the rows from the source table into its assigned temporary table instance using %Table.
Application Engine programs are designed for two types of execution and each has its own pool of Temporary Tables
Set Processing uses SQL to process groups, or sets, of rows at one time rather than processing each row individually. With row by row processing you following a repetitive loop that selects a row, determines if it meets a given criterion, if so, apply rule x to row Update row, commit. With set processing, you only select those rows that meet the filtering criteria and then run the rule once again all the affected rows.
To use state record, there are certain prerequisites, they are:
Select Profile -> Edit Profile-> Process Scheduler Tab -> Application section Select Debug check box.
(You can dynamically modify the state record run application engine step by step People Code Debugger for the Application Engine.)
AE Trace files: – AE_<Program Name>_<Process Instance>.AET Without the process instance: – AE_<Date/Timestamp>_<OS_PID>.AET
There are many ways of reading run-control parameters in AE, most commonly used are:
%Select (EMPLID) /*This will pass value to State record*/
Select EMPLID from PS_AERUNCONTROL where PROCESS_INSTANCE = %PROCESS_INSTANCE and OPRID= %OPRID
&SQL = “Select EMPLID from PS_AERUNCONTROL Where PROCESS_INSTACNE = RECORD.PROCESS_INSTANCE and OPRID = %Bind (PROCESS_INSTANCE)
Step properties:-
On Error: –
People code Action: –
SQL Action properties: –
Basically they have two option, public and private if section declared as public then it be access from other program. Private we cannot call from other program.
Multiple temporary tables as a pool of tables will be helpful to achieve parallel processing. Each invocation of your program would have to allocate an unused temporary table, mark it as ‘in use’, use it and release it back to the pool when you through with it (for each Application Engine program you write).