Introduction
This process begins with an existing decision table with one in variable. The original decision table calculates a discount based only on the number of units the customer is buying. This decision table calculates a discount based both on the type of customer and the number of units.
When you have completed the decision table, you should test it to ensure it behaves as you expect.
Prerequisites
The entity must exist.
|
Quick Steps |
| 1 |
Open the decision table, then add a parameter |
| 2 |
Enter the parameter details, then click OK |
| 3 |
Add a condition, then enter the new column header description and expression |
| 4 |
Create a new row condition, then define the description and expression for each row condition |
| 5 |
Define the description and expression for the other conditions and results |
| 6 |
Save and compile the decision table, then open the scenario |
| 7 |
Enter the scenario values, then run the test |
| 8 |
View the diagram |
| 9 |
Create more test steps |
| 10 |
Run the steps individually and check results |
| 11 |
Save the scenario |
Detailed Steps
Step 1. Open the decision table, then add a parameter.
Open the decision table and add another variable (or parameter).
Step 2. Enter the parameter details, then click OK.
This variable is going to be called "istrCustomerType". The Direction is In and the Data Type is string.
Step 3. Add a condition, then enter the new column header description and expression.
Currently, this decision table only uses the product quantity to determine the offered discount. This example adds another factor to affect the discount: whether the customer type is Regular or Premium.
The new column will use the istrCustomerType variable.
Step 4. Create a new row condition, then define the description and expression for each row condition.
You need a row for each condition, or customer type.
The types are Regular and Premium. Their expressions should be short strings you can easily associate with their descriptions.
Step 5. Define the description and expression for the other conditions and results.
For this decision table, Premium customers will have the already defined discount. Regular customers will have a different discount. This decision table uses the same number of conditions for each customer type, but you can also have fewer conditions: this decision table only has to cover all possible product quantities, not have the same number of possible discounts.
Step 6. Save and compile the decision table, then open the scenario.
You should test the rule after updating it.
Step 7. Enter the scenario values, then run the test.
This scenario should now display two fields for Input Values. If necessary, refresh the scenario to display the istrCustomerType input.
Enter the iintQuantityOfProduct and istrCustomerType values, plus the Expected Value given these two values.
When you have entered the values, click the Run Test icon, then click Current Rule.
Xelence provides the following options for running the test:
Only Result : Displays only the result.
Current Rule: Displays the result and diagram for this rule.
Step 8. View the diagram.
Click the View Test Result icon to display the flow of execution from condition to action.
In this example, the diagram path starts with the Customer Type of PREM, then proceeds to the Quantity of Product (Between 51 and 100).
Step 9. Create more test steps.
To create another step, click the Test Cases header on the left and click the plus icon.
Create multiple steps for both Regular and Premium customers.
Step 10. Run the steps individually and check results.

Step 11. Save the scenario.
When you are finished testing the steps, save the scenario.
What are the improvements over S3 Version 6?
This is an identical process.
Related Articles
Create a Decision Table with One In Variable
Test the Decision Table
Add a New-Date Specific Version to the Decision Table and Test the New Version
This post is part of the Rules topic. Click here to open the Rules Overview.
#Xelence
#Rules