Creating a flat business object definition manually

This section describes the manual creation of a business object definition named Hello. This business object is used by the SampleHello collaboration.

Figure 29 illustrates the Hello business object definition that you will create and shows the values that its integration broker might expect from its triggering-event business object.

Figure 29. Hello business object.


To create a business object definition manually:

  1. Start Business Object Designer Express; for more information, see "Starting Business Object Designer Express"..
  2. From the File menu, select New.

    Business Object Designer Express displays the New Business Object dialog box. Figure 30 shows the version of the New Business Object dialog box you see if you are running Business Object Designer Express from System Manager. If you are not running Business Object Designer Express from System Manager, the Create in Project list is omitted from the dialog box.

    Figure 30. New Business Object dialog box.


  3. Enter the name Hello for the new business object definition.

    Names are generally case-sensitive, so enter the name exactly as shown here.

    Note:
    The name of a business object definition can contain only alphanumeric characters and underscore (_). This name must use only characters defined in the code set associated with the U.S. English locale (en_US).
  4. Leave the Application Specific Information field empty and click OK.

Business Object Designer Express displays the business object definition dialog box, as illustrated in Figure 31.

Figure 31. Initial display of a new business object definition


Adding attributes

Each piece of information in the business object is represented by an attribute in the Hello business object definition. You must provide the attribute definitions for the Hello business object. As illustrated in Figure 31, the tool automatically adds an entry for the required "end of object" marker, ObjectEventId.
Important

Do not delete, change, or move the ObjectEventId attribute. This attribute is reserved for the WebSphere business integration system's internal use. Business Object Designer automatically moves this attribute when you save the definition.

The row for each attribute defines the attribute's properties. For information on the attribute properties, see "Business object attributes and attribute properties".

As Figure 29 shows, the Hello business object definition has the following attributes: Greeting, Recipient, and SpecialMessage. Define the attributes and their properties, one at a time.

Adding the Greeting attribute

To add the Greeting attribute:

  1. Enter the attribute name Greeting in the Name column of the first available empty row, which is 2 for the first attribute.
    Note:
    This attribute name must use only characters defined in the code set associated with the U.S. English locale (en_US).
  2. Click the Type column to display the pull-down list of options and select String for the attribute type. The type of an attribute is its data type.
    Tip:

    If you have other business objects opened in Business Object Designer Express, their names appear in the Type pull-down menu. Displaying existing business objects among the choices for Type allows you to create a hierarchical business object with an attribute whose type is another business object.

    If System Manager is running, then every business object definition in the Integration Component Library you are working from is automatically displayed in this list.

  3. Skip the Key, Foreign, Reqd (or Required), and Card fields.

    These fields specify whether the current attribute is the business object's primary or foreign key, whether the attribute's value is required, and whether the attribute represents a child business object or objects. For an explanation of these properties, see "Business object design".

  4. In the Max Length field, retain the default value of 255.

    This field specifies the maximum number of bytes available for this attribute's value.

  5. In the Default value field, enter Hello.

    This field specifies the value to use if no other value is supplied for the attribute at run time.

    You have now defined the following properties for the Greeting attribute:
    Name:
    Greeting
     
    Type:
    String
     
    Maximum length:
    255
     
    Default value:
    Hello
     

  6. Ignore all other fields and click in the Name column of the third row.

Adding the Recipient attribute

The second attribute, Recipient, is a string.

The SampleHello collaboration object uses this attribute as follows:

At least one attribute in each business object definition must be a key attribute. A key attribute contains a value by which the WebSphere business integration system uniquely identifies instances of the business object. Make the Recipient attribute the key attribute.

To add the Recipient attribute, enter the text Recipient in the Name column, and follow the steps for adding the Greeting attribute, using the following properties:
Name:
Recipient
 
Type:
String
 
Maximum length:
255
 
Default value:
Collaboration
 
Key: Yes
(A checkmark appears in the Key column)

Leave the other fields blank and click in the Name column of the fourth row.

Adding the SpecialMessage attribute

The third attribute, SpecialMessage, is a string.

The SampleHello collaboration expects the value of this attribute to be entered by the system administrator or another person with access to the collaboration configuration properties after the collaboration object has been created. The collaboration dynamically obtains the value of the configuration property and appends it to the message.

To add the SpecialMessage attribute, enter the text SpecialMessage in the Name column, and follow the steps for adding the Greeting attribute, using the following properties
Name:
SpecialMessage
 
Type:
String
 
Maximum length:
255
 

Leave the other fields blank.

The Attributes tab now displays three user-defined attributes: Greeting, Recipient, and SpecialMessage. Figure 32 illustrates the Hello business object's attributes.

Figure 32. New business object definition with attributes.


Changing attribute order

You can graphically change the sequence order of attributes in the business object definition. For example, to place the key attribute, Recipient, above the Greeting attribute, click in the first (leftmost) column and drag the cursor up one row.

Specifying the supported verbs

You must now specify the verbs that this Hello business object will support. These verbs represent the triggering events that the business object sends to the integration broker. Click the General tab of the Hello business object definition dialog box to display the screen in which you specify the verbs. Figure 33 illustrates this dialog box.

Figure 33. General editing screen


The business object supports the four default verbs--Create, Delete, Retrieve, and Update--and they appear by default. In this example, only one triggering event is supported: Create. Therefore, change the business object definition to support only this verb.

Important:
You must specify at least one verb for each business object definition.
Note:
The name of a verb can contain only alphanumeric characters and underscore (_). This name must use only characters defined in the code set associated with the U.S. English locale (en_US).

To indicate that the Hello business object supports only the Create verb, you can either delete the remaining verbs simultaneously or individually.

Deleting multiple verbs simultaneously

To delete the Delete, Retrieve, and Update verbs simultaneously:

  1. Select the Delete verb and, while pressing the Shift key, click the Update verb.
  2. Click Delete.

Deleting each verb individually

To delete each verb individually:

  1. Select the number to the left of the Delete line in the Supported Verbs table.
  2. Click Delete.
  3. Repeat steps 1 and 2 for the Retrieve and Update verbs of the Supported Verbs table.
  4. Leave the Application Specific Info blank for the Create verb.

You have finished the definition for the Hello business object. This is a good time to save your changes by selecting File -> Save. If you are using an ICL-based project, the definition is saved to the ICL. If you are using a local project, you will be prompted to specify a file name and local directory in which to save the definition.

Copyright IBM Corp. 2003, 2004