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:
- In the Project Navigator, right-click on the ExpenseReport BPM
Object (
), and click
(
).
The
Attribute dialog box appears.
- Enter
submittedBy in the
Name field.
- Select
String from the
Type drop-down list, and click
OK.
The attribute editor for the
submittedBy attribute opens.
- In the
Storage Constraints section of the editor,
check
Not Null. This tells ALBPM that the field is
mandatory.
- Save (
) 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.
- You will now define the Submit Date attribute. Again, in the
Project Navigator right-click on the ExpenseReport BPM Object (
), and click
(
).
The
Attribute dialog box appears.
- Enter
submitDate in the
Name field.
- Select
Time from the
Type drop-down list, and click
OK.
The attribute editor for the submitDate attribute opens.
- Select
Date Only from the
Time Precision drop-down list.
- As before, check
Not Null in the
Storage Constraints section.
- Save (
) the changes and close the editor window by clicking
on the
X in the bottom tab.
- 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.