What you will learn

In this guide you will learn how to create all the required PeopleSoft objects to pass values to an application engine program.

In PeopleSoft, an Application Engine is a program that is used to execute a series of programmatic steps or “actions” in a specific order. It is designed to perform repetitive or complex tasks, such as data manipulation, data integration, or data processing, and can be used to automate various business processes within the PeopleSoft system.

Application Engines are implemented as PeopleCode programs, which are written in a proprietary programming language that is specific to PeopleSoft. They consist of a series of programmatic steps that are executed in a specific order, and can include a variety of different actions such as SQL statements, PeopleCode functions, and calls to other programs or components.

Application Engines can be initiated and controlled through the use of run control records, which are used to specify the parameters and options for the Application Engine. They can also be scheduled to run at specific intervals or on a specific schedule using the PeopleSoft Process Scheduler.

Application Engines are a useful tool for automating complex or repetitive tasks in PeopleSoft, and can help to streamline and optimize various business processes within the system.

Requirements

  • PeopleSoft environment (PUM)
  • Application Designer

Table of Contents

  1. Create run control record
  2. Create state record
  3. Create app engine
  4. Create run control page
  5. Create a component
  6. Register the component
  7. Create process definition
  8. Run app engine

Create run control record

A run control record is a template from which the run control table is created. The run control table stores parameters for a process, including the processing options and any input values that are required. To create a run control record follow the steps below:

a. Launch Application Designer.
b. Click File then click New… choose Record.
c. Click Insert then click Fields…
d. Search for RUN_CNTL_ID then click Insert
e. Search for OPRID then click Insert
f. Search for FILENAME then click Insert
g. Search for DEBUG then click Insert
h. Double click RUN_CNTL_ID and check off Key, Search Key and List Box Item
i. Double click OPRID and check off Key
j. Click File then click Save specifying the name MXM_APPENG_RC

Record

Create state record

A state record is a special type of record that is used to store information about the state or status of a particular process or job. In this guide we will be transferring information from the run control table to the state record. Create a state record by following the steps below:

a. Launch Application Designer.
b. Click File then click New… choose Record.
c. Click Insert then click Fields…
d. Search for PROCESS_INSTANCE then click Insert
e. Search for AE_SECTION then click Insert
f. Search for AE_APPLID then click Insert
g. Search for RUN_CNTL_ID then click Insert
h. Search for OPRID then click Insert
i. Search for FILENAME then click Insert
j. Search for DEBUG then click Insert
k. Click Record Type tab then choose Derived/Work
l. Click File then click Save specifying the name MXM_APPENG_AET

Record

Create app engine

Follow the steps below to create an app engine in Application Designer:

a. Launch Application Designer.
b. Click File then click New… and choose App Engine Program.
c. Click Insert then click Section
d. Click on new section and update the name to GETPARAM
e. Click Insert then click Step/Action
f. Change the action to SQL and enter the SQL below:

%Select(OPRID, RUN_CNTL_ID, FILENAME, DEBUG)
SELECT OPRID
, RUN_CNTL_ID
, FILENAME
, DEBUG
FROM %Table(MXM_APPENG_RC)
WHERE OPRID = %OperatorId
AND RUN_CNTL_ID = %RUNCONTROL

g. Click Insert then click Section
h. Click on new section and update the name to REPORT
i. Click Insert then click Step/Action
j. Change the action to PeopleCode and enter the PeopleCode below:

MessageBox(0, "", 0, 0, "FILENAME: %1", MXM_APPENG_AET.FILENAME.Value);
MessageBox(0, "", 0, 0, "DEBUG: %1", MXM_APPENG_AET.DEBUG.Value);

k. Click the MAIN section
l. Click Insert then click Step/Action
m. Change the action to Call Section and enter GETPARAM
n. Click Insert then click Step/Action
o. Change the action to Call Section and enter REPORT

Create run control page

A run control page is a user interface that enables you to enter the parameters for a process or report and then submit it for execution. It serves as a central point for controlling and managing the execution of processes and reports within the PeopleSoft system. In the step we will be duplicating an existing run control page in Application Designer:

a. Launch Application Designer.
b. Click File then click Open.
c. Enter Run Control in the Description field and click enter
d. Choose any page and click Open
e. Click File then Save As and enter MXM_APPENG for the App Engine name
f. Remove all the existing fields on the page
g. Drag Filename and Debug from MXM_APPENG_RC
h. Click File then click Save

Page

Create a component

A component is a logical unit of functionality that represents a specific task or process within the system. Components typically consist of a series of pages that are used to perform specific tasks or functions. They can be accessed through the navigation menu or by using a specific URL. Follow the following steps in App Designer to create a component:

a. Launch Application Designer.
b. Click File then click New… choose Component
c. Click Insert then click Insert Page into Component…
d. Enter MXM_APPENG in the name field and click Insert
e. Update the Item Label to App Engine Variables
f. Click on the Component Properties button and click on the Use tab
g. Enter PRCSRUNCNTL in the Search Record field, check off Add, Update/Display Actions
h. Click on the Internet tab and uncheck Display Folder Tabs and Display Hyperlinks then click Ok
i. Click File then Save, Enter MXM_APPENG as the name

Component

Register the component

Registering a component in PeopleSoft helps to make it more accessible and usable for users, and allows you to set up security and search options for it. You will specify the navigation and security by registering the component. Follow the following steps in App Designer to rehister a component:

a. Launch Application Designer.
b. Click Tools then click Register Component…
c. Select all options and click Next
d. Select… and enter MXM_CUSTOM_MENU then click Select
e. Choose USE for the Bar Name field then click Next
f. Select EMPLOYEE for the Portal Name field
g. Select MXM_CUSTOM for the Folder Name
h. Enter App Engine Variables for in the Content Reference Label and Long Description then click Next
i. Select PTPT1200 for the Permission List Name field
k. Click Next then Finish

Create process definition

A process definition is a set of guidelines that outline the steps and requirements for completing a specific process. It associates a process with a particular component, enabling navigation to the process through the component. The process definition is created via PIA.

a. Launch a browser and navigate to PIA
b. Navigate to PeopleTools, Process Scheduler, Process Definitions
c. Click Add a New Value then choose Application Engine for the Process Type and enter MXM_APPENG for the Process Name then click Add
d. Click the Process Definition Options tab and enter MXM_APPENG under Component and TLSALL under Process Groups and Click Save

Run app engine

At this stage all the necessary objects should be created and in place. This step will be performed through a browser.

a. Launch a browser and navigate to PIA
b. Navigate to Custom Components, App Engine Variables
c. Click Add a New Value and Enter MXM_APPENG and click Add
d. Enter a value for the file name and check off Debug process
e. Click Run

Run

If you enjoyed this guide, feel free to share it with others! Tweet

Need some help with this tutorial? Spotted an error? Got some helpful advice for others?
Join the discussion on Twitter

Where to Go From Here?

Head over to Github to get the source code of this guide and install it on your sandbox. Customize it to your needs and enjoy!

If you wish to expand your knowledge on PeopleSoft, consider enrolling in my PeopleSoft Developer Course.