Configuring Application Engine Action Plug-ins

PeopleTools allows you to configure an Application Engine action plug-in to alter the SQL or PeopleCode actions of any Application Engine.

The configured plug-in action is executed at runtime. This effectively allows you to modify the code without actually customizing or re-designing the Application Engine program.

Configure the selected SQL or PeopleCode action of the Application Engine program by adding new SQL, PeopleCode, or both and/or by replacing the existing SQL or PeopleCode action through PIA in the AE Action Plugin page (PeopleTools, Application Engine).

Note: You can add or replace only SQL and PeopleCode actions in the Application Engine program. Only sections with steps having SQL or PeopleCode actions of the Application Engine program, which you plan to configure, will be displayed in PIA. This feature is not designed to add new sections or steps to an existing Application Engine program.

Actions belonging to the same step of the same section of the Application Engine program can have multiple plug-in actions defined. The plug-in action type does not have to match the action type that is selected for configuration. You can re-use the same SQL or PeopleCode plug-in action multiple times for different Application Engine programs.

The Application Engine action that is being configured cannot be used as a plug-in to configure another Application Engine program. Also, you cannot define a plug-in for the Application Engine action that is already been used as a plug-in.

For example, if Application Engine program A action Y is configured to use Application Engine program B action X as a plug-in, then Application Engine program A action Y cannot be used as a plug-in for any other Application Engine program. Also, you cannot configure a plug-in for Application Engine program B action X.

Ensure that information such as state records, temporary tables, PeopleCode variables that are required by the plugged-in action is made available from the configured Application Engine program.

To add new Application Engine plug-in actions:

  1. In Application Designer, identify an existing or create a new Application Engine program with the SQL or PeopleCode actions that you want to use to configure the SQL or PeopleCode actions of any Application Engine program.

    To create an Application Engine program, see Creating, Opening, and Renaming Programs

  2. In the PIA, open AE Action Plugin page by selecting PeopleTools > Application Engine > AE Action Plugins.

  3. Choose the Application Engine program that you want to configure by plugging-in the desired SQL or PeopleCode actions from the newly created Application Engine program.

    See the subsequent Configuration Options section for details.

  4. Verify the configured Application Engine program in Application Designer to know the impact of the plug-ins.

    You can identify the configured SQL or PeopleCode action by a red flash on its icon.

    This image shows the configured SQL action with a red flash. On the code pane, the additional code is highlighted in blue, code being replaced is in strikeout, and the replacement code in red. The codes are displayed based on the order of execution defined in the PIA.

    Configured AE action

Note: You can use the %AECallerApplId system variable to identify the name of the Application Engine program that executed a plug-in action or a call section to the currently executing program.

For more details, see %AECallerApplId

On-Exit Application Engine Plug-in

PeopleTools allows you to configure an On-Exit Application Engine plug-in at the end of an Application Engine program. This enables the Application Engine program to run and exit based on the conditions defined for the On-Exit Application Engine plug-in.

On the PIA, you can specify which section, step, SQL or PeopleCode action should run on-exit from an Application Engine program.

Note: On-Exit plug-ins can be configured for any existing Application Engine programs.

You can verify the configured On-Exit Application Engine plug-in in the Application Designer.

This example shows an On-Exit Application Engine plug-in configured in the Application Designer.

On-Exit Plug-in Program

Configuration Options

Use the AE Action Plugin page to configure Application Engine action plug-in and On-Exit Application Engine plug-in.

This example illustrates the fields and controls on the AE Action Plugin page. You can find definitions for the fields and controls later on this page.

AE Action Plugin page

Use these configuration options to configure a delivered Application Engine program:

Field or Control

Description

Enabled

Select this check box to enable the configuration.

Section

Select a section of the delivered Application Engine program, which you plan to configure. Only sections with steps having SQL or PeopleCode are listed.

Step

Select a step of the chosen section. Only steps that have SQL or PeopleCode actions are listed.

Action

Select an action from the chosen step.

Plugin Name

Select the new Application Engine program that contains the new SQL or PeopleCode action, which will be used to configure the delivered Application Engine program.

Section

Select the required section from the new Application Engine program.

Step

Select the required step from the selected section.

Action

Select the SQL or PeopleCode action from the selected step to add before or after the existing action, or to replace the existing action.

Mode

The three modes that decide the execution order of the configured Application Engine action:

  • Before - Execute the new Application Engine action before the existing action.

  • After - Execute the new Application Engine action after the existing action.

  • Replace - Execute the new Application Engine action instead of the existing action.

Order within Mode

This field is required if the same action belonging to the same step of the same section of the configured Application Engine program has multiple plug-ins using the same mode. The value entered in this field decides the sequence in which the actions within the mode run during execution.

Description

(Optional) Descriptive notes.

Use these configuration options to configure On-Exit Application Engine plug-in:

Field or Control

Description

Enabled

Select this check box to enable the On-Exit plug-in configuration.

Plugin Name

Select the On-Exit Application Engine plug-in.

Section

Select a section of the On-Exit Application Engine plug-in that you plan to run.

Step

Select a step of the selected section.

Action Type

Select an action of the selected step.

<Exit Conditions>

These are the exit conditions:

  • On Success

  • On Skip Step

  • On Break

  • On Abort

  • On Skip

The On-Exit Application Engine plug-in runs based on the exit condition defined in the Application Engine program.

For example, for an Application Engine program, if you set the On-Exit plug-in to run for the On-Break exit condition, the On-Exit plug-in runs when the last action executed before the Application Engine program exited was a SQL or PeopleCode action that issued a Break condition.

See documentation for SQL and PeopleCode actions.

See Using PeopleCode in Application Engine Programs

Note: At least one of the exit conditions must be selected. Otherwise, an error is displayed while saving.

Note: In the PIA, the Actions Plugin grid gets disabled if the selected Application Engine program does not have SQL or PeopleCode actions, and a message is displayed stating that only On-Exit plug-ins can be configured.

Performance

Sometimes plug-in changes may not be immediately recognized. It might take at most ten minutes for the changes to be recognized.

The processes where it takes time for the plug-in changes to come in effect are:

  • When an active application server is running CallAppEngine() PeopleCode.

  • When viewing an Application Engine Program Flow view in an active Application Designer session.

  • When an Application Engine program begins processing before the plug-in change is initiated.

Note that there cases where plug-in changes are immediately recognized, and those are:

  • While stopping and restarting any one process from the above set of processes.

  • When an Application Engine program is run through the Process Scheduler.