Jump to: navigation, search

Creating Rules Packages

Follow these steps to create a new rule package:

  1. Select the node in the business hierarchy to which this rule package will belong from the drop-down list. Rule packages can belong to any node in the hierachy from release 8.5.1. In releases before 8.5.1, you can only select the Tenant to which this rule package will belong.
    Package names must be unique across nodes or tenants.  Package names should follow a naming convention such as including the node/tenant name, or company name, in their package names to avoid conflict.
  2. In the Explorer Tree, select New Rules Package under the appropriate node or Solution. You must have appropriate permissions for this option to display.
  3. In the Details Panel, enter a name property for the new rule package.
    There are two name properties for a rule package: Package Name and Business Name.

    Package Name must conform to Java package naming conventions. Generally speaking, the package name should be in all lower case, can contain digits but must not start with a digit, and "." should be used as a separator, not spaces. For example, my.rules and myrules1 are both valid names, but My Rules and 1my.rules are not valid package names. Each organization should establish its own naming conventions to avoid name collision. Additionally, Java keywords must be avoided in package names. For example, my.package or new.rules are not valid package names. A list of Java keywords can be found here.

    Business Name allows you to provide a user-friendly name for the rule package, as it appears in the GRAT Explorer Tree. For example, Acme Rules is not a valid rule package name, but you could use acme as the Package Name and ACME Rules as the Business Name.
  4. Select which type of rule package you are creating. The drop-down list shows which types are already in the repository for the selected tenant. As you change the type, the list of templates for that type will be displayed.
  5. Enter a description for the rule package. The available rule templates (that were created for the node/Tenant and match the type selected in Step 4) will appear in the table. Templates prefixed with "(*)" are templates that were created in the Environment Tenant and can be used by all Tenants. Rule developers create rule templates and publish them to the rules repository by using the GRDT.
    The access permissions configured in Configuration Server can also affect which templates are displayed.
    GRAT users can select between multiple versions of templates, which are displayed on the enhanced Template Selection dialog along with version comments created by the template developer to help identify differences between the versions.  The number of versions of a template that are displayed is configured in Genesys Administrator.

    Select the template(s) you want to include and click Save.

  6. The new rule package will appear in the Explorer Tree. Expand the new rule package, and the following options (subject to the permissions set for your user ID) will appear under the rule package folder:
    • Business Calendars
    • Test Scenarios
    • Deploy Rules
    • Search
    You will also see the business structure nodes to which you have access permission.
  7. You can now create rules for your rule package.

Importing Rules Packages

You can import an entire rule package containing the rule definitions, business calendars and test scenarios for that rule package, from an .XML file.

If it is necessary to import the rule templates, you should import them prior to importing the rule packages, since the rule packages make references to the templates that they use.

It is not necessary to import the rule templates if you are importing or exporting from the same system (for example, backing up or restoring a rule package) or from an equivalent system (for example, a lab versus a production environment). However, if you are importing the rule package to a new system or sending it to Genesys for service, you should export both the rule templates and the rule packages so that, when imported, all referenced templates are available in the target system.

The last-modified-by date and all rule audit history are not part of the rule package (or rule) export. So, when re-importing an exported rule package, the user doing the importing becomes the new owner of each rule created. Package and rule history are not maintained. The imported rules is considered a new rule package with new history starting from the point of import.

Refer to Importing Rule Templates for details on how to import rule templates.

Importing rule packages enables you to do the following:

  • Copy an entire rules configuration from a test environment to a production environment.
  • Perform a backup of the entire rules configuration before performing a Genesys Rules System upgrade
To import a rule package, you must have Create Package and Create Business Calendar permissions.

To import a rule package:

  1. Select the Tenant to which the rule package belongs from the drop-down list.
  2. In the Explorer Tree, select New Rules Package under the appropriate Solution.
  3. Click Import Rule Package. A dialog box opens in which you to enter the Package Name and the Business Name, and select the .xml file to be imported.
  4. Check  Auto-save each rule to auto-save each rule on import. This option should only be used if the rule package is known to be valid on the target system, such as when copying between two identical systems (a lab versus a production environment). Auto-save commits each rule in the package without validating that it matches the underlying templates.  If you do not use this option, each rule is imported in the draft state and must be saved manually. This method shows any validation errors and gives the rule author the opportunity to fix them before deployment.
  5. If your business hierarchy is non-nested, check Auto-create business hierarchy during import to tell GRAT to automatically create any missing nodes in your business hierarchy for rules that are contained within the .xml file.  For example, if this option is selected, during the import if there is a rule that is associated with the “Widget Sales” department, but no such department is defined in the business hierarchy, GRAT will attempt to create it during the import operation. The GRAT user who is performing the rule package import must have permission to create this folder.  If the box is not checked and there are rules associated with missing nodes, the import will fail.

    If your business hierarchy is nested, and you select the Auto-create business hierarchy during import during the import process, GRAT ensures that both business structures are compatible, and prevents an import if it they are not, and displays an error message informing you that the business hierarchy is not compatible with the imported rule package.

    Even if the Auto-create business hierarchy during import button is selected, GRAT prevents the same node name from being created anywhere in the hierarchy—uniqueness of business node names across the entire hierarchy is still enforced.
  6. Click Import.

Getting Started

Importing the CM Template and Sample Rules Package

  1. Install GRS as described in the GRS Deployment Guide (opens a new document).
  2. Log into GRAT.
  3. Navigate to the required solution in the left navigation pane.
  4. Click the Import Templates button.
  5. Browse to the template file—cm_template.xml—which will be in the Examples folder in the default installation directory unless you specified another location when you installed it. Click Import.
  6. A prompt indicates whether or not the import succeeded. When the import is complete, you will see on the Import Template dialog a new template called CM_Standard_Rules.
  7. From the CM Examples Solution folder, browse to the CM Sample Package file —cm_sample.xml. Click Import.
  8. Give the sample rules package a suitable Package Name and Business Name for your purposes. See also importing a rules package.

The template is now available for selection when you create a rules package, and the sample rules package is available to work with.

You now have available, via the drop-down menus in GRAT, a fully defined set of ready-made Conversation Manager-specific Conditions and Actions. Full detailed listings of these are provided in Conditions and Actions.

This page was last edited on November 2, 2016, at 15:53.
Comments or questions about this documentation? Contact us for support!