Accessing State Records with PeopleCode
Running PeopleCode from Application Engine steps enables you to complete some simple operations without having to use SQL. For example, to assign a literal value to an Application Engine state record field using SQL, you may have issued a statement similar to this one:
%SELECT(MY_AET.MY_COLUMN)
SELECT 'BUSINESS_UNIT' FROM PS_INSTALLATIONYou can use a PeopleCode assignment instead:
MY_AET.MY_COLUMN = "BUSINESS_UNIT";Similarly, you can use a PeopleCode If statement instead of a Do When action to check the value of a state record field.
When accessing state records with PeopleCode, keep in mind that:
-
State records are unique to Application Engine programs.
-
Within Application Engine PeopleCode, state record values can be accessed and modified using the standard
recordname.fieldnamenotation.
Note:
When you launch an Application Engine program from PeopleSoft Process Scheduler, you can generate a process warning status after the program completes by including and modifying the AE_APPSTATUS field in a state record. You can generate the warning status by setting AE_APPSTATUS to a value of 1.