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:
Note: If the Controls tab is not visible in WebLogic Workshop, click View —> Windows —> Data Palette from the menu bar.
The Application Name parameter allows you to reuse an application view between WebLogic Workshop 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.
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/docs81/javadoc/com/bea/wlai/control/package-summary.html
When you create a new Application File control, it appears in your project directory as a JCX file. The following is an example of an Application View control:
package FunctionDemo; import weblogic.jws.*; import com.bea.wlai.control.ApplicationViewControl; import com.bea.xml.XmlObject; /** * This ApplicationView provides some simple services to * create/get/update customers in the sample CUSTOMER_TABLE table. * It also defines an event * indicating a customer record has been updated. * @jc:av-identity name="FunctionDemo.CustomerMgmt" * app="sampleApp" */ public interface CustomerMgmtAppView extends com.bea.control.ControlExtension, ApplicationViewControl {
/** * Get a customer record given first and last name. * @jc:av-service name="GetCustomer" async="false" */ public wlai.functionDemo. customerMgmtGetCustomerResponse.RowsDocument GetCustomer(wlai.functionDemo.customerMgmtGetCustomerRequest. InputDocument request) throws Exception;
/** * Update the customer's email address. * @jc:av-service name="UpdateCustomer" async="false" */
public wlai.functionDemo.customerMgmtUpdateCustomerResponse. RowsAffectedDocument UpdateCustomer(wlai.functionDemo. customerMgmtUpdateCustomerRequest.InputDocument request) throws Exception;
/** * Select all customers in the customer table. * @jc:av-service name="GetAllCustomers" async="true" */ public void GetAllCustomers() throws Exception;
/** * Create a new customer given first and last name, * and date of birth. * @jc:av-service name="CreateCustomer" async="false" */ public wlai.functionDemo. customerMgmtCreateCustomerResponse.RowsAffectedDocument CreateCustomer(wlai.functionDemo. customerMgmtCreateCustomerRequest.InputDocument request) throws Exception;
public interface Callback extends ApplicationViewControl.Callback
{
/** * Async response callback method for * GetAllCustomers service. */ public void onGetAllCustomersResponse(wlai.functionDemo. customerMgmtGetAllCustomersResponse.RowsDocument response);
/** * Callback to handle errors with async service requests. * Note that only one async request can be in flight * for a given control instance at any given time. * * @param errorMsg * The error message text for the failed async request. */ public void onAsyncServiceError(String errorMsg); } }
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. WebLogic Workshop 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.
![]() |
![]() |