Skip Headers
Oracle® Fusion Middleware Modeling and Implementation Guide for Oracle Business Process Management
11g Release 1 (11.1.1.4.0)

Part Number E15176-04
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

15 Working with Services and References

This chapter describes the different service and reference components that you can use in Oracle BPM. It describes how these components appear in the business catalog and how the components in the business catalog relate to the SOA composite that defines these services and references. It also describes how to customize these components to make them easier to understand and more appropriate for business analysts.

This chapter includes the following sections:

15.1 Introduction to Services and References

Some flow objects in Oracle BPM require you to define a service or a reference to implement them. You can define services and references in the SOA composite in your BPM project.

The business catalog displays the services, components, and references that appear in the SOA composite. When you add a new component in the Exposed Services or External References areas in the composite, it automatically appears in the corresponding predefined module in the business catalog.

The following SOA components appear as services or references in the business catalog:

Note:

When you define a web service to implement a service task, message events, or send and receive tasks, ensure that the operations it contains do not define arguments of XML types defined within a WSDL. The arguments in the operations in the web service must be primitive types or types defined within an XSD file.

15.1.1 Introduction to Services

Services are those components that you can use to implement certain activities and events in your BPMN process.

The Services predefined module stores the components that display a service handle in the SOA Composite.

You can use services to implement the following flow objects:

  • Service tasks

  • Message events

  • Send and receive tasks

15.1.2 Introduction to References

References are the interfaces that you can use to define the interface of your BPMN processes.

The References predefined module stores the components that display a reference handle in the SOA composite.

You can use references to define the process interface using the following flow objects:

  • Message events

  • Send and receive tasks

15.1.3 Introduction to Callbacks

If a service is asynchronous and contains a callback interface, then the component in the business catalog contains a callback inner component. The callback inner component groups all the callback operations in the service.

After selecting the service component in the business catalog, you can view a list of the operations in the callback component in the Structure window.

The implementation of message events and receive tasks configured to wait for a callback from the service only enable you to select an operation from the callback inner component of the corresponding service.

Figure 15-1 shows a service with a callback interface in the business catalog.

Figure 15-1 Service with Callback Interface

Description of Figure 15-1 follows
Description of "Figure 15-1 Service with Callback Interface"

15.2 Introduction to Service Adapters in Oracle BPM

Service adapters enable you to integrate with other applications and external services. Oracle BPM supports the use of service adapters to integrate your BPMN process with external applications, legacy applications, and external services such as FTP or databases.

Oracle BPM supports service adapters for the following technologies:

For a detailed description of service adapters see:

When you add a SOA service adapter to the SOA composite of a BPM project, the service adapter automatically appears in the business catalog. The business catalog stores the SOA service adapters in different modules depending on the swimlane of the SOA composite where you added the SOA service adapter:

Depending on the nature of the service adapter, the SOA composite enables you to add the components in the different swimlanes. For example, you must add a file adapter that contains a read operation in the Exposed Services swimlane, but if the file adapter contains a write operation, then you must add it in the External References swimlane.

Figure 15-2 shows a SOA composite that contains a file adapter with read operation and a file adapter with a write operation. Note that the file adapter that contains the write operation appears under the Services predefined module in the business catalog, while the file adapter that contains the read operation appears under the References predefined module.

Figure 15-2 Adapter Services in Oracle BPM

Description of Figure 15-2 follows
Description of "Figure 15-2 Adapter Services in Oracle BPM"

The business catalog stores service adapters under the External module within the Services or References predefined modules. The service adapter is represented as a node. If you select a service adapter in the BPM Project Navigator, then the Structure window displays the operations it contains. If the service adapter is configured as asynchronous, then the Structure window also displays the callback inner object.

Note:

The operations in the service adapters that do not return output arguments may define an element structure Empty as the output argument. This element structure appears in the data association of the flow object that uses the service adapter. Defining output data associations is optional, so are not required to provide a mapping for this element structure.

15.3 Introduction to Oracle Mediator in Oracle BPM

Oracle Mediator facilitates the communication among the components within a composite application. These components include BPMN processes.

You can use Mediator in a BPM project in the following use cases:

Figure 15-3 Mediator Components in the Business Catalog

Description of Figure 15-3 follows
Description of "Figure 15-3 Mediator Components in the Business Catalog"

Figure 15-4 shows a BPEL process that invokes a BPMN process through a mediator. Note that the service handle of the mediator connects to the BPEL process and the reference handle connects to the BPMN process.

Figure 15-4 BPEL Process Using a Mediator to Invoke a BPMN Process

Description of Figure 15-4 follows
Description of "Figure 15-4 BPEL Process Using a Mediator to Invoke a BPMN Process"

The Mediator Service

When you add a mediator to the SOA composite the business catalog generates a mediator service.

This component represents the mediator service. It contains the operations you invoke to communicate with the mediator. You can invoke the operations defined in this service using service tasks, message events, or send and receive tasks, depending on the type of operation.

The business catalog stores mediator services in the Mediator module located in the Services predefined module. It creates a separate module for each of the mediator service components. The name of this module is the name of the component.

Item 2 in Figure 15-3 shows the exposed service Mediator_ep for the mediator component shown in the SOA composite

The Mediator Interface

If you select the SOA binding option when creating the mediator, then Oracle JDeveloper creates the service interface. This interface defines the signature of the operations you can use to access the mediator from outside the SOA composite. You can configure your BPMN process to use this interface, so that the BPMN and the mediator have the same interface.

The business catalog stores service interfaces in the Externals module located in the References predefined module.

Item 1 in Figure 15-3 shows the exposed service interface component Mediator_ep for the mediator component shown in the SOA composite.

For information on how to use an interface to define the process interface, see Section 21.5, "Using Message Events with an Interface from the Business Catalog to Define Your Process Interface" and Section 21.9, "Using Send and Receive Tasks with an Interface from the Business Catalog to Define Your Process Interface".

The Reference Interfaces

The SOA composite shows an interface for each component the mediator adapts.

The business catalog stores service interfaces in the Mediator module located in the References predefined module. It creates a separate module for each of the Mediator service components. The name of this module is the name of the component

Item 1 in Figure 15-3 shows the reference interface component ProcessProcessService for the mediator component shown in the SOA composite.

For more information on SOA mediators, see part "Using the Oracle Mediator Service Component" in Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.

15.4 Introduction to BPEL Processes in Oracle BPM

BPEL processes enable you to model a business process using a standard different from BPMN. Depending on the nature of the process, some processes might be easier to implement in a certain technology. Oracle BPM enables you to integrate the BPEL and BPMN processes in your project, getting the best of the two standards.

Figure 15-5 shows an SOA composite that contains multiple BPEL processes and how the business catalog displays them.

Figure 15-5 BPEL Process Components in Business Catalog

Description of Figure 15-5 follows
Description of "Figure 15-5 BPEL Process Components in Business Catalog"

The BPEL Service Component

When you add a BPEL process to the SOA composite, the BPEL service component appears in the business catalog.

This component represents the BPEL process service. You can use this component to implement service tasks or message events, or send and receive tasks, depending if the BPEL process is synchronous or asynchronous.

Figure 15-5 shows how the business catalog displays a BPEL process and its corresponding exposed service interface.

The business catalog shows the BPEL process service in the BPEL module located in the Services predefined module. It creates a separate module for each of the BPEL process service components. The name of this module is the name of the BPEL process.

Oracle BPM treats BPEL processes as services. It does not make a distinction between other types of services and BPEL processes.

For more information on how to invoke synchronous and asynchronous services from a BPMN process, see Section 20.1, "Introduction to Communication with Other BPMN Processes and Services".

The Exposed Interface

If you selected the SOA binding option when creating the BPEL process, then the exposed interface appears in the business catalog.

This interface enables external components to invoke BPEL processes. If you are designing a BPMN process to replace a BPEL process, then you might want to use this interface to define a BPMN process to ensure that you can replace one for the other.

For information on how to use an interface to define the process interface, see Section 21.5, "Using Message Events with an Interface from the Business Catalog to Define Your Process Interface" and Section 21.9, "Using Send and Receive Tasks with an Interface from the Business Catalog to Define Your Process Interface".

For more information on BPEL Processes, see Using the BPEL Process Service Component in Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.

15.5 Using Services in Oracle BPM

The following flow objects require you to define a service to implement them:

15.6 Using References in Oracle BPM

The following flow objects enable you to define an interface using a reference component from the business catalog:

15.7 Customizing Services and References

The interfaces of some services and references you use in your process might be too complex or use names that do not clearly convey their use. These interfaces are not appropriate for a process analyst. You can customize these services and references to hide their complexity and make them more suitable for a business analyst. You might also customize a service or a reference to make your process easier to understand for other process developers.

Customizing a service or a reference enables you to:

When you customize a service or a reference, the service or reference disappears from the predefined modules where they were stored and Oracle BPM Studio replaces their uses by the customized component.

If you delete the customized service or reference, then the service or reference appears back in the corresponding predefined module, unless you remove either of them from the SOA composite.

Note:

If you delete the original service or reference, Oracle BPM Studio does not delete the customized service or reference. You must delete the customized service or reference manually or create a new service or reference with the same name as the one you deleted.

15.7.1 How to Customize a Service or a Reference

You can customize a service or a reference to make it more suitable for a business analyst and easier to understand for process developers.

To customize a service or a reference:

  1. In the BPM Project Navigator, right-click the service or the reference.

  2. Select Customize Service.

    The Customize Adapter Service dialog box appears.

  3. In the Name field, enter a name for the customized service or reference.

  4. Click Browse and select a module to store the customized service or reference.

  5. Optionally, enter a description for the customized service or reference.

  6. From the operations list, select the operations to appear in the customized service or reference.

  7. Edit the operations to customize them.

    See Section 15.7.2, "How to Customize an Operation" for information on how to customize an operation.

  8. Click OK.

15.7.2 How to Customize an Operation

When you customize a service or a reference, optionally you can customize the operations it contains.

To customize an operation:

  1. From the Operations table, select an operation.

  2. Click Edit.

    The Edit Operations dialog appears.

  3. In the Display Name field, enter the customized name for the operation.

  4. In the Description field, enter a description for the operation.

  5. If the operation requires input or output arguments, then you can provide a description for them.

  6. Click OK.

15.7.3 What Happens When You Customize a Service or a Reference

The customized service or reference appears in the module you chose to store it in. The component in the Services or References predefined module disappears.

If there are any BPMN processes that use the component you customized, Oracle BPM Studio automatically updates the implementation of the activities in those processes to use the customized service or reference.

If you delete the customized service or reference, then it appears back in the corresponding predefined module.