PeopleSoft Application Engine Frequently Asked Interview Questions And Answers
What Are Different Types Of Variables In The Application Engine Peoplecode?
There are two types of Variables mainly in Application Engine Peoplecode, they are:
Local variable – These are the variables available for the duration of the program in which they are declared.
Global / Component – These are the variables available while the Application Engine program is running. They get saved at commits and check points, so they can be used for restarts. Component variables are same as Global in case of the AE.
Different Ways Pass Data Between The Steps?
We can pass data between steps in three different ways, they are:
Using State records – One row can be passed and can have many state records.
Using Component/Global People code variables
Using Temporary records – Multiple rows of data can be passed.
What Is Prerequisite For The State Record?
To use state record, there are certain prerequisites, they are:
State Record should be a SQL Table or a Derived work record, for AE Restarts we would definitely need State Record as a SQL Table, as Derived work records store data only at run-time.
Name of the State Record should end in AET, the system identifies the record as a state record with this notation
We need to use PROCESS_INSTANCE field in the record and it should be defined as a key
Any data types except character or numeric must not be required fields
How To Read The Run Control Parameters In Ae?
There are many ways of reading run-control parameters in AE, most commonly used are:
SQL:
%Select (EMPLID) /*This will pass value to State record*/
Select EMPLID from PS_AERUNCONTROL where PROCESS_INSTANCE = %PROCESS_INSTANCE and OPRID= %OPRID
People code:
&SQL = “Select EMPLID from PS_AERUNCONTROL Where PROCESS_INSTACNE = RECORD.PROCESS_INSTANCE and OPRID = %Bind (PROCESS_INSTANCE)
How Do You Execute Application Engine Through Push Button?
Application Engine can be execute with a single click on Push Button, by using the following:
CreateProcessRequest () , Schedule ()
CallAppEngine.
What Is The Syntax For Callappengine?
The Syntax for CallAppEngine is as below:
CallAppEngine (applid [, state record]);
What Are The 3 Trace Parameters You Can Pass To Your Psae.exe?
As following:
TRACE <trace value>
TOOLSTRACESQL <trace value>
TOOLSTRACEPC <trace value>
Trace Parameter Mostly Used For General Performance Information?
TRACE <trace value> 384 – mostly used trace value.
What Is The Difference Between A Trace Value And Trace Parameters?
A Trace parameter determines which type of trace is turned on.
A Trace value determines what type of data is recorded in your trace files.
What Are The 3 Common Ways To Pass A Trace Parameter And Value To Your Program Psae.exe?
The 3 common ways to pass a trace parameter are the following:
Configuration manager
Process Definition
Command prompt
What Are The Different Types Of Application Engine?
In general, the types are:
Standard : Standard entry-point program.
Upgrade Only : Used by PeopleSoft Upgrade utilities only
Import Only : Used by PeopleSoft Import utilities only
Daemon Only : Use for daemon type programs
Transform Only : Support for XSLT Transform programs
How Do You Program Ae Program For The Restarts?
Program Level:
State Record: One of the state record needs to SQL Table, Since All Derived work record will be re-initializing on commit.
Program Properties: On the Advanced tab in the program properties dialog box, make sure that disable restart is not checked
Configuration manager: In the configuration manager, sure that Disable restart is not selected on the process scheduler tab.
Section Level Section type:
The option for section type are prepare only and critical updates
If the section is preparing data i, e select data, populating temporary tables, or updating temporary tables then the section should be prepare only
If the section is updating the permanent application tables in the database, you should select critical update.
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.
Explain Set Processing?
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.
What Are The Advantages Of Set Processing?
Improved Performance: – Set processing performs significantly better than it is -by-row counterpart for “reasonable” batch processing volumes.
Minimized SQL Overhead: – It tends to use fewer Application Engine SQL statements that each processed more data than the statements executed in row-by-row processing.
Easy Maintenance: – if need to make a fix or add an enhancement to SQL, it’s just a matter of modifying the SQL or inserting the new “Chunk”. Leveraging the RDBMS: – With Set – based processing, you take advantage of the SQL processing engine on the database rather than placing the processing burden and overhead on the application executable.
Explain About Testing And Debugging Application Engine?
Application Engine Trace File-You can track the step execution of your application execution
Application Engine Interactive Debugger – First click on the trace tab and turn off the statement timings.
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
Explain The Order And Flow Of Action Types?
Do When
Do While
Do Select
Peoplecode
SQL
Call Section
Message Log
XSLT
Do until
What Is Prerequisite For The Temporary Record?
Should have process Instance as key
Name should end with _TAO
What Are The Different Types Of Temporary Tables?
Dedicated
Un Dedicated (Shared)
Why Parallel Processing Required?
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).
How Running Ae Program As Batch Differs From Running It Online?
Application Engine programs are designed for two types of execution and each has its own pool of Temporary Tables
Online: Invoked by CallAppEngine from People Code Run quickly, synchronously, and at random times. Potential for simultaneous executions Uses the online Temporary Table pool. Not restart able. Psae.exe randomly assigns an instance number from the number range on your online temp tables. If the instance number is in use psae.exe puts the program in Queue until the assigned instance becomes free. Unlock on completion, on Crash free from Manage Abends.
Batch: Invoked through the Process Scheduler. Run for longer amounts of time, asynchronously, and at scheduled times. Can be designed for parallel execution for performance. Uses the Batch/Dedicated Temporary table. Restart able. It allocates instance number based on the availability on a record by record basis and psae.exe begins with the lowest instance numbers. If the properties are set continue – Base table is used with Process instance as key. If Re-startable – Locked across Restarts until completes successfully. If not Re-startable on Program completion.
What Are The Important Steps For Implementing The Parallel Processing?
Define you Temporary Tables.
Set the Temporary Tables Online pool.
Assign Temporary Tables to your Application Engine program in it program.
Set Temporary Table Batch Pool – Instance count in the AE.
Build / Rebuild your Temporary Table record.
Code %Table Meta – SQL as reference to Temporary Tables in your Application Engine program,
so that Application Engine can table references to the assigned Temporary Table instance dynamically at runtime.
What Happens When All The Instance Of The Temporary Table Is In Use?
It behaviour can control by AE developer. If the runtime options are set to continue
“People Tools will insert rows into the base table using the PROCESS_INSTANCE as a key”
If temp table doesn’t contain PROCESS_INSTANCE as a key field in a Temporary table, you should change the
Temp table runtime options to “Abort” in the appropriate Application Engine programs.
How Can You Divide The Data To Be Processed By Different Instance Of The Program To Perform Parallel Program?
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.
What Is The Difference Between Exit (0), Exit (1) When We Are Using This Functions In Ae?
Exit (1) causes immediate termination of a Peoplecode program. Use this parameter to rollback database changes.
Exit (0) caused immediate termination of a Peoplecode Program but don’t make rollback in the database.
What Is The Difference Between The %select And %selectinit Meta Sqlfunctions?
%select: if any values have not selected then previous value will be there
%selectinit : if any values have not selected then previous value will reinitiate to null
What Is The Maximum Limitation On Temporary Table Instances In Ae.?
99
What Are Different Types Do Select?
Select/Fetch: Opens the cursor only at the first time and retrieve rows one at loop
Reselect: It opens the cursor and closes the cursor on each iteration of the loop. It will reselect the same row of data. Logic in Actions of the step should be such that it will be changing the status of the rows in the table the do select is selecting. Commits are not ignored and will be committed in a reselect loop when the restart is enabled
Restart able: similar to select/Fetch but it WILL COMMIT inside the loop thus allowing the checkpoint to the PS_AERUNCONTROL table.
Error Handling Or Exception Handling In Application Engine?
Step properties:-
On Error: –
Abort – Write message to message log and terminate.
Ignore – Write message to message log and continue.
Uppress – No message will be written, but program will continue.
People code Action: –
On return options can used to handle run time errors.
Abort: – Exits immediately – Not recommended.
Break: – 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. If this is the last step in the section, the calling step resumes control of the processing.
SQL Action properties: –
No Rows: – When the Sql doesn’t return any rows, you can tell what application engine program should do.
Abort: -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.
When using skip step keep the following in mind:1) Application Engine ignores the commit for the current step at runtime2) If the current step contains only one Action, only use skip step at by-pass the commit.
Which Actions Are Mutually Exclusive And Why They Are Mutually Exclusive?
Sql and callsection.
What Is The Main Purpose Of The Access Property In The Section?
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.
What Are Different Types Of Variables In The Application Engine Peoplecode?
There are two types of Variables mainly in Application Engine Peoplecode, they are:
Local variable – These are the variables available for the duration of the program in which they are declared.
Global / Component – These are the variables available while the Application Engine program is running. They get saved at commits and check points, so they can be used for restarts. Component variables are same as Global in case of the AE.
Different Ways Pass Data Between The Steps?
We can pass data between steps in three different ways, they are:
Using State records – One row can be passed and can have many state records.
Using Component/Global People code variables
Using Temporary records – Multiple rows of data can be passed.
What Is Prerequisite For The State Record?
To use state record, there are certain prerequisites, they are:
State Record should be a SQL Table or a Derived work record, for AE Restarts we would definitely need State Record as a SQL Table, as Derived work records store data only at run-time.
Name of the State Record should end in AET, the system identifies the record as a state record with this notation
We need to use PROCESS_INSTANCE field in the record and it should be defined as a key
Any data types except character or numeric must not be required fields
How To Read The Run Control Parameters In Ae?
There are many ways of reading run-control parameters in AE, most commonly used are:
SQL:
%Select (EMPLID) /*This will pass value to State record*/
Select EMPLID from PS_AERUNCONTROL where PROCESS_INSTANCE = %PROCESS_INSTANCE and OPRID= %OPRID
People code:
&SQL = “Select EMPLID from PS_AERUNCONTROL Where PROCESS_INSTACNE = RECORD.PROCESS_INSTANCE and OPRID = %Bind (PROCESS_INSTANCE)
How Do You Execute Application Engine Through Push Button?
Application Engine can be execute with a single click on Push Button, by using the following:
CreateProcessRequest () , Schedule ()
CallAppEngine.
What Is The Syntax For Callappengine?
The Syntax for CallAppEngine is as below:
CallAppEngine (applid [, state record]);
PeopleSoft Application Engine Frequently Asked Interview Questions And Answers |
What Are The 3 Trace Parameters You Can Pass To Your Psae.exe?
As following:
TRACE <trace value>
TOOLSTRACESQL <trace value>
TOOLSTRACEPC <trace value>
Trace Parameter Mostly Used For General Performance Information?
TRACE <trace value> 384 – mostly used trace value.
What Is The Difference Between A Trace Value And Trace Parameters?
A Trace parameter determines which type of trace is turned on.
A Trace value determines what type of data is recorded in your trace files.
What Are The 3 Common Ways To Pass A Trace Parameter And Value To Your Program Psae.exe?
The 3 common ways to pass a trace parameter are the following:
Configuration manager
Process Definition
Command prompt
What Are The Different Types Of Application Engine?
In general, the types are:
Standard : Standard entry-point program.
Upgrade Only : Used by PeopleSoft Upgrade utilities only
Import Only : Used by PeopleSoft Import utilities only
Daemon Only : Use for daemon type programs
Transform Only : Support for XSLT Transform programs
How Do You Program Ae Program For The Restarts?
Program Level:
State Record: One of the state record needs to SQL Table, Since All Derived work record will be re-initializing on commit.
Program Properties: On the Advanced tab in the program properties dialog box, make sure that disable restart is not checked
Configuration manager: In the configuration manager, sure that Disable restart is not selected on the process scheduler tab.
Section Level Section type:
The option for section type are prepare only and critical updates
If the section is preparing data i, e select data, populating temporary tables, or updating temporary tables then the section should be prepare only
If the section is updating the permanent application tables in the database, you should select critical update.
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.
Explain Set Processing?
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.
What Are The Advantages Of Set Processing?
Improved Performance: – Set processing performs significantly better than it is -by-row counterpart for “reasonable” batch processing volumes.
Minimized SQL Overhead: – It tends to use fewer Application Engine SQL statements that each processed more data than the statements executed in row-by-row processing.
Easy Maintenance: – if need to make a fix or add an enhancement to SQL, it’s just a matter of modifying the SQL or inserting the new “Chunk”. Leveraging the RDBMS: – With Set – based processing, you take advantage of the SQL processing engine on the database rather than placing the processing burden and overhead on the application executable.
Explain About Testing And Debugging Application Engine?
Application Engine Trace File-You can track the step execution of your application execution
Application Engine Interactive Debugger – First click on the trace tab and turn off the statement timings.
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
Explain The Order And Flow Of Action Types?
Do When
Do While
Do Select
Peoplecode
SQL
Call Section
Message Log
XSLT
Do until
What Is Prerequisite For The Temporary Record?
Should have process Instance as key
Name should end with _TAO
What Are The Different Types Of Temporary Tables?
Dedicated
Un Dedicated (Shared)
Why Parallel Processing Required?
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).
How Running Ae Program As Batch Differs From Running It Online?
Application Engine programs are designed for two types of execution and each has its own pool of Temporary Tables
Online: Invoked by CallAppEngine from People Code Run quickly, synchronously, and at random times. Potential for simultaneous executions Uses the online Temporary Table pool. Not restart able. Psae.exe randomly assigns an instance number from the number range on your online temp tables. If the instance number is in use psae.exe puts the program in Queue until the assigned instance becomes free. Unlock on completion, on Crash free from Manage Abends.
Batch: Invoked through the Process Scheduler. Run for longer amounts of time, asynchronously, and at scheduled times. Can be designed for parallel execution for performance. Uses the Batch/Dedicated Temporary table. Restart able. It allocates instance number based on the availability on a record by record basis and psae.exe begins with the lowest instance numbers. If the properties are set continue – Base table is used with Process instance as key. If Re-startable – Locked across Restarts until completes successfully. If not Re-startable on Program completion.
What Are The Important Steps For Implementing The Parallel Processing?
Define you Temporary Tables.
Set the Temporary Tables Online pool.
Assign Temporary Tables to your Application Engine program in it program.
Set Temporary Table Batch Pool – Instance count in the AE.
Build / Rebuild your Temporary Table record.
Code %Table Meta – SQL as reference to Temporary Tables in your Application Engine program,
so that Application Engine can table references to the assigned Temporary Table instance dynamically at runtime.
What Happens When All The Instance Of The Temporary Table Is In Use?
It behaviour can control by AE developer. If the runtime options are set to continue
“People Tools will insert rows into the base table using the PROCESS_INSTANCE as a key”
If temp table doesn’t contain PROCESS_INSTANCE as a key field in a Temporary table, you should change the
Temp table runtime options to “Abort” in the appropriate Application Engine programs.
How Can You Divide The Data To Be Processed By Different Instance Of The Program To Perform Parallel Program?
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.
What Is The Difference Between Exit (0), Exit (1) When We Are Using This Functions In Ae?
Exit (1) causes immediate termination of a Peoplecode program. Use this parameter to rollback database changes.
Exit (0) caused immediate termination of a Peoplecode Program but don’t make rollback in the database.
What Is The Difference Between The %select And %selectinit Meta Sqlfunctions?
%select: if any values have not selected then previous value will be there
%selectinit : if any values have not selected then previous value will reinitiate to null
What Is The Maximum Limitation On Temporary Table Instances In Ae.?
99
What Are Different Types Do Select?
Select/Fetch: Opens the cursor only at the first time and retrieve rows one at loop
Reselect: It opens the cursor and closes the cursor on each iteration of the loop. It will reselect the same row of data. Logic in Actions of the step should be such that it will be changing the status of the rows in the table the do select is selecting. Commits are not ignored and will be committed in a reselect loop when the restart is enabled
Restart able: similar to select/Fetch but it WILL COMMIT inside the loop thus allowing the checkpoint to the PS_AERUNCONTROL table.
Error Handling Or Exception Handling In Application Engine?
Step properties:-
On Error: –
Abort – Write message to message log and terminate.
Ignore – Write message to message log and continue.
Uppress – No message will be written, but program will continue.
People code Action: –
On return options can used to handle run time errors.
Abort: – Exits immediately – Not recommended.
Break: – 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. If this is the last step in the section, the calling step resumes control of the processing.
SQL Action properties: –
No Rows: – When the Sql doesn’t return any rows, you can tell what application engine program should do.
Abort: -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.
When using skip step keep the following in mind:1) Application Engine ignores the commit for the current step at runtime2) If the current step contains only one Action, only use skip step at by-pass the commit.
Which Actions Are Mutually Exclusive And Why They Are Mutually Exclusive?
Sql and callsection.
What Is The Main Purpose Of The Access Property In The Section?
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.
Post a Comment