Show TOC

Procedure documentationCreating the Enumeration Type Locate this document in the navigation structure

 

The credit card type have only three values: Standard, Gold, Platinum. You create an enumeration type called CardType and capture the corresponding values. This way you do not have to enter the card type in your rules.

Procedure

  1. In the Project Explorer view, expand the creditcard_rules node, the Rules Modeling node and double-click the Project Resources node.

  2. In the Project Resources editor, choose the Enumeration Types tab.

  3. In the Enumeration Type editor that appears, choose the Add button.

  4. In the dialog box that appears, enter CardType in the Name: field.

  5. Locate Java Type and choose java.lang.string in the drop down menu.

  6. In the space provided, enter the following values:

    • Gold = Gold

    • Standard = Standard

    • Platinum = Platinum

  7. Choose OK.

  8. Save the changes.