Creating a Class and its Attributes

A class is a set of properties that belong together. It can contain attributes, each of which represents an individual piece of information.

In this task you create a class, called Generic Claim, and add attributes to it.

Procedure

  1. Select the Class tool in the palette. Drag it over the claims package in the diagram and drop it.

    This places a class in the diagram, contained within the package.

  2. Label the class Generic Claim.
    Note: This is reflected in the Label field but becomes GenericClaim with no space in the Name field. The Name is used internally in scripts, expressions and so on.
  3. Select the Attribute tool in the palette, and drag it over the GenericClaim class in the diagram and drop it.
  4. Select the attribute you have just created, and name it claimSummary.

    The Properties view for that attribute is displayed.

    Note: The attribute’s name claimSummary is now displayed in the diagram within the GenericClaim class. By default it is assigned the type (or superclass) Text, and this is also displayed after the name, separated by a colon. Since text is the appropriate type for a name, you do not need to change this.
  5. Add a second attribute to the same class and name it claimAmount.

    To assign a different type to this attribute, select the attribute in the editor, and in the Properties view, click on .

  6. The Select Type dialog is displayed. Click Integer - Bom Primitive Types and click OK.

Result

For more information, see "Packages" in the "Tasks" chapter of the TIBCO Business Studio Modeling User’s Guide.