Client Application Developer's Guide

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Using Workflow with AquaLogic Data Services Platform-Based Applications

BEA's WebLogic Integration server provides WebLogic Platform components with business-process management (BPM) capabilities. A business process coordinates interaction among various resources to perform a complete set of specific tasks. WebLogic Integration business processes are designed using visual components available, such as Process controls, in WebLogic Workshop.

By bringing WebLogic Integration and BEA AquaLogic Data Services Platform together, developers can achieve sophisticated programming scenarios that might otherwise be difficult, at best.

For example, a WebLogic Integration process (JPD) can be defined that encompasses multiple AquaLogic Data Services Platform data services, and that uses the JPD to enforce distributed transactional semantics without using XA and to reduce the number of locks held on disparate data sources (such as Web services or other non-XA-compliant data sources) that might not otherwise be able to participate in the same transaction. In other words JPD is used to achieve atomicity over disparate data sources (see Figure 10-1).

Note: The invocation of JPDs from Data Services Platform is described in the Handling Updates Through Data Services chapter of the Building Queries and Data Views.

 


Brief Overview of WebLogic Integration JPDs

Much of the underlying Java code for the Process (defined in a Java class, as a Java Process Definition, or JPD) is generated or created automatically. Processes coordinate interactions among resources by means of Java controls (Java Control Extensions, or JCX) that are specific to these process definitions. Using WebLogic Workshop, developers can add various components, including Data Service controls, and customize behavior in the business process, as needed, to accomplish the specifics of the workflow.

Figure 10-1 Using WLI JPD with AquaLogic Data Services Platform to Provide Distributed, Two-Phase Commit Capability to Data Service

Using WLI JPD with AquaLogic Data Services Platform to Provide Distributed, Two-Phase Commit Capability to Data Service

WebLogic Workshop leverages the Java Extension Control (or simply, controls) mechanism to simplify working with J2EE resources.

A Java Control is an abstraction layer that simplifies working with J2EE resources in WebLogic Workshop.

Controls provide a runtime behavior for accessing functionality and resources using Java classes. WebLogic Workshop provides Controls for numerous WebLogic and AquaLogic components, including Data Service controls for AquaLogic Data Services Platform and Process controls for WebLogic Integration.

WLI Process controls enable Web services, business processes, or pageflows to send requests to, and receive callbacks from, a business process (JPD).

See Accessing Data Services from WebLogic Workshop Applications for more information about Data Service controls.

For more information about WebLogic Integration, process controls, and business-process management in general, see the WebLogic Integration documentation page at:


http://download.oracle.com/docs/cd/E13214_01/wli/docs85/index.html

AquaLogic Data Services Platform and JPD can be integrated in two different ways:

Once the JPD is created, it can be called from a data service instance using the JpdService API, a server-side Mediator API that can be invoked in an update override.

How SDO's Handling of XMLObjects Differs from JPD

By default, a JPD converts XML objects to an XML proxy class; the class implements the ProcessXML interface. The ProcessXML interface does not know how to handle SDO objects, such as change summaries.

You must override the default behavior in the JPD by editing the source code.

 


Adding a Data Service Control to a Process

You can use Data Services Platform in WebLogic Integration (WLI) business process applications through a Data Service control. For example, you might add AquaLogic Data Services Platform-based information to decision-making logic in the business process.

There are three basic steps to adding Data Services Platform queries to WebLogic Integration business processes:

Creating a Data Service Control

Before you can execute a Data Services Platform query from a WLI business process, you must create a Data Service control that accesses the query or queries you want to run in your business process.

See Accessing Data Services from WebLogic Workshop Applications for more information about creating Data Service controls.

In WebLogic Workshop:

  1. Create a Process application.
  2. Create a Data Services project in the Process application. In the Data Services project, import the existing Data Service projects that you want to incorporate into the JPD.
  3. Create a Data Service control, adding the functions you want to use from the data services to the control.
  4. When the process is defined, you can then generate a Process control from the JPD, from within WebLogic Workshop (right-mouse click on the Design view of the JPD and select Generate Process control from the popup menu).
  5. The control is generated.

For complete details, see Data Service Controls Defined.

Adding a Data Service Control to a JPD File

Once you have created a Data Service control, you can add it to a business process the same way you add any other control to a business process. For example, you can drag and drop the control into the WebLogic Integration business process in the place where you want to run your Data Services Platform query or you can add the Data Service control to the WebLogic Workshop Data Palette.

The Data Service controls must be created in the same project as the JPD.

Figure 10-2 Creating a Data Service Control

Creating a Data Service Control

Setting Up the Data Service Control in the Business Process

Once the Data Service control has been added to the business process, its functions are available. As shown in Figure 10-3, you must select the query in the General Settings section of the Data Service control portion of the business process, specify input parameters for the query in the Send Data section, and specify the output of the query in the Receive Data section.

Figure 10-3 Specifying in the Business Process Input and Output Parameters for a Data Service Control

Specifying in the Business Process Input and Output Parameters for a Data Service Control

Figure 10-4 shows the WebLogic Workshop rendering of a business process accessing a Data Service Control.

Figure 10-4 WebLogic Integration Business Process Accessing a Data Service Control

WebLogic Integration Business Process Accessing a Data Service Control

Submitting Changes from a Business Process

By default, a business process (Java process definition, or JPD) converts XML objects to an XML proxy class by implementing the ProcessXML interface. However, ProcessXML is not completely compatible with SDO. In particular, it does not accommodate SDO specific features such as change summaries. As a result, the default XML processing performed in a business process must be overridden.

You can override the business process by performing the following steps in the workflow:

  1. In the JPD you need to turn off default ProcessXML deserialization and enable XMLBean serialization on the XML object factory by calling the XmlObjectVariableFactory.setXBean().
  2. In the JPD you need to disable the XMLBean serialization and turn on the default ProcessXML deserialization on the XML object by calling XmlObjectVariableFactory.unset().
  3. Invoke the Data Service control.

Updating Multiple Data Services Using Workflows

Once created, custom update classes can be used to create workflows that manage updates to multiple data services. For information on invoking a JPD from an update override class see "Invoking JPDs from Data Services Platform" in the Handling Updates Through Data Services chapter of Data Services Developer's Guide.


  Back to Top       Previous  Next