Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 Concepts and Definitions : Diagram Nodes

Diagram Nodes
Business object model Diagram Nodes consist of Package, Class, Association Class, Primitive Type, Attribute and Operations.
About Diagram Nodes
When creating diagram nodes, note that:
See http://java.sun.com/docs/codeconv/ for more information about these. These Java Programming Conventions are options under Preferences, so you can choose to disable them if you require. See Setting Diagram Preferences for more information.
Package
A Package is a way of grouping related model elements. For example:
A Package can also contain other Packages.
Class
A class is a description of a set of properties that, when grouped together, create a meaningful unit. Classes can be organized in a hierarchical structure.
Example: Department, employee, purchase order, and inventory item are all classes.
Primitive Type
A Primitive Type is a data type. Defining a Primitive Type enables you to define your own data types and then specify how data of that type is interpreted. You can specify what values the data can have or any constraints on the data, for example. It enables you to refine your data to your specific business domain. You could create a Primitive Type called Patient ID and specify that Patient IDs should always be a maximum of 7 characters long, and consist of 2 letters followed by 5 numbers, for example. See Setting Restrictions on Primitive Types and Attributes for more information on the restrictions you can set.
All the Primitive Types that you define must be based on the following standard business object model Primitive Types that are available in the business object model Editor. Some types have subtypes. The types are described in the following table.
When you create a Primitive Type, it defaults to Text. the type is displayed above the name of the Primitive Type in italics as shown below.
You can change the standard type on which the Primitive Type is based by clicking on the button in the Superclass field, on the General tab in the Properties View. Additional information required by the Primitive Type is specified on the Advanced tab; see Setting Restrictions on Primitive Types and Attributes.
Attribute
Attributes describe the information stored or maintained about a Class. For example:
The Item Class has the Attributes promotionCode, listPrice, and discountedPrice.
Attributes, like Primitive Types, must be based on one of the standard business object model Primitive Types that are available in the business object model Editor.
Multiplicity
The Multiplicity field on the General tab of the Properties view for an Attribute indicates whether TIBCO Business Studio needs to allow for multiple copies of an Attribute. For example, a purchase order Class could allow for only one po_ number Attribute but multiple line_items Attributes.
The lightbulb icon by the field indicates that content assistance is available. Press Ctrl+space to display a list of the possible values for the Multiplicity field.
The following table describes the available multiplicity indicators:
Where n is greater than 1
Zero to n where n is greater than 1
One to n where n is greater than 1
Setting Restrictions on Primitive Types and Attributes
You can specify restrictions for Primitive Types and Attributes. To do this:
1.
In the Properties View for the Primitive Type or Attribute, select the Advanced tab.
2.
Expand the Restrictions.
The restrictions you can specify depend on the type (including subtype where appropriate) of your Attribute or Primitive Type. The following table describes the restrictions you can set for each type.
Operations
An Operation allows you to specify the function of a Class. Defining an Operation enables you to request a Class to perform that function. If you have a Class called policy for example, you could create an Operation called createClaim to create a claim against this policy.
You can specify arguments and argument types for Operations. Arguments often add extra data that the operation needs. For example, the createClaim operation could specify the Doctor’s visit notes as a parameter.
An Operation can also return a value after it has finished. You can show the value it returns and the value’s type. For example, the createClaim operation could return the Claim once it has completed.
Each Class can have a number of Operations. Operations that are defined for a Class are displayed in the Operations Compartment of the Class, below a line that separates them from the attributes, as shown below.
The example above shows the createClaim operation that has a parameter of VisitNotes and whose return value is the Claim.
Enumeration
An Enumeration is a data type that can contain a list of values. An Enumeration contains a set of named identifiers, called Enumeration Literals, that represent the values of the enumeration.
An enumeration can be a generalization of Primitive Type Object if it is not a String enumeration.
You must set up the generalization, and you must have created the Primitive Type object to generalize from.
In the example below, a Primitive Type of the Decimal data type has been created. There is also an Enumeration called Analgesics, containing enumeration literals. You create a generalization from the Enumeration to the Primitive type. In this example, this would create an Analgesics enumeration with decimal literals.
Generalizations of the following data types are not supported: Attachment, Boolean, Duration, ID, Object, URI.
 
Enumeration Literal
Enumerations contain Enumeration Literals in a similar way to the way that Classes contain Attributes. Each Enumeration Literal is one of the list of values that make up the Enumeration.
For example, an Enumeration called Analgesics might contain literals listing the different analgesics that might be prescribed.
Enumeration literals require values to be set. The format of the value is determined by the data type of which the enumeration is a generalization. Ranges of values are not supported.
In the example in Enumeration, Analgesics is a generalization of the Decimal data type.
So the Enumeration literal CODEINE requires a value in a decimal format:

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved