Creating Rules Packages
Follow these steps to create a new rule package:
- 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.
ImportantPackage 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.
- In the Explorer Tree, select New Rules Package under the appropriate node or Solution. You must have appropriate permissions for this option to display.
- In the Details Panel, enter a name property for the new rule package.
ImportantThere 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. - 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.
- 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.
ImportantThe access permissions configured in Configuration Server can also affect which templates are displayed.ImportantGRAT 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.
- 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 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.
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:
- Select the Tenant to which the rule package belongs from the drop-down list.
- In the Explorer Tree, select New Rules Package under the appropriate Solution.
- 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.
- 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.
- 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.
ImportantEven 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. - Click Import.
Getting Started
Importing the CM Template and Sample Rules Package
- Install GRS as described in the GRS Deployment Guide (opens a new document).
- Log into GRAT.
- Navigate to the required solution in the left navigation pane.
- Click the Import Templates button.
- 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.
- 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.
- From the CM Examples Solution folder, browse to the CM Sample Package file —cm_sample.xml. Click Import.
- 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.