8 Using the Business Catalog

Learn how the artifacts in your BPM project are represented in the business catalog and use the business catalog to store and organize the components needed to implement the processes in your BPM Project.

8.1 Introduction to the Business Catalog

The business catalog is a directory within a BPM project that stores the components you use to implement some flow objects in BPMN processes. You can share and reuse the assets in the business catalog across the processes in a BPM project.

The business catalog stores the following types of components:

  • Errors

  • Events

  • Human Tasks

  • Business Rules

  • Service Adapters

  • Synthesized Types

  • BPEL Processes and Mediators

  • Business Objects

  • Business Exceptions

  • Enumerations

Depending on the component you can use them for the implementation of a specific activity or multiple flow objects or to define the data associations of a flow object.

Table 8-1 shows which flow objects use each of the components in the business catalog for their implementation.

Table 8-1 Flow Object Implementation

Component Flow Objects

Error

  • Start error event

  • Throw error event

  • Catch error event

  • End error event

Business exception

  • Start error event

  • Throw error event

  • Catch error event

  • End Error Event

Event

  • Start signal event

  • Throw signal event

  • End signal event

Human Task

User task

Business Rule

Business rule task

Service Adapter

  • Service task

  • Message throw event

  • Message catch event

  • Message end event

  • Send and receive tasks

Mediator

  • Service task

  • Message throw event

  • Message catch event

  • Message end event

  • Send and receive tasks

BPEL Process

  • Service task

  • Message throw event

  • Message catch event

  • Message end event

  • Send and receive tasks

Business Object

You can use them as arguments in the data associations of the following:

  • Service task

  • User task

  • Business rule task

  • Message throw event

  • Message catch event

  • Message end event

  • Send and receive tasks

Enumerations

You can use the attribute of an enumeration as arguments in the data associations of the following:

  • Service task

  • User task

  • Business rule task

  • Message throw event

  • Message catch event

  • Message end event

  • Send and receive tasks

Depending on the type of component, the business catalog uses two different ways of storing them. You can divide the components by the way the business catalog stores them into the following categories:

  • Non-Synthesized Components

  • Synthesized Components

8.1.1 Non-Synthesized Components

The business catalog stores a file with information about these components. When you open a BPM project, the business catalog reads the file it created to load the component.

The following components are not synthesized:

  • Business objects

  • Exceptions

  • Modules

  • Customized services and references

  • Enumerations

8.1.2 Synthesized Components

The business catalog generates the component structure dynamically based on an SOA component included in the SOA composite or an XML type or element. You cannot modify these components. Depending on the type of component they appear on a different predefined module. You cannot move the component to another module. To modify or store the component in another module, you must customize the service or the type.

The business catalog does not store any type of file for synthesized components. It generates the structure of synthesized components dynamically based on the XML or SOA component they represent.

You cannot modify synthesized components or move them to another module. Because these components are dynamically generated, they automatically reflect any change you make to the XML schema or SOA component they are based on.

The following components are synthesized:

  • Synthesized Types

  • Business Rules

  • Human Tasks

  • BPEL Processes

  • Mediators

8.1.3 Adding Components to the Business Catalog

The way you add a component to the business catalog varies according to the type of component.

  • Errors: When you add a service or a reference to your BPMN Project, if the operations they contain can generate errors, then these errors appear in the Errors predefined module.

  • Events: When you add events to the SOA Composite, they appear in the Events predefined module. See Introduction to Communication Between Processes Using Signal Events, for more information on how to use events in a BPM project.

  • Human Tasks: The existing Human Tasks included in the SOA Composite and the new ones you add automatically appear as components in the HumanTask predefined module. This component is generated from the Human Task you added. See Working with Human Tasks for more information.

  • Business Rules: The existing Business Rules included in the SOA Composite and the new ones you add automatically appear as components in the BusinessRules predefined module. This component is generated from the Business Rule you added. See Using Business Rules for more information.

  • Service Adapters: The existing Service Adapters in the SOA Composite and the new ones you add, appear in the Services and References predefined modules. See Working with Services and References for more information.

  • BPEL Processes and Mediators: The BPEL Processes and Mediators included in the SOA Composite and the new ones you add, automatically appear as components in the Services and References predefined modules. See Introduction to Oracle Mediator in Oracle BPM and Introduction to BPEL Processes in Oracle BPM for more information.

  • Synthesized Types: When you add a service or a reference that requires one or more arguments, if the data type of those arguments does not exist in the Types predefined module, then Studio automatically adds them. See Introduction to Services and References for more information. You can customize a synthesized type to change its name and move it to a user-defined module. See Customizing Synthesized Types for more information on how to customize a synthesized type.

  • Business Objects: There are different ways of adding Business Objects to the business catalog. See Modeling Business Objects for more information.

  • Enumerations: You can add enumerations in any custom module in the Business Catalog. See Creating an Enumeration for more information on how to create enumerations.

Note:

If you add a component that references resources that are missing or corrupted, the business catalog shows this missing dependencies with an error node. The label of the node displays the path of the resource. For more information on the missing resource place the mouse over the node to display the tooltip, or build the BPM project. Building the BPM project enables you to find the component that requires the missing resources.

8.1.4 Using Modules to Organize Business Components

You can organize the Business Objects in the business catalog into different groups using modules. Generally you group all the related components into a module.

In the Sales Quote example you can create a module named Quotes to store all the components used to manage the information about the quotes used in the process.

You can nest modules. Nesting modules enables you to create a hierarchical structure that reflects the organization of your components.

In the Sales Quote example you might want to group all the modules that handle the information in the project into a single module. To do this you can create a module named Data that contains modules like Quotes and Contracts.

Organizing components using modules has the following benefits:

  • It improves the readability of your project. Ideally the name of the module provides information about the components it contains.

  • It makes it easier to locate a specific component.

  • If needed, you can use the same name to identify different components that belong to different modules.

You cannot add Business Objects in the root level of the business catalog. You must always create a module where you can store your Business Objects.

It is a good practice to name the modules using a descriptive identifier. This makes it easier to find a component and makes your project easier to understand for other developers.

8.1.4.1 Predefined Modules

The business catalog contains the following predefined modules:

  • Errors: Stores the errors that the operations in the services and references in your project define.

  • Events: Stores the Events that you add to the SOA Composite.

  • HumanTasks: Stores the Human Tasks that you add to your project.

  • References: Stores the interfaces you can use to define the interface of your BPMN process.

  • Rules: Stores the Business Rules that you add to your project.

  • Services: Stores the components that you can use to implement the flow object in your BPMN process.

  • Types: Stores the types that Studio generates when you add a service or a reference that require arguments of types that do not exist in the business catalog.

These modules are a permanent part of the business catalog and you cannot remove or rename them. Studio does not allow you to create new top level modules with these names.

You cannot create new modules within these predefined modules. Because the components stored in them are synthesized, you cannot rename them or move them to other modules.

Figure 8-1 Custom and Predefined Modules

Description of Figure 8-1 follows
Description of "Figure 8-1 Custom and Predefined Modules"

8.2 Adding a New Module

The business catalog enables you to create new modules to store and organize the Business Objects in your project.

You can add a module at the root level of the business catalog or within another module.

8.2.1 How to Add a New Module

You can create a new module to store the new components you create and the customized services and references.

To add a new module:

  1. In the Applications window, right-click the Components node or a user-defined existing module.
  2. Select New.
  3. Select Module.
  4. Enter a name to identify the module.
  5. Click OK.
The new module appears in the business catalog. You can create new business objects, business exceptions and modules within the new module. You can also customize services and references.

8.3 Deleting a Module

You can delete the custom modules in the business catalog. You cannot delete the predefined modules.

When you delete a module, you also delete all the components within the module.

8.3.1 How to Delete a Module

You can delete those modules that you do not use or need.

To delete a module:

  1. In the Applications window, right-click the module you want to remove.
  2. Select Delete.

    A confirmation message appears.

  3. Click OK.
When you delete a module, the module and the components within the module are removed from the business catalog. If there are any flow objects or components in your project that use any of the deleted components, then this causes errors when you build your BPM project.

8.4 Customizing Synthesized Types

You can customize a synthesized type to change its name for a more descriptive name that helps process analysts and process developers understand the use of the component.

When you customize a type you must also provide a user-defined module in which to store the customized type.

8.4.1 How to Customize a Synthesized Type

You can customize a synthesized type to change its name and move it to a user defined module.

To customize a synthesized type:

  1. In the Applications window, expand the Types predefined module.
  2. Right-click the type you want to customize.
  3. Select Customize Type.

    The Create Business Object dialog box appears.

  4. In the Name field, enter a name for the customized type.
  5. In the Destination Module field, enter the name of the module in where you want to store the customized type, or click the browse button to browse the available modules and select one.
  6. Click OK.
The synthesized type in the Types predefined module disappears and a new business object appears in the module you selected for the customized type. Oracle BPM Studio automatically replaces all the references to the synthesized type with references to the customized type. If you delete the customized type, then the synthesized type appears back in the Types predefined module.

8.5 Creating an Enumeration

You can use enumerations to model a collection of values of the same type. Enumerations enable you to check and restrict the values of a certain argument in compile time, avoiding bugs and errors in runtime.

When you type the name of the enumeration the Simple Expression Editor autocomplete shows you the list of available attributes and their value. From this list you can select the attribute you want to use.

8.5.1 How to Create an Enumeration

You can create an enumeration to model a collection of values.

To create an enumeration:

  1. In the Project Navigator Tree, right click the Business Catalog node.
  2. Select New.
  3. Select Enumeration.

    The Create Enumeration dialog box appears.

  4. Enter a name to identify the enumeration.
  5. Click the Search button next to the Destination Module field to select the module where to store the enumeration.

    To create a new module you can type the name in the Destination Module field or create it from the Search dialog box.

  6. From the Type list, select the type of the enumeration.

    Available types are:

    • string

    • int

    • Double

    • Decimal

    • Boolean

    You can only add one enumeration of each type.

  7. Click OK.

    The enumeration editor appears.

  8. Add attributes to the enumeration.

    For more information, see How to Add Attributes to an Enumeration.

8.5.2 How to Add Attributes to an Enumeration

After you create the enumeration you must add the attributes that make part of the collection you are modeling, and assign them values.

To add an attribute to an Enumeration:

  1. Edit the enumeration.
  2. Expand the Items module in the Enumeration editor.
  3. Click the Add button.

    The Create Item dialog box appears.

  4. Enter a name to identify the attribute.

    The name is unique for each attribute and must not be a Java reserved words, start with a number, contains spaces or special characters.

  5. Enter a value for the attribute.
  6. Click OK.

    The new attribute appears in the Enumeration Editor.

  7. Optionally, click the Edit button next to the Documentation label to add documentation that describes the attribute.

8.5.3 Using an Enumeration in a Simple Expression

The following sample code shows you how to use an enumeration in a simple expression. The enumeration in the example is a collection of colors. The code in the example is accessing the value of the red attribute, a string that represents the color value in the hexadecimal RGB format:

Example 8-1 Enumeration Use in a Simple Expression

Module.Color.red