App Engine
App Engine
INTRODUCTION TO
APPLICATION ENGINE
Overview
Application Engine is a PeopleTool designed to help you develop background SQL
processing programs. Use of this tool is intended for developers with knowledge of SQL,
SQL tools and PeopleTools.
Application Engine offers you an alternative to writing COBOL or SQR programs for
background SQL processing. Application Engine does not generate, parse, or understand
SQL. It merely executes SQL that you provide. This can be SQL you write as part of an
application, or SQL that has been generated by tools such as Query.
Objectives
By the end of this chapter, you will be able to:
1-1
APPLICATION ENGINE
JUNE 2002
1-2
Two views of your program. The Definition view is where you create and modify
your programs. The Program Flow view allows you to see the actual order in which
your program will execute the statements.
JUNE 2002
APPLICATION ENGINE
Encapsulation
Unlike applications developed using COBOL or SQR, Application Engine programs
reside completely within your database. With Application Engine, you do not have to
compile your programs, there are no statements to store, and there is no need to directly
interact with the operating environment you use.
You can develop your entire program from scratch, including the table definitions, all
within the Application Designer, and then you can run and debug your applications
without exiting PeopleTools.
1-3
APPLICATION ENGINE
JUNE 2002
PSAESTEPDEFN XYZ )
Effective-Dating
Application sections are effective-datedmeaning you can activate/deactivate a section
as of a particular date. This enables you to archive sections as you modify them, instead
of destroying them. In the future if you decide to revert to a previous incarnation of a
section, you can simply reactivate it.
1-4
JUNE 2002
APPLICATION ENGINE
Platform Flexibility
Even with the use of Meta-SQL, there may still be times when you have to write and
execute different SQL in your Application Engine program, depending on the RDBMS
platform on which you intend your program to run.
In Application Engine, you have the ability to call different versions of a Section for
different platforms, as needed.
You can specify a Section to be one of the following:
Default
Most Sections will only have the default version, and, even in cases where you refine a
particular Section for a specific RDBMS, a default version of that Section will also exist.
When Application Engine executes a Section, it will use the version thats specific to the
current database platform if a specific version exists. If there is no RDBMS-specific
version, Application Engine uses the (default) version.
Within platform-specific Sections, you also have the ability to call base portions of SQL
statements by using the %SQL object. This means you can write your generic SQL
portions just once, and then you can reference them from your different platform
versions.
Even if you dont intend to develop platform specific versions, using %SQL is still a
benefit since you can refer to the SQL repository from within Application Engine SQL.
This allows for reusing SQL and dynamic SQL.
1-5
APPLICATION ENGINE
JUNE 2002
Upgrade Support
Since Application Engine program definitions are now defined in and stored as
Application Designer objects, they join the growing ranks of PeopleTools components
that you can easily upgrade using Application Designer.
You can upgrade Application Engine definitions by project, program, or section.
Also, you can insert records and Application Engine programs in the same project. This
means that if you change your record definition, you can put the modified record into a
project, and you can then also include in the project any Application Engine programs
affected by the changealong with affected pages, and so on. Then you upgrade the
entire project all at once. With COBOL and SQR, you have to do the record change then
modify your batch programs using some other mechanism all while making sure to keep
track of what was changed and how and where it affects the batch program. With
Application Engine and PeopleTools, its all taken care of automatically.
1-6
JUNE 2002
APPLICATION ENGINE
Inactivate Courses
Walk Thru
In this course, we will be using some applications that have been set up for the Training
environment. These applications are not part of the PeopleSoft products, but rather just
used for educational purposes.
One of the tables we will be using is the PS_PSU_COURSE_TBL. This table stores
course information. Once a particular course is no longer offered, the status is changed to
Inactive. The Application Engine program that we will be executing will inactivate all
courses for Tools Release 6.
Open Query Analyzer. Start, Programs, Microsoft SQL Server, Query Analyzer.
Press OK.
1-7
APPLICATION ENGINE
JUNE 2002
Courses
Process Course
Information
Inactivate Rel 6
Courses
1-8
push button.
JUNE 2002
APPLICATION ENGINE
4. Click OK to execute the program. You will be returned to the run control.
5. Use the Process Monitor hyperlink to check on the progress of your program.
Hopefully your job will be successful. If the program is still processing, use the Refresh
button to update the run status.
6. Click on the Details link.
Details
The message log will display any program messages that were issued.
1-9
APPLICATION ENGINE
JUNE 2002
The Redirected Terminal Output will display the standard output log for the application
engine program.
View Log/Trace
Redirected
Terminal Output
You will see that a message was sent from the program Process Completed. You will
also see that the program ended normally.
7. Check the database to see that the rows were inactivated.
1-10
JUNE 2002
APPLICATION ENGINE
Chapter Review
1. List 4 of the benefits of using Application Engine programs for your batch jobs.
2. What is the name of the Application Engine executable and what language is it
written in?
1-11
APPLICATION ENGINE
JUNE 2002
1-12
Applications can dynamically adjust for changes in record and field definitions
through integration into the PeopleSoft Data Dictionary and meta-SQL, a situation
requiring changes and recompilation of COBOL.
Your programs can take advantage of existing business logic in the form of shared
PeopleCode.
You have Upgrade integration for migrating programs to other instances of your
database as well as future release upgrade support.