Using Integration Controls

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

Application View Control

Application View Browser

Note: The Application View control uses application views defined using the Application Integration Design Console, provided with WebLogic Integration. The Application View control is available in BEA Workshop for WebLogic Platform only if you are licensed to use WebLogic Integration.

The Application View control allows your web service or business process to access an enterprise application using an application view. An application view must be created using the Application Integration Design Console before it can be referenced using an Application View control. To learn more about application views and their relationship to enterprise applications, see Overview: Application Integration.

Like other BEA Workshop for WebLogic Platform controls, the Application View control allows BEA Workshop for WebLogic Platform web services and business processes to interact with enterprise applications using simple Java APIs. They allow a developer to access an enterprise application even if they don't know any of the details of the application's implementation.

The Application View control provides a means for a developer to invoke application view services both synchronously and asynchronously, and start a new business process when an EIS event occurs. In both the service and event cases, the developer uses XML and mapping tools to interact with the Application View control. The developer need not to understand the particular protocol or client API for the enterprise application (hereafter referred to as an Enterprise Information System or EIS). Events are delivered using the Message Broker Subscription control. Message Broker integration is provided by publishing all application view events to the Message Broker through its API.

 


Topics Included in this Section

Overview: Application Integration

Describes the relationship between enterprise application adapters, WebLogic Integration application views, and the Application View control.

Creating a New Application View Control

Describes how to create and configure an Application View control.

Updating an Application View Control

Describes how to update an Application View control when the underlying application view changes.

Using an Application View Control

Describes how to use an existing Application View control from within a business process.

 


Prerequisites for Integrating Applications Using WebLogic Workshop

The WebLogic Workshop Application View control is designed to make it easy for you to use an existing, deployed application view from within your business process. WebLogic Workshop is specifically not designed to help you develop and deploy application views. Please consult Using the Application Integration Design Console to learn how to use the Application Integration Design Console to create and publish application views.

Any application which uses the application integration capabilities of WebLogic Integration must contain a project explicitly named Schemas. The Schemas project is used to store the wlai.channel file and application view schemas (published as XML Bean classes). If the Schemas project does not exist in the application, you must create it before publishing application views.

Application views with services that are published to a WebLogic Workshop application must not contain underscores in the application view service names. Also, no underscores are allowed in the Application View control name. When building a Control Receive node, WebLogic Workshop only allows a single underscore in a method name, which is automatically generated from the control name and the method name.

Create and configure the WebLogic Domain

Before creating the Application View control, you have to perform the following procedure:

  1. Configure your WebLogic domain, see Creating WebLogic Domains Using The Configuration Wizard.
Note: When you configure your WebLogic domain, in the Select Domain Source page, select WebLogic Integration check-box under Generate a domain configured automatically to support the following BEA Products.
  1. Start the WebLogic Server using the startWeblogic.cmd.
  2. Launch the WebLogic Server Console by entering http://localhost:7001/console in a web browser.
  3. Enter your username and password and click Login.
  4. The WebLogic Server Home page is displayed (see Application View Control).

    Figure 3-1 WebLogic Server Administration Console


    WebLogic Server Administration Console

  5. Click the Lock & Edit tab on the left pane.
  6. Go to Domain Structure on the left pane, and select Select Deployments.
  7. The Summary of Deployments page appears.

  8. In the Summary of Deployments page, click Install.
  9. The Install Application Assistant page appears (see Figure 3-2).

    Figure 3-2 Install Application Assistant


    Install Application Assistant

  10. In the Install Application Assistant page select the path where the BEA_WLS_DBMS_ADK.ear is located. The default path is C:\WLI9\weblogic92\integration\adapters\dbms\lib\BEA_WLS_DBMS_ADK.ear.
  11. Click C:\ and go to bea\weblogic92\integration\adapters\dbms\lib\.
  12. Select BEA_WLS_DBMS_ADK.ear, and click Next (see Figure 3-3).
  13. Figure 3-3 Selecting the Installation File


    Selecting the Installation File

Note: In this document, we are taking an example of an RDBMS adapters to create a Application View control, for more information on supported configuration see Supported Configurations for BEA WebLogic Platform 9.2.
  1. Accept the default setting and click Next.
  2. Accept the default settings and click Finish.
  3. Click Activate Changes on the left pane.
  4. Click the Lock & Edit tab on the left pane.
  5. In the Summary of Deployments page, select the BEA_WLS_DBMS_ADK check box, go to Start and from the drop-down list select Servicing all RequestArrow symbolsee Figure 3-4)Arrow symbol
  6. Figure 3-4 Servicing all requests


    Servicing all requests

    The Start Application Assistant page appears.

  7. Click Yes.
Configure the Business Process
  1. In the Package Explorer pane, select the Business Process you want to add the Application View control.
  2. Expand the Project_EARArrow symbolEarContentArrow symboland select META-INF (see Figure 3-5).
  3. Figure 3-5 META-INF


    META-INF

  4. Right-click META-INF, select NewArrow symbolOtherArrow symbolSimpleArrow symbolFile.
  5. Click Next.
  6. The New File wizard appears.

  7. Enter ai-publish.properties in the File name field (see Figure 3-6).
  8. Figure 3-6 New File


    New File

  9. Click Finish.
  10. Double-click ai-publish.properties and enter the following:
    • ear.content.dir=<your workspace dir>/<your app project dir>/<ear content dir (usually EarContent)>
    • schemas.src.dir=<your workspace dir>/<your schema project dir>/<schema src dir (usually src)>
    • Shown below is an example of the content in ai-publish.properties with a workspace located in c:/temp, an application project called myApp (with default ear content dir EarContent), and a schemas project called mySchemas (with default src dir called src):

      ear.content.dir=C:/temp/myApp/EarContent
      schemas.src.dir=C:/temp/mySchemas/src
  11. Click Save.
  12. Launch the Application Integration Console by entering http://localhost:7001/wlai in a web browser.
  13. Enter your username and password and click Login.
  14. The Define New Application View page appears.

  15. Enter a name, in the Application View Name field.
  16. Enter a description, in the Description field.
  17. Select BEA_WLS_DBMS_ADK from the scroll-down menu, in Associated Adapter.
  18. Click Create New Connection.
  19. The Create New Browsing Connection page appears, enter the needed parameters and click Ok.
  20. Enter the needed paramet
  21. The Configure Connection Parameters page appears, enter the needed parameters and click Continue.
  22. Enter the needed parameter and click OK.
  23. The Application View Administration for Testing page appears. Click on the Add tab next to Services.
  24. The Add Sevice page appears, enter the following details:
    • Unique Service Name: enter a name for the service
    • SQL Statement: enter the SQL details.
  25. Click Add.
  26. Click Test.
  27. The Summary for Application View test page appears.

  28. Click Publish to publish the channel into the BEA Workshop for WebLogic Platform.
  29. In the BEA Workshop for WebLogic Platform, go to Project and from the drop-down list select Clean.
  30. The ApplicationView_ejb.jar gets published in the Wlai-repository folder (see Figure 3-7).
  31. Figure 3-7 Application View Publish


    Application View Publish

Related Topics

Using Controls in Business Processes

Overview: Application Integration

WebLogic Integration provides a standards-based integration solution for connecting applications both within and between enterprise applications (also called Enterprise Information Systems or EISs). An EIS is typically a large-scale business application such as a Customer Relationship Management (CRM), Enterprise Resource Planning (ERP) or Human Resources (HR) application. Examples of EISs include SAP, PeopleSoft, or Siebel. WebLogic Integration provides the following tools for integrating applications:

Figure 3-8 shows how the various application integration components interact.

Figure 3-8 Application Integration Components

Application Integration Components

By using these tools, you can integrate all your enterprise information systems (EIS). Typical IT organizations use several highly specialized applications. Without a common integration platform, integration of such applications requires extensive, highly specialized development efforts.

Adapters

In order to integrate the operations of an enterprise, the data and functions of the various EISs in an organization must be exposed. In the Java 2 Enterprise Edition (J2EE) model, EIS functionality is exposed to Java clients using an adapter (sometimes called a resource adapter or a connector) according to the J2EE Connector Architecture. WebLogic Integration makes use of adapters to establish a single enterprise-wide framework for integrating current or future applications. Adapters greatly simplify your integration efforts because they allow you to integrate each application with a single application server, and thus avoid the need to integrate every application with every other application. Adapters for popular EISs are available from applications vendors, from BEA Systems, and from third-party vendors.

As an extension to BEA WebLogic Integration, BEA offers a growing portfolio of BEA WebLogic Adapters. These adapters completely conform to the J2EE Connector Architecture specification, and feature enhancements that enable faster, simpler and more robust integration of your business-critical applications. Each adapter provides bi-directional, request-response integration with a specific application or technology. User information on specific adapters is available at http://www.oracle.com/technology/documentation/index.html. Please contact Customer Support for platform support information.

If your business requires a specialized, custom adapter, WebLogic Integration provides an Adapter Development Kit. The ADK is a set of tools for implementing the event and service protocols supported by WebLogic Integration. These tools are organized in a collection of frameworks that support the development, testing, packaging, and distribution of resource adapters for WebLogic Integration. Specifically, the ADK includes frameworks for design-time operation, run-time operation, logging, and packaging. For more information on the ADK, see Developing Adapters.

Application Views

In addition to defining and implementing adapters, the AI component of WebLogic Integration enables a developer to create application views. An application view provides a layer of abstraction on top of an adapter; whereas adapters are closely associated with the specific functions available in the EIS, an application view is associated with business processes that must be accomplished by clients. The application view converts the steps in the business process into operations on the adapter.

An application view exposes services and events that serve the business process. Each WebLogic Workshop Application View control is associated with a particular application view, and makes the services and methods of the application view available to WebLogic Workshop web services as control methods and callbacks. For information on defining application views, see Using the Application View Design Console.

A service represents a message that requests a specific action in the EIS. For example, an adapter might define a service named AddCustomer that accepts a message defining a customer and then invokes the EIS to create the appropriate customer record.

An event issues messages when events of interest occur in the EIS. For example, an adapter might define an event that sends messages to interested parties whenever any customer record is updated in the EIS. Events are delivered using the Message Broker Subscription control. Message Broker integration is provided by publishing all application view events to the Message Broker through its API. To learn about the Message Broker Subscription control, see Message Broker Controls.

Application View Control

You use application view controls in BEA Workshop for Weblogic Platform to interact with an EIS through an application view. Application view controls allow a business process engineer to browse the hierarchy of application views, invoke a service as an action in a business process, and start a new business process when an EIS event occurs.

Events are delivered using the Message Broker Subscription control. Message Broker integration is provided by publishing all Application View events to the Message Broker through its API.

For information on how to add control instances to business processes, see Using Controls in Business Processes.

Creating a New Application View Control

This topic describes how to create a new Application View control.

To learn about Application View controls, see Application View Control.

To learn about WebLogic Workshop controls, see Using Controls in Business Processes.

To create a new Application View control:

  1. In the Package Explorer pane, double-click the business process to which you want to add the Application View control. The business process is displayed in the Design View.
  2. Click Application Integration Components on the Data Palette and from the drop-down list choose Integration Controls to display the list of controls used for integrating applications.
  3. Note: If the Data Palette view is not visible in BEA Workshop for WebLogic Platform, click WindowArrow symbolShow ViewArrow symbolData Palette from the menu bar.
  4. Select ApplicationView.
  5. The Insert control: ApplicationView dialog box appears.

  6. In the Insert control: ApplicationView dialog box enter the following details:
    • In the Field Name, type the variable name used to access the new Application View control instance from your business process. The name you enter must be a valid Java identifier.
    • In the Insertion point: from the drop-down list select the point where you want the field name to be inserted in the process file.
    • Decide whether you want to make this a control factory and select or clear the Make this a control factory that can create multiple instances at runtime check box. For more information about control factories, see Control Factories: Managing Collections of Controls.
    • Click Next.
    • The Create Control wizard appears.

  7. In the Create Control dialog box enter the following details:
    • In the Name field, type the name of your new control extension file.
    • Decide whether you want to add comments as configured in the properties of the current project and select or clear the Generate comments check box.
    • Click Next.
    • The Insert control: ApplicationView dialog-box appears (see Figure 3-9).

      Figure 3-9 Insert Control: ApplicationView


      Insert Control: ApplicationView

  8. In the Insert control: ApplicationView dialog box perform the following:
    • In the Application View field click Browse....The Application Views Browser dialog-box opens (see Figure 3-10), displaying available application views that are published in the current domain. Application views that have not been published using the Application Integration Design Console do not appear in the list.
    • Figure 3-10 Application View Browser


      Application View Browser

    • Select the published application view you want this Application View control to represent. Services offered by the selected application view are displayed in the Services to Invoke Asynchronously (selected=async) list.
    • Select services that will be invoked asynchronously by selecting the application displayed in Available Application Views. Selecting a application causes it to be generated in the control's extension file as an asynchronous service. This means it has a call-in with a void return and a callback with param as the service response type. Click OK.
    • In the Insert ApplicationView dialog, enter the BEA Workshop for WebLogic Platform application name in the Application Name field. The application name is usually the same as that of the current BEA Workshop for WebLogic Platform application.
    • The Application Name parameter allows you to reuse an application view between BEA Workshop for WebLogic Platform applications. You must first define the application view in the context of the primary application (app1) using the Application Integration Design Console. Then, define an Application View control in a process or web service within a second application (app2) and specify app1 in the Application Name field in the Insert ApplicationView dialog. Because the browse function uses the context of the current application, you cannot use the browse function to locate application views in another WebLogic Workshop application. When reusing an application view from another application, all services are accessed synchronously.

  9. Click Finish.

Application View Control Methods

To learn about the methods available on the Application View control, see the com.bea.wlai.control package in the WebLogic Integration Javadoc at the following URL:

http://download.oracle.com/docs/cd/E13214_01/wli/docs92/wli.javadoc/com/bea/wlai/control/package-frame.html

Example: Application View Control

When you create a new Application File control, it appears in your project directory as a control.java file. The following is an example of an Application View control:

package FunctionDemo; 

mport com.bea.wlai.control.ApplicationViewControlSync;
import org.apache.beehive.controls.api.bean.ControlExtension;
/**
 * MasterApplicationView description
 */
@ControlExtension
@com.bea.wlai.control.ApplicationViewAnnotations.AppViewIdentity(name = ".DBMS.MasterApplicationView", appName = "OracleXAApp")
public interface appviewCntrl extends com.bea.control.ControlExtension,
		com.bea.wlai.control.ApplicationViewControlSync {
	static final long serialVersionUID = 1L;
	/**
	 * Update Service description
	 */
	@com.bea.wlai.control.ApplicationViewAnnotations.AppViewService(name = "UptService", async = false)
	public wlai.dbms.masterApplicationViewUptServiceResponse.RowsAffectedDocument UptService(
			wlai.dbms.masterApplicationViewUptServiceRequest.InputDocument request)
			throws Exception;
	/**
	 * Select All service description
	 */
	@com.bea.wlai.control.ApplicationViewAnnotations.AppViewService(name = "SelectAllServ", async = false)
	public wlai.dbms.masterApplicationViewSelectAllServResponse.RowsDocument SelectAllServ()
			throws Exception;
	/**
	 * Insert Service description
	 */
	@com.bea.wlai.control.ApplicationViewAnnotations.AppViewService(name = "InsertService", async = false)
	public wlai.dbms.masterApplicationViewInsertServiceResponse.RowsAffectedDocument InsertService(
			wlai.dbms.masterApplicationViewInsertServiceRequest.InputDocument request)
			throws Exception;
	public appviewCntrl create();
}

If a business process or Web service does not implement the onAsyncServiceError callback, the Application View control does not write errors to the server log. BEA Workshop for WebLogic Platform informs you when you build the application if the onAsyncServiceError callback is not implemented with warning messages similar to the following:

WARNING: dummy.jpd:35: The Callback interface InsertAsyncCtrl.Callback 
defines a method void
onInsertServiceResponse(wlai.dbms.masterApplicationViewInsertServiceResponse.
RowsAffectedDocument), but you don't define an equivalent event handler.
WARNING: dummy.jpd:35: The Callback interface InsertAsyncCtrl.Callback defines a
method void onAsyncServiceError(java.lang.String), but you don't define an
equivalent event handler.

Customizing an Application View Control

You can customize an Application View control in several ways. You may modify the properties of the control itself or the properties of the control's methods. Each of these modifications is described in more detail in the sections that follow.

You can also use the Interface ControlContext for access to a control's properties at run time and for handling control events. Property values set by a developer who is using the control are stored as annotations on the control's declaration in a JWS, JSP, or JPD file, or as annotations on its interface, callback, or method declarations in a control file.

Control Properties

The Application View control exposes the AppViewIdentity property with the name and appName attributes. For a description of the AppViewIdentity property and its attributes, see Control Annotations.

Method Properties

Each method of an Application View control exposes the av-service property that binds the Application View control method to an application view service. For a description of the AppViewService property and its attributes, see Control Annotations.

Related Topics

Using an Application View Control

Using Controls in Business Processes

Interface ControlContext

Updating an Application View Control

Once an application view is designed in the Application Integration Design Console and then published, control of the Application view is passed to the WebLogic Workshop application. If changes are required to the design of the application view, you must make them in the Application Integration Design Console and republish the application view. You must then regenerate the Application View control to ensure that the design changes are available to the WebLogic Workshop application.

Updating a Control when an Application View Changes

To update an Application View control when the target application view changes, you must regenerate the Application View control.

Rename or delete the old Application View control file before generating a new Application View control with the same name. If you customized control properties, these customizations must be redone on the new control.

Related Topics

Creating a New Application View Control

Using an Application View Control

This topic describes how to use an existing Application View control in your web service.

To learn about controls, see the Using Controls in Business Processes.

To learn about Application View controls, see Application View Control.

To learn how to create a Application View control, see Creating a New Application View Control.

Using an Existing Application View Control

All controls follow a consistent model. Therefore, most aspects of using an existing Application View control are identical to using any other existing control. To use an existing Application View control:

  1. Click Application View Browser on the Data Palette and from the drop-down list choose Integration Controls to display the list of controls used for integrating applications.
  2. Note: If the Data Palette view is not visible in BEA Workshop for WebLogic Platform, click WindowArrow symbolShow ViewArrow symbolData Palette from the menu bar.
  3. Select ApplicationView.
  4. The Insert control: ApplicationView dialog box appears.

  5. In the Insert control: ApplicationView dialog box enter the following details:
    • In the Field Name, type the variable name used to access the new Application View control instance from your business process. The name you enter must be a valid Java identifier.
    • In the Insertion point: from the drop-down list select the point where you want the field name to be inserted in the process file.
    • Decide whether you want to make this a control factory and select or clear the Make this a control factory that can create multiple instances at runtime check box. For more information about control factories, see Control Factories: Managing Collections of Controls.
    • Click Next.
    • The Create Control wizard appears.

  6. In the Create Control dialog box enter the following details:
    • In the Name field, type the name of your new control extension file.
    • Decide whether you want to add comments as configured in the properties of the current project and select or clear the Generate comments check box.
    • Click Next.
    • The Insert control: ApplicationView dialog-box appears.

  7. In the Insert control: ApplicationView dialog box perform the following:
    • Click Browse to browse for existing Application View controls. The Select dialog is displayed. When you find the control you want to use, select it and click Select.
  8. Click Ok.

Customizing an Application View Control

There are properties that are specific to the Application View control. If you choose to copy and customize an existing Application View control, the properties you may wish to modify are:

ApplicationViewControl Interface

All Application View controls are subclassed from the ApplicationViewControl interface. The interface defines methods that may be called on Application View control instances from a web service.

To learn more, see Interface Application View Control.

Related Topics

Creating a New Application View Control


  Back to Top       Previous  Next