CallAppEngine

Mon 01 January 2018

Syntax

CallAppEngine(applid[, statereclist, processinstance, allowcommit])

Where statereclist is list of record objects in the form:

&staterecord1 [, &staterecord2] .  .  .

There can be only as many record objects in statereclist as there are state records for the Application Engine program. Additional record objects are ignored.

Description

Use the CallAppEngine function to start the Application Engine program named applid . This is how to start your Application Engine programs synchronously from a page. (Prior to PeopleTools 8, you could do only this using the RemoteCall function.) Normally, you won’t run Application Engine programs from PeopleCode in this manner. Rather, the bulk of your Application Engine execution will be run using the Process Scheduler, and the exception would be done using CallAppEngine.

The staterecord can be the hard-coded name of a record, but generally you use a record object to pass in values to seed particular state fields. The record name must match the state record name exactly.

The processinstance allows you to specify the process instance used by the Application Engine runtime. In your PeopleCode program this parameter must be declared of type integer since that is the only way the runtime can tell whether the last parameter is to be interpreted as a process instance. For more details see the Application Engine documentation.

After you use CallAppEngine, you may want to refresh your page. The Refresh method, on a rowset object, reloads the rowset (scroll) using the current page keys. This causes the page to be redrawn. GetLevel0().Refresh() refreshes the entire page. If you want only a particular scroll to be redrawn, you can refresh just that part.

Note: If you supply a non-zero process instance, all message logging is done under the process instance. You must build your own PeopleSoft Pure Internet Architecture page to access or delete the messages, since there is no Process Monitor entry for the process instance you used.

Parameters

Field or Control

Definition

applid

Specify the name of the Application Engine program you want to start.

statereclist

Specify an optional record object that provides initial values for a state record.

processinstance

Optionally, specify the process instance used by the Application Engine runtime. If no value is specified, the Application Engine runtime automatically generates a new process instance.

allowcommit

Specify an optional Boolean value indicating whether intermediate commits are allowed. If omitted, allowcommit defaults to False.

Intermediate commits of only the transactions that are related to the Application Engine program use a secondary connection to the database. Before invoking CallAppEngine with intermediate commits, the secondary connection to the database for that application server domain must be enabled using the database flags (DbFlags) in the application server configuration file. Note that the secondary connections are enabled by default. If the secondary connection to the database is disabled and CallAppEngine is invoked with allowcommit set to True, the functionality will fall back to the default where all transactions are committed only at the end of an Application Engine program.

See

Returns

None.