Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 13 Domain Models : Adding Domain Models

Adding Domain Models
You can store domain models as desired, for example, in a folder called DomainModels. For each domain model, you create a set of domain entries, where each entry represents a valid value for the entity property that uses the domain model.
After you add a domain model, associate it with a property. See Associating Domain Models with a Property
To Add a Domain Model
1.
Right-click the folder where you want to store the domain model, and select New > Domain Model. You see the New Domain Model Wizard.
Alternatively, right-click a resource, and select New > Other. In the New dialog, select Domain Model under TIBCO BusinessEvents.
2.
3.
Click Finish. You see the Domain Model editor.
4.
5.
As needed complete the Inherits From field. If this domain model extends another domain model, browse to and select that domain model.
6.
In the Domain Entries section, click Add (). An empty row appears in the table of entries.
You can also select rows and click Duplicate () to duplicate (and then modify) selected rows.
You can select a row and click Remove () to remove individual rows that are not needed.
7.
The Details section presents appropriate fields for defining the type of domain model entry you selected in step 4. See To Add Domain Entries for examples.
8.
To Add Domain Entries
When you add a domain model, you first select its data type. The Domain Model editor then displays an appropriate user interface for defining domain model entries of that data type.
The Domain Entries section is the same for all types. The Details section changes depending on what data type you selected for the domain model.
Supported Data Types
Domain Models support the following data types:
Sections below show the user interface for each type.
String
String entries are simple text strings.
 
Numeric values in a String domain type  When you use a numeric value (Integer, Double, or Long) in a domain model of type String, TIBCO BusinessEvents adds double quotes around the value. (These are visible after you save and reopen the domain model.)
Integer, Double, Long
In a single domain model, you can enter single values, range values, or a mixture of both. Acceptable values for integer, long, and double domain entries are the same as for the equivalent Java datatypes.
Text values in a numeric data type  When you enter text in a domain model of type Integer, Double or Long, TIBCO BusinessEvents marks it in red color, and indicates you to correct it.
The user interface is similar for all numeric datatypes. Here are some single values and a range value for an integer domain model:
The next figure shows a set of ranges. Note that you define whether each end of the range is inclusive. For complete coverage, ensure that there is no gap and no overlap between ranges through consistent use of the Included check box. For example, the figure shows that the lower bound of the Senior range, 55, is not included.
Boolean
Boolean entry values are always true or false. The description can give the meaning of the pair of choices, such as male or female, supported or unsupported, eligible or ineligible and so on.
DateTime
In a single domain model, you can enter single values, range values, or a mixture of both. You specify a date and a time. A date and time picker enable you to select the date and time:
If you don’t want to specify a time of day, set the time to midnight (12:00 AM) for the start date, and to a minute before midnight (11:59:59 PM) for the end date of an inclusive range, or for a single date.
The calendar shows a 12-hour clock. PM numbers are converted to a 24 hour clock format in the value table.

Copyright © TIBCO Software Inc. All Rights Reserved