Application Engine Program Types

This section discusses:

  • Application Engine program types.

  • Daemon program type.

  • Transform program type.

Application Engine has five types of programs. You specify the type in the Program Properties dialog box for your program definition. The types are:

  • Standard, which is a normal entry-point program.

  • Upgrade Only, which is used in PeopleSoft upgrade utilities.

  • Import Only, which is used by PeopleSoft import utilities.

  • Daemon Only, a type of program used as a daemon process.

  • Transform Only, a program type used to support Extensible Stylesheet Language Transformations (XSLT).

Application Engine provides a daemon process, called PSDAEMON, that runs continuously when PeopleSoft Process Scheduler is running and is intended for recurring jobs. It polls the system, checking for certain conditions to occur. A predefined set of conditions is an event. When the conditions are true, PSDAEMON schedules a process to handle the event.

PSDAEMON supports limited tracing because it runs indefinitely. Specifically, it only allows Application Engine tracing at the step and SQL levels, in addition to the standard PeopleSoft SQL and PeopleCode tracing. It does not support other options, such as Timings and DB Optimizer tracing.

You activate PSDAEMON in PeopleSoft Process Scheduler or from the command line.

Note: One PSDAEMON process can run for each row in the PS_SERVERDEFN table. The PS_SERVERDEFN.DAEMONENABLED field must be set to 1.

Starting PSDAEMON from the Command Line

The command line syntax is:

psdaemon [-CTdatabase_type] [-CDdatabase_name] [-COuserID] [-CPpassword] -Rserver_name

Use the –R option to query PS_SERVERDEFN, obtaining the daemon group, sleep time, and recycle count (terminate after N iterations).Server_name is the key value for PS_SERVERDEFN. You do not need to pass ProcessInstance (–I) or AE Program ID (–AI).

Starting a Daemon Program from PeopleSoft Process Scheduler

Before starting a daemon Application Engine program, you must add the program to the Daemon Group page in PeopleSoft Process Scheduler.

To add a daemon program:

  1. Select PeopleTools > Process Scheduler > Daemon Group.

  2. Select the Add New Value page.

  3. Enter a daemon procedure group name and click Add.

  4. On the Daemon Group page, add the appropriate programs to the program name list.

Restarting the AEDAEMONMGR Program

AEDAEMONMGR is a restartable Application Engine program that commits after each daemon procedure. When PSDAEMON executes, it determines whether it must restart AEDAEMONMGR following an abnormal end to a program.

If a restart is not required, PSDAEMON assigns a new process instance and runs AEDAEMONMGR from the beginning. Because of this design, PeopleSoft Process Scheduler does not have to determine whether PSDAEMON exited due to an error or because it had reached the recycle count.

AEDAEMONMGR uses the Daemon Group page value to get related daemon procedures from PS_DAEMONGROUP in order, and then it initiates each procedure. After all procedures have been executed, AEDAEMONMGR logs a sleep message and returns control to PSDAEMON. The sleep time is used only to log an informational message at the end of each cycle, for example, "Sleeping for N minutes...." It also logs a message at the beginning of each cycle so that an administrator can monitor the runtime and sleep-time of a specific PSDAEMON process.

If an error occurs in AEDAEMONMGR, if the recycle count has been reached, or if PSSERVERSTAT.DAEMONACTION = '1' (indicating that PeopleSoft Process Scheduler is idle), then PSDAEMON exits. Otherwise, it sleeps for the requested number of minutes and then calls AEDAEMONMGR again.

Using PSDAEMON to Start Parallel Processing

Within a daemon group, programs are invoked sequentially and one program does not execute until the previous program has completed. The programs contained in a daemon group should be quick programs that scan information to find events. When an event is discovered, the daemon program can use the ProcessRequest class to invoke programs that are not of the daemon type. These non-daemon type Application Engine programs can execute in parallel. For that reason, do not include application-specific processing in a PSDAEMON type program.

Transform Only type programs enable different systems to communicate with one another by transforming messages into appropriate formats. When you specify an Application Engine program as a Transform Only program, you must specify actions of type XSLT or PeopleCode. You can use transform programs to:

  • Apply a transformation to a message to make its structure comply with the requirements of the target system.

  • Perform a data translation on a message so its data is represented according to the conventions of the target system.

  • Determine whether to pass a message through to its target by filtering it based on its content.