Peoplesoft App Engine

The execution of a PeopleSoft Application Engine starts with the Main section and flows down to other sections which are called from the mai. Popular Posts Peoplesoft Meta Tables.

The two major components of PeopleSoft Integration Broker, which help you accomplish this task are the integration gateway and the integration engine, which is otherwise also known as the application engine. The integration gateway is a collection of Java servlets and classes running on a web server. PeopleSoft Application Engine comprises two distinct components—a designer where you define your batch program and the runtime environment where you run and monitor your program. In PeopleSoft Application Engine, a program is a set of SQL statements, PeopleCode, and program control actions that enable looping and conditional logic. This section provides an overview of PeopleCode and Application Engine programs and discusses how to: Decide when to use PeopleCode. Consider the program environment. Access state records with PeopleCode.

Application Engine Specifying the Section Name dynamically

<< Previous Next >>

A. CallSection

An App Engine program is divided into ‘Sections’, which are blocks of statements consisting of any number of ‘Steps’ and ‘Actions’. Unless you’re dealing with a ‘library’ App Engine, the program will contain one section called ‘MAIN’, with any number of remaining sections named by the developer. At any point throughout the App Engine code, you can transfer control from one section to another via the use of the ‘Call Section’ command:

The name of the target section is usually specified in the AE definition. However, in some cases, you may want to use ‘CallSection’ in a more dynamic way. You’d rather not specify the name of the section in advance, but would instead prefer to set the Section name at run-time. Fortunately, this is relatively easy to do.

B. Creating a Dynamic Call

Firstly, insert the field ‘AE_SECTION’ into your AE state record. Then prior to the ‘Call Section’ step, add the following code to a PeopleCode Step, setting the AE_SECTION field to the actual section that needs to be called.

The ‘Call Section’ command itself should then be defined with no value entered in the section name, but with the ‘Dynamic’ flag ticked. The system will know that dynamic naming is in operation and will check for the AE_SECTION field on the state record. The program will error if the AE_SECTION field does not exist, or it points to an invalid section name.

Dynamic sections could be used, for instance, when the App Engine is intended to run as both a batch process and as an online process. In this case, you may want to call different sections as the data requirements will differ depending on whether a run control record has been created in advance. Refer to Tip 015 for more details of the ‘CallAppEngine’ function.

See Also:
Application engine

Tip 015: Calling an App Engine from within PeopleCode
Tip 039: Using Population Selection

Peoplesoft App Engine Message Log

<< Previous Next >>

Application Engine Deleting ‘stuck’ run controls due to a prior ‘No Success’

<< Previous Next >>

A. All Processing Suspended

If you’ve ever created an App Engine from scratch, you will no doubt have come across the problem where your AE goes to ‘No Success’ at some point. Then, when you try to re-run the App Engine using the same run control as before, you get a message such as this:

B. Restartable App Engines

One of the standard App Engine properties (in File -> Definition Properties -> Advanced) is a Y/N checkbox called ‘Disable Restart’. This specifies whether or not the App Engine has the ability to restart itself from an ‘abend’, a point of failure (restartable App Engines also have other requirements, such as a permanent state record, but this subject is beyond the scope of the current post). While a restartable App Engine can be handy for certain requirements – such as processing thousands of records over the course of many hours – in many cases the option is overkill for a more modest programming requirement. And of course, here at Barefoot PeopleSoft we are always interested in keeping things as simple as possible.

Rather annoyingly, however, when you first create an App Engine in App Designer, the ‘Disable Restart’ option is NOT ticked by default, meaning the App Engine is initially defined as ‘restartable’. If, like me, you usually forget to turn this option on, you will soon discover that a run control cannot be reused once it has gone to ‘No Success’.

C. Resurrecting Stuck Run Controls

While the ‘Disable Restart’ option is easy enough to turn on in the App Engine properties (refer to navigation above), what about existing run control IDs that have gone to ‘No Success’? Are these lost forever, or can they be recovered and re-used in any way? Fortunately, they can, by running the delete statement below. This purges all ‘stuck’ run control records for your user ID, meaning you can start again from scratch with your favoured run control ID (which, for many people, is often the run control ID of ‘1’… the habit is hard to break).

Alternatively, you can remove the stuck run controls by navigating to the following page in the system:

PeopleTools -> Application Engine -> Manage Abends

See Also:

Application Engine Do While Example

<< Previous Next >>