Modeling and Implementation Guide for Oracle Business Process Management
View PDF

13 Modeling Business Objects

This chapter describes how to use Business Objects in a BPM Project. Business Objects allow you to manage the data in your process efficiently and enable you to reuse existing components. They reduce the complexity of your process making it easier to maintain.

This chapter includes the following sections:

13.1 Introduction to Business Objects

Business Objects allow you to model and develop the business entities that are part of your process using the Object Oriented paradigm.

Using Business Objects simplifies the management of the data in your process by encapsulating the data and business behavior associated with the business entity it represents.

A Business Object is composed of a set of attributes and a set of methods. Attributes store the data related to the entity you are modeling. Methods manipulate the value of these attributes, or perform calculations based on their values.

Typically Business Objects represent entities in an actual business, but you can also use them to encapsulate business logic that is not associated to any particular entity.

Generally when your process contains a large number of data objects, you can group those that describe the same identity in a Business Object. For example, in the purchase order process you can group the following data in a Customer object:

Using Business Objects to manage a group of related data reduces significantly the complexity of your process by replacing multiple process data objects by a single data object of the type of the Business Object you defined. Additionally it provides you other benefits described in the Section 13.1.2, "Benefits of Modeling Using Business Objects".

In a purchase order process you can identify the following business entities:

Each of these entities groups a set of highly related data. This data is represented in the attributes of an Business Object. The attributes define and describe the same business entity. The value of these attributes defines the state of the Business Object.

The Business Objects you define in your BPM project are stored in user-defined modules in the business catalog. When you open a business object, its editor shows you its description and the attributes that compose it .

13.1.1 Types of Business Objects

The way you create a business object determines its characteristics and functionality.

The following are different ways of creating a business object:

13.1.2 Benefits of Modeling Using Business Objects

Using business objects to manage the data in your process provides you the following benefits:

13.1.3 Naming Conventions for Business Objects

When you name a business object you should respect the following rules:


Note:
Studio forces the first letter of the name of a business object to uppercase.

13.2 Working with Business Objects

You can add business objects to your BPM project to store data related to the processes it contains. The business objects you add are stored in the business catalog, for more information about the business catalog, see Chapter 12, "Using the Business Catalog".

When developing a business object you can modify it, rename it, or delete them. You can also add documentation that helps you identify the functionality of the business object or describes how to use it.

13.2.1 How to Add a Business Object

To add a business object:

  1. Right-click a user-defined module in the business catalog.

  2. Select New and then select Business Object.

  3. Enter a name to identify the new business object.


    Note:
    You cannot repeat a name within the same module. However you can assign the same name to business objects in different modules.

  4. Click OK.

13.2.2 What Happens When You Add a Business Object

The business object appears in the business catalog. You can use this business object to define the type of the following elements in your BPMN process:

13.2.3 How to Modify a Business Object

You can modify an existing business object by:

13.2.4 How to Delete a Business Object

To delete a business object:

  1. In the BPM Project Navigator, right-click the business object you want to delete.

  2. Select Delete.

    A confirmation message appears.

  3. Click OK.

13.2.5 What Happens When You Delete a Business Object

BPM Studio remove the business object from the business catalog. If there are any flow objects in your process that use the removed business object, then you have to remove these references manually.

13.2.6 How to Document a Business Object

To Document a business object:

  1. Edit the business object.

  2. In the business object editor, in the business object Editor, click the Edit button next to the Documentation field.

  3. Add the documentation for the business object.

    See Section 5.4.1, "Introduction to the Documentation Editor", for details on how to create and edit documentation.

  4. Click Close.

13.2.7 What Happens When You Document a Business Object

The documentation is available for other process developers to read and modify.

13.3 Using a Business Object in a Process

You can use business objects to store data related to your process. To use a business object in your project, add a process data object to your process and set its type to the business object you created. You can update the information in this data object from any of the activities in the process.

13.3.1 How to Use a Business Object in a Process

To use a business object in a Process:

  1. Add a process data object to your process. Use the business object as the type of the data object.

    See Section 8.3.1, "How to Add a Process Data Object", for information on how to add a process data object.


    Note:
    When selecting the type of the data object use the Browse More Types... button to display the complete list of types. Then select <Component> to display the list of available business objects.

  2. Initialize the value of the data object in the process using a Script Task or Data Associations.

13.3.2 What Happens When You Use a Business Object in a Process

The data object you defined has the structure defined in the business object. The type of the data object is the name of the business object. For example, if you define a business object SalesQuote and then create a data object that uses this business object as its type, then the type of the data object is SalesQuote.

You can assign values to the data objects that use these types using data associations and script tasks.

13.4 Adding Business Objects Based on a XML Schema Element or Type

You can create a business object based on an XML schema element or complex type. The XML schema element or complex type you use to create your business object has to be part of your BPM Project. You can add an XML schema that contains the element or complex type to your project, or you can use a use a type defined inline in a WSDL file. For the latter you must add the WSDL file to your project by adding an SOA Adapter of type Web Service.

When you create a business object using an XML schema element, the selected element becomes an attribute of the resulting business object.

When you create a business object using an XML schema element, the selected element becomes an attribute of the resulting business object.

If you create a business object based on a schema contained in a WSDL file, then you cannot use the resulting business object as the type of an attribute of another business object.

13.4.1 How to Add a Business Object Based on a XML Schema Element or Type

Before following this procedure ensure that the business catalog contains the XML schema you want to use as a base for your Business Objects.

To add a business object based on an XML schema or complex type:

  1. Right-click a user-defined module.

  2. Select New and then select Business Object.

  3. Enter a name to identify the new business object.

  4. Select Based on External Type.

  5. Click the Browse button next to the External Type field.

  6. Select the external type from which to create the new business object.

13.5 Introduction to Business Object Attributes

Attributes store data that defines and describes the business object. The attributes in a business object are equivalent to instance variables in Object Orientation.

In the purchase order process you can identify the following attributes in the Product object:

These attributes describe the product and are relevant to the process. The ID or SKU serves to identify the chosen product. The description is probably used to show the user what the product does. And the price is used to show the customer how much the product costs and later in the process to calculate the total amount due.

When you define an attribute you must specify:

Additionally you can define the following:

13.5.1 Supported Data Types for Business Object Attributes

The following table describes the supported data types for an attribute in a business object:

Data Type Description
Bool True or false values
Int Integer numbers
Decimal Decimal numbers with defined precision
Real Real numbers
String Alphanumeric values
Time Units of time
Interval Intervals of time
Binary Binary values (For example: images, files)
Array A collection of elements of a specified data type
Complex Types Other business objects

13.5.2 Naming Conventions for Business Object Attributes

When you name a attribute of a business object you should respect the following rules:


Note:
Studio forces the first letter of the name of an attribute to lowercase.

13.6 Working with Business Object Attributes

To model a business object you must add it attributes. These attributes store the data related to your process. You can add, modify and delete attributes as necessary.

You can also add them documentation that describes the data they store and provides any necessary information to the user of the business object.

13.6.1 How to Add a Business Object Attribute

To add an attribute to an existing business object:

  1. In the Project Navigator Right-click the business object where you want to add the attribute.

  2. Select New and then select Attribute.


    Note:
    Another alternative for the previous steps is editing the business object and clicking the Add button in the Attributes section.

  3. Enter a name to identify the new attribute.

  4. From the type list, select a type for the new attribute, or click the Browse More Types... button to select a complex type.

  5. Click OK.

13.6.2 How to Delete a Business Object Attribute

To delete an attribute from an existing BPM Object:

  1. Edit the Business Object that contains the attribute you want to remove.

  2. In the Attributes section, click the Remove Attribute button next to the attribute you want to remove.

    A confirmation message appears.

  3. Click OK.

13.6.3 How to Document a Business Object Attribute

To document a business object Attribute:

  1. Edit the business object that contains the attribute you want document.

  2. In the Attributes section, expand the business object attribute you want to document.

  3. Click the Edit... button next to the Documentation field.

    The Documentation Dialog appears.

  4. Add the text to document the functionality of the selected attribute.

    See Section 5.4.1, "Introduction to the Documentation Editor", for details on how to create and edit documentation.

13.6.4 What Happens When You Document a Business Object Attribute

The documentation is available for other process developers to read and modify