Viewing Application Engine Programs

This section discusses how to:

  • Use Definition view.

  • Use Program Flow view.

  • Switch between Definition and Program Flow views.

  • Use the Refresh option.

You use Definition view to create definitions within a defined hierarchical structure, in which nodes represent the definitions. A node is the visual representation of a section, step, or action that you can select, collapse, modify, and so on.

The sections that appear in Definition view do not necessarily appear in the order that they execute. To see the actual order in which the sections execute, switch to Program Flow view.

In addition to using a mouse, you can navigate in this view using the following keyboard combinations:

  • Press Ctrl+Home to scroll to the top of the program definition and select the first node.

  • Press Ctrl+End to scroll to the end of the program definition and select the last visible node.

  • Press Tab to move from the currently selected field to the next updateable field.

  • Press Ctrl+Down Arrow to move from the currently selected node to the next node.

  • Press Ctrl+Up Arrow to move from the currently selected node to the previous node.

Image: Example of Application Designer Definition view

This example illustrates the fields and controls on the Example of Application Designer Definition view. You can find definitions for the fields and controls later on this page.

Example of Application Designer Definition view

Definition View Pop-up Menu

The following table describes each item you see when you right-click a Definition view window. Certain menu items are enabled only when a particular definition is selected.

Menu Command

Description

View PeopleCode

Launches the PeopleCode Editor with the appropriate PeopleCode loaded. Enabled when a PeopleCode action is selected.

View SQL

Launches the SQL Editor with the appropriate SQL loaded. Enabled when an action containing SQL is selected.

View XSLT

Launches the SQL Editor with the related Extensible Stylesheet Language Transformations (XSLT) text loaded. Enabled only for Transform Only program types when an XSLT action is selected.

Cut

Removes the selected item and copies it to a clipboard. Here, the word clipboard refers to a PeopleTools-only repository for sharing PeopleTools objects. You cannot copy or paste into another program.

Copy

Copies the selected item.

Paste

Pastes the contents of the PeopleTools clipboard (the most recently cut or copied item) to the current location of the cursor.

Delete

Removes the currently selected node from the program definition.

Refresh View

Refreshes the current view and reorders the definition objects as necessary.

Show Comment

Reveals the comments associated with the selected definition object.

Insert Section

Inserts a new section into the current program at the place where the cursor is positioned. This option is enabled only when you have selected MAIN or another section.

Insert Step/Action

Inserts a new step and action within the currently selected section. This option is enabled only when you have selected a section or a step.

Insert Action

Inserts a new action within the currently selected step. This option is enabled only when you have selected a step or action.

Jump to This Program Flow

Switches to the Program Flow view with the first occurrence of the currently selected definition in focus.

Print

Displays the print dialog box for the definition view.

Insert Section Into Project

Applies to sections. Inserts the currently selected section into the current project.

Program Flow view is a read-only view that shows the expected sequence of steps to execute for the program you are developing.

Image: Example of Application Designer Program Flow view

This example illustrates the fields and controls on the Example of Application Designer Program Flow view.

Example of Application Designer Program Flow view

You can control the amount of detail that appears for each definition by clicking it to expand to the next level. You also can view the SQL or PeopleCode in the lower (splitter) window area by clicking the lower window.

If a primary step node (one that is not the result of a section call) is selected, the Print Options dialog box permits printing to begin either at that step node or the entire program prints. However, if a secondary step node (one that is the result of a section call), a secondary action node, a call section action node, a SQL node, or a PeopleCode node is selected in the Program Flow view, then the Print Options dialog box only permits the entire program to be printed.

To display the pop-up menu for a node, right-click the node. You do not have to select the node first.

You also can display the comments associated with definitions by selecting View, Show All Comments or, for a particular node, right-click and select Show Comment.

You can double-click SQL or PeopleCode statements to launch the editors.

Program Flow Pop-up Menu

The following table describes each pop-up menu item in the Program Flow view:

Menu Command

Description

View PeopleCode

Launches the PeopleCode Editor with the appropriate PeopleCode loaded. Enabled when a PeopleCode action is selected.

View SQL

Launches the SQL Editor with the appropriate SQL loaded. Enabled when an action containing SQL is selected.

Refresh View

Refreshes the current view and reorders the definition objects as necessary.

Show Comment

Reveals the comments for a single definition object that appears in the Program Flow view.

Jump to This Definition

Switches to the Definition view with the first occurrence of the currently selected definition object in focus.

Print

Launches the print dialog box for the program view.

By default, navigation within either view does not affect the currently active row in the other view. This functionality enables you to retain your place in one view while scrolling through the other.

To switch between the two views, use any of the following methods:

  • View tabs

    As with any tabbed interface, if you select a tab, the associated view interface becomes active. When you return to the previous view, it remains positioned on the current or last selected node within the program when you switched. This positioning is true whether you selected the item or just placed the cursor within an edit box.

  • View menu

    Select a section or step in the current view (note that selecting an action does not enable this functionality; you can jump only from parent nodes). Then select View, Jump to Program Flow or View, Jump to Definition, depending on the currently active view. When you select one of these commands, the focus of the target view depends on what you selected in the previous view. For example, if you selected Section C, Step 4 in Definition view and you select View, Jump to Program Flow, then Section C, Step 4 is the focus of the Program Flow window. If the selected item is in a program that is not open already, then Application Engine opens the appropriate program and navigates to the requested node in the view window.

  • Pop-up menu

    The same commands as the View menu are also available from the pop-up menu.

Switching Within Program Flow View

While you are in Program Flow view, you can select these options from the pop-up menu:

  • Go to Next Reference

    Select to switch to the next reference of a particular definition object. This option helps you navigate quickly through a program. For instance, if references to Section C, Step 4 appear three times because of multiple calls to this object at runtime, then you can select Go to Next Reference to navigate quickly and easily to each reference or call.

  • Jump to this Definition

    Select to go directly to the definition node in the Definition view that pertains to the current selection in the Program Flow view.

As you develop an Application Engine program, you may be inserting, renaming, and deleting definitions. In a large program, you can easily lose your place or become disoriented. The Refresh option reorders all the nodes for the current definition according to the following logic:

  • For standard program definitions, the MAIN section always appears first (Library program types do not contain a MAIN section because they contain only callable sections).

    The remaining sections appear alphabetically by name, which makes it easy to locate a section within the program definition. At runtime, the system runs sections through Call Section actions within steps, not by the order in which the sections are defined.

  • Steps are never automatically reordered in the Definition view; at runtime, they run in the sequence in which you defined them.

  • Actions are always logically reordered within a step based on their action type, which defines their runtime sequence.

Note: When you save a modified definition, the system automatically refreshes the view.

Application Engine inserts any delete requests for a given section into the current project, regardless of the Tools, Options setting in Application Designer.

For example, suppose you delete a section node from the current Application Engine program and then you reinsert a section node and rename it the same name as the section you just deleted. The section object is not inserted into the project, regardless of your Tools, Options setting, because a delete action already exists for this object. To resolve this situation, either remove the delete request manually before inserting the new copy request or reset the proper flags manually in the upgrade project that changes the action type from Delete to Copy.