Creating a new business object

  1. Right-click on the Business Objects icon on the Business Objects tab and select Add Business Object.

    The Properties - New Business Object window opens.

  2. Enter a Name in the field provided. Ensure that the name you choose is not already used for another business object. Choose a name that will be easy to recognize later, such as one that describes the purpose of the object and/or the data it works with. This is the name by which the business object will be known and when you are configuring data-source mappings in the data-access layer.

    Note that only the characters a-z, A-Z, and 0-9 are allowed.

    You can, optionally, specify a Use if condition from the drop-down list. During deployment, the code for this business object is only generated if the condition is satisfied — that is, the application property is True or False (according to which radio button is selected). For example, you can specify that code for an M3-specific business object is only generated if the M3 Connector is enabled. This field is set to <always> by default.

    You can specify whether transactions are handled automatically — by WebSphere — or manually — by custom stages. The Transaction type is set for all methods here either as Container (automatic handling — the default setting) or Bean (manual handling).

    Note: The Bean transaction type is needed for the PCM interface.
  3. Click OK to create the new business object. The new object is added at the bottom of the business objects list. By default, the object is set up with a key-field attribute in the primary set (under the Attributes heading) and empty headings for Subsets and Methods.
  4. Add the initial set of attributes that you require from the business object by right-clicking on the Attributes heading and selecting Add Attribute from the contextual menu. For details about how to add and configure attributes, see Working with business object attributes.
  5. If required, create subsets and attributes for each of them. For more information, see Working with subsets.
  6. Create each method that you require for the business object.

Once you have completed the above procedure, you are ready to use the business object in your presentation-layer design. However, the business object will not be functional until you also set up a connector for it and configure that connector with mappings that establish how each business object attribute connects to the relevant data-source fields.