LinkedIn
Copied!

Table of Contents

Creating decision tables

Version:

Only available versions of this content are shown in the dropdown

To better adjust to the varied factors in your business processes, you can create a decision table. Decision tables test a series of property values to match conditions, so that your application performs a specific action under conditions that you define.

For example, you can define a condition in your application to approve a loan request, if the credit score of the applicant is greater than 500 and lower than 700. You can then add a condition that if the applicant's credit score is greater than 700, a customer service representative prepares a special offer for the applicant.
  1. In the header of Dev Studio, click Create Decision Decision Table .

  2. In the Label field, enter a name that describes the purpose of the table.

  3. In the Apply to field, select the class in which you want to create the decision table.

  4. Click Create and open.

  5. In the Conditions column, click the header cell.

  6. In the Select a property window, in the Property field, enter or select a property that you want to use as a condition.

  7. In the Label field, enter the name of the property.

  8. Select a comparison method:

    • To use a simple comparison, in the Use operator list, select the operator.
    • To specify a range for the condition property, select the Use range check box, and then define start range and end range.
    You can configure a property value to be greater than and lower than certain amounts.
  9. Click Save.

  10. Optional:

    To consider additional factors in a decision, add more condition properties:

    1. In the Conditions column, click a cell.

    2. In the toolbar, click the Insert column after icon.

    3. Define the condition property by repeating steps 5 through 9.

  11. In the if row, click the cell under a property, and then enter a value.

    If you configure two or more conditions, enter a value for at least one of the conditions. Your application ignores conditions without values.
  12. In the Return column, enter a return result.

    You can configure a condition that if a credit score is greater than 500 and lower than 700, the return result is to approve the case.
  13. To allow for more outcomes, create additional decisions:

    1. Click a cell in the if row.

    2. In the toolbar, click the Insert row after icon.

    3. Define the condition by repeating steps 5 through 12.

  14. In the otherwise row, in the Return column, select or enter a property that defines an application behavior when no condition in the table returns a true value.

    Configure your application to reject a case.
  15. Optional:

    To ensure that your application can process the table, check the table for conflicts by clicking Show conflicts on the toolbar.

    If two rows are identical, the second row never evaluates to true and is unreachable.
    A warning icon appears in rows that are unreachable or empty.
  16. Optional:

    To increase the possibility of reaching a return value, improve the completeness of the table by clicking Show completeness on the toolbar.

    The system automatically adds suggested rows to the decision table, that cover additional cases.
  17. Click Save.

At run time, your application processes all rows in the table and performs all the results from the columns that evaluate to true.

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.