Saturday 9 July 2011

application engine interview question and answers-2

1) Order and flow of action types
1) Do When
2) Do While
3) Do Select
4) Peoplecode
5) SQL
6) Call Section
7) Message Log
8) XSLT
9) Do until

2) What is Prerequisite for the Temporary record?
1) Should have process Instance as key
2) Name should end with _TAO

3) Different types of Temporary tables
- Dedicated
- Un Dedicated (Shared)

4) Why Parallel Processing required?
Potential performance improvements by splitting the data to be processed into groups and simultaneously running multiple instance of your program to deal with different groups of data.
If you have a one program that uses a temporary table and is invoked multiple times, that single temporary table could be used concurrently in multiple executions of the code. This could create unpredictable results since the different instances of the code would be issuing delete, Inserts and/or updates unsynchronized with each other.
You could solve the problem by creating multiple temporary tables as a pool of tables. 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).

5) 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-starable – Locked across Restarts until completes successfully.
If not Re-startable on Program completion.

6) 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.

7) What happens when all the instance of the temporary table are in use?
It behavior 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.

8) 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.

9) What are the 3 common ways to pass a trace parameter and value to your program psae.exe?
Configuration manager, Process Definition, Command prompt.

10) 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.

11) Which actions are mutually exclusive and why they are mutually exclusive?
Sql and callsection.

12) 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 runtime
2) If the current step contains only one Action, only use skip step at by-pass the commit.
13) What are different types Do Select? 
1) Select/Fetch
2) Reselect
3) Restart able

Select/Fetch: -
Opens the cursor only at the first time and retrieve rows one at loop.
Commits inside the step (commits in the Called Section) are ignored if AE is Restart enabled.
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.

14)What is the maximum limitation on temporary tabel instances in AE.
99

15) what is the difference between the %SELECT and %SELECTINIT meta sql functions.
Ans %select : if any values have not selected then previous value will be there
%selectinit : if any values have not selected then previous value will reinitilate to null

16) 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.

3 comments:

  1. Really very helpfull post about Peoplesoft Application Engine Interview Question.Thanks for sharing.

    ReplyDelete
  2. Peoplesoft Interview Questions and Answers
    http://allinterviewquestionsandanswerspdf.blogspot.in/2016/06/top-100-peoplesoft-interview-questions.html

    ReplyDelete
  3. Thank you for sharing your blog, seems to be useful information can’t wait to dig deep!

    ReplyDelete