Tech - 해당되는 글 27건

Working with Split-Join

This section provides instructions for creating and configuring Split-Joins. Following are the primary topics in this section:

Introduction to Split-Join

The Split-Join is a mediation pattern that can be used by a transport typed business service in an Oracle Service Bus message flow. Split-Join allows you to send message requests to multiple services concurrently, thus enhancing performance in comparison to sending them sequentially. Split-Join achieves this task by splitting an input message into individual messages, routing them concurrently to their destinations, and then aggregating the responses into one overall message.

You design a Split-Join in the Workshop for WebLogic Split-Join editor, then export it to the Oracle Service Bus console for testing and production.

Note: In the Oracle Service Bus console, a Split-Join is associated with a business service using the Flow transport protocol. Therefore, the Split-Join has a .flow file name extension in Workshop for WebLogic even though it is always referred to simply as a “Split-Join” in this document.

There are two types of Split-Join pattern: static Split-Join and dynamic Split-Join, as described in Designing a Split-Join.

For more information on invoking a business service from an Oracle Service Bus message flow, see Proxy Services: Message Flow in the Oracle Service Bus console help system.

Designing a Split-Join

There are two Split-Join patterns, the Static Split-Join and the Dynamic Split Join.

The Static Split-Join can be used to create a fixed number of message requests (as opposed to an unknown number). For instance, a customer places an order for a cable package that includes three separate services: internet service, TV service, and telephone service. In the Static use case, you could execute all three requests in separate parallel branches to improve performance time over the standard sequential execution.

The Dynamic Split-Join can be used to create a variable number of message requests. For instance, a retailer places a batch order containing a variable number of individual purchase orders. In the Dynamic use case, you could parse the batch order and create a separate message request for each purchase. Like the Static use case, these messages can then be executed in parallel for improved performance.

Initial Setup

Split-Joins potentially include the following tasks as part of their initial setup:

Creating/Importing a WSDL Containing the Base Operation

Every Split-Join is based upon a WSDL operation. When you first create a Split-Join, you will be asked to browse to the appropriate WSDL file and to select this operation as part of the creation process. You can create this WSDL file in Workshop for WebLogic.

Creating/Importing a Business Service to Use the Split-Join

Every Split-Join will be used by a transport typed business service, which, in turn, is invoked by a proxy service. You cannot export or test your Split-Join until you have created this business service. If it already exists, you can import it into Workshop for WebLogic, or, if it does not exist, you can create it in Workshop for WebLogic or the Oracle Service Bus console. If you want to get started on your Split-Join before you create the business service, you can generate the business service automatically after you create the Split-Join.

Designing a Static Split-Join

Suppose you want to design a new Split-Join called Service Availability that handles orders for a telco’s cable service package including TV, phone, and internet service. The idea is for the Split-Join to receive an incoming package order and to reply with an order acknowledgement for each type of service. In this case, Service Availability is designed as a Static Split-Join because there are three message requests per order, one for each type of service. In this particular example the customer requests only TV and DSL service.

Creating the Service Availability Split-Join may include the following tasks:

1. Creating a New Split-Join

2. Adding an Assign

3. Adding a Parallel Node

4. Adding an Assign for Each Branch

5. Adding an Invoke Service

6. Adding an Assign for Each Branch

7. Exporting and Testing the Split-Join

1. Creating a New Split-Join

Create a new Split Join based on the WSDL operation you want to use for placing the order. In this case the WSDL operation we want is called “telecom.”

After you select the WSDL operation, a skeleton of the newly created Split-Join appears in the Split-Join editor, as shown in the following figure. It consists of a Start Node, a Receive, a Reply. The labels are then edited in the general properties tab to better reflect the specific function of each node in this particular Split-Join.

Debugging a proxy service

The Start Node contains both a Request Variable and a Response Variable that have been determined by the WSDL operation initially selected. The Receive receives the incoming request message (in this case for the three or fewer different kinds of cable service), and the Reply generates a response message and sends it back to the client.

Note: The Receive node requires no further configuration. Similarly the Reply requires no further configuration, unless to generate an error fault--which is not the case in this scenario (see Configuring a Reply for more information on generating faults).

2. Adding an Assign

The first Assign, Prepare Output Message, contains an Assign operation that prepares the Response Variable in a form such that the later nodes can work on the data within it (that is, Copy/Insert/Assign/Replace/Delete/Java Callout/Log the data). This output message is relayed to the final Reply node in the Split-Join and, in turn, returned to the original client.

3. Adding a Parallel Node

The Parallel Node contains two main branches, one to check cable TV availability and one to check DSL availability. Each branch is composed of a number of actions, the sequence and general configuration being the same for both branches.

Debugging a proxy service

4. Adding an Assign for Each Branch

The first Assign in each Parallel Branch, Prepare Input Address, copies the incoming customer address data into a Variable that is referenced to check the availability of the service at that location. The Assigns are the same for each branch and would be for additional branches as well.

5. Adding an Invoke Service

An External Service is then invoked to check whether the requested service type is available at the customer’s location. Each branch contains one Invoke Service, Check Cable TV Availability and Check DSL Availability. Each invocation calls an External Service, which compares the customer’s address (stored in the Variable initialized in the previous step) to the availability of the service at that location. The result is then stored in an output Variable that is passed on to the final Assign in the Branch below.

6. Adding an Assign for Each Branch

The final two Assigns, Update Cable TV Status in Output Message and Update DSL Status in Output Message, take the results of the external service invocations and put them into the output message using a Replace operation. The aggregated response are then sent to the original client in the final Reply node, which requires no further configuration.

7. Exporting and Testing the Split-Join

After you design the Split-Join, you can export it to the Oracle Service Bus console for testing and production.

Debugging a proxy service

Related Topics

Designing a Dynamic Split-Join

Suppose that you want to design a Split-Join that handles a batch order from a retailer containing a variable number of individual purchase orders (as opposed to a fixed number of orders). The idea is for the Split-Join to receive the batch order and to reply with an order acknowledgement for each order within. This would be a Dynamic Split-Join because the number of individual purchase order requests is variable and unknown at design time.

Creating this Split-Join may include the following tasks:

1. Creating a New Split-Join

2. Adding an Assign

3. Adding a For Each

4. Adding an Assign

5. Adding an Invoke Service

6. Adding an Assign

7. Adding an Error Handler

8. Exporting and Testing the Split-Join

1. Creating a New Split-Join

Create a new Split Join based off of the WSDL operation you want to use for placing the order. In this case the WSDL operation we want is called “batchOrders.”

After the operation is selected, a skeleton of the newly created Split-Join appears in the Split-Join editor consisting of a Start Node, a Receive, a Reply. The labels are then edited in the general properties tab to better reflect the specific function of each node in this particular Split-Join.

Debugging a proxy service

The Start Node, Order Placement, contains both a request variable, inputVar, and an response variable, outputVar. The Receive, Receive Batch Order Request, will initialize the contents of the Request Variable (in this case purchase orders), and the Reply, Reply Order Placement, will send a response, based on the order acknowledgements aggregated into the Response Variable, back to the client. In this example Order Placement also contains a callout to an External Service, “Order” that will be invoked to approve individual orders.

Note: The Receive node requires no further configuration. Similarly, the Reply requires no further configuration, unless you would like to generate an error fault—which is not the case in this scenario (see Configuring a Reply for more information on generating faults).

2. Adding an Assign

The first Assign, Prepare Output Message, contains an Assign operation that prepares the response variable (here labeled an “Output Message” for readability) in a form such that the later nodes can work on the data captured within it (that is, Copy/Insert/Assign/Replace/Delete into the Variable). In this case, that data would consist of order acknowledgments and/or errors.This Output Message is relayed to the final Reply node in the Split-Join and, in turn, returned to the original client.

3. Adding a For Each

The For Each, Iterate Through Orders, contains logic that will parse through each order in the batch, send it to an external proxy for approval, and capture an order acknowledgment in response. If there is a problem with an order, an error is sent from the invoked proxy and captured in the Error Handler. The following figure depicts the entire scope of the For Each logic.

Debugging a proxy service

4. Adding an Assign

The Assign, Prepare Purchase Order, copies the incoming purchase order requests into a variable that is referenced to check approval of the order in the next step.

5. Adding an Invoke Service

An external service, Check Order Availability, is then invoked to approve each individual purchase order. If the order is accepted, the service responds with an order acknowledgment. If the order is not accepted, the service responds with an error.The result is then stored in an output variable that is passed on to the final Assign in the next step.

6. Adding an Assign

The final Assign, Update Order Status in Output Message, takes the results of the external service invocation and copies them into the output message using an Insert operation. The aggregated response is then sent to the original client in the final Reply node, which requires no further configuration.

7. Adding an Error Handler

The Error Handler captures any Errors returned by the invoked service. It takes these errors and inserts them into the output message using an Assign operation.

Debugging a proxy service

8. Exporting and Testing the Split-Join

After you design the Split-Join, you can export it to the Oracle Service Bus console for testing and production.

Debugging a proxy service

Related Topics

Creating a New Split-Join

In order to create a new Split/Join, you must have access to a WSDL containing the operation upon which to base the Split-Join. The Split Join must be created in an existing Oracle Service Bus project within an existing Oracle Service Bus configuration project.

To create a new Split-Join:

  1. In the Oracle Service Bus perspective, select File > New > Split-Join. This opens the New Split-Join Wizard.
  2. In the New Split-Join Wizard, type or select an Oracle Service Bus project location and enter a file name for the new Split-Join. When you have finished, click Next.
  3. In the next screen, you must select a binding and then an operation on which to implement the Split-Join. There are two ways to make your selection:
    1. Choose your operation from one of the WSDLs displayed in the Select Operation tree. All of the WSDLs in your current Oracle Service Bus configuration project are available.
    2. Import your WSDL into the Oracle Service Bus configuration project using the Consume button. Consumption imports a new WSDL into your configuration from an outside source, as described in the following step.
  4. If you choose to consume the base WSDL, go through the following steps:
    1. Click Consume.
    2. Browse for the location, or “Artifact Folder,” wherein you wish to generate the consumed WSDL. The default artifact folder is your current Oracle Service Bus project.
    3. If you want to overwrite existing local files, select the checkbox.
    4. Choose the service resource in which the WSDL to be consumed resides: Enterprise Repository, File System, UDDI, URI, or Workspace.
    5. Select The WSDL that you want to consume from that Service Resource. After you have made your selection the workspace will rebuild momentarily and the Service Consumption Status dialog will appear depicting the status of your consume. If it was successful, click OK to close the dialog.
    6. The consumed WSDL is now in your Oracle Service Bus configuration project, and you can select an operation from it upon which to base your Split-Join.
  5. Click Finish.

A basic Split-Join is created and visually represented as a diagram in the Design View. By default, it consists of a Start Node, a Receive, and a Reply. The Start Node contains the Request and Response Variables introspected from the WSDL operation. The Receive is used to receive incoming request messages. The Reply is used to send response messages.

Related Topics

Configuring the Start Node

The Start Node is generated automatically whenever you create a new Split-Join. It is the starting point from which all the other nodes proceed. Configuring a Start Node can include the following tasks:

  • Add General Information
  • Define Global Variables
  • View External Services

Related Topics

Adding General Information

General information is useful for making a node more legible. It includes the ability to add a unique identifier, or Label, to the node and to supplement it with notes, or Documentation. General information is optional.

  1. To add a Label to a node, select the General tab in the Properties view and enter a unique, identifying string in the Label field. The Label that you enter appears underneath the node in the Split-Join editor.
  2. In the Documentation field enter any notes that you think are important.

Defining Global Variables

Variables in the Start Node store data that can be referenced globally, that is by any node in the Split-Join. By default, every Start Node is assigned both a request and a response variable when the Split-Join is initially created. From the Start Node, you can either create a new global variable or edit an existing global variable.

To create a new global variable:

  1. Right-click the Start Node and select Create Variable to open the Create Variable Dialog.
  2. Enter a name for the variable.
  3. Select the Variable Type (Builtin, Schema, or Message).
  4. Choose a Variable.
  5. Note: You may need to drill down into the hierarchy to select a Schema or Message Type variable.
  6. Click OK.

If it is not already open, expand the content area to the left by clicking the arrow to the left of the Start Node icon. The newly created variable appears in the Variables field along with any other global variables. To view the details of any variable, simply select it and its structure will appear in the Properties view.

To edit an existing global Variable:

  1. Open the Edit Variable Dialog in one of the following ways:
    • Right-click the selected variable and select Edit Variable from the context menu.
    • Select a variable and click Edit in the variable Properties view.
  2. Enter a name for the Variable.
  3. Select the Variable Type: Builtin, Schema, or Message.
  4. Choose a variable.
  5. Note: You may need to drill down into the hierarchy to select a Schema or Message Type variable.
  6. Click OK.

If it is not already open, expand the content area to the left of the Start Node icon. The newly created variable appears in the Variables field along with any other global variables. To view the details of any variable, simply select it and its structure will appear in the Properties view.

Viewing External Services

The External Services listed in the Start Node are those invoked outside of the context of the Split-Join. They are specified in an Invoke Service but listed here for convenience.

To view External Services, expand the content area to the left of the Start Node by clicking the arrow to the left of the Start Node icon. When an External Service is selected, a dashed blue arrow appears pointing to the Invoke Service associated with the service, and the service’s location appears in the Properties view.

Configuring a Receive

A Receive is generated automatically whenever you create a new Split-Join. The purpose of the Receive is to place incoming request data in a variable and make the contents available for later nodes to use. Configuring a Receive can include the following tasks:

  • View the Operation
  • Define the Receive Variable
  • Add General Information

Related Topics

Viewing the Operation

The Operation is based upon the initial WSDL selection for the overall Split-Join. It is displayed in the Properties View for reference.

Defining the Receive Variable

You must define the Incoming Message Variable the Receive will initialize.

  1. Select the Receive operation.
  2. Create a new Message Variable (following steps).
  3. Note: If there are no available Message Variables associated with the previously chosen Operation, you must create a new Message Variable.

    To create a new Message Variable, select Create Message Variable from the Message Variable menu, enter a variable name in the Create Variable dialog, and click OK.

Note that Message Type Namespace and Message Type are displayed automatically on the Properties page once the variable is defined.

Adding General Information

General information is useful for making a node more legible. It includes the ability to add a unique identifier, or Label, to the node and to supplement it with notes, or Documentation. General information is optional.

  1. To add a Label to a node, select the General tab in the Properties view and enter a unique, identifying string in the Label field. The Label that you enter appears underneath the node in the Split-Join editor.
  2. In the Documentation field enter any notes that you think are important.

Creating an Assign

The Assign is used for data-manipulation including initializing and updating a variable. It is composed of a set of one or more operations that can be added from the Assign toolbar. Configuring an Assign can include the following tasks:

  • Add and Configure Assign Operations
  • Add General Information

Related Topics

Adding and Configuring Assign Operations

Assign operations include Assign, Copy, Delete, Insert, Java Callout, Log, and Replace. Every Assign is composed of one or more of these operations, which you can add to the Assign using the Design Palette view.

Note: The Assign operations in the Split-Join editor are essentially the same as the corresponding actions in the Workshop for WebLogic Message Flow editor. However, one important difference is that when you are using the XQuery\XSLT or XPath Editors to edit expressions in the Split-Join context, only variables and namespaces internal to the Split-Join are available.

A brief explanation of each operation follows:

  • Assign the result of an XQuery Expression to a Variable.
  • For more information on configuring the Assign, see Assign Properties.

  • Copy the information specified by an XPath 1.0 expression from a source document to a destination document. (This operation is unique to Split-Join and has no corresponding Action in the Workshop for WebLogic Message Flow editor, as described in Adding a Copy Operation).
  • Delete a set of nodes specified by an XPath expression.
  • Note: Unlike the Oracle Service Bus delete, only an XPath expression may be deleted in a Split-Join, not the entire variable.

    For more information on configuring the Delete operation, see Delete Properties.
  • Insert the result of an XQuery Expression at an identified place relative to nodes selected by an XPath expression.
  • For more information on configuring the Insert operation, see Insert Properties.

  • Java Callout lets you invoke a Java method for processing such as validation, transformation, and logging.
  • For more information on configuring the Java Callout operation, see Java Callout Properties.

  • Log lets you log Split-Join data at a specified severity to the server log file.
  • For more information on configuring the Log operation, see Log Properties.

  • Replace a node or the contents of a node specified by an XPath expression
  • For more information on configuring the Replace operation, see Replace Properties.

Adding an Operation to an Assign

Adding an operation to the Assign involves the following steps:

  1. Drag the operation from the Design Palette into the Assign node in the Split-Join editor.
  2. Configure the operation in the Properties view.
  3. Save the Split-Join.

You can edit an operation by selecting it and modifying the properties in the Properties view.

Adding a Copy Operation

The Copy operation lets you copy the information specified by an XPath 1.0 expression from a source document to a destination document. It is an operation unique to the Split-Join editor. Adding a Copy operation to the Assign involves the following steps:

  1. Add a Copy to the Assign from the Design Palette.
  2. In the Properties view, select a Copy From type and a Copy To type.
  3. If the type is an expression, enter the expression manually or click browse to launch the XQuery Expression Builder.
  4. In the type is a variable, drill down to and select the desired element. The resulting query will be displayed in the Query field below.
  5. If the Copy From type is a Literal, enter the literal in the text field.
  6. If the Copy From type is an XML fragment, enter [or paste] the fragment in the text field.

Adding General Information

General information is useful for making a node more legible. It includes the ability to add a unique identifier, or Label, to the node and to supplement it with notes, or Documentation. General information is optional.

  1. To add a Label to a node, select the General tab in the Properties view and enter a unique, identifying string in the Label field. The Label that you enter appears underneath the node in the Split-Join editor.
  2. In the Documentation field enter any notes that you think are important.

Invoking a Service

The Invoke Service is used to invoke external, WSDL-based business services, WSDL-based proxy services, and Split-Joins. Configuring an Invoke Service can include the following tasks:

  • Select an Operation
  • Define Input and Output Variables
  • Add General Information

Related Topics

Selecting an Operation

An operation must be selected upon which to base the Invoke Service. You must select this operation before you can configure Input and Output variables. To select an operation:

  1. Add an Invoke Service operation to the Split-Join from the Design Palette.
  2. From the Operations tab in the Properties view, click Browse to launch the Service Browser.
  3. In the Service Browser, drill down to the desired service and select a Binding, then an operation.
  4. Click OK. The selected operation and its Service Location appear in the Properties view.
  5. Note: Clicking a Service Location in the Properties view will open the external service file.

Defining Input and Output Variables

An Invoke Service requires both an Input Variable and an Output Variable, unless it is a one-way invocation. The procedure to configure these variables is essentially the same. Either type of variable can be global (that is, available within the entire Split-Join) or local (that is, available within a particular context Scope.) To define either an Input or Output variable:

  1. In the Input Variable and Output Variable tabs in the Properties view, define the Message Variable for each. This can be done in two ways:
    1. Select a pre-existing variable from the Message Variable menu.
    2. Create a new Message Variable (following steps).
    3. Note: If there are no available Message Variables associated with the previously chosen operation, you must create a new Message Variable.

To create a new Message Variable:

  1. Select Create Message Variable from the Message Variable menu. The Create Message Variable Dialog appears.
  2. Provide a name for the variable.
  3. Make the variable either global or local. Global variables are accessible within the entire Split-Join, whereas local variables are restricted to the current Scope.

Message Type Namespace and Message Type are displayed automatically on the Properties view once a variable is defined.

Adding General Information

General information is useful for making a node more legible. It includes the ability to add a unique identifier, or Label, to the node and to supplement it with notes, or Documentation. General information is optional.

  1. To add a Label to a node, select the General tab in the Properties view and enter a unique, identifying string in the Label field. The Label that you enter appears underneath the node in the Split-Join editor.
  2. In the Documentation field enter any notes that you think are important.

Creating a Parallel

The Parallel creates a fixed number of configured parallel branches. Each branch has its own Scope which in turn can contain any number of nodes. Configuring a Parallel can include the following tasks:

  • Add Nodes
  • Add General Information

Related Topics

Adding Nodes

The Parallel is essentially a placeholder for a fixed number of processing branches, each with its own scope. Two branches are automatically generated by default. An individual scope may contain unique processing logic according to your construction; simply drag the appropriate nodes into the Scope. You may add additional branches with the Add Scope button.

Debugging a proxy service

Adding General Information

General information is useful for making a node more legible. It includes the ability to add a unique identifier, or Label, to the node and to supplement it with notes, or Documentation. General information is optional.

  1. To add a Label to a node, select the General tab in the Properties view and enter a unique, identifying string in the Label field. The Label that you enter appears underneath the node in the Split-Join editor.
  2. In the Documentation field enter any notes that you think are important.

Creating a For Each

The For Each is used to create conditional logic for iterating through a variable number of requests. It is primarily used to create dynamic Split-Joins. Configuring a For Each can include the following tasks:

  • Define the For Each Logic
  • Add General Information

Related Topics

Defining the For Each Logic

To define the For Each logic:

  1. Add a For Each node to the Split-Join, and select it.
  2. In the Properties view, select the Counter Variables tab, and set the Parallel property to yes or no. If you choose yes, individual branches will be processed in parallel. If you select no, they are processed sequentially.
  3. Define the Counter Variable Name by clicking the Counter Name link.
  4. Enter the Start Counter Value. If necessary, use the browse button to create a new value in the XPath Expression Builder.
  5. Note: The lowest possible starting counter value is “1.”
  6. Enter the Final Counter Value. If necessary, use the browse button to create a new value in the XPath Expression Builder.
  7. Note: The lowest possible starting counter value is “1.”

Adding General Information

General information is useful for making a node more legible. It includes the ability to add a unique identifier, or Label, to the node and to supplement it with notes, or Documentation. General information is optional.

  1. To add a Label to a node, select the General tab in the Properties view and enter a unique, identifying string in the Label field. The Label that you enter appears underneath the node in the Split-Join editor.
  2. In the Documentation field enter any notes that you think are important.

Creating an If Activity

The If Activity is used to provide conditional logic within a Split-Join. It is composed of a number of nodes that determine the behavior for the overall If activity. Each node must be individually configured. When you create an If activity, an If and an Else are automatically generated within it. You can add an unlimited number of Else If nodes with the Add Else If button.

Debugging a proxy service

Configuring an If Activity can include the following tasks:

  • Configure the If
  • Add and Configure Else If
  • Configure the Else

Related Topics

Configuring the If

The If provides a unit of conditional logic within the overall If activity. It is automatically generated when you create an If activity. Configuring an If can include the following tasks:

  • Write the logic of the condition
  • Add resulting nodes
  • Add General Information

Related Topics

Writing the logic of the condition

The If Activity executes conditional logic defined by an XPath 1.0 expression. Enter this condition in the Condition text field of the Condition tab, or click the browse button to launch and write the expression in the expression builder.

Adding resulting nodes

If the condition in the If logic is met, a subsequent node or string of nodes will result. Add and configure any resulting nodes by dragging them in sequential order to a drop point beneath the If icon.

Adding General Information

General information is useful for making a node more legible. It includes the ability to add a unique identifier, or Label, to the node and to supplement it with notes, or Documentation. General information is optional.

  1. To add a Label to a node, select the General tab in the Properties view and enter a unique, identifying string in the Label field. The Label that you enter appears underneath the node in the Split-Join editor.
  2. In the Documentation field enter any notes that you think are important.

Adding and Configuring Else If

The Else If is used to provide additional logic within the context of an overall If. You can add an Else If every time you press the “Add Else If” button.

Debugging a proxy service

Configuring an Else If can include the following tasks:

  • Write the Logic of the Condition
  • Add Resulting Nodes
  • Add General Information

Related Topics

Writing the Logic of the Condition

The Else If uses conditional logic defined by an XPath 1.0 expression. Enter this condition in the Condition text field of the Condition tab or click the browse button to launch and write the expression in the expression builder.

Adding Resulting Nodes

If the condition in the Else If logic is met, a subsequent node or string of nodes will result. Add and configure any resulting nodes by dragging them in sequential order to a drop point beneath the Else If icon.

Adding General Information

General information is useful for making a node more legible. It includes the ability to add a unique identifier, or Label, to the node and to supplement it with notes, or Documentation. General information is optional.

  1. To add a Label to a node, select the General tab in the Properties view and enter a unique, identifying string in the Label field. The Label that you enter appears underneath the node in the Split-Join editor.
  2. In the Documentation field enter any notes that you think are important.

Configuring the Else

The Else provides a final case of logic within the context of an overall If. It is automatically generated when an If is created. Configuring an Else can include the following tasks:

  • Add Resulting Nodes
  • Add General Information

Related Topics

Adding Resulting Nodes

As the final case in the If’s logic, the Else requires no conditions to be met in order to execute. It will automatically execute resulting activities when invoked. Add and configure any resulting nodes by dragging them in sequential order to a drop point beneath the Else icon.

Adding General Information

General information is useful for making a node more legible. It includes the ability to add a unique identifier, or Label, to the node and to supplement it with notes, or Documentation. General information is optional.

  1. To add a Label to a node, select the General tab in the Properties view and enter a unique, identifying string in the Label field. The Label that you enter appears underneath the node in the Split-Join editor.
  2. In the Documentation field enter any notes that you think are important.

Creating an Error Handler

The Error Handler receives and handles errors. If it is attached to a Start Node, it is a “global” Error Handler and serves as a catch-all for the output of all local Raise Error nodes. If it is attached to a Scope, it only handles errors raised locally. To create an Error Handler:

  1. Select the start node or Scope node to which the Error Handler will be added.
  2. Right-click the selected icon and select Add Catch or Add CatchAll.
  3. If you are invoking a SOAP Fault, in the Catch All tab of the Properties View, select SOAP Fault Variable Name to define a SOAP Fault variable associated with the Error Handler.

The basic Error Handler is now configured, but you may need to add additional Assign, If, and/or Reply nodes to it depending on whether you wish to execute logic upon the received faults before sending a response.

Related Topics

Creating a Raise Error

The Raise Error generates an error that causes the Split-Join to stop normal processing. If the error is not handled using an Error Handler, the Split-Join will terminate and a Fault will be sent to the Oracle Service Bus message flow. Configuring a Raise Error can optionally include documenting the nature of the error in the General Information tab.

You can also add a Re-Raise Error operation to an Error Handler. Configuration involves modifying Label and adding Documentation.

Related Topics

General information is useful for making a node more legible. It includes the ability to add a unique identifier, or Label, to the node and to supplement it with developer notes, or Documentation. General information is optional.

  1. To add a Label to an node, open the Properties view and enter a unique, identifying string in the Label field. The Label that you enter appears underneath the node Icon in the Canvas area.
  2. In the Documentation field enter any notes that you think are important.

Configuring a Reply

A global Reply is generated automatically whenever you create a new Split-Join. The purpose of the global Reply is to send a response back to the invoking Oracle Service Bus message flow. However, you may also create a Reply elsewhere in the Split-Join, including within Error Handlers. Configuring the Reply can include the following tasks:

  • View the Operation
  • Define the Reply Variable
  • Add General Information

Related Topics

Viewing the Operation

The operation is based upon the initial WSDL selection for the overall Split-Join. It is displayed in the Properties view for reference.

Defining the Reply Variable

The Reply can either send a Response or a Fault back to the client depending on how you configure the variable. The Fault options available vary depending upon whether the Reply is global or local.

  • A global Reply (that is, a Reply in a Split-Join outside of an Error Handler) can never have a SOAP Fault but can have a WSDL Fault. This is why the SOAP Fault option is always disabled.
  • A local Reply (that is, a Reply attached to an Error Handler) can have either a WSDL Fault or a SOAP Fault. WSDL Faults will be available only if they were defined in the WSDL upon which the Split-Join is based. The SOAP Fault option will always be available provided one has been previously defined in the Error Handler.
Note: Switching back and forth between the Response and Fault buttons will clear either configuration. For instance, if you have previously selected “Propagate SOAP Fault” for Fault configuration and you then switch to the “Response” configuration, “Propagate SOAP Fault” will be deselected.

Given the available options as outlined above, select either a Response or a Fault for your Reply Variable.

If you select Response, you must define the Message Variable the Response will be assigned to. This can be done in two ways:

  1. Select the Reply, and in the Properties view, select the Variable tab.
  2. Select a pre-existing variable from the Message Variable menu.
  3. Create a new Message Variable (following steps).
  4. Note: If there are no available Message Variables associated with the previously chosen operation, you must create a new Message Variable.

To create a new Message Variable, select Create Message Variable from the Message Variable menu. The Create Message Variable Dialog appears:

  1. Provide a name for the variable.
  2. Click OK.

Note that Message Type Namespace and Message Type are displayed automatically in the Properties view once the variable is defined.

If you select Fault, you must specify either a WSDL Fault or propagate a SOAP Fault.

Note: In some circumstances, no Faults or only a SOAP Fault will be available. See previous notes.

If you select a WSDL Fault, you must specify the Fault by name and define the Message Variable that it will be assigned to.

  1. Select WSDL Fault Name and choose a name from those available.
  2. Note: There may only be one name available in which case no choice is necessary.
  3. Define a Message Variable. This can be done in two ways:
    1. Select a pre-existing variable from the Message Variable menu.
    2. Create a new Message Variable (following steps).
    3. Note: If there are no available Message Variables associated with the previously chosen operation, you must create a new Message Variable.

To create a new Message Variable, select Create Message Variable from the Message Variable menu. The Create Message Variable Dialog opens:

  1. Provide a name for the variable.
  2. Click OK.

Message Type Namespace and Message Type are displayed automatically on the properties page once a variable is defined.

If you select Propagate SOAP Fault, the SOAP Fault specified in the parent Error Handler will automatically be propagated in the Reply. There is nothing else to configure.

Adding General Information

General information is useful for making a node more legible. It includes the ability to add a unique identifier, or Label, to the node and to supplement it with notes, or Documentation. General information is optional.

  1. To add a Label to a node, select the General tab in the Properties view and enter a unique, identifying string in the Label field. The Label that you enter appears underneath the node in the Split-Join editor.
  2. In the Documentation field enter any notes that you think are important.

About Scope

A Scope is a container that groups various elements together. The container creates a context that influences the behavior of its enclosed elements. Local Variables and the Error Handler defined within the Scope are restricted to this context. However, some nodes within the scope may operate both locally (that is, within the Scope) and globally (that is, outside of the Scope.) For instance, an Invoke Service within a certain Scope might call upon an service external to the Scope’s context.

Related Topics

Exporting and Testing a Split-Join

You can export and test a Split-Join on an Oracle Service Bus server provided that it is associated with a transport typed business service. Exporting and testing a Split-Join can include the following tasks:

  • Creating a Transport Typed Business Service
  • Exporting the Split-Join Files
  • Testing the Split-Join in the Test Console

Creating a Transport Typed Business Service

A Split-Join is used by a particular transport typed business service. If you do not have an appropriate business service, you must create one before you can export or test your Split-Join. There are two ways to create a business service:

  1. Create the business service manually in Workshop for WebLogic or the Oracle Service Bus console.
  2. Generate the business service automatically from the Split-Join (.flow) menu:
    1. Right click on the Split-Join (.flow) file in the Project Explorer to open the Split-Join menu.
    2. Select Oracle Service Bus.
    3. Select Generate Business Service.
    4. Name and save the new service in a project.

After you create the business service, you can export the Split-Join provided that it has no errors.

Note: It is a helpful practice to place the associated business service in the same Oracle Service Bus project as the Split-Join. It can also be useful to give the business service the same name as the Split-Join so that they are easily correlated.

Exporting the Split-Join Files

Split-Joins without errors can be exported to an Oracle Service Bus server.

Note: Errors appear in the Problems view of the Split-Join editor. If you try to export a Split-Join with errors, the export fails.

There are three ways to export a Split-Join:

  1. Export from the Business Service Menu
  2. Auto-export
  3. Manual export
Exporting from the Business Service Menu

It is possible to export a Split-Join directly from the Business Service menu. However, because exporting by this method automatically launches the Oracle Service Bus Test Console, it is useful if you want to both export and test. Exporting from the Business Service menu involves the following steps:

  1. In the Project Explorer, right click on the Business Service (.biz file) to be exported/tested.
  2. Select Run as.
  3. Select Run on server. The Run on Server Dialog opens.
  4. Select an existing server or define a new one and go to the next step.
  5. In the Add and Remove Projects window, the Oracle Service Bus project containing the business service and any other dependent files have been pre-selected for configuration/export. They can not be removed because the business service can not be tested without its dependent files. The entire Split-Join will therefore be exported.
  6. Select Finish, and the Oracle Service Bus Test Console will launch. You can now test the business service.
Auto-export

A Split-Join can be auto-exported to an Oracle Service Bus server. If you use this method, you must manually launch the Oracle Service Bus console in order to test the exported files. Auto-exporting involves the following steps:

  1. Select File > Export.
  2. Select Oracle Service Bus.
  3. Select Resources to Oracle Service Bus Server. This will export the resources to the Oracle Service Bus server, but it will not launch the Oracle Service Bus Test Console. You must launch the Test Console manually within the Oracle Service Bus console application.
Manual export

A Split-Join can be manually exported to an Oracle Service Bus server. If you use this method, you must manually launch the Oracle Service Bus console to test the exported files. Manually exporting involves the following steps:

  1. Select File > Export.
  2. Select Oracle Service Bus.
  3. Select Resources as Configuration JAR and go to the next step.
  4. In the Oracle Service Bus Configuration JAR Export window, configure the following options:
    1. Select the Oracle Service Bus Configuration file containing the files to be exported.
    2. Set the Export Level to Project or Resource depending upon whether you wish to export entire projects or individual files. The selection available in the tree below will change based upon the Export Level.
    3. Select the projects and/or resources to be exported in the configuration JAR.
    4. Select Include Dependencies if you want to export any file dependencies associated with the selected files.
    5. Browse to a destination for the exported JAR file.
    6. Click Finish to export the JAR file.
  5. Import the JAR file via the Oracle Service Bus console.
Note: A quick way to access the Oracle Service Bus console from Workshop for WebLogic is to right-click the server and select Launch Service Bus Console.

Testing the Split-Join in the Test Console

You can test a Split-Join by executing the business service that uses it in the Oracle Service Bus Test Console. This can either be done within the Split-Join editor or by exporting the Split-Join to an Oracle Service Bus server. To test the Split-Join within the IDE, you need to export the files using the menu for the business service that uses the Split-Join.

Exporting from the Business Service Menu

You can export and test a Split-Join directly from the Business Service menu. If you use this method, the export happens in the background while the Oracle Service Bus Test Console launches. Exporting from the Business Service menu involves the following steps:

  1. In the Project Explorer, right click on the Business Service (.biz file) to be exported/tested.
  2. Select Run as.
  3. Select Run on server. The Run on Server Dialog appears.
  4. Select an existing server or define a new one and go to the next step.
  5. In the Add and Remove Projects window, the Oracle Service Bus project containing the business service and any other dependent files have been pre-selected for configuration/export. The dependent files cannot be removed because the business service cannot be tested without its dependent files.

Click Finish, and the Oracle Service Bus Test Console will launch. You can now test the business service.

Note: Although only the Oracle Service Bus Test Console is displayed at this point, the entire Split-Join has been exported to the Oracle Service Bus server.
      Tech/BPEL PM  |  2009. 3. 11. 18:08




Configuring Business Services using the HTTP Transport

You must select HTTP as the transport protocol when you configure any type of business service based on HTTP and the endpoint URI is of the form:

http://<host:port/someService>

where:

  • host: is the name of the system that hosts the service.
  • port: is the port number at which the connection is made.
  • someService: is a target service.
Note: You must specify the following endpoint URI when you configure a business service based on HTTPS.
Note: https://<host:port/someService>

Table 1-2 describes all the parameters you can specify to configure HTTP transport for a business service.

Table 1-2 Parameters for Configuring HTTP Transport for Business Service
Parameter
Description
Timeout
This parameter specifies the HTTP timeout interval, in seconds, before the connection is dropped. The default value for this parameter is 0, meaning that there is no timeout.
HTTP Request Method
This parameter lets you to use one of the following HTTP methods in a request:
  • POST – Passes all its data, of unlimited length, directly over the socket connection as part of its HTTP request body. The exchange is invisible to the client, and the URL does not change. For REST-based requests, POST tells the transport to perform a create/replace operation or perform an action with the request.
  • GET – You can include as part of the request some of its own information that better describes what to get. This information is passed as a sequence of characters appended to the request URL in a query string. You can use GET in a business service with a Service Type of “Any XML Service,” or with a Service Type of “Messaging Service” when the Request Message Type is set to “None.” For REST-based requests, GET retrieves a representation of a remote resource.
  • PUT – You can use PUT in a business service with a Service Type of “Any XML Service” or “Messaging Service.” PUT tells the transport to perform a create/replace operation with a REST-based request, such as uploading a file to a known location.
  • HEAD – You can use HEAD in a business service with a Service Type of “Any XML Service,” or with a Service Type of “Messaging Service” when the Response Message Type is set to “None.” HEAD tells the transport to get header information for a remote resource rather than getting a full representation of the resource in a REST-based request.
  • DELETE – You can use PUT in a business service with a Service Type of “Any XML Service” or “Messaging Service.” DELETE tells the transport to perform a delete operation with a REST-based request.

Note: If a method is already set in the $outbound/transport/request/http:http-method variable, that value takes precedence over any method you select for HTTP Request Method.
Authentication
Select one of the following:
  • None - Specifies that authentication is not required to access this service.
  • Basic - Specifies that basic authentication is required to access this service.
  • Basic authentication instructs WebLogic Server to authenticate the client using a user name and password against the authentication providers configured in the security realm, such as a Lightweight Directory Access Protocol (LDAP) directory service and Windows Active Directory. The client must send its user name and password on the HTTP request header.

    Basic authentication is strongly discouraged over HTTP because the password is sent in clear text. However, it is safe to send passwords over HTTPS because HTTPS provides an encrypted channel.

    Warning: By default, all users (authorized and anonymous) can access a business service. To limit the users who can access a business service, create a transport-level authorization policy. See Editing Transport-Level Access Policies in Using the Oracle Service Bus Console.

  • Client Certificate - Specifies encrypted communication and strong client authentication (two-way SSL). To learn more, see Configuring Transport-Level Security in the Oracle Service Bus Security Guide.
Service Account
A service account is an alias resource for a user name and password. This is a required field if you selected the Basic Authentication Required field.
For more information, see Service Accounts in Using the Oracle Service Bus Console.
Follow HTTP redirects
Select this check box to specify that HTTP redirects (which are requests with a response code 3xx) should be automatically followed. A re-direct occurs when you send an outbound request to the URL of a business service, and that service returns a response code (for example, 302) that says the URL is no longer valid and this request needs to be sent to another URL. If the Follow HTTP Redirects check box is selected, Oracle Service Bus automatically re-sends the request to the new URL without any action on your part. Deselect this check box if you do not want the HTTP redirects to be automatically followed.
Dispatch Policy
Select the instance of WebLogic Server Work Manager that you want to use for the dispatch policy for this endpoint. The default Work Manager is used if no other Work Manager exists. For information about Work Managers, see Using Work Managers to Optimize Scheduled Work and Create Work Manager in the WebLogic Server Administration Console Online Help.
Request Encoding
Accept the default iso-8859-1 as the character set encoding for requests in HTTP transports, or enter a different character set encoding.
Response Encoding
Accept the default iso-8859-1 as the character set encoding for responses in HTTP transports, or enter a different character set encoding.
Proxy Server
Enter a proxy server resource or click Browse to choose an entry from the list of configured proxy server resources.

For more information on how to configure this transport, see Transport Configuration in Using the Oracle Service Bus Console.

REST Support

The HTTP transport provides support for working with REST (Representational State Transfer) environments through Oracle Service Bus, whether you have REST clients that need to interact with non-REST service providers, non-REST clients that need to interact with REST-based service providers, or REST-to-REST services you want to expose through Oracle Service Bus.

In a REST pattern, you invoke HTTP methods (such as GET, PUT, HEAD, POST, and DELETE) on resources that are located at specific URLs. For example, when a user updates his own profile information in a Web application that uses REST, a POST action updates the user information in the database through the service’s REST API.

Oracle Service Bus provides the following placeholder variables for handling REST-based requests for inbound and outbound communication:

  • $inbound or $outbound/transport/request/http:http-method – For handling HTTP methods such as GET, PUT, HEAD, POST, and DELETE.
  • $inbound or $outbound/transport/request/http:query-string – For handling query strings in a URL. For example, in the URL http://localhost:7021/myproxy/weather?operation=temperature&pincode=80439/, the query string is operation=temperature&pincode=80439.
  • $inbound or $outbound/transport/request/http:relative-URI – For handling relative portions of a REST resource URL (relative to the proxy service URI). For example, in the URL http://localhost:7021/myproxy/weather, /weather is a relative URL to http://localhost:7021/myproxy.

REST in Proxy Services

With an Oracle Service Bus proxy service, you have the flexibility to interact with REST patterns, whether you are receiving REST-based requests or generating REST-based actions.

For example, if your team wants to develop REST-based applications and invoke services in a non-REST service provider, you can send REST operations through a proxy service and transform those operations into a format the service provider understands; or you could transform a non-REST request into a resource URL and invoke an operation in a REST-based service provider.

XQuery Examples

Following are XQuery examples of URI parsing using HTTP variables in a proxy server.

Relative-URI

A proxy service has a URI http://localhost:7001/weather, and you want to capture the relative URI parts of a request. You create the following XQuery:

<relative-URI>
{
for $c in
fn:tokenize($inbound/ctx:transport/ctx:request/http:relative-URI, "/")
where fn:string-length($c) != 0
return
<part>
{$c}
</part>
}
</relative-URI>

If a request comes with the URI of http://localhost:7001/weather/temperature/35457, the relative-URI will be /temperature/35457, and the XQuery output will be:

<relative-URI>
<part>temperature</part>
<part>35457</part>
</relative-URI>

Query-String

A proxy service has a URI http://localhost:7001/weather, and you want to capture the URL query string. You create the following XQuery:

<query-params>
{
for $c in
fn:tokenize($inbound/ctx:transport/ctx:request/http:query-string, "&amp;")
return
<param name="{fn:substring-before($c,"=")}"
value="{fn:substring-after($c,"=")}"></param>
}
</query-params>

If a request comes with a URI of http://server:7001/weather?operation=temperature&pincode=35457, the query-string will be operation=temperature&pincode=35457, and the XQuery output will be:

<query-params>
<param name=’operation’ value=’temperature’/>
<param name=’pincode’ value=’35457’/>
</query-params>

REST in Business Services

With an Oracle Service Bus business service, you can invoke REST-based services.

For REST operations, the HTTP transport uses the value in the $outbound/transport/request/http:http-method variable. If that variable does not supply an HTTP method, the HTTP transport lets you select one of the following HTTP Request Methods in the transport configuration: POST, PUT, HEAD, GET, AND DELETE.

Note: If the business service uses a Service Type of WSDL Web Service, only the POST method is available.

Using the $outbound/transport/request-http/http-method variable, you can also supply your own methods. For example, you can use COPY, MOVE, and LOCK for WebDAV environments (Web-based Distributed Authoring and Versioning).

Use the following guidelines for setting $outbound variables:

  • The transport does not provide run-time validation for custom methods or for manually set supported methods that do not comply with the constraints described in this section.
  • Since $outbound is only available in a Routing node, you cannot specify a method name at run time for publish and service callout actions.
  • If the $outbound query-string is set, the business service passes the query string as part of the URI while invoking an external service.
  • If the $outbound relative-URI is set, the business service uses that value to generate the URI, which is relative to the business service URI.
  • For example, in a business service with a URI of

    http://service.com/purchaseOrder

    and the following HTTP variables

    $outbound/transport/request-http/relative-URI: “/PO12367” and
    $outbound/transport/request-http/query-string: “item=NO1&color=black”

    The final resolved URI is

    http://service.com/purchaseOrder/PO12367?item=NO1&color=black

Response Codes for HTTP Business Services

The HTTP transport provides the following response codes for HTTP methods:

Method
Response Codes
POST
200 (OK)
201 (Created)
204 (No Content)
PUT
200 (OK)
201 (Created)
204 (No Content)
301 (Moved Permanently) – The server sends the response code. The business service handles this response by resending the original request.
HEAD, GET
200 (OK)
DELETE
200 (OK)
202 (Accepted)
204 (No Content)

 

      Tech/BPEL PM  |  2009. 3. 11. 18:05




Integrating PeopleSoft Integration Broker and Oracle Service Bus

The recent BEA acquisition augments Oracle SOA Suite with BEA's AquaLogic Service Bus (henceforth referred to as the Oracle Service Bus). OSB offers a lightweight Enterprise Service Bus to connect, mediate and manage interactions between heterogeneous services and legacy applications. The go-forward strategy is to offer a unified service bus architecture that combines the respective strengths of the (existing) Oracle Enterprise Service Bus and the (newer) OSB, in addition to providing an automated upgrade path for existing customers.

This tutorial demonstrates some of the core ESB features.

Tutorial overview

The core OSB features showcased are:

  • Connectivity, via the ability to access and integrate applications using a standards based approach (SOAP).
  • Messaging and Routing: Once connectivity is established, incoming data and messages are routed to their appropriate destination. Routing decisions are usually based on headers, content or other external rules.
  • Transformation: As data flows between services, it needs to be transformed to match the format that target services expect to receive.

We show how an outbound SOAP message generated by PeopleSoft Integration Broker can be consumed by the Oracle Service Bus. OSB then transforms the message using XQuery and routes it to the appropriate business service, using content based routing (CBR). This is a typical business scenario -- where events are generated in a PeopleSoft module and then published to various external applications.

Use case

PeopleSoft CRM generates a single purchase order containing multiple line items, and no single vendor is capable of supplying all the line items. As a result, the purchase order needs to be split (transformed) into several individual orders containing the respective line items. The individual purchase orders will also need to conform to the schema of the respective vendor business services before they can be routed onwards. The tutorial defines two business services: "Vendor A" to supply product IDs 0-10100 and "Vendor B" for the remaining products.

The individual purchase orders contain the following fields:

  • Order number
  • Product ID
  • Quantity
  • Total price

Purchase orders for Vendor B contain an additional field:

  • Business unit

Implementation details

The main steps in the process are:

  1. Configure PeopleSoft CRM to publish an outbound event message via the Integration Broker.
  2. Implement CBR (in the Oracle Service Bus) and define the relevant business services (Vendor A and Vendor B). This tutorial uses a file system to represent the different vendors.
  3. Route the incoming messages using CBR to the appropriate business service, while ensuring that the payload conforms to the expected format (i.e: invoke the appropriate transformation logic)

Upon successful execution, the incoming purchase order from PeopleSoft CRM is transformed and routed to the two business services.

      Tech/BPEL PM  |  2009. 3. 11. 17:25




Integrating PeopleSoft HCM with BPA Suite and SOA Suite

We illustrate the progression of a business process from the initial modeling to the eventual creation of the executable software using Oracle BPA Suite, Oracle SOA Suite and PeopleSoft HCM.

Oracle BPA Suite provides a standards based approach for the modeling, analysis and simulation of business processes. Sharing these process models with the development team is as easy as clicking a button that reads “Share Blueprint with IT” which then exports the process metadata to the Oracle SOA Suite (Oracle BPEL PM, Oracle JDeveloper). The development team integrates the resulting BPEL model with the backend PeopleSoft HCM to create the executable software.

The tutorials will showcase these capabilities:

  • Modeling a business process and exporting it to the development environment.
  • Round trip integration between the modeling and the development environments.
  • Creation of executable software and integration with the backend application.

Use Case

Consider a benefits enrollment process where an employee has a qualifying event (the birth of a child, for instance) and now needs to enroll this new born child for health benefits and also make changes to the employee's payroll withholding to account for the new dependent.

While a typical benefits enrollment is often more complex than the above description, this tutorial focuses on a simplified scenario to illustrate the principal concepts and for ease of implementation and demonstration.

The process model is setup to accept all the relevant information (Employee ID, payroll withholding information, dependent's name, birth date, etc) upfront. The appropriate business processes (Insert Dependents, Insert W4) are subsequently invoked using this input data.

Implementation

The figure below summarizes the interaction between the business analyst and the process developer. The business repository contains the shared metadata and helps to keep the modeling and the development environments in sync.

overview.JPG

There are three distinct phases in the implementation process (click on the links below for detailed instructions):

  • Step 1: Create the business process model using Oracle BPA Suite and generate the metadata (referred to as the process blueprint).
  • Step 2: Use Oracle JDeveloper to generate the BPEL model from the previously created process blueprint; round trip integration between the modeling (Oracle BPA Suite) and the development (Oracle JDeveloper) environments.
  • Step 3: Using Oracle JDeveloper, the BPEL partner links created in Step 2 are modified to invoke the corresponding PeopleSoft CI service and the appropriate BPEL artifacts are added to create the executable software. The BPEL project file that was used is available here.

    Additional information on generating a web service from the PeopleSoft CI is available at the PeopleSoft Best Practice Center.

      Tech/BPEL PM  |  2009. 3. 11. 17:23




Creating an Account in Siebel Using BPEL and Web Services

This tutorial shows you how to create, deploy, and test a BPEL process to create customer accounts in a Siebel Application.

Approximately 1 hour

Topics

This tutorial covers the following topics:

Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.)

Note: Alternatively, you can place the cursor over an individual icon in the following steps to load and view only the screenshot associated with that step. You can hide an individual screenshot by clicking it.

Overview

Siebel applications are built on a rich technology stack, and have been supporting web services starting from version 7.5.3 . Major web services support came in version 7.8 and in 8.0 it was expanded to support numerous out of the box web services for Customer Order Management. Hence if you are working with any version later than 7.8, then you can typically use direct web services for integration. BPEL Process Manager is certified with Siebel v 7.8.2 onwards. This tutorial demonstrates how to use BPEL Process Manager to consume a Siebel generated WSDL to invoke an inbound Siebel Account Web Service (also known as Siebel ASI - Application Service Interface)

Back to Topic List

Before you perform this tutorial, you should:

1.

Have installed Oracle SOA Suite 10g (10.1.3.1). You can download the software from Oracle Technology Network web site.

2.

Have installed Oracle JDeveloper 10g. (10.1.3.2). You can download the software from Oracle Technology Network web site.

3.

Have access to Siebel 7.8 instance with Call Center.

4.

Have access to the SiebelAccount.xsd file. Right click the file link and choose Save Target As .... from context to download and save the file to a local directory of your choice. You use this file later in this tutorial.

5.

Perform the steps provided in the tutorial Create an Inbound Web Service for Siebel Account Business Service

   

Back to Topic List

Log in to Siebel Call Center

Log in to Siebel Call Center using appropriate credentials. Perform the following steps:

1.

Enter the following URL to log in to Siebel Call Center (change the <hostname> to localhost or your specific hostname). Note that the port number used in this tutorial is 7777, which might be different for your setup/operating system. Use the port number that is appropriate for your setup.

http://<hostname>:<port#>/callcenter_enu/start.swe

 

2.

To log in to Siebel Call Center, enter the credentials of a System Administrator, and click Login. In this example, following values are used:


Username: SADMIN
Password: SADMIN

 

3.

Siebel Call Center Home page appears. Click the Site Map (spherical) icon on the home page to view available services.

Back to Topic List

In this topic, you select an inbound Web Service that exposes a Siebel account called Customer Account and generate WSDL for it. To do this, perform the following steps:

 

1.

Left mouse click the Administration - Web Services link to bring up the administrative options for Web Services.

 

2.

Click the Inbound Web Services link to view the list of delivered Web Services.

You now see the Inbound Web Serivces screen that lists all available Inbound Web Services.

 

3.

Scroll down the list of Inbound Web Services to locate the Customer Account Web Service. This is a delivered Web Service that exposes a Siebel account named Customer Account. (You create this Web Service from a previous OBE tutorial in this series named Create an Inbound Web Service for Siebel Account Business Service.

Alternatively click the Query button to locate this Web Service.

Enter Customer Account as Web Service name to be queried and click Go. Note that the query is case sensitive.

This query displays entry of the Customer Account Web Service.

 

4.

Click Clear Cache to refresh the cache. You perform this task each time you make changes such as change the Namespace URL/Name of a Web Service.

 

5.

Examine the Service Port and Operations sections corresponding to the Customer Account Web Service by scrolling down the window. Notice the Transport (HTTP) and Address Field(URL) values.

You may observe from the Transport drop down list that there are other transport protocols/methods available such as MQ and JMS.

 

6.

In the Operations section, notice that three operations (Insert, Query by ID, and Query By Example) are exposed for the Customer Account Web Service. For this tutorial, you use the Insert operation on this Customer Account Web Service. You need this information for importing the WSDL while creating a BPEL process using JDeveloper, as explained later in this tutorial.

 

7.

In the Inbound Web Services section, click the Generate WSDL button to generate a WSDL file for the Customer Account Inbound Service.

View the generated WSDL in a browser window.

8.

In the browser window, select File > Save As to save the generated WSDL file as SiebelAccountInsertWS.wsdl. You use this WSDL file later in the BPEL process design time

Back to Topic

Create, Deploy, and Test a BPEL Process To Create a Customer Account in Siebel

In this topic, you create, deploy, and test a BPEL process. To do this, perform the following steps:

A Create and Deploy a BPEL Process that invokes methods of a Siebel Inbound Webservice.
B. Test the integration with Siebel

Back to Topic List

Create and Deploy a BPEL Process

In this topic, you learn to create a BPEL process and deploy it to the default Application Server connection. Perform the following steps:

Prerequisites:

Perform the following prerequisite steps:

1.

Start SOA Suite: Click Start > Programs > Oracle-SOA > Start SOA Suite.

2.

Start BPEL Console. Click Start > Programs > Oracle-SOA > Oracle BPEL Process Manager > BPEL Control.

 

3.

Now, start JDeveloper to design the BPEL process. Double-click the JDeveloper executable jdeveloper.exe found in the root directory (<jdev_home>) where you unzipped it.

If the Migrate User Settings dialog box opens, click NO.

Close the Tip of the Day window.

The JDeveloper IDE should now be displayed.

 

Create a BPEL Process

In this task, you create a BPEL Process based on a .xsd file that contains structure of a Siebel customer account sample. You extracted this file from a previous step in this tutorial. Perform the following steps to complete this task:

Create a BPEL Process
1.

In JDeveloper, right click the Applications node in the Applications Navigator and select New Application from context.

.

 

2.

In the Create Application dialog box, enter the Application Name as SiebelCust_WS and click OK. This application hosts a BPEL process that you are going to create later in this tutorial.

 

3.

Do not create an associated project at this point. Hence, in the Create Project dialog, Click Cancel.

 

4.

Observe that the application SiebelCust_WS is created in your Applications window. Now you create a synchronous BPEL process under this application. Right click this application and select New Project.

5.

In the New Gallery window, select BPEL Process Project and click OK

.

6.

In the BPEL Project Creation Wizard, enter name of the process as SiebelCreateAccount. Select Synchronous BPEL Process as the template. Click Next

.

7.

To select an Input Schema Element, click the browse icon, navigate to the directory where you saved the SiebelAccount.xsd file from a previous step in this tutorial, and select the file. This .xsd file resembles structure of a customer account that has to be created in Siebel.

.

8.

Expand the Type Explorer from the Type Chooser popup window to select SiebelAccount.xsd as the Type. Click OK.

.

Click Finish

9.

Observe the tree structure in the Application Navigator window and the SiebelCreateAccount.bpel process design window.

Create a Partner Link

In this task, you create a partner link that is based on the WSDL file generated from a Siebel Inbound Web service earlier in this tutorial. Perform the following steps to complete this task:

1.

Rightclick anywhere in the Services section the SiebelCustomerAccount.bpel designer window and select Create Partner Link.

 

2.

Enter name of the partner link as Siebel_BPEL. Click the Browse WSDL Files from Local File System button to select the WSDL file that was generated through the Siebel Call Center in a previous step in this tutorial.

 

3.

Choose the SiebelCustomerAccount_80.wsdl file from your local file system where you saved it earlier in this tutorial. Click Open.

4.

If you receive a message that you are attempting to reference a WSDL that is external, click Yes.

Click Yes in the Partner Link Type box to create a new WSDL file that creates Partner Link types.

5.

Select CustAccount_Role for both the Partner Role and My Role fields.

Click Ok.

6.

View the Partner Link created under the Services section of the SiebelCreateAccount.bpel diagram view.

Create an Invoke Activity
1. From the BPEL Designer window, click the Component Palette and select Process Activities from the drop down list.

Drag the Invoke activity from the Process Activities list and drop it below the receiveInput activity in the SiebelCreateAccount.bpel diagram view.

2.

Create a link between the Invoke_1 activity and the Siebel_BPEL Partner Link. Perform this step by dragging the link icon from the Invoke_1 activity to the partner link. This step helps to establish a structural relationship between the variables of the BPEL process and the .xsd file.

3.

Now set properties for the invoke activity. Set Name of the Invoke activity as Invoke_InsertSiebelAccount

Select AccountInsert as the operation to be performed.

Click the Automatically Select the Input Variable icon next to the Input Variable field. Select the default Global variable displayed. Click OK.

Select default Global variable for the Output Variable in a similar way.

Click Ok to complete the process of setting the properties of the Invoke activity. Observe the settings.

 

Create a Transform Activity to Send Input Request Data to The Invoke activity
1. From the BPEL Designer window, click the Component Palette and select Process Activities from the drop down list. Scroll down the Process Activities list to locate Transform icon.

Drag the Transform activity from the Process Activities list and drop it between the receiveInput activity and the Invoke_InsertSiebelAccount activity in the SiebelCreateAccount.bpel diagram view. This activity helps to assign values to the input variable.

2.

Double click the Transform activity to set properties for input variables. select Invoke_InsertSiebelAccount_InputVariable as the Target Variable. Observe the change in values displayed in the Target Part for the payload.

Ignore the error indication in the Transform window. It goes away after you validate your activity successfully.

Click SiebelMessage from the Target Part. With this step, you are now assigning a payload to the SiebelMessage.

Click Apply.

3.

In the Transformation_1.xsl diagram view, observe the payload structure displayed from the source and the target account. Under the Target section, expand the ns1:ListOfAccountInterface node by one level to observe the ns:Account. node.

Now create a mapping between the source and the taget input variables. To perform this task, point the mouse at the source SiebelAccount variable and drag it to map to the target variable ns1:Account.

In the Auto Map Preferences pop-up window, make sure that the Match Elements with Exact Names option is selected and click OK.

Observe that a mapping is now created between the source and target input variables.

You can expand the target variable further to see field to field mapping.

4.

Save all your changes. Activate the SiebelCreateAccount.bpel diagram view. Click the Validate Process button to validate the transformation. Click OK to complete the transformation process in the Transform Window.

Create an Assign Activity to Send Output Data from the Invoke activity
1. From the BPEL Designer window, click the Component Palette and select Process Activities from the drop down list. Scroll the Process Activities list to locate the Assign icon.

Drag the Assign activity from the Process Activities list and drop it between the Invoke_InsertSiebelAccount activity and the receiveOutput activity in the SiebelCreateAccount.bpel diagram view. This activity helps to assign values to the invoke output variable.

2.

Double click the Assign activity to set properties for output variables. In the Assign Window enter the following information:

In the General tab, assign name of the activity as CopyOutput and click Apply

 

3.

In the Copy Operation tab, click Create to display the Create options window and select Copy Operation from the drop down list.

In the From section, expand the Process > Variables > Invoke_InserSiebelAccoutn_AccountInsert_OutputVariable > SiebelMessage > ns3:ListOfAccountInterface > ns3:Account variable and select the ns3:AccountId variable. This is the source output variable whose value will be copied to the target output variable. Note: The number next tot he NS might be different in your instance.

In the To section, expand the Process > Variables > OutputVariable > payload > client:SiebelCreateAccoutnProcessResponse > client:result node.

Click OK in the Create Copy Operation window.

Click OK in the Assign window to complete the assign process.

Save all your work.

In this topic, you create a connections to an application server and to an Integration server to whcih you deploy your BPEL process and then test the process. To do this task, perform the following steps:

a.
b.
c.

a. Create a Connection to the Application Server and to the Integration Server:

In this task, you create connection to the Integration server to which you deploy the BPEL process. This inturn requires a connection made to the Application Server where the SOA Suite is installed.

1.

In BPEL Designer, select the Connections Navigator tab. Right click Application Server and select New Application Server Connection.

Click Next on the Welcome page.

2.

Type iAS10g for the Connection Name and choose Oracle Application Server 10g 10.1.3 from the Connection Type drop down list. Click Next.

 

3.

Enter username and password for the connection. These are the values you must have provided while installing the SOA Suite server. For this tutorial, these values are set as oc4jadmin and welcome1 respectively.

Click Next.

4.

Specify hostname, OC4J instance name, and the OPMN port number values as appropriate for your SOA Suite installation.

Click Next.

5.

Click Test Connection button and wait to see the results. The results should indicate that the connection is successful, as shown in the following screenshot.

If the connection is not successful, adjust your Application Server settings and retest the connection.

Click Finish when your test is successful.

6.

In the BPEL Designer, select the Connections Navigator tab. Right click Integration Server and select New Integration Server Connection.

Click Next on the Welcome page.

7.

Type SOAConnection for the Connection Name. Click Next.

 

8.

Set Application Server to the name you used in step 2 above and Host Name as appropriate for your installations. Port number is set in this tutorial to 8888. You need to verfiy values set for your SOA server nd provide the same here.

Click Next.

9.

Click Test Connection button and wait to see the results. The results should indicate that the connection is successful, as shown in the following screenshot.

If the connection is not successful, adjust your Application Server and Host name settings and retest the connection.

Click Finish when your test is successful.

With this step, you created a connection to the Integration Server to which you deploy the BPEL process created in a previous step.

b. Deploy BPEL Process to the Integration Server:

In this topic, you deploy the BPEL Process SiebelCustomerAccount.bpel to the Integration Server SOAConnection. To complete this task, perform the following steps:

1.

In the Application Navigator window, select and right click the SiebelCustomerAccount.bpel node.

Select Deploy > SOAConnection > Deploy to a default domain from the resulting menu options.

 

2.

In the Message Log window, notice the message that the deployment is successful, as shown in the following screenshot.

If you receive Deployment failed message, verify your BPEL process for any errors and redeploy the application.

c. Test the deployed BPEL process using BPEL Control:

In this step you test the BPEL process created in this tutorial and enter details to insert a customer account through the BPEL Control. Perform the following tasks:

1.

Select Start > Programs > Oracle - SOA > Oracle BPEL Process Manager > BPEL Control to open the BPEL Control

2.

In the browser window, enter username and password as set during your SOA Suite installation. For this tutorial, username/password are used as oc4jadmin/welcome1.

3.

Click the SiebelCustomerAccount from the Deployed BPEL Processes list in the Dashboard.

4.

In the Payload section, enter details for one Siebel Customer Account.

Click Post XML Message button. This process inserts a Siebel Customer account and returns a unique identifier using which you can query for the Customer account when required.

5.

Observe the unique identifier that is returned for the customer account created in the previous step.

 

Back to Topic

In this tutorial, you learned how to:

Generate a WSDL file from Siebel Call Center
Create, deploy, and test a BPEL process to insert a Siebel customer account.
      Tech/BPEL PM  |  2009. 3. 11. 17:09




Improving Service Performance with Split-Join

Oracle Service Bus’s advanced mediation feature, called Split-Join, helps you improve service performance by concurrently processing individual messages in a request. This topic, which describes Split-Join, includes the following sections:

 Split-Join으로 불리는 OSB의 향상된 중개 특징은 요청에서 다발적으로 발생되는 각각의 메시지를 처리함으로서서비스 성능을 향상할수 있도록 도와줄 것이다. 이주제는 아래와 같은 두가지 섹션을 포함한다.

   - Split-Join의 소개

   - Split-Join의 개발


Introduction to Split-Join

Oracle Service Bus’s Split-Join feature lets you split a service payload, such as an order, into individual messages for concurrent processing. Concurrent processing, as opposed to sequential processing, greatly improves service performance. Split-Join achieves this task by splitting an input message payload into sub messages (split), routing them concurrently to their destinations, and aggregating the responses into one overall return message (join). This process of payload splitting and response aggregation is called a Split-Join pattern.


Split-Joins are particularly useful for optimizing overall response times in scenarios where payloads delivered by faster systems are being directed to responding services on slower systems. Without Split-Join, individual messages in a payload are normally resolved in sequential order by the recipient, which can take a long time if the responding system is slow. (The overall response time is the sum of the individual response times for each message.) With Split-Join, multiple messages are processed simultaneously, which reduces burden on the responding system and greatly enhances response times. (The overall response time is roughly that of the longest individual message’s response time plus some minor system overhead.)

There are two patterns supported by the Split-Join feature:

Static Split-Join

The static Split-Join branches from the main execution thread of an Oracle Service Bus message flow by splitting a payload into a fixed number of new branches according to the configuration of the Split-Join. At design time you determine the number and variety of services to be invoked.

Static Split-Join – Sample Scenario

A telco company might want to employ static Split-Join when processing a customer’s order for a communications services package. In this case, the customer might sign up for DSL and voice services all at once. Rather than executing each request in the payload separately in order, the telco can execute the messages in parallel using a callout from the Oracle Service Bus message flow to a Split-Join employing the static Split-Join pattern.

Static Split-Join is the ideal pattern in this case because the developer knows there will always be exactly two incoming service requests for this particular service package: DSL and voice. Splitting the requests into parallel branches allows them to be processed concurrently, which improves the overall response time for processing the payload. After all messages have been processed, the generated responses are aggregated back into one reply in the execution thread.

Figure 4-1 illustrates a static Split-Join that splits two known service requests, DSL activation and phone activation, processes each request in parallel, and joins the responses into a single reply.

Figure 4-1 Static Split-Join – Known number of service requests

Static Split-Join –  Known number of service requests

Dynamic Split-Join

The dynamic Split-Join branches from the main execution thread of an Oracle Service Bus message flow by dynamically creating new branches according to the contents of the incoming payload. The dynamic Split-Join uses conditional logic to determine the number of branches to create. All requests are handled simultaneously, and the responses are aggregated into a single reply.

Dynamic Split-Join – Sample Scenario

A company might want to use dynamic Split-Join when placing automated stationery orders for its employees. If the orders are automatically placed every week based on employee submissions, there is no way of knowing how many individual orders are placed in any one weekly order. Rather than placing each order separately, the company could use dynamic Split-Join to place the orders concurrently using a callout from the Oracle Service Bus message flow to a Split-Join employing the dynamic Split-Join pattern.

Dynamic Split-Join is the ideal pattern in this case, because the developer has no way of knowing how many orders will be submitted each week. The dynamic Split-Join loops through all the orders and places them in parallel. The developer can also limit the number of orders processed. After all of the orders have been processed, the generated order responses are aggregated back into one reply in the execution thread.

Figure 4-2 illustrates a dynamic Split-Join that splits 15 orders, processes them concurrently, and joins the responses into a single reply.

Figure 4-2 Dynamic Split-Join – Unknown number of service requests

Dynamic Split-Join –  Unknown number of service requests

Split-Join Framework

A Split-Join, which takes the form of a .flow file in Workshop for WebLogic, is based on a WSDL operation. The Split-Join is wrapped in a WSDL-based business service that communicates across a FLOW transport, which is a dedicated transport for Split-Joins. The business service is invoked from a proxy service. Figure 4-3 illustrates the Split-Join framework.

Figure 4-3 Split-Join framework

Split-Join framework

 


Developing Split-Joins

You create and configure Split-Joins in Workshop for WebLogic, then import them into the Oracle Service Bus Console for use in run-time configuration. For information on developing Split-Joins, see Working with Split-Join in the Workshop for WebLogic help system.

Split-Join Resource Type and Environment Variable

If you reference Split-Joins in any scripts or custom code, use the values in Table 4-1:

Table 4-1 Split-Join resource type and environment variable
typeId
FLOW
Work manager environment value type
Split-Join Work Manager
      Tech/BPEL PM  |  2009. 3. 11. 17:09




Using REST with Oracle Service Bus

Overview

Oracle Service Bus (OSB), the rebranded name for BEA's AquaLogic Service Bus, is one of the products I help customers with frequently.  Recently questions from both customers and internally at Oracle have been increasing about OSB support for REST. In this entry I cover the current and future state of REST support in OSB.

Background

REST can be a loaded term.  There are a couple of InfoQ articles introducing REST and REST Anti-Patterns that should be required reading for those considering a REST architecture.  What does REST support really mean in the context of an Enterprise Service Bus?

A Service Bus applies mediation to both clients and providers of services.  This results in a loosely coupled architecture, as well as other benefits.  Being loosely coupled means that Providers and Consumers can now vary different aspects of a message exchange:

  • Location of Provider/Consumer
  • Transport (Http, Https, JMS, EJB, FTP, Email, etc)
  • Message Format (SOAP, POX - Plain Old Xml, JSON, txt, etc)
  • Invocation Style (Asynchronous, Synchronous)
  • Security (Basic Auth, SSL, Web Service Security, etc)

Two aspects where Service Bus support for REST would apply in an example would be Transport and Message Format.

A Contrived But Realistic Example

orderService

OrderDiagram 

Consider a contrived example where REST support in the Service Bus could easily come up.  Assume an organization already has an Order SOAP based service that is mediated by the Service Bus.  Currently this service is used by several applications from different business units.  SOAP web services with well-known XSD contracts work great for an interchange format for existing systems.  However, there is a new initiative to give management a mobile application to get order status.  The sponsoring executive has heard that AJAX is important and tasked an intern to quickly build the front-end because of frustration with IT delays.  The front-end is quickly mocked up using an AJAX framework and the executive tells the IT staff to deploy it immediately.  The problem is that the client-side AJAX framework doesn't work with SOAP and XML, it was mocked up with JSON.

Instead of developing a second Order Service to support this new invocation style and format, OSB can be configured to mediate both the invocation style and the message format and reuse the perfectly working, tested, provisioned, etc Order Service.  A new proxy could be configured to accept HTTP requests and map them to SOAP over HTTP.  The response, which is normally XML described by XSD, can be converted to JSON.

OSB Capabilities

A common REST approach in practice is the use of HTTP verbs POST, GET, PUT, and DELETE to correspond to the CRUD methods of CREATE, READ, UPDATE, DELETE.  So we can map those verbs to the Order Service, mapping DELETE to cancelOrder since it is against company policy to delete orders from the system.

The HTTP transport for inbound requests (a Proxy) in the Service Bus provides a mechanism to intercept invocations to a user customized URI base path.  So if my server binds to the context "user_configured_path" and localhost and port 7001, then the HTTP Proxy intercepts all HTTP GET and POST calls to http://localhost:7001/user_configured_path .  This includes suffixes to that path such as http://localhost:7001/user_configured_path/foo/bar/etc .

AquaLogic Service Bus 3.0 (as well as 2.x releases of ALSB) supports GET and POST use cases, but does not have developer friendly support for HTTP verbs PUT and DELETE out of the box.  For GET requests, pertinent information is available in the $inbound/ctx:transport/ctx:request/http:relative-URI variable.  To parse query string information, use $inbound/ctx:transport/ctx:request/http:query-string.   A common pattern for HTTP GET is to use XQuery parsing functions on that variable to extract extra path detail, but the $body variable will be empty.  For POST requests, the same applies, but the $body variable may have a message payload submitted as xml, text, or some other format.

I have heard from product management that first class support for HTTP verbs such as PUT and DELETE is planned in the next release of OSB, which is scheduled sometime in the Fall of 2008.  For customers that require PUT and DELETE verb support immediately, OSB does have a transport SDK, which could be used to add inbound and outbound REST support.  That approach would require some development.  There are other inbound options besides the transport SDK, such as a basic approach of deploying an HTTP servlet with doDelete() and doPut() implemented.  This servlet could be deployed on OSB instances and forward to specific proxies to provide PUT and DELETE support.  An outbound option would be to use a java call-out to invoke a REST style provider.

Returning to the example for a moment, the executive dashboard only requires order status in the first release, so only HTTP GET support is necessary.  In the existing SOAP-based Order Service, the interaction looks like this:

orderRR

An equivalent REST-ful URL might look like http://localhost:7001/Order/123 where 123 is the OrderID.  Clients using this interface might expect a JSON response like this:

{
"Status":"Submitted",
"OrderID":"123",
"OrderDetailID":"345",
"CustomerID":"234"
}

Types like int are supported JSON values, although the above value types are strings as you can see by the double quotes.  Let's just assume that strings are ok for now to make this easier.  Here is a proxy configuration bound to the Order URI context:

OrderRESTProxy

Notice that the response type is "text" because we will convert the XML to JSON.  I tried using the JSON java library from json.org to convert xml nodes in the response to a JSON format.  One gotcha is namespace conversion.  For simplicity I tested with xml nodes with no namespaces, and that worked.  That code looks like this: 

org.json.JSONObject j = org.json.XML.toJSONObject( xmlStringBuffer.toString() );
System.out.println( j.toString() );

There are other techniques to convert between XML and JSON that use convention to map namespaces to JSON structures, but that is for another time.  Because my example used real-world xml with namespaces, I used a java callout to loop over child nodes of an XmlObject to build the JSON structure in java code.  Let me know what you think and if you have considered alternative approaches.  I've attached my code artifacts that are completely for illustrative purposes only and worked on my machine with ALSB 3.0 and Workshop 10.2.

For another example that works with currently released versions of Service Bus, check out "The Definitive Guide to SOA - BEA AquaLogic Service Bus" by Jeff Davies.  In the book he has a Command example where a Proxy is used for a service that handles multiple types of commands.  An updated version of the book should be available shortly.


http://blogs.oracle.com/jamesbayer/2008/07/using_rest_with_oracle_service.html

      Tech/weblogic  |  2009. 3. 9. 17:01




SOA Archives

September 30, 2008

WS asynchrony models (BPEL Vs JAX-WS)

Introduction

In the Web Services world an asynchonous call means sending a message to a remote service and then wait for it to send the response back to the caller

(a.k.a. callback). Talking in HTTP terms this means two different HTTP connections: one from the client to the service provider and the other from the

provider to the client. As the same client can call several times to an asynchonous service the incoming callbacks must be correlated with the invocations.
WS-Addressing [WSA] is the standard used for this correlation. This standard defines a set of SOAP headers needed to achieve

correlation. The most important ones are:

  - Invoke
   
  • MessageID: Identifies the conversation
  •    
  • ReplyTo: Indicates the URL where the client waits for the callback to be sent
  •  
      - Callback
       
  • RelatesTo: Identifies the conversation so the client can correlate with the request

  •  
      Fig. 1 - Asynchonous invocation message interchange
     

    Asynchronous model implementations

    Each SOAP stack provides it's own implementation of the asynchonous model and problems may occurr when the client and the provider use different SOAP stack.

    This document describes the specific case of invoking a JAX-WS asynchronous service from Oracle BPEL 10.1.3.1. Let's take a look to both models to see the

    difference.

    BPEL asynchronous model

    In BPEL the asynchonous model is implemented via two Web Services. An asynchronous BPEL service exposes two services in it's WSDL as shown in the following

    pictures:

    Fig. 2 - BPEL process asynchronous WSDL (request highlighted)
     
    Fig. 3 - BPEL process asynchronous WSDL (response highlighted)

    The former is to be implemented by the service itself to receive the invocation. The later is to be implemented by the client in order to receive the

    callback.

    JAX-WS asynchronous model

    As you can see in the picture below a JAX-WS asynchonous service does only expose one service. The asynchrony affects only to the implementation and not to

    the service description itself. The runtime behaviour is the same as in the BPEL case. The only difference is in the way they service is described.

     
      Fig. 4 - JAX-WS asynchronous WSDL

    Adapting a JAX-WS WSDL for BPEL

    The target is to create a WSDL equivalent to the JAX-WS one but adapted to the BPEL style so the runtime behaviours get equal.

    Adapting the portType definition

    As we saw previously as there's only one portType in the JAX-WS WSDL it has to be broken down into two. The output of the original portType has to be removed

    from it. The new portType has the original one's output as input as it's going to be used for callback.

     
      Fig. 5 - JAX-WS sample portType tag
     
     
      Fig. 6 - JAX-WS sample portType tag (Modified)

    Adapting the binding definition

    We have to act the same way with the binding. It has to be broken down into two bindings following the same rules used for the portType. First, the output

    must be removed from the original binding. Then a binding has to be created for the callback portType. Again, the ouput from the original one becomes the

    input of this one.

     
      Fig. 7 - JAX-WS sample binding tag
     
     
      Fig. 8 - JAX-WS sample binding tag (Modified)
     

    Adapting the service definition

    Finally, a new service has to created. It has to be associated to the recently created portType and binding. The location needs not to have a existing URL as

    the WS-Addresing headers will tell the remote service where to send the callback message.

     
      Fig. 9 - JAX-WS sample service tag
     
     
      Fig. 10 - JAX-WS sample service tag (Modified)

    WS-Addressing

    There are several addresing headers and all of them are valid. Oracle BPEL PM 10.1.3.1 uses the ones in the

    http://schemas.xmlsoap.org/ws/2003/03/addressing namespace. In order to use different addressing headers (E.g. the ones in the

    http://www.w3.org/2005/08/addressing namespace) the following has to be done:

    Sending http://www.w3.org/2005/08/addressing WS-Addresing headers

    Some messages have to be defined to send out the theese addressing headers. One for each header we want to be included.

     
      Fig. 11 - http://www.w3.org/2005/08/addressing messages

    The bindings have also to be modified to indicate the headers we want to be sent and received. Each header declaration points to the correspondent message

    from the described above.

     
      Fig. 12 - Bindings including headers

    Receiving http://www.w3.org/2005/08/addressing WS-Addresing header in Oracle BPEL PM

    As, by default, Oracle BPEL PM searchs only for the http://schemas.xmlsoap.org/ws/2003/03/addressing headers for correlation a specific handler has to be

    deployed. The code shown here is a header handler. It looks for the addressing header and in case it finds it sets the conversation ID (the attribute used

    for correlation) with the header's value.

    In order to develop a BPEL header handler the com.collaxa.cube.engine.handlers.IMessageHandler interface has to be implemented. To compile it the Jar files

    located at the Oracle BPEL PM library folder have to be in the classpath.

     
      Fig. 13 - http://www.w3.org/2005/08/addressing header handler source code

    To deploy it to the Oracle BPEL PM engine just copy the class (with the required folder structure) to the $BPEL_HOME/system/classes folder. Then, edit the

    message-handlers.xml file located at $BPEL_HOME/domains//config folder. Include a new message-handler tag for the handler and include it in the

    inbound-flow tag. After restarting BPEL the handler will start working.

     
      Fig. 14 - Message handler configuration

    Additional Resources

    [WSA] W3C WS-Addressing Core

    [JAX-WS] JAX-WS at Java.net
          Tech/BPEL PM  |  2009. 3. 5. 13:46




    Monitoring WebLogic using JMX

    March 16, 2007 – 1:29 pm

    It's not as straightforward as you might think or expect, but once setup, gives a lot more insight into the behavior of your applications. Use your favorite JMX client (jconsole, jManage, SiteScope, MC4J, etc.) to monitor thread pools, database connections, memory usage and any other MBean attributes.

    There are two ways (that I know of) to enable a WebLogic application for monitoring using JMX.

    • Enable IIOP and default user for the WebLogic server
    • Use the Java 5 JMX remote capabilities

    Enable IIOP and default user for the WebLogic server

    Step 1: Enable Anonymous Admin Lookup

    From the WebLogic documentation:

    The Anonymous Admin Lookup Enabled option specifies whether anonymous, read-only access to WebLogic Server MBeans should be allowed from the MBean API. With this anonymous access, you can see the value of any MBean attribute that is not explicitly marked as protected by the Weblogic Server MBean authorization process. This option is enabled by default to assure backward compatibility. For greater security, you should disable this anonymous access.

    To verify the setting of the Anonymous Admin Lookup Enabled option through the WebLogic Administration Console, see the Domain: Security: General page in the Administration Console or the SecurityConfigurationMBean.AnonymousAdminLookupEnabled attribute.

    Step 2: Enable IIOP Protocol for Admin Server and Application Servers
    • In the Server Settings' Protocol tab, check "Enable IIOP"
    • Enter the Default IIOP Username and Default IIOP Password.

    If you don't do this, you will get an error similar to the following when you try to establish an rmi connection:
    org.omg.CORBA.NO_PERMISSION: User does not have permission on weblogic.management.mbeanservers to perform lookup operation. vmcid: 0 completed: No

    Then you can use the JMX URL to connect to an individual application server:
    service:jmx:rmi:///jndi/iiop://127.0.0.1:7001/weblogic.management.mbeanservers.runtime

    or if you connect to the Admin server, you can view the MBeans for all the servers in the cluster using this URL:
    service:jmx:rmi:///jndi/iiop://127.0.0.1:7001/weblogic.management.mbeanservers.domainruntime

    See also: Enable and configure IIOP

    Use Java 5 JMX remote

    Add the following command-line options to the start script for the WebLogic server you want to monitor:
    -Dcom.sun.management.jmxremote
    -Dcom.sun.management.jmxremote.port=8888
    -Dcom.sun.management.jmxremote.ssl=false
    -Dcom.sun.management.jmxremote.authenticate=false

    Then, you can connect using this JMX URL:
    service:jmx:rmi:///jndi/rmi://127.0.0.1:8888/jmxrmi
    and you will got not only the com.bea MBeans, but all of the Java 5 MBeans, also.

    Troubleshooting

    If there are a large number of MBeans in your monitored application, you may run into a problem using Windows where the IIOP connection will timeout. You may see an error like this:

    Internal communication failed. (in getResults) org.omg.CORBA.COMM_FAILURE:
    vmcid: SUN minor code: 208 completed: Maybe

    In this case you can set the com.sun.CORBA.transport.ORBTCPReadTimeouts property to adjust the transport read tcp timeout property, which is a colon separated property with the following syntax.

    <initial time to wait: max read giop header time to wait: max read message time to wait: backoff factor>

    If you are getting this error, then you can add this option to the jconsole command line, adjusting the 2nd value higher as needed. This example sets the timeout to 30 seconds:

    jconsole -J-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:30000:500:10

    Incorporating into LoadRunner

    Once you have enabled the JMX monitors, you can then incorporate this data into your LoadRunner test scenarios using SiteScope. SiteScope is an agent-less monitoring tool that actually comes bundled with LoadRunner and is free (up to 500 monitoring "points") for non-production use.

          Tech/weblogic  |  2009. 3. 5. 11:04




    WLS 9/10 에서 JMX MBean 브라우저 jconsole 사용하기 기술자료

    2008/05/06 13:37

    복사 http://blog.naver.com/javalove93/130031031944

    WebLogic 서버는 6.0 버전부터 JMX 를 지원했다. 하지만 그것은 JMX 가 완전히 표준 스펙이 되기 전이었다.
     
    WLS 9.0 부터는 완전히 표준화된 JMX 1.2 (JDK 1.5 에 포함) 를 지원하기 때문에, JMX 스펙을 따르는 범용 JMX MBean 브라우저와 호환이 된다. JDK 1.5 에 포함된 jconsole 은 이러한 범용 JMX 브라우저 중에서 가장 강력한 툴이다. jconsole 을 사용하여 WLS 9.0 또는 10.0 에 접속하는 방법에 대해 알아 본다.
     
     
    1. WLS 부팅 시 다음 옵션을 지정 (포트 번호 상관 없음)
     
    set JAVA_OPTIONS=-Dcom.sun.management.jmxremote.port=9543 -Dcom.sun.management.jmxremote.authenticate=false
        -Dcom.sun.management.jmxremote.ssl=false
     
    포트 번호 없는 경우
     
    set JAVA_OPTIONS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false
     
    2. Domain | Security 에서 Anonymous Admin Lookup Enabled 체크
     
     
     
    3. Server | Protocols | IIOP 에서 Enabled IIOP 체크 (Default Username 과 Password 도 WLS Admin ID/PW 로 지정)
     
     
     
    4. jconsole 실행하여 다음 JMX URL 로 접속 (ID/PW 없이)
     
    service:jmx:rmi:///jndi/iiop://localhost:7001/weblogic.management.mbeanservers.runtime
     
     
    위와 같이 접속이 되면 아래 그림처럼 모든 JMX MBean 들을 GUI 형태로 액세스할 수 있다.

    'Tech > weblogic' 카테고리의 다른 글

    Coherence*Web and WebLogic Server  (0) 2009.03.23
    Using REST with Oracle Service Bus  (0) 2009.03.09
    Monitoring WebLogic using JMX  (0) 2009.03.05
    Installing and Displaying the WLDF Console Extension  (0) 2009.03.04
    Enable trust between domains  (0) 2008.03.29
          Tech/weblogic  |  2009. 3. 4. 10:53



    archidream's Blog is powered by Daum