Defining BPM Object Attributes

Once you have the BPM object, you need to specify the type of data that will be stored in it. You do this by defining the attributes of the object. Each attribute holds one particular piece of information.

You begin with data fields that are used only once per expense report (once per instance), such as the name of the employee.

Note that the expense report form is numbered, but there is no "report number" in the table in Defining the Expense Report. We leave the implementation of this number to you, so you can test your skills once you have completed the tutorial.

We will skip the Total attribute for now because it contains a calculated value. You will add it in a later task.

To define the attributes:

  1. In the Project Navigator, right-click on the ExpenseReport BPM Object (BPM Object icon 
				), and click New > Attribute (Attribute icon 
				). The Attribute dialog box appears.
  2. Enter submittedBy in the Name field.
  3. Select String from the Type drop-down list, and click OK. The attribute editor for the submittedBy attribute opens.
  4. In the Storage Constraints section of the editor, check Not Null. This tells ALBPM that the field is mandatory.
  5. Save (Save icon 
				) the changes and close the editor window by clicking on the X in the bottom tab. If you close from the top tab, you will close the BPM Object.
  6. You will now define the Submit Date attribute. Again, in the Project Navigator right-click on the ExpenseReport BPM Object (BPM Object icon 
				), and click New > Attribute (Attribute icon 
				). The Attribute dialog box appears.
  7. Enter submitDate in the Name field.
  8. Select Time from the Type drop-down list, and click OK. The attribute editor for the submitDate attribute opens.
  9. Select Date Only from the Time Precision drop-down list.
  10. As before, check Not Null in the Storage Constraints section.
  11. Save (Save icon 
				) the changes and close the editor window by clicking on the X in the bottom tab.
  12. By now you should be able to add attributes on your own. Add the remaining attributes according to the following table:
    Name Type Additional Properties
    description String Storage Constraints = Not Null
    Maximum Length = 100
    costCenter Int none
    reviewedBy String Storage Constraints = Not Null
    comments String Storage Constraints = Not Null
    Maximum Length = 400
    isApproved Bool Default Value = False

You have now defined seven attributes in the ExpenseReport BPM object. In the Project Navigator, you should see the following:

Figure 1. ExpenseReport BPM Object Attributes

In the next task, you will add a group to this object. Groups are used to store arrays or collections of attribute sets.