![]() |
![]() |
|
|
Using Application Views in the Studio
This section presents the following topics:
Before You Begin
After you create all the application view services and events that are required for your enterprise, you can use the resulting application views to execute your business processes. The simplest way to do this is by using the WebLogic Integration Studio to design business process workflows that use your application view services and events.
The WebLogic Integration Studio is a graphical user interface (GUI) for designing business process workflows. These workflows can include application view services and events defined using WebLogic Integration. For details, see Using the WebLogic Integration Studio.
Before you can invoke an application view service or receive an application view event in the WebLogic Integration Studio, you must make sure the following prerequisites have been met:
Workflow Setup Tasks
The following sections describe four tasks you may perform to set up your workflow to use application view services and events:
You can perform any combination of these tasks to create your own workflows.
This document does not fully explain how to use the business process management (BPM) functions provided by Weblogic Integration; for complete information, see Learning to Use BPM with WebLogic Integration or go to http://www.oracle.com/technology/documentation/index.html
.
Task 1: Set Up a Task Node to Call an Application View Service
In your organization, there may be situations in which you want to call an application view service from within a workflow. To do this, add a task node to the workflow, then add an appropriate Application View Service action to the task node. Once the workflow is saved and activated, the application view service is called whenever the task node executes.
Steps for Setting up a Task Node to Call an Application View Service
To create a task node that calls an application view service, complete the following procedure:
Whichever option you select, the Service Request Template dialog box is displayed.
The Service Request Template dialog box displays the template to be used for all service requests of the type specified in step 11. This template is based on the input schema for the service.
When this action is executed, the template data is assigned to the specified request document variable and used as the input document for the service. This template overrides any previous setting for the variable.
For details about using the Service Request Template dialog box, see Using the WebLogic Integration Studio.
Note: When you set up a task node to call an asynchronous application view service, the result is returned to the Studio. The workflow identifies this response using the request ID variable you selected. To set up an event node to receive the response, make sure to use the same request ID variable for the event node. For more information about creating such an event node, see Task 2: Set Up an Event Node to Wait for a Response from an Asynchronous Application View Service.
Task 2: Set Up an Event Node to Wait for a Response from an Asynchronous Application View Service
This section explains how to receive an asynchronous application view service response and handle any errors it may contain.
In a workflow, whenever an action calls an application view service asynchronously, the application view service returns a response. If you need the response, you must set up a corresponding asynchronous event node to wait for it. This section describes a highly simplified scenario in which an event node receives an application view service response without checking for errors.
To set up an asynchronous event node to wait for a response from an asynchronous application view service, create an event node and configure it to wait for an event of type AI Async Response.
Configuring Receipt of a Response
To set up the event node to receive an asynchronous service response, you can use either of the following methods:
Note: Use of te Response Document tab is preferred because it provides a universal means of receiving both asynchronous and synchronous responses. When you use this method, an XML document is received regardless of whether the response is asynchronous or synchronous, and you do not need to query the value of the asynchronous service response variable.
We recommed using a response document variable to receive asynchronous service responses whenever possible. To configure a service to wait for an event of type AI Async Response, you use the Event Properties dialog box. This dialog box may or may not offer you the choice of using an asynchronous variable to receive the response. Whether this choice is available depends on the following conditions:
Handling Errors in an Asynchronous Application View Service Response
Although this task does not include the configuration of error handling for the application view service response, you may want to handle errors in your own workflows. To handle asynchronous service response errors in workflows that use an AsyncServiceResponse variable, you can use the features provided by the application integration plug-in.
The application integration plug-in includes the variable type AsyncServiceResponse and three functions:
For a complete description of these functions, see Functions Provided by the Application Integration Plug-In.
Procedure for Configuring Receipt of an Asynchronous Service Response (Preferred Method)
To set up an asynchronous event node to wait for a response from an asynchronous application view service, create an event node and configure it to wait for an event of type AI Async Response.
To set up an event node to use an XML variable to receive an asynchronous service response, complete the following procedure:
Note: The purpose of this event node is to wait for a response to a Call Application View Service action that was called asynchronously earlier in the workflow. The Call Application View Service action sets the request ID variable. The action and this event node can work together only if both use the same request ID variable. For more information about setting up the Call Application View Service action, see Task 1: Set Up a Task Node to Call an Application View Service.
Procedure for Configuring Receipt of an Asynchronous Service Response (Legacy Method)
The preferred method for receiving an asynchronous service response is to use a response document variable of type XML. However, if an existing workflow contains an asynchronous event node that was previously set up to use an AsyncServiceResponse variable (to wait for a response from an asynchronous application view service), you can modify the event node.
To modify an event node that uses an AsyncServiceResponse variable to receive an asynchronous service response, complete the following procedure:
Note: The purpose of this event node is to wait for a response to a Call Application View Service action that was invoked asynchronously earlier in the workflow. The Call Application View Service action sets the request ID variable. The action and this event node can work together only if both use the same request ID variable. For more information about setting up the Call Application View Service action, see Task 1: Set Up a Task Node to Call an Application View Service.
Note: Because you are modifying an existing asynchronous event node, the asynchronous service response variable field is already populated. If you do not need the response, select the Response Document (preferred) tab. For details about using the preferred method, see Procedure for Configuring Receipt of an Asynchronous Service Response (Preferred Method).
Functions Provided by the Application Integration Plug-In
If your enterprise includes AI Async Response variables and you want to interrogate those variables while using the application integration plug-in, use the following functions:
Using these functions, you can set up decision nodes to handle success and failure conditions.
Note: These functions are available only if the application integration plug-in is installed, and they support only the asynchronous variable method for receiving asynchronous service responses. For details, see Procedure for Configuring Receipt of an Asynchronous Service Response (Legacy Method).
AIHasError()
Use AIHasError() to determine the status of an asynchronous service response. The following table provides details about this function.
AIGetErrorMsg()
Use AIGetErrorMsg() to retrieve the error message string returned by an asynchronous application view service. The following table provides details about this function.
AIGetResponseDocument()
Use AIGetResponseDocument() to retrieve the XML response document returned by an asynchronous application view service. The following table provides details about this function.
Task 3: Create a Workflow Started by an Application View Event
It is sometimes desirable to have a workflow that is started whenever a designated application view event occurs. To create such a workflow, edit the workflow's start node so it responds to an event of type AI Start, then select the appropriate application view event. If necessary, you can set up conditions with which the event can be filtered. After you save and activate the workflow, the start node is executed each time the application view event occurs.
Steps for Creating a Workflow Started by an Application View Event
To set up a workflow with a start node that is triggered by an application view event, complete the following procedure.
Task 4: Set Up an Event Node to Wait for an Application View Event
In a workflow, it is sometimes desirable to have an event node that is triggered by an application view event. To create such an event node, edit an event node so it responds to an event of type AI Event, then select the appropriate application view event. If necessary, you can set up conditions with which to filter the application view event. After you save and activate the workflow, the workflow progresses to this event node, waits for a specified application view event, and continues processing.
Steps for Setting Up a Node to Wait for an Application View Event
To set up an event node to be triggered by an application view event, complete the following procedure:
For information about setting up conditions and XPath expressions, see Using the WebLogic Integration Studio.
In the Event Properties dialog box, select an XML variable from the Event Document Variable list. Data from the application view event that is received by the start node is stored in this variable. If you do not need the event data, skip this step.
![]() |
![]() |
![]() |
|
Copyright © 2002 BEA Systems, Inc. All rights reserved.
|