Defining a Valid Values List

Often, a given piece of data may have a set of valid values much smaller than that allowed by the data type. For these cases, you can define a set of values that the user can select from.

For example, suppose you want a user to specify a state code for the US. There is a total of 676 two-letter combinations, but there are only 50 two-letter state codes. To assure data integrity, it is better if the user is allowed to chose one of only 50 states instead of entering any possible two-letter code.

When you configure a BPM object attribute with a set of valid values, the attribute is presented to the user as a list. The user must select one of the choices provided.

There are three possible Valid Values settings for a BPM object attribute:
Valid Values Setting Description Presented to User As
All Any value within the bounds of the data type is accepted. This is the default setting. Text field
Static List One of a list of values is accepted. The list is set at design time. Drop-down list
Dynamic Method One of a list of values is accepted. The list is dynamically built by a method in run-time. Drop-down list

The dynamic method is more flexible because you can pull the information from a database. However, this tutorial uses a static list because it is easy to configure without writing any code.

To add a static list of valid values to an attribute:

  1. In the Project Navigator, expand the ExpenseReport BPM Object (BPM Object icon 
				).
  2. Double-click on the costCenter attribute. The editor for the costCenter attribute opens.
  3. In the Valid Values section, select Static List, and check the Edit Value Descriptions option. A Value / Description table appears.
  4. To add each entry to the table, click Add (Add icon
				). Then enter a numeric value in the Value column, and a text string in the Description column. Add the values shown in the table below:
    Value Description
    100 Sales
    200 Marketing
    500 Support
  5. Set the Default Value field to 100.
  6. Save your changes and close the editor for this attribute.
With this step, the data model for the BPM object is complete. In the following task you define a process variable to hold the BPM object as the instance travels through the process.