Defining BPM Object Attributes

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

We 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 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. In the Name field, enter submittedBy .
  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, select Not Null. This tells Oracle BPM 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 close the BPM Object rather than just this attribute.
  6. You 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. The attribute editor for the submitDate attribute opens.
  8. From the Type drop-down list, select Time. The Time Precision list appears
  9. From the Time Precision list, select Date Only.
  10. As before, in the Storage Constraints section, check Not Null.
  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 add a group to this object. Groups are used to store arrays or collections of attribute sets.