An incorrect Rule configuration in an application can cause delays in Case processing. To avoid configuration errors such as incorrectly routed Assignments, unit test individual Rules as you develop them. To expedite future Rules testing, you can create reusable test Cases from the unit test.
The appearance of the Run Rule window varies across Rule Types, so how you run a Rule varies by its type. In general, however, the Rules run by using data from a test page that you define for the test.
Tasks involved in defining the test page include the following:
- Selecting a method for creating the test page – You can copy values from a thread of an existing Clipboard Page to the test page, create a new test page, or reset the values of an existing test page. For more information about Clipboard Pages, see Clipboard tool.
- Applying Data Transforms – For a reusable and expedited method of making decisions and calculating values, you can apply Data Transforms to set values for the test page. For example, to unit test a decision table, you can create a Data Transform to provide values for the properties evaluated by the table, rather than manually entering values when you run the Rule. For more information about Data Transforms, see Data Transforms.
- Manually entering test data – In some Cases, you can manually enter values to use. If you enter values for a test, the values that you enter override values on the test page.
- Specifying how service Rules run – For services, you also specify whether the service Rule is to run in your session or is to run as a newly created service requestor. If the service is configured to run as an authenticated user, you are prompted for a user name and password.
When you run the Rule, the system uses Rule resolution. If you unit test a Rule, and there is a higher version of the Rule, the system runs the higher version.
After you run the test, you can also convert the test to a reusable test Case that you can run at any time. For more information about using unit test Cases, see Understanding unit test Cases.