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.
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.
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.
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.
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.
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.
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.
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:
- In the Oracle Service Bus perspective, select File > New > Split-Join. This opens the New Split-Join Wizard.
- 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.
- 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:
- 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.
- 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.
- If you choose to consume the base WSDL, go through the following steps:
- Click Consume.
- 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.
- If you want to overwrite existing local files, select the checkbox.
- Choose the service resource in which the
WSDL to be consumed resides: Enterprise Repository, File System, UDDI,
URI, or Workspace.
- 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.
- 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.
- 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.
- 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.
- 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:
- Right-click the Start Node and select Create Variable to open the
Create Variable Dialog.
- Enter a name for the variable.
- Select the Variable Type (Builtin, Schema, or Message).
- Choose a Variable.
Note: |
You may need to drill down into the hierarchy to select a Schema or Message Type variable. |
- 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:
- 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.
- Enter a name for the Variable.
- Select the Variable Type: Builtin, Schema, or Message.
- Choose a variable.
Note: |
You may need to drill down into the hierarchy to select a Schema or Message Type variable. |
- 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.
- Select the Receive operation.
- Create a new Message Variable (following steps).
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.
- 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.
- 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:
- Drag the operation from the Design Palette into the Assign node in the Split-Join editor.
- Configure the operation in the Properties view.
- 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:
- Add a Copy to the Assign from the Design Palette.
- In the Properties view, select a Copy From type and a Copy To type.
- If the type is an expression, enter the expression manually or click browse to launch the XQuery Expression Builder.
- 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.
- If the Copy From type is a Literal, enter the literal in the text field.
- 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.
- 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.
- 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:
- Add an Invoke Service operation to the Split-Join from the Design Palette.
- From the Operations tab in the Properties view, click Browse to launch the Service Browser.
- In the Service Browser, drill down to the desired service and select a Binding, then an operation.
- Click OK. The selected operation and its Service Location appear in the Properties view.
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:
- 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:
- Select a pre-existing variable from the Message Variable menu.
- Create a new Message Variable (following steps).
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.
- Provide a name for the variable.
- 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.
- 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.
- 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.
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.
- 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.
- 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:
- Add a For Each node to the Split-Join, and select it.
- 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.
- Define the Counter Variable Name by clicking the Counter Name link.
- Enter the Start Counter Value. If necessary, use the browse button to create a new value in the XPath Expression Builder.
Note: |
The lowest possible starting counter value is “1.” |
- Enter the Final Counter Value. If necessary, use the browse button to create a new value in the XPath Expression Builder.
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.
- 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.
- 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.
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.
- 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.
- 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.
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.
- 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.
- 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.
- 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.
- 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:
- Select the start node or Scope node to which the Error Handler will be added.
- Right-click the selected icon and select Add Catch or Add CatchAll.
- 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.
- 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.
- 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:
- Select the Reply, and in the Properties view, select the Variable tab.
- Select a pre-existing variable from the Message Variable menu.
- Create a new Message Variable (following steps).
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:
- Provide a name for the variable.
- 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.
- Select WSDL Fault Name and choose a name from those available.
Note: |
There may only be one name available in which case no choice is necessary. |
- Define a Message Variable. This can be done in two ways:
- Select a pre-existing variable from the Message Variable menu.
- Create a new Message Variable (following steps).
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:
- Provide a name for the variable.
- 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.
- 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.
- 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:
- Create the business service manually in Workshop for WebLogic or the Oracle Service Bus console.
- Generate the business service automatically from the Split-Join (.flow) menu:
- Right click on the Split-Join (.flow) file in the Project Explorer to open the Split-Join menu.
- Select Oracle Service Bus.
- Select Generate Business Service.
- 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:
- Export from the Business Service Menu
- Auto-export
- 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:
- In the Project Explorer, right click on the Business Service (.biz file) to be exported/tested.
- Select Run as.
- Select Run on server. The Run on Server Dialog opens.
- Select an existing server or define a new one and go to the next step.
- 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.
- 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:
- Select File > Export.
- Select Oracle Service Bus.
- 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:
- Select File > Export.
- Select Oracle Service Bus.
- Select Resources as Configuration JAR and go to the next step.
- In the Oracle Service Bus Configuration JAR Export window, configure the following options:
- Select the Oracle Service Bus Configuration file containing the files to be exported.
- 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.
- Select the projects and/or resources to be exported in the configuration JAR.
- Select Include Dependencies if you want to export any file dependencies associated with the selected files.
- Browse to a destination for the exported JAR file.
- Click Finish to export the JAR file.
- 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:
- In the Project Explorer, right click on the Business Service (.biz file) to be exported/tested.
- Select Run as.
- Select Run on server. The Run on Server Dialog appears.
- Select an existing server or define a new one and go to the next step.
- 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. |