Thursday, December 31, 2009

How PeopleCode Programs are Stored and Saved


When you save an Application Designer definition, PeopleTools saves all PeopleCode programs belonging to that definition that have been added or modified. Component record field PeopleCode and component record PeopleCode belong to the component. If new PeopleCode programs have been added, PeopleTools creates an association between the owning definition and new rows in the PeopleCode table. If a PeopleCode program is deleted, the association between the owning definition and the program is also deleted.

Saving PeopleCode programs together with their owning definitions helps to guarantee the integrity of the application. In the event of system failure, it’s now extremely unlikely that your application could end up storing PeopleCode programs that are not associated with any definition; or worse, a definition associated with a PeopleCode program that was never saved.

When you save any Application Designer definition, all PeopleCode programs that you’ve added or changed since the last save will be checked, formatted, and saved at the same time.If you want to format and check the syntax of a single PeopleCode program, use the Validate Syntax command instead of the Save command.

Automatic Backup of PeopleCode:

A PeopleCode program is automatically saved to a file while you’re working on it. This checkpoint occurs at the following times:

·       Every 10 keystrokes.

·       On a save command, just prior to the save being executed (in case the save doesn’t actually

execute because the code is invalid).

·       When another PeopleCode program is selected to be edited (if you have two PeopleCode editor

windows open at the same time, and you move from one to the other).

The file is saved to your temp directory (as specified in your environment), in a file with the following name:

PPCMMDDYY_HHMMSS.txt where MMDDYY represents the month, date and year, respectively, of the checkpoint, and HHMMSS represents the hour, minute and second, respectively.

The top of the checkpoint file contains the following information:

[PeopleCode Checkpoint File]

[RECORD.recordname.FIELD.fieldname.METHOD.eventname]

If your PeopleCode program is saved successfully, any checkpoint files associated with that program are automatically deleted.

0 comments:

Post a Comment

Total Pageviews

Copyright © Tech & Management Notes