PeopleTools 8.61 has introduced several features and updates for Application Engine, including plugins that improve its functionality, enhance performance and expand integration capabilities.
Application Engine Plug-ins
- AE plug-ins provide the ability to attach plug-ins to Application Engine steps.
- They can be used to modify SQL or PeopleCode actions in the Application Engine.
- For example, when we need to customize a delivered Application Engine, we typically modify the delivered code directly. However, this approach can be challenging during PeopleTools upgrades.
- To address this issue, the AE plug-ins feature was introduced. With this feature, we can write the desired code in a new Application Engine. Once configured, the new Application Engine PeopleCode will be triggered instead of the original delivered code.
- Additionally, rather than completely replacing the delivered code, AE plug-ins allow us to execute custom code either before or after the delivered code.
Application Engine plug-ins configuration
Navigation: PeopleTools > Application Engine > AE Action plug-ins
Fig: 1 Search for Application Engine
- After selecting the delivered Application Engine, choose the section, step, and action that needs customization.
Fig: 2 Select Step and Action
- Select AE plug-ins and choose the section, step, and action where the desired code has been written.
Fig: 3 Select Application Engine Plug-ins
In the Application engine pug-ins three types of mode exist.
- Before: It will execute the new code before executing the application engine code
- After: It will execute the new code after executing the application engine code and before running the next action in the App Engine
- Replace: It will replace the existing application engine code with new code.
Fig: 4 Application Engine Mode
- After the configurations enable the action plug-ins and initiate the delivered Application Engine.
Application Engine Enhancements in People Tools 8.61
- Application Engine Plug-ins
- Meta SQL function
Application Engine Plug-ins:
- In this release developer can be able to create a plug-in for call section action it will direct the system to run SQL or PeopleCode action or call an Application Engine section.
- In application engine plugins new step has been included. The developer can select to run all the steps in the section and the action column will disappear.
Fig: 5 AE Plug-ins Action and Steps
Meta SQL functions in AE Plug-ins:
The meta-SQL is the PeopleSoft-specific feature used for the placeholder or function which is embedded in SQL definition. It is useful for enabling PeopleSoft database platform independence.
This enhancement includes the following meta-SQL functions which can be used in Application Engine Plug-ins.
- %GetNextSeqValue
- %UpdateStats
- %DeleteStats
%GetNextSeqValue:
This meta-SQL function will increase the given database sequence and return its next value developer can create a new sequence or migrate GetNextNumberWithGapsCommit(). It is commonly used to fetch the next value from the SQL objects.
Syntax
%GetNextSeqValue(sequence_name)
Example usage in Application Engine
SQLExec(“SELECT %GetNextSeqValue(PS_ORDER_NUMBER) FROM %SelectDummyTable”, &order_number);
INSERT INTO PS_MY_TABLE (ID, NAME, CREATED_DT) VALUES (%GetNextSeqValue(MY_SEQ), ‘John Doe’, %CurrentDateIn );
%UpdateStats:
This meta-SQL function will be helpful in the Application Engine Plug-ins to update database statistics for the specific table, used for the query optimization by maintaining accurate statistics, it helps the Application engine performance in the most efficient way.
Use this constructor when we try to insert a large amount of data in the temporary tables that will be deleted before the end of the program run. It will save you from having dummy seed data for the temporary tables.
Syntax:
%UpdateStats(record name,[HIGH/LOW])
Example usage in Application Engine
%UpdateStats(PO_WRK1)
INSERT INTO PS_SALES_DATA (SALES_ID, AMOUNT, REGION) SELECT SALES_ID, AMOUNT, REGION FROM PS_SALES_STG;
%UpdateStats(PS_SALES_DATA);
Uses of %UpdateStats:
If we %UpdateStats in the Application Engine Plug-ins it will maintain efficient database performance.
It can be used after performing bulk insert, update, or delete
It will be helpful in tuning the performance of complex queries.
%DeleteStats:
It is used to delete the meta-SQL in Oracle database
used to remove the outdated statistics from the table and immediately rebuild the fresh statistics using %UpdateStats
Using %DeleteStats and %UpdateStats in the Application Engine Plug-ins we can maintain the performance and reliability of the database queries
Syntax:
%DeleteStats(table_name)
Example usage in Application Engine:
%DeleteStats(PS_EMPLOYEE_TMP);
%UpdateStats(PS_EMPLOYEE_TMP);
Use of Meta-SQL function in AE Plug-ins:
It will be helpful to optimize the performance for bulk operations like insert or update, and simplify the SQL maintenance and SQL code can be reused.
Key Features of Application Engine Plug-ins in PeopleTools 8.61:
It allows developers to add specific functionality without modifying the core AE program. This ensures that each AE program remains easy to manage and maintain.
Once a plug-in is developed, it can be reused across different AE programs. This reduces duplication of effort and helps maintain consistency in functionality.
Plug-ins can be used to improve the performance of AE programs by introducing efficient algorithms or by using specialized processes like caching, logging, or batch processing.
Developers can write custom logic as part of the plug-ins to handle specific business rules or unique process requirements.
Plug-ins can help improve error handling and logging mechanisms within AE programs. For example, a plug-in can be designed to capture detailed error information or send notifications upon failure.
Author
Name: Saravana Kumar
Designation: Associate Consultant