Customizing TreeMover for Additional Node and Level Data Records

This topic discusses how to customize TreeMover for additional node and level data records.

The TreeMover program only moves data in the standard PeopleSoft tree tables. PeopleSoft trees generally have application node data stored in the PS_TREE_NODE_TBL table and application level data stored in the PS_TREE_LEVEL_TBL table.

However, the tables used to hold the application data for the detail values, such as leaves, are always application-specific; there are no default tables for storing that application data. For example, you might have trees that reference employees as leaf values, and the employee information is stored in the PERSONAL_DATA_TBL table. TreeMover does not handle moving data from application tables. Generally, when you move trees between different PeopleSoft databases, you should move the application data using other means, such as with DataMover. However, you can also customize the TreeMover program to copy other application data. As with any PeopleSoft application, you should avoid performing any customizations whenever possible.

Note: Creating TreeMover customization for moving non-standard node and detail user data is a complicated process. Oracle recommends using PeopleSoft Data Mover or other database tool when you move user data from a source database to a target database.

Before customizing TreeMover, you should consider the tables for which you intend to add support. Application tables that hold data used by other parts of the PeopleSoft system should be moved by other means, such as DataMover.

Modifying the TreeMover Application Engine Program

The TreeMover process is a PeopleSoft Application Engine process called TREEMOVER. To add support for additional node and level tables, you must perform two basic steps: create the file layout to be used for the new data and modify the TREEMOVER_AET PeopleCode according to the following steps.

Note: You should not need to make any modifications to the actual Application Engine code.

To modify the TreeMover Application Engine program:

  1. Create file layouts for your desired tree node data record or tree level data record using Application Designer file layout functionality.

    Use one of the existing TreeMover file layouts as an example (TREE_DEFN, TREE_NODE, and so on). Each file layout you add for TreeMover must have a unique file record ID, which is specified as part of the file layout record properties; the existing TreeMover file layouts use numbers 1 through 6.

    Each file layout you add must also have the UPDATE_ACTION field.

  2. In the TREEMOVER_AET record, modify the PROCESS_INSTANCE FieldFormula PeopleCode as follows:

    • In the isValidUserNodeRec function, add your desired PeopleSoft records for node data to the condition check.

    • In the isValidUserLevelRec function, add your desired PeopleSoft records for level data to the condition check.

    • In the setUserNodeRecLayout function, add code to set the correct file layout based on the node data record.

    • In the setUserLevelRecLayout function, add code to set the correct file layout based on the level data record.

    • In the getUserNodeData function, add code to get data from your new node records.

    • In the getUserLevelData function, add code to get data from your new level records.

Note: In the previous steps, do not modify the original code in the functions. You should add new code only within new “if” conditions. If you change any of the existing code, trees based on the PS_TREE_LEVEL_TBL and PS_TREE_NODE_TBL will no longer be handled with TreeMover.

Modifying the TreeMover SQR Program

If you have modified the TREEMOVER Application Engine program, then you also need to make similar changes to the TMDOWNLD.SQR, assuming you’re using that SQR to download trees from a PeopleSoft 7.x database.

To modify the TMDOWNLD SQR program:

  1. Change the Download-TreeUserLevel procedure to handle the new tree level data tables.

    Be sure to add conditional logic so that the existing logic is still executed when the tree structure uses PS_TREE_LEVEL_TBL. The tree level record name is stored in the variable &TS.LEVEL_RECNAME.

  2. Change the Download-TreeUserNode procedure to handle the new tree node data tables.

    Be sure to add conditional logic so that the existing logic is still executed when the tree structure uses PS_TREE_NODE_TBL. The tree node record name is stored in the variable &TS.NODE_RECNAME.