Application Engine: D. Sree Lakshmi Envytee Infosoutions
Application Engine: D. Sree Lakshmi Envytee Infosoutions
Application Engine: D. Sree Lakshmi Envytee Infosoutions
D. Sree lakshmi
EnvyTee InfoSoutions
• Introduction to Application Engine.
Technical Definition:
• No Compilation required.
• Database Flexibility.
• Sections
• Steps
o Actions
• Section Name (e.g. MAIN, etc) and Description
• Market
• Platform
• Effective Date and Status
• Market
• Platform
• Effective Date
• Auto Commit
• Access Type
• 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 one
Step, and all Steps should contain at least oneAction.
Commit After
• Default
• Later
• After Step
On Error
Abort
Ignore
Suppress
Frequency
• Contains all the code of Application Engine Program.
• There are eight types of Actions that you can include within a Step, and aStep
can contain multipleActions.
• You can only include one of each Action type within a single Step.
• The only mutually exclusive Actions within a single Step are Call Sectionand
SQL Statement.
Program Flow Actions
Program Flow Actions are used to control the execution of your program. With
these 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 of
a SELECT.
• 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 Step
are not executed.
• Your program executes a DO When Action only once when the owningStep
executes.
www.itwisesolutions.com
• The DO Select Action is a SELECT statement that executes subsequentActions
once for every row of data that the Do Select returns.
• DO Select can execute a SQL statement for each row returned from the
SELECT statement. The subsequent Actions within the Step are executed ina
loop based on the results of the SELECT statement.
2. Do Select Type :
• Select/Fetch Performs a Fetch for each iteration of the loop to get each row from
the SELECT.
• Restartable It performs a Fetch on each iteration of the loop to get each row
from the SELECT. It can be Restarted.
Use a Do Until if you want the "processing actions" to execute at least once, and to
execute over and over until a certain condition is true, such as until a SELECT
returns some rows.
PeopleCode Actions allow you to take advantage of IF-THEN logic, messaging, File
Layouts, Component Interface and various other features all from within yourApplication
Engine programs.
Configurable Properties
On Return :
If your PeopleCode program provides a false result, you can haveApplication Engine
respond 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.
Use this Action if you want to perform the following SQL commands on multiple rows:
• UPDATE
• INSERT
• DELETE
• SELECT
Configurable Properties
2. No Rows
In the event that the SQL (INSERT, UPDATE, and DELETE) associated with the SQL
Action does not return any rows, you need to specify what your Application Engine
program should do.
• Section Break Application Engine exits the current Section immediately, andcontrol
returns to the calling Step.
• Skip Step Application Engine exits the current Step immediately and moves on tothe
next Step.
• Use the Call Section Action to Call Another Section defined in an Application
Engine program.
• You can call a (local) Section defined within your current program, otherwise
Section MAIN would be the only Section executed.
• The external Section you intend to call must have its Access property set toPublic.
• If a Section's Access property is set to Private, that Section can only be calledfrom
within the same program.
Configurable Properties
• It is also the method by which Section, Steps, and Actions pass valuesto
subsequent program steps.
• Process Instance is the only key Field and is used for maintaining session
• Improve performance
• Any Program
• Making batch temp tables
parallel processing aware
o Instance count is the
number of concurrent
instances
o Batch Temp tables = Sum
of the instance count for
each program a table is
used
o Naming convention
PS_NAME_TMPnn
• Set processing is a SQL technique used to process groups, or sets, of rowsat
one time rather than processing each row individually
• Application Engine has the built-in ability to save a program state and restart
where it stopped processing in the case of an abend.
• To invoke or run an Application Engine program:
• Process Scheduler
• People Code
• Command Line
• CallAppEngine
SQL
• Restart Facility
• Inbuilt Tool