Skip to main content

Creating decision tables

Pega Community logo

Note: The following content, referenced from Pega Community, is included here to help you better achieve the module learning objectives.

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.
    For example: 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.

    For example: 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.

    For example: 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.

    For example: If two rows are identical, the second row never evaluates to true and is unreachable.
    Note: 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.

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

Note: At run time, your application processes all rows in the table and performs all the results from the columns that evaluate to true.
If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice