This chapter provides an overview of application packages and discusses how to:
Create application packages.
Use the Application Package Editor.
Edit application package classes.
See Also
Use the Application Packages Editor to create application packages. A package contains other packages or application classes. A subpackage is any package within a primary, or parent, package.
The editor window’s title bar displays the name of the application package definition. The main window displays the classes and other application packages that make up the application package definition.
The primary package is represented by a blue database symbol, while subpackages are represented with yellow database symbols. Classes are represented by lightning bolts and scripts, and host-related application object classes (PeopleCode programs).
In the following example, EOEC_CCI is the primary package, and EXCEPTION and PROCESS are subpackages. CardHolder, CareType, CreditCard, and so on, are classes in the EOEC_CCI application package, while CreditCardException and InvalidExpirationDate are classes in the EXCEPTION subpackage, and InterlinkTransaction and TestTransaction are classes in the PROCESS subpackage.
Application Package Editor main window
This section provides an overview of package names and discusses how to create application packages.
You can create a subpackage with the same name as another package or subpackage within the same application package definition, as long as the fully qualified name is unique for each subpackage. Each subpackage is differentiated by the full path name of the class (from the package definition name and the subpackage name).
For example, suppose in the application class PT_FRUIT, where PT_FRUIT is the primary class, you had the following structure of subpackages (no classes are listed in this example):
Example of application package naming conventions
In this example, there are three subpackages named Raw, but the fully qualified name for each is unique. For example, the first one is qualified by the name of the primary package. Its fully qualified name is PT_FRUIT:Raw.
The other Raw subpackages are also qualified by the subpackages that contain them. Their names are PT_FRUIT:Reciepies:Raw and PT_FRUIT:Smoothies.Raw.
Similarly, you cannot create two classes with the same name within a given package or subpackage. You can create classes with the same name within the same application package definition, just like subpackages, as long as the fully qualified name is unique. Each class is differentiated by the full path name of the class.
Note. You cannot create a structure where there are more than two levels of subpackages defined below the primary package.
To create a new application package:
Open PeopleSoft Application Designer.
Select File, New, Application Package.
A new application package appears.
To insert a new package or class:
Open an application package.
Select a package.
Insert the new item.
Select the package, then select Insert, Package, or Insert, Application Class.
When you right-click an open Application Package Editor window, you see the available functions:
Application Package Editor shortcut menu
Cut, Copy, and Paste |
Not available for this release. You can work around this by inserting new subpackage and class nodes where needed and using the clipboard to copy and paste PeopleCode text from class to class. To copy the primary package, select File, Save As. |
Deletes either a class or a package. The PeopleCode text is not actually deleted until you save the application package. Deleted PeopleCode classes can be recovered by reinserting the class node, as long as you haven't saved in the interim. |
|
Inserts an application class. Because classes cannot have children (subclasses), they can be inserted only into an existing package. |
|
Inserts an application package. You can only insert packages into an existing package or subpackage. |
|
Renames either a class or a subpackage. When you save the definition, all PeopleCode programs associated with the renamed class are also updated. To rename the primary package definition, use File, Rename. |
|
View the associated PeopleCode. PeopleCode can be only defined for application classes, and is not directly related to package nodes. |
|
Print the application package definition, including all the PeopleCode in the classes. |
From an application package, you can access the PeopleCode programs associated with the classes of the package.
The Application Packages Editor and the PeopleCode Editor interfaces are similar. You can add, delete, and change text: you can use the find and replace function; you can validate the syntax. When you save application packages, the code is automatically formatted (indented and so on), just as it is in the PeopleCode Editor.
The editor window contains the main edit pane, the drop-down definition list at the upper-left, and the drop-down event list at the upper-right, as shown in the following illustration:
Only one event is defined for an application class, OnExecute. This is not an event in the Component Processor flow. The application class runs when called.
The drop-down list on the upper-left enables you to navigate directly to the PeopleCode associated with every class in the package, as well as every subpackage and its classes.
To edit an application class:
Open the application package.
Select a class.
Either select View, PeopleCode, or right-click and select View PeopleCode.
A PeopleCode Editor window appears.
See Also
Writing and Editing PeopleCode