Automatically Creating a Business Object Model to Store Returned Data

You can automatically create a business object model to store data returned by the SQL query or stored procedure.

Procedure

  1. On the Database tab, select a database Parameter defined as OUT or INOUT:
  2. In the Data Field field, click . The Select Data Field or Formal Parameter dialog is displayed.
  3. Select Create new return parameter, then click OK. A data field called ResultSet and a corresponding business object model are automatically created. For example:
    Note: If this is not the first data field created in this way, a unique number is appended to the name - ResultSet1, ResultSet2 and so on.
    You can open the business object model directly by clicking .

Result

A ResultSet data field and a ResultSet business object model are created as follows:

  • The ResultSet data field is automatically created in the process’ Data Fields folder.

    The data field is defined as an External Reference to a business object model. The business object model is also automatically created, with a name formed by concatenating the database service task’s name with the data field’s name - in this example, DBCall3ResultSet.)

    The data field is defined as an External Reference to a business object model. The business object model is also automatically created, with a name formed by concatenating the database service task’s name with the data field’s name - in this example, DBCall3ResultSet.)

  • The ResultSet business object model is created in the project’s Business Objects folder.

    The business object model contains a single class (with the same name as the business object model), which is automatically populated with attributes whose names and types match the data returned by the database.

    Note: TIBCO Business Studio can only populate the business object model attributes if you are using a database connection profile to provide a connection to a design-time target database and you are defining an ad-hoc SQL query.

    If you do not have a database connection, or if you do but you are defining a stored procedure, the business object model class will be empty and you will need to manually add the required attributes and ensure that their names and types match those being returned by the database.