Creating a flat business object definition manually

This section describes the manual creation of a business object definition named Hello. If your integration broker is InterChange Server, this business object is used by the SampleHello collaboration, whose creation is described in the tutorial chapter of the Collaboration Development Guide.

Figure 29 illustrates the Hello business object definition that you can 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; for more information, see "Starting Business Object Designer".
  2. Click File -> New.

    Business Object Designer 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 from System Manager. If you are not running Business Object Designer 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 type 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 box empty and click OK.

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

Figure 31. Initial display of a new business object definition

Note:
There may be minor differences in the Business Object Designer interface depending on your integration broker. However. the basic functionality of the tool is the same.

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,, Business Object Designer 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. Type 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 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, their names appear in the Type list. 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 your integration broker is InterChange Server (ICS) and System Manager is running, then every business object definition in the Integration Component Library you are working from is automatically displayed in this list.

    If your integration broker is a non-ICS broker (such as WebSphere MQ Integrator Broker) or you are using ICS but System Manager is not running, then the only way to add a business object definition as a child to another business object definition is to import that business object definition first into Business Object Designer by clicking File -> Open From File.

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

    These columns 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 box, leave the default value of 255.

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

  5. In the Default box, type Hello.

    This 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 columns and click the Name column of the third row.
Adding the Recipient attribute

The second attribute, Recipient, is a string.

If your integration broker is InterChange Server, 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, type 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 check mark appears in the Key column)

Leave the other columns blank and click theName column of the fourth row.

Adding the SpecialMessage attribute

The third attribute, SpecialMessage, is a string.

If your integration broker is InterChange Server, 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, type 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 columns 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 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 supports. 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 tab.

Figure 33. General editing tab

The business object supports the four default verbs--Create, Delete, Retrieve, and Update; they appear on the General tab by default. For the purposes of this tutorial, 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

To delete the Delete, Retrieve, and Update verbs:

  1. Select the Delete verb and, while pressing the Shift key, click the Update verb.
  2. Press the Delete key.
Deleting individual verbs

To delete each verb individually:

  1. Click the number to the left of the Delete line in the Supported Verbs table.

    The row is selected.

  2. Press the Delete key.
  3. Repeat steps 1 and 2 for the Retrieve and Updateverbs in the Supported Verbs table.
  4. Leave the Application Specific Info box 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 clicking 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. 1997, 2003