Creating and Exporting Rule Packages

Global Payroll offers a streamlined package creation process that enables you to create rule packages, create import/export scripts, and export rule packages using a single component for both standard and version based rule packages. You can run each step in this process—from package creation, to script creation, to package export—as part of a continuous sequence of steps, or run one step at a time. The Global Payroll system ensures that each step is complete before the next step begins, and displays the status of the package so that you can track your progress through the export process.

In addition, Global Payroll enables you to specify a default location on the Installation Settings page for the scripts used in the import/export process so that you do not need to enter the same basic information each time you export a package.

Page Name

Definition Name

Usage

Package Definition Page

GP_PKG_DFN

Name a rule package and enter a description and comments.

Define Criteria By Element Page

GP_PKGCRIT_ELM_SEC

Define selection criteria for a package by element.

Define Criteria By Attribute Page

GP_PKGCRIT_ATR_SEC

Define selection criteria for a package by attribute.

Where Clause Page

GP_PKG_CRIT2_SEC

View and modify the SQL Where clause for the selection criteria defined on the Define Criteria By Attribute page.

Define Criteria By Version Page

GP_PKGCRIT_VER_SEC

Define selection criteria for a package by version.

Package Processing Page

GP_PKG_S_RUNCTL

  • Package elements meeting the selection criteria you have defined.

  • Generate scripts for the export and import process.

  • Export packages.

View Package Page

GP_PKG_VIEW

View the elements in a rule package. View the action (upgrade or delete) that the system takes when you copy the package. You can clear elements in the package.

View Version Detail Page

GP_PKG_VERDTL_SEC

View version details for a package by version.

Package Status Page

GP_PKG_DTTM_SEC

View the date and time packages and scripts were created, and see when packages were exported, imported, compared, and upgraded.

View Scripts Page

GP_PKG_SCRIPTS_SEC

View export, import, and cleanup scripts.

To create and export a rule package:

Note: Rule packages can only include elements defined in records having PIN_NUM as the key.

  1. Define criteria for selecting the elements in a rule package.

    You can define different kinds of selection criteria:

    • Use the Define Criteria By Element page of the Create/Export Rule Package (GP_PKG_CREXP) component to select elements for a package by name.

    • Use the Define Criteria By Attribute page of the Create/Export Rule Package component to select elements by attribute (element type, owner, used by, class, category, country).

      You can modify the SQL code that the system uses to select elements when you define criteria by attribute.

    • Use the Define Criteria By Version page of this component to select elements for a package based on their version number.

    You can specify criteria by element and by attribute for the same package. If you do this, the system selects all elements that meet the criteria specified on the Define Criteria By Element page or the Define Criteria By Attribute page.

    You cannot define criteria by version for a package together with criteria by element and/or by attribute. Version criteria are exclusive of other selection criteria.

  2. Run the create package process to package the elements meeting the selection criteria.

    Do this on the Package Processing page of the Create/Export Rule Package component.

  3. View the package and clear any elements that you do not want to move to the target database.

    Do this on the View Package page of the Create/Export Rule Package component

  4. Run the create scripts process.

    Do this on the Package Processing page.

    Note: The system generates three scripts for the export and import process: xxx_exp.dms (export script), xxx_imp.dms (import script), and gp_cleanup.dms (cleanup script), where xxx represents the name of the rule package.

  5. Review the scripts created in step 4 (above).

    Do this on the View Scripts page of the Create/Export Rule Package component.

  6. Run the export package process.

    Do this on the Package Processing page.

    You must export the package before you can import it into the target database.

Note: This topic represents the create rule package, create import/export scripts, and export rule package steps as separate, discrete processes; however, you can also run these steps as part of a single continuous process.

Warning! If you add or change an element after creating a package, you must recreate the package to include your changes.

Use the Package Definition page (GP_PKG_DFN) to name a rule package and enter a description and comments.

Navigation:

Set Up HCM > Product Related > Global Payroll & Absence Mgmt > Elements > Manage Global Payroll Packages > Create/Export Rule Package

This example illustrates the fields and controls on the Package Definition page.

Package Definition page

Field or Control

Description

Description and Comment

Enter a description of the package and comments.

Version Based and Define Criteria By Version

Select the Version Based check box to define a package using version criteria. By default, this check box is deselected.

When you select this check box, the Define Criteria By Version link appears and the Define Criteria By Element and Define Criteria By Attribute Links disappear.

Click the Define Criteria By Version link to access the Define Criteria By Version page, where you can specify the version of the elements that you want to include in the rule package.

Define Criteria By Element

Click the link to access the Define Criteria By Element page, where you can select elements to include in the package by name.

Note: When you specify the elements to include in the package on the Define Criteria By Element page and click OK, the check box in front of this link is automatically selected.

Define Criteria by Attribute

Click the link to access the Define Criteria By Attribute page, where you can select elements to include in the package based on attributes of the elements.

Note: When you define element attributes on the Define Criteria By Attribute page and click OK, the check box in front of this link is automatically selected

Note: You cannot define version based criteria for a package together with element or attribute criteria, as these package types are mutually exclusive. The system provides the following controls to prevent this from occurring: After you define and save version criteria for a package, you cannot access the Define Criteria By Element or Define Criteria By Attribute pages to add element and attribute criteria. In addition, if you try to combine package types before saving your work—for example, you define a version based rule package and then try to define additional criteria by element or by attribute—all of the version criteria you have already entered will be deleted at save time and you will receive a warning message.

Note: After you import a package, the Define Criteria By Element, Define Criteria By Attribute, and Define Criteria By Version links are disabled and you can no longer modify the selection criteria.

Use the Define Criteria By Element page (GP_PKGCRIT_ELM_SEC) to define selection criteria for a package by element.

Navigation:

Click Define Criteria By Element link on the Package Definition page.

This example illustrates the fields and controls on the Define Criteria By Element.

Define Criteria By Element

Packaging Criteria - Element List

Field or Control

Description

Entry Type

Select the entry type for the element to include in the package. This determines which elements you can select in the Element Name field.

Element Name

In this required field, select the name of the element to include in the package. This element is referred to as the focus element.

Element Owner

Identifies who created the element that you selected in the Element Name field and who's responsible for maintaining it. Valid values are Customer, Modified, PS Mnt (PeopleSoft Maintained), PS NonMnt, and PS Secure.

Include

Select the elements to include in the package.

Valid values are:

Focus Element + Members: The system includes focus elements (the elements in the Element Name field) as well as any member elements used by the focus elements (as depicted on the Uses page).

Focus Element Only (default): The system includes focus elements as well as any auto generated components and accumulators. First level elements are selected as information only elements.

Warning! Select Focus Element Only only if you know that the target database contains all of the member elements. If it doesn't, the system reports an error during the compare process.

Note: The system always includes information for the member elements in the package—even when you select Focus Element Only. Although the member elements aren't copied to the target database, the system uses the information to perform the compare process described later in this topic.

Language

Specify whether to copy base and related language data to the target database.

All fields on GP_PIN that are translatable have associated related language data. Related language data is stored on the related-language table for GP_PIN, GP_PIN_LANG.

Valid values are:

  • All(Base&Related): Add all language information to the package.

  • Base: Select to get only the base language data.

  • Related: Copy all language data related to the element but not the base language for the element itself.

Action

Select the action the system should take with this element when upgrading the target database. Values are:

Upgrade (default): Adds the element to the target database or updates a matching element that's in the target database.

Delete: Deletes the element from the target database. (One database can be used as both the source and target database.)

You cannot delete elements that meet any of the following conditions:

  • Used in a results table.

  • Associated with payee data.

  • Linked to a non-rule table.

  • Used by another element.

  • Delivered by the PeopleSoft system.

Note: You can delete the related language or all language information but not the base language alone.

If you are deleting both a parent and a child element, you must still unhook the child from the parent.

Warning! PeopleSoft strongly recommends that you place deletes in a separate package from all other elements.

Use the Define Criteria By Attribute page (GP_PKGCRIT_ATR_SEC) to define selection criteria for a package by attribute.

Navigation:

Click Define Criteria By Attribute link on the Package Definition page.

This example illustrates the fields and controls on the Define Criteria by Attribute page - Attribute Set1 tab.

Define Criteria by Attribute page - Attribute Set1 tab

This example illustrates the fields and controls on the Define Criteria by Attribute page - Attribute Set2 tab.

Define Criteria by Attribute page - Attribute Set2 tab

Attribute Set1

Select the Attribute Set1 tab.

Field or Control

Description

Include

Specify whether the package includes only focus elements (which meet the selection criteria on the Attribute Set1 tab) or also includes elements that are used by the focus elements.

Values are Focus Element + Members and Focus Element Only.

Focus Element + Members: The system includes focus elements (in the Element Name field) as well as any member elements used by the focus elements (as depicted on the Element Relationship Uses page).

Focus Element Only (default): The system includes focus elements as well as any auto generated components and accumulators. First level elements are selected as information only elements. Information only elements are used by the focus element and its immediate children (if this information has not been previously selected).

Warning! Select Focus Element Only only if you know that the target database contains all the member elements. If it doesn't, the system reports an error during the compare process.

Note: The system always includes information for the member elements in the package—even when you select Focus Element Only. Although the member elements aren't copied to the target database, the system uses the information to perform the compare process described later in this topic.

Language

Specify whether to copy base and related language data for GP_PIN fields to the target database.

All fields on GP_PIN that are translatable have related language data. This data is stored in the related-language table for GP_PIN, GP_PIN_LANG.

Valid values are:

  • All: Add all language information to the package.

  • Base: Select to get only the base language data.

  • Related: Copy all language data related to the element but not for the base element itself.

Action

Select the action the system should take with this element when upgrading the target database. Values are:

Upgrade (default): Adds the element to the target database or updates a matching element that's in the target database.

Delete: Deletes the element information from the target

You cannot delete elements that meet any of the following conditions:

  • Used in a results table.

  • Associated with payee data.

  • Linked to a non-rule table.

  • Used by another element.

  • Delivered by the PeopleSoft system.

Note: You can delete the related language or all language information but not the base language alone.

If you are deleting both a parent and a child element, you must still unhook the child from the parent.

Warning! PeopleSoft strongly recommends that you place deletes in a separate package from all other elements.

Element Type

Select the element type.

Element Owner

Select the element owner. Valid values are: Customer, Modified, PS Mnt, PS Non-Mnt, and PS Secure.

Attribute Set2

Select the Attribute Set2 tab.

Field or Control

Description

Used By

Select where elements are used. Valid values are All Countries (default) and Specific Country. If you select Specific Country, you must select the country in the Country field.

Country

Select the country's three-digit country code if you selected Specific Country in the Used By field.

Category

To select only elements assigned to a particular category, select the category. (You assign a category to an element on the Element Name page.)

Element Class

Select the element class to package. (You assign an element class to an element on the Element Name page.)

Valid values are: Customary, Not Classified, Sample Data, Statutory, and System Data.

Where Clause Option

The system converts the criteria entered on the Define Criteria by Attribute page into SQL in order to select elements for the package.

Values are:

Use Default WHERE Clause: Tells the system to use the default Where clause. If the where clause has been changed and Use Default WHERE Clause is selected again, the page discards any SQL code modifications you have made and reverts to the Where clause based on the criteria you specified.

Change WHERE Clause: Makes all other fields on the page unavailable and puts the SQL code on the Where Clause page in edit mode.

Show Where Clause

Displays the Where Clause page, where you can view and alter the SQL code containing your selection criteria.

Use the Where Clause page (GP_PKG_CRIT2_SEC) to view and modify the SQL Where clause for the selection criteria defined on the Define Criteria By Attribute page.

Navigation:

Click the Show Where Clause link on the Define Criteria By Attribute page.

This example illustrates the fields and controls on the Where Clause.

Where Clause

Field or Control

Description

Where Clause Option

Select Use Default WHERE Clause to use the default clause or revert to it after editing the SQL code. Any edits you make to the Where clause will be lost when you select Use Default WHERE Clause.

Select Change WHERE Clause to make the code on the lower part of the page available for editing.

Where Clause

If you select Use Default WHERE Clause as the Where Clause Option, the system displays the Where clause of the SQL statement that it created based on the selection criteria defined on the Define Criteria by Attribute page. The Where clause is not editable.

If you select Change Where Clause, you can edit the SQL Where clause. The following rules apply:

  • Do not use PIN_NUM as a selection criterion or any field where PIN_NUM can be stored.

    (Doing so prevents renumbering during the import process.)

  • Add the prefix PS_GP_PIN to field names that you enter.

    Example: PS_GP_PIN.RECALC_IND.

Note: When you Click OK and save, the system checks for the use of PIN_NUM, and looks for SQL syntax errors.

Use the Define Criteria By Version page (GP_PKGCRIT_VER_SEC) to define selection criteria for a package by version.

Navigation:

Select the Version Based check box on the Package Definition page and click the Define Criteria By Version link.

This example illustrates the fields and controls on the Define Criteria By Version page.

Define Criteria By Version page

Field or Control

Description

Used By

Select All Countries or Specific Country depending on whether you are defining version criteria for all countries or a single country.

Specific Country

If you select Specific Country in the Used By field, specify the country.

Version

Select the version of elements to include in the package. You can select multiple versions if they are for the same country.

Use the Package Processing page (GP_PKG_S_RUNCTL) to .

  • Package elements meeting the selection criteria you have defined.

  • Generate scripts for the export and import process.

  • Export packages.

Navigation:

Set Up HCM > Product Related > Global Payroll & Absence Mgmt > Elements > Manage Global Payroll Packages > Create/Export Rule Package > Package Processing

This example illustrates the fields and controls on the Package Processing.

Package Processing page

After defining selection criteria for a package, use the Package Processing page to:

  • Create packages based on the selection criteria you have defined.

  • Create scripts to use in the export and import process.

  • Export packages to the target database.

  • Track the status of a package.

During the export process, the system automatically adds 50, 000, 000 to the value of the PIN number assigned to each element so that it can distinguish the imported elements from elements that exist in the target database.

Processing Options

The check boxes under Processing Options display the status of the creation and export process. Status values are:

  • Created: If this check box is selected, the package has been created.

  • Scripts Created: If this check box is selected, scripts have been created for the package.

  • Exported: If this check box is selected, the package has been exported to the target database.

Field or Control

Description

Package Status

Click to access the Package Status page, where you can view the date and time packages and scripts were created, and see when packages were exported, imported, compared, and upgraded.

Create Processing

Field or Control

Description

Create Package

Select Create Package to have the program create the package based on the criteria, attributes, or version you have defined.

Export Processing

Field or Control

Description

Create Scripts

Select Create Scripts to have the system to generate three scripts for the export and import process: xxx_exp.dms (export script), xxx_imp.dms (import script), and gp_cleanup.dms (cleanup script), where xxx represents the name of the rule package.

This check box becomes available under the following conditions:

  • You select the Create Package check box.

  • The package has already been created.

Note: You must specify a path to the script location to generate a script.

Note: You can select Create Package and Create Scripts at the same time, and the system will generate the package and then create the export and import scripts. However, you cannot select Create Scripts before you generate the package.

Script Location

Specify the path to the location where you want the scripts to be created.

This field becomes available when you:

  • Select the Create Scripts check box.

  • Select the Export Package check box.

  • Have created the scripts for a package.

The location of the scripts and data files must be accessible by both the import and export NT Process Scheduler for the import and export databases. You must specify the script location in the Process Scheduler configuration file (psprcs.cfg).

Note: We discuss how to specify the script location in the Process Scheduler configuration file in the topic titled The Process of Connecting UNIX and NT Directories.

See The Process of Connecting UNIX and NT Directories.

Note: You can define a default script location on the Installation Settings page for all packager scripts.

See Installation Settings Page.

View Scripts

Click to access the View Scripts page, where you can review export and import scripts.

Export Package

Select Export Package to have the system export the package during processing.

This field becomes available when you:

  • Select the Create Package and Create Scripts check boxes.

  • Have created a package and then select the Create Scripts check box.

  • Have created the package and the scripts.

After exporting the package from the source database, you can import it into the target database using the Apply Rule Package (GP_PKG_APPLY) component.

Note: During the export process, the system automatically adds 50 000 000 to the value of the PIN number assigned to each element so that it can distinguish the imported elements from elements that exist in the target database.

Process

Click the Process button to call and run the processes denoted by the check boxes you have selected: Create Package, Create Scripts, and Export Package. Note that you can select all three check boxes at the same time and run these processes as a single, continuous sequence, or run one process at a time. However, the processes must run in the order of create package first, then create scripts, then export package.

Note: When you click the Process button the Process Monitor page appears, so that you can monitor the process. Wait until the program finishes before opening a page associated with the package.

Use the View Package page (GP_PKG_VIEW) to view the elements in a rule package.

View the action (upgrade or delete) that the system takes when you copy the package. You can clear elements in the package.

Navigation:

Set Up HCM > Product Related > Global Payroll & Absence Mgmt > Elements > Manage Global Payroll Packages > Create/Export Rule Package > View Package

This example illustrates the fields and controls on the View Package page.

View Package page

After creating a package, you can view the elements in the package and individually select any elements that you do not want to export to the target database.

Field or Control

Description

Action

Displays the action applicable to the element in your package.

Values are: Upgrade, Delete, and Info Only.

When deleting items, the source database and target database can be the same.

Upgrade

This check box is selected by default to include the element in the package for export. deselect it to exclude the element from the export.

View Version Detail

If the elements displayed on the View Package page are packaged by version, the View Version Detail link appears. Click this link to access the View Version Detail page, where you can view each element's version number and the database records (tables) containing the element definitions.

Use the View Version Detail page (GP_PKG_VERDTL_SEC) to view version details for a package by version.

Navigation:

Click the View Version Detail link on the View Package page for a package by version.

This example illustrates the fields and controls on the View Version Detail page.

View Version Detail page

For elements packaged by version, access the View Version Detail page to view each element's version number and the database records (tables) containing the element definitions.

Use the Package Status page (GP_PKG_DTTM_SEC) to view the date and time packages and scripts were created, and see when packages were exported, imported, compared, and upgraded.

Navigation:

Click the Package Status link on the Package Processing page.

This example illustrates the fields and controls on the Package Status page.

Package Status page

View the date and time packages and scripts were created, and see when packages were exported, imported, compared, and upgraded.

Use the View Scripts page (GP_PKG_SCRIPTS_SEC) to view export, import, and cleanup scripts.

Navigation:

Click the View Scripts link on the Package Processing page.

This example illustrates the fields and controls on the View Scripts page.

View Scripts page

Field or Control

Description

Script Location

Displays the script location, which must be accessible by both the import and export NT Process Scheduler for the import and export databases. You must specify the script location in the Process Scheduler configuration file (psprcs.cfg).

Note: We discuss how to specify the script location in the Process Scheduler configuration file in the topic titled The Process of Connecting UNIX and NT Directories.

See The Process of Connecting UNIX and NT Directories.

Note: You can define a default script location on the Installation Settings page for all packager scripts.

See Installation Settings Page.

View Package Script

Select the type of script that you want to view: export, import, or cleanup. The DataMover script appears.