Skip Headers
Oracle® Fusion Applications Developer's Guide
11g Release 1 (11.1.2)

Part Number E15524-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

34 Orchestrating ADF Business Components Services

This chapter describes how to use a SOA composite application to invoke business methods within an Oracle ADF web application. In this pattern, the Oracle ADF web application business methods make changes to data, whereas the SOA composite does not.

When to implement: This pattern describes how to use a SOA composite application to invoke business methods within an Oracle ADF web application. In this pattern, the Oracle ADF web application business methods make changes to data, whereas the SOA composite does not. For example:

See Chapter 35, "Manipulating Back-End Data from a SOA Composite" for information regarding patterns in which both the Oracle ADF web application and SOA composite must update data without conflicting.

Design Pattern Summary: A BPEL process service component uses an invoke activity to invoke a partner link that accesses a SOAP service created for a business component.

Involved components:

34.1 Introduction to the Recommended Design Pattern

Oracle Fusion applications may require that a BPEL process service component access data values from ADF Business Components in an Oracle ADF web application. Oracle Fusion applications may also require that a BPEL process service component invoke a method contained in ADF Business Components. Instead of directly accessing the ADF Business Components, you can publish the component as a web service. The composite then accesses the published component over SOAP using an invoke activity and partner link in the BPEL process service component. Figure 34-1 shows a high-level overview of this design pattern.

Figure 34-1 SOA Composite Application Accesses ADF Business Components Using SOAP

BPEL flow uses SOAP to invoke ADF BC

This approach is recommended because SOAP bindings do not require that the Oracle ADF web application and the SOA components be co-located in the same container.

34.2 Other Approaches

There are no other approaches to implementing this use case. The only supported way to invoke ADF Business Components services is to use a web service SOAP binding.

WARNING:

Using the Oracle ADF binding to invoke ADF Business Components services is prohibited due to topology and security requirements. (Oracle ADF services and SOA composites must be collocated; there are no application roles and privileges cannot be escalated.)

34.3 Example

The sample code for this use case can be downloaded from Oracle SOA Suite samples.

34.4 How to Invoke an ADF Business Components Service from a BPEL Process Service Component

To invoke ADF Business Components using a SOAP binding, you first publish the business component as a web service. You then create a BPEL process service component that contains a partner link to the ADF Business Components service. The partner link is accessed from an invoke activity. An assign activity is used to populate data into a variable used to pass data to the ADF Business Components service.

To invoke ADF Business Components from a BPEL process service component:

  1. Create ADF Business Components, including an application module, as documented in "Part II: Building Your Business Services" in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

  2. Optionally, create any SDO classes for view objects. For detailed procedures, see the chapter "Integrating Service-Enabled Application Modules" in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

    Any top-level view objects referenced in a service interface created from an application module will automatically be service-enabled. However, creating the SDO classes for individual view and entity objects allows you to configure the SDO name or namespace, or selectively service-enable child view objects.

  3. Configure the service interface for the application module. For detailed procedures, see the chapter "Integrating Service-Enabled Application Modules" in the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

    You can elect to include in your service interface custom methods, top-level service view instances, and any find operations based on view criteria.

    At the end of this step, Oracle JDeveloper creates the WSDL files that will be used by the BPEL process service component to access any required methods or data. Figure 34-2 shows the WSDL created for the StoreFrontService in the sample application. This service accesses the customer and order information needed by the SOA composite application.

    Figure 34-2 StoreFrontService WSDL File in Oracle JDeveloper

    wsdl file displays in editor showing relationships
  4. Implement the security as described in Section 34.5, "Securing the Design Pattern.".

  5. For verification purposes, you can either run the Oracle ADF web application from the Integrated Weblogic Server container included with Oracle JDeveloper, or you can deploy the Oracle ADF web application to a standalone container. To deploy to a standalone container:

    1. Create a deployment profile for the web application. For details, see the chapter "Deploying Fusion Web Applications" of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

    2. Make an Oracle WebLogic Server connection to the container.

    3. Deploy the profile to the container.

    4. Add a library reference to oracle.soa.workflow.wc. Add the following entry to the file in MW_HOME/user_projects/domains/<domain name>/config/config.xml directory, and add the line shown in Example 34-1 to oracle.adf.domain.loader.

      Example 34-1 Shared Library Name

      <shared-library name="adf.oracle.domain" version="11.1.1"
                      library-compatible="true">
      ...
      <import-shared-library name="oracle.soa.workflow.wc"/>
      

      Note:

      Skip this step if deploying the profile to the WLS container included in the SOA installation.
  6. Add the WSDL file for the ADF Business Components service to the Resource Palette of Oracle JDeveloper. If you are using the embedded server, you first need to run your application. You then create a new URL connection in the Resource Palette to the embedded server. The URL is:

    http://host:7101/ApplicationName-ProjectName-context-root/AppModuleService Name
    

    The URL for the embedded server is generated at the bottom of the WSDL file. Alternatively, you can open the file and copy the soap:address URI.

    If you have deployed the Oracle ADF web application to a standalone server, then create a new Application Server connection in the Resource Palette. For more information about using the Resource Palette, see the Oracle JDeveloper Online Help.

  7. Create a SOA composite application that includes a BPEL process service component. For more information, see the chapter "Developing SOA Composite Applications with Oracle SOA Suite" in the Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.

  8. In the SOA composite application, create the reference web service binding to the WSDL file for the ADF Business Components service. When creating the binding, be sure to select the WSDL from the Resource Palette.

    Note:

    The ADF Business Components service must be running in order for it to be discoverable.

    Figure 34-3 shows the composite.xml file for the sample application.

    Figure 34-3 Composite Application

    composite.xml shows how components interact

    A Partner Link for the ADF Business Components is automatically created when the reference is wired to the BPEL process.

    For more information about creating bindings, see the chapter "Developing SOA Composite Applications with Oracle SOA Suite" in the Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.

  9. Wire the BPEL component to the Oracle ADF web service

    Use a web service binding so that the ADF Business Components service can be remotely deployed.

    For more information about wiring references, see the chapter "Developing SOA Composite Applications with Oracle SOA Suite" in the Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.

  10. Create an Invoke activity that invokes the partner link for the ADF Business Components.

    For more information about creating Invoke activities, see the chapter "Getting Started with Oracle BPEL Process Manager" in the Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.

  11. Create an Assign activity to assign any values (for example, a static XML fragment) to variables for the BPEL process service component. These can then be passed to the ADF Business Components service.

    For more information about creating Assign activities, see the chapter "Getting Started with Oracle BPEL Process Manager" in the Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.

  12. Repeat adding assign and invoke activities as needed. Figure 34-4 shows the BPEL flow for the sample application.

    Figure 34-4 BPEL Flow for Invoking an ADF Business Components Service

    BPEL flow invokes a BC service
  13. Implement the security as described in Section 34.5, "Securing the Design Pattern".

34.5 Securing the Design Pattern

You need to secure the following:

For information about securing the design pattern, see Section 50, "Securing Web Services Use Cases."

34.6 Verifying the Deployment

To properly verify this design pattern, you should test your ADF Business Components, then deploy and verify the SOA composite application.

To verify this design pattern:

  1. Test your Oracle ADF web application using the various testing and debugging methods described in the chapter "Testing and Debugging ADF Components" of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework. For information about testing the ADF Business Components service, see the chapter "Integrating Service-Enabled Application Modules" chapter of the Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework.

  2. Deploy the SOA composite application to the standalone WLS where the SOA infrastructure has been installed. Because you created a web service binding from the SOA composite application to the ADF Business Components web service, the ADF Business Components web service need not be deployed to the SOA infrastructure.

  3. Test the deployed SOA Composite service using Fusion Middleware Control Console. Every deployed service has its own test page, so you can quickly test that the service functions as you expect. For more information, see "Managing SOA Composite Applications" in the Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle Business Process Management Suite.

34.7 Troubleshooting the Use Case

Following are tips that may help resolve common issues that arise when developing or running this use case.

Use Oracle Enterprise Manager Fusion Middleware Control Console to troubleshoot the use case:

http://localhost:8888/em

You can test your SOA composite using Fusion Middleware Control Console. For more information, see the section "Automating Testing for SOA Composite Applications" in the chapter "Managing SOA Composite Applications" in the Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle Business Process Management Suite.

34.8 What You May Need to Know About Orchestrating ADF Business Components Services

Before you implement these design patterns, you should be aware of the following:

Any time you invoke an ADF Business Components service, the database transaction for that operation is committed when it completes.

There is no session propagation between the BPEL process and Oracle ADF. While the identity is passed in when security policies are in place, a new Oracle Fusion Data Security session is created with each invocation of the ADF Business Components service operations.

If you invoke ADF Business Components service operations that use event-raising entities, those events are not raised.