This section describes how to add different types of actions to message flows using Oracle JDeveloper.
Actions are the elements of pipeline stages, error handler stages, route nodes, and branch nodes that define how messages are to be defined as they flow through a pipeline. Use the Pipeline Editor, in Oracle JDeveloper, to add actions such as route, publish, service callout, transport headers, conditional actions, error actions, and message transformation actions.
This chapter includes the following sections:
Actions are the elements of pipeline stages, error handler stages, route nodes, and branch nodes that define how messages are to be defined as they flow through a pipeline.
These instructions assume you are already editing a pipeline in the Pipeline Editor, as explained in Viewing and Editing Pipelines in JDeveloper.
They also assume you have already added a pipeline stage, a route node, or an error handler stage. See:
To add an action to a pipeline:
In the Pipeline Editor, right-click the component icon to which you wish to add the action. For example, right-click a Stage to add an action.
Select Insert Into > Action Name from the context menu that appears. The available action names depends on the context.
Note:
You can alternatively choose to drag an Action component from the Components window to the appropriate location in the Pipeline Editor.
As you drag a component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the component to one of the yellow circles, the circle changes to green indicating that you can drop the component there.
Table 17-1 through Table 17-4 list the actions you can configure for pipelines.
Table 17-1 Pipeline - Communication Actions
Action | Description | More Information |
---|---|---|
![]() Publish |
Publish a message to a statically specified service. |
|
![]() Publish Table |
Publish a message to zero or more statically specified services. Switch-style condition logic is used to determine at runtime which services will be used for the publish. |
|
![]() Dynamic Publish |
Publish a message to a service identified by an XQuery expression |
|
![]() Routing Options |
Modify any or all of the following properties in the outbound request: URI, Quality of Service, Mode, Retry parameters, Message Priority. |
|
![]() Service Callout |
Configure a synchronous (blocking) callout to a Service Bus-registered proxy or business service. |
|
![]() Transport Headers |
Set the transport header values in messages |
|
![]() Dynamic Routing |
Assign a route for a message based on routing information available in an XQuery resource. |
|
![]() Routing |
Identify a target service for the message and configure how the message is routed to that service: |
|
![]() Routing Table |
Assign a set of routes wrapped in a switch-style condition table.Different routes are selected based upon the results of a single XQuery expression. |
Table 17-2 Pipeline - Flow Control Actions
Action | Description | More Information |
---|---|---|
![]() For each |
Iterate over a sequence of values and execute a block of actions |
|
![]() If...then... |
Perform an action or set of actions conditionally, based on the Boolean result of an XQuery expression. |
|
![]() Raise error |
Raise an exception with a specified error code (a string) and description. |
|
![]() Reply |
Specify that an immediate reply be sent to the invoker. |
|
![]() Resume |
Resume message flow after an error is handled by an error handler. |
|
![]() Skip |
Specify that at runtime, the execution of the current stage is skipped and the processing proceeds to the next stage in the message flow. |
Table 17-3 Pipeline - Message Processing Actions
Action | Description | More Information |
---|---|---|
![]() Assign |
Assign the result of an XQuery expression to a context variable. |
|
![]() Delete |
Delete a context variable or a set of nodes specified by an XPath expression. |
|
![]() Insert |
Insert the result of an XQuery expression at an identified place relative to nodes selected by an XPath expression. |
|
![]() Java callout |
Invoke a Java method from the pipeline. |
|
![]() JavaScript |
Manipulate an XML or JSON payload using a JavaScript expression. |
|
![]() MFL transform |
Convert non-XML to XML or XML to non-XML in the pipeline. |
|
![]() nXSD translate |
Convert native data format (nXSD) to XML or XML to native data format (nXSD) in the pipeline. |
|
![]() Rename |
Rename elements selected by an XPath expression without modifying the contents of the element. |
|
![]() Replace |
Replace a node or the contents of a node specified by an XPath expression. |
|
![]() Validate |
Validate elements selected by an XPath expression against an XML schema element or a WSDL resource. |
Table 17-4 Pipeline - Reporting Actions
Action | Description | More Information |
---|---|---|
![]() Alert |
Send an alert notification based on pipeline message context. |
|
![]() Log |
Construct a message to be logged. |
|
![]() Report |
Enable message reporting for a pipeline. |
Use the following steps to modify the properties for an Action:
Click the Action to select it. The Properties window displays the properties for the selected component.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
In the Properties window, change the properties, as desired.
Click Save in the Oracle JDeveloper toolbar.
When you have finished adding actions, you can further configure the actions in stage or route node, as described in Table 17-5.
Table 17-5 Edit Stage Configuration Tasks
To... | Complete This Step... |
---|---|
Delete an action |
Right-click the action in the Pipeline Editor. Select Delete from the context menu that appears. |
Move an action |
In the Pipeline Editor, click the action icon, and hold the mouse button to drag it. Yellow circles appear to indicate the valid places where you can drop the action. When you drag the action to a yellow circle, it turns green to indicate a valid drop. Release the mouse button to drop the action item on a green circle. |
Cut an action |
Right-click the action in the Pipeline Editor. Select Cut from the context menu that appears. |
Copy an action |
Right-click the action in the Pipeline Editor. Select Copy from the context menu that appears |
Paste an action that you have cut or copied |
In the Pipeline Editor, right-click the component where you wish to paste the action. Select Paste from the context menu. You can copy and paste actions across stages. However, in the case of Assign, Replace or Insert actions, note the following:
|
Click Save in the Oracle JDeveloper toolbar.
In the Pipeline Editor, continue to construct the pipeline, as described in Viewing and Editing Pipelines in the Console.
Click Save in the Oracle JDeveloper toolbar.
Use a publish action to identify a statically specified target service for a message and to configure how the message is packaged and sent to that service.
For more information on publish behavior, see Performing Transformations in Pipelines.
These instructions assume you are already editing a pipeline in the Pipeline Editor, as explained in Viewing and Editing Pipelines in the Console.
They also assume you have already added a pipeline stage, a route node, or an error handler stage. See:
To add a Publish action to a pipeline:
Use one of the following methods to add a Publish action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the Publish action. For example, right-click a Stage to add a Publish action to it.
Select Insert Into > Publish from the context menu that appears.
Drag the Publish component from the Components window to the appropriate location in the Pipeline Editor. To find the Publish component, select the Message Flow category in the Components window. Next, look under the Communication section for the Publish icon.
As you drag the Publish component to the editor window, yellow circles appear to indicate the valid places where you can drop the Publish component. When you drag the Publish component to one of the yellow circles, the circle changes to green indicating that you can drop the Publish component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the Publish action:
Click the Publish node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
In the Properties window, click the Search icon next to Service to specify a target service for the message.
If the service has operations specified, you can specify an operation to be invoked by selecting it from the Operation list.
Click the General tab on the left side of the Properties window.
Under Description, enter an optional description for the action.
Click Save in the Oracle JDeveloper toolbar.
Use a publish table action to publish a message to zero or more statically specified services. Switch-style condition logic is used to determine at runtime which services will be used for the publish.
For more information on publish behavior, see Performing Transformations in Pipelines.
To add Publish Table actions:
Use one of the following methods to add a Publish Table action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the Publish action. For example, right-click a Stage to add a Publish action to it.
Select Insert Into > Publish Table from the context menu that appears.
Drag the Publish Table component from the Components window to the appropriate location in the Pipeline Editor. To find the Publish component, select the Message Flow category in the Components window. Next, look under the Communication section for the Publish Table icon.
As you drag the Publish Table component to the editor window, yellow circles appear to indicate the valid places where you can drop the Publish Table component. When you drag the Publish Table component to one of the yellow circles, the circle changes to green indicating that you can drop the Publish Table component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the Publish Table action:
In the Pipeline Editor, click the Publish Table node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
In the Properties window, click the fx icon next to Value to specify an XQuery expression. At runtime, the XQuery expression returns the value upon which the routing decision is made.
Under Description, specify an optional description for the Publish Table action.
Click a Case construct in the Publish Table node to select it. The Properties window displays the properties for the selected node.
In the Properties window, select an operator, and a value for the XQuery expression in the Value field.
Configure the Publish action corresponding to the Case. See Adding Publish Actions in JDeveloper. for more information on configuring Publish actions.
Optionally add more cases by clicking the Add Case icon. Repeat steps 3 to 5 for each new case that you add.
Configure the Publish action corresponding to the Default case. See Adding Publish Actions in JDeveloper. for more information on configuring Publish actions.
Click Save in the Oracle JDeveloper toolbar.
Use a dynamic publish action to publish a message to a service specified by an XQuery expression.
For more information on publish behavior, see Performing Transformations in Pipelines.
To add Dynamic Publish actions:
Use one of the following methods to add a Dynamic Publish action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the Dynamic Publish action. For example, right-click a Stage to add a Dynamic Publish action to it.
Select Insert Into > Dynamic Publish from the context menu that appears.
Drag the Dynamic Publish component from the Components window to the appropriate location in the Pipeline Editor. To find the Dynamic Publish component, select the Message Flow category in the Components window. Next, look under the Communication section for the Publish icon.
As you drag the Dynamic Publish component to the editor window, yellow circles appear to indicate the valid places where you can drop the Dynamic Publish component. When you drag the Dynamic Publish component to one of the yellow circles, the circle changes to green indicating that you can drop the Dynamic Publish component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the Dynamic Publish action:
In the Pipeline Editor, click the Dynamic Publish node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
In the Properties window, click the fx icon next to Service to specify an XQuery expression. When complete, the XQuery expression should provide a result similar to:
<ctx:route> <ctx:service isProxy="false">project/folder/businessservicename</ctx:service> <ctx:operation>foo</ctx:operation> </ctx:route>
Note:
If a proxy service is being invoked, set isProxy
to true. If a business service is being invoked, set isProxy
to false.
The element operation
is optional.
Click the General tab on the left side of the Properties window.
Under Description, specify an optional description for the Dynamic Publish action.
Click Save in the Oracle JDeveloper toolbar.
Use the Routing Options action to modify any or all of the following properties for the outbound request in $outbound
: URI, Quality of Service, Mode, Retry parameters.
Although these properties can be modified using Assign, Insert, Replace, or Delete actions on $outbound
, using Routing options provides a simpler way to perform this task, without requiring knowledge of XPath, XQuery, or the structure of the $outbound
context variable.
The Routing Options action can only be used where the context variable $outbound
is valid. It can be added to the following actions:
Publish
Dynamic Publish
Publish Table
Service Callout
Routing
Dynamic Routing
Routing Table
For more information on routing, see Modeling Message Flow in Oracle Service Bus.
To add a Routing Options action:
Use one of the following methods to add a Routing Options action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the Routing Options action. For example, right-click Request Action in a Publish node to add a Routing Options action to it.
Select Insert Into > Routing Options from the context menu that appears.
Drag the Routing Options component from the Components window to the appropriate location in the Pipeline Editor. To find the Routing Options component, select the Message Flow category in the Components window. Next, look under the Communication section for the Routing Options icon.
As you drag the Routing Options component to the editor window, yellow circles appear to indicate the valid places where you can drop the Routing Options component. When you drag the Routing Options component to one of the yellow circles, the circle changes to green indicating that you can drop the Routing Options component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the Routing Options action:
In the Pipeline Editor, click the Routing Options node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
In the Properties window, set any or all of the following:
URI: Click the fx icon to invoke the XQuery Expression Builder. Enter an expression that returns a URI. This overrides the URI for the invoked service.
QoS: Select the Quality of Service option from the list. This overrides the default that is auto computed.
Mode: Select between One-way or Request-Response.
Retry Interval: Specify the number of seconds between retries. This overrides the default configured with the invoked service.
Retry Count: Specify the number of retries the system must attempt before discontinuing the action. This overrides the default configured with the invoked service.
Priority: Click the fx icon to launch the XQuery Expression Builder. Enter an expression that returns a positive integer.
Description: Specify an optional description for the Dynamic Publish action.
Click Save in the Oracle JDeveloper toolbar.
Use a service callout action to configure a synchronous (blocking) callout to a Service Bus-registered proxy or business service.
For more information on service callout actions, see Constructing Service Callout Messages.
To add a Service Callout action:
Use one of the following methods to add a Service Callout action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the Service Callout action. For example, right-click a Stage node to add a Service Callout action to it.
Select Insert Into > Service Callout from the context menu that appears.
Drag the Service Callout component from the Components window to the appropriate location in the Pipeline Editor. To find the Service Callout component, select the Message Flow category in the Components window. Next, look under the Communication section for the Service Callout icon.
As you drag the Service Callout component to the editor window, yellow circles appear to indicate the valid places where you can drop the Service Callout component. When you drag the Service Callout component to one of the yellow circles, the circle changes to green indicating that you can drop the Service Callout component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the Service Callout action:
In the Pipeline Editor, click the Service Callout node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Click the Search icon next to Service to specify a business or proxy service.
If the service you chose in the preceding step is a WSDL-based service and has operations that can be invoked on the service, select the operation from the Operation field.
Under Configuration, specify how you want to configure the request and response messages by selecting one of the following options:
Select Configure Body to configure the SOAP Body. Selecting this option allows you to use $body
directly.
Select Configure Payload Document to configure the payload.
Depending on the kind of service you selected, and on the kind of configuration options you chose for that service, select values for the Request and Response variables that appear.
Specify an optional Description for the Service Callout action.
Click Save in the Oracle JDeveloper toolbar.
Use a transport header action to set the header values in messages.
To add a Transport Header action:
Use one of the following methods to add a Transport Header action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the Transport Header action. For example, right-click a Stage node icon to add a Transport Header action to it.
Select Insert Into > Transport Header from the context menu that appears.
Drag the Transport Header component from the Components window to the appropriate location in the Pipeline Editor. To find the Transport Header component, select the Message Flow category in the Components window. Next, look under the Communication section for the Transport header icon.
As you drag the Transport Header component to the editor window, yellow circles appear to indicate the valid places where you can drop the Transport Header component. When you drag the Transport Header component to one of the yellow circles, the circle changes to green indicating that you can drop the Transport Header component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the Transport Header action:
In the Pipeline Editor, click the Transport Header node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
For the Direction list, select one of the following:
Outbound Request: Select this option to set header values for outbound requests (the messages sent out by a pipeline in route, publish, or service callout actions). This header element is located in the message context as follows:
$outbound/ctx:transport/ctx:request/tp:headers
Inbound Response: Select this option to set header values for inbound responses (the response messages a proxy service sends back to clients). This header element is located in the message context as follows:
$inbound/ctx:transport/ctx:response/tp:headers
Optionally select Copy Headers to copy the header from inbound message to outbound message and vice versa.
Under Headers, select a Protocol, and click the Add Header icon, identified by the green plus (+) sign, to add a header. Select an Action, specify a Name for the Header, and any Value that may be required.
The Set Action enables you to use an XQuery or XSLT expression to set the value of the header. The Copy Action copies the header value from the inbound request if setting value for the outbound request. The Copy Action copies the header value from the outbound response if setting value for the inbound response. The Delete action removes the header from the request or response metadata.
Repeat the preceding step to add any additional headers.
To delete a header, you can select the row, and click the Delete Header icon, identified by the red X sign.
Specify an optional Description for the Transport Callout action.
Click Save in the Oracle JDeveloper toolbar.
Assign a route for a message based on routing information available in an XQuery resource.
This is a terminal action, which means you cannot add another action after this one. However, this action can contain request and response actions. For more information on routing, see Modeling Message Flow in Oracle Service Bus.
To add dynamic routing to a route node:
Use one of the following methods to add a Dynamic Routing action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the Dynamic Routing action. For example, right-click a Route node icon to add a Dynamic Routing action to it.
Select Insert Into > Dynamic Routing from the context menu that appears.
Drag the Dynamic Routing component from the Components window to the appropriate location in the Pipeline Editor. To find the Dynamic Routing component, select the Message Flow category in the Components window. Next, look under the Route section for the Dynamic Routing icon.
As you drag the Dynamic Routing component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Dynamic Routing component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the Dynamic Routing action:
In the Pipeline Editor, click the Dynamic Routing node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Under Service, click the fx icon to specify an XQuery expression. The result of the XQuery expression should be similar to:
<ctx:route> <ctx:service isProxy='true'>{$service}</ctx:service> <ctx:operation>{$operation}</ctx:operation> </ctx:route>
Note:
If a proxy service is being invoked, set isProxy
to true. If a business service is being invoked, set isProxy
to false.
The service name is the fully qualified service name.
The operation element is optional.
Specify an optional Description for the Dynamic Routing action.
Proceed to add actions to the Request Action and Response Action branches.
Click Save in the Oracle JDeveloper toolbar.
Identify a target service for the message and configure how the message is routed to that service.
This is a terminal action, which means you cannot add another action after this one. However, this action can contain request and response actions. For more information on routing, see Modeling Message Flow in Oracle Service Bus.
To add a Routing action to a route node:
Use one of the following methods to add a Routing action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the Routing action. For example, right-click a Route node icon to add a Routing action to it.
Select Insert Into > Routing from the context menu that appears.
Drag the Routing component from the Components window to the appropriate location in the Pipeline Editor. To find the Routing component, select the Message Flow category in the Components window. Next, look under the Route section for the Routing icon.
As you drag the Routing component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Routing component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the Routing action:
In the Pipeline Editor, click the Routing node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Click the Search icon to the right of the Service field to specify a service. The Resource Chooser dialog appears.
Select a service from the resources, and click OK.
If you selected a WSDL-based service, then select an Operation corresponding to the service.
Specify an optional Description for the Routing action.
Proceed to add actions to the Request Action and Response Action branches.
Click Save in the Oracle JDeveloper toolbar.
A routing table is a set of routes wrapped in a switch-style condition table. It is a short-hand construct that allows different routes to be selected based upon the results of a single XQuery expression.
You can nest multiple levels in the stage editor. Identify target services for messages and configure how the messages are routed to these services.
This is a terminal action, which means you cannot add another action after this one. However, this action can contain request and response actions. For more information on routing, see Modeling Message Flow in Oracle Service Bus.
To add a routing table to a route node:
Use one of the following methods to add a Routing Table action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the Routing Table action. For example, right-click a Route node to add a Routing Table action to it.
Select Insert Into > Routing Table from the context menu that appears.
Drag the Routing Table component from the Components window to the appropriate location in the Pipeline Editor. To find the Routing Table component, select the Message Flow category in the Components window. Next, look under the Route section for the Routing Table icon.
As you drag the Routing Table component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Routing Table component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the Routing Table action:
In the Pipeline Editor, click the Routing Table node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
In the Properties window, click the fx icon next to Value to specify an XQuery expression. At runtime, the XQuery expression returns the value upon which the routing decision is made.
Under Description, specify an optional description for the Routing Table action.
Click a Case construct in the Routing Table node to select it. The Properties window displays the properties for the selected node.
In the Properties window, select an operator, and a value for the XQuery expression in the Value field.
Configure the Routing action corresponding to the Case. See Adding Routing Actions to Route Nodes in JDeveloper. for more information on configuring Routing actions.
Optionally add more cases by clicking the Add Case icon. Repeat steps 3 to 5 for each new case that you add.
Configure the Routing action corresponding to the Default case. See Adding Routing Actions to Route Nodes in JDeveloper. for more information on configuring Routing actions.
Click Save in the Oracle JDeveloper toolbar.
Use the for each action to iterate over a sequence of values and execute a block of actions.
To add a For Each action:
Use one of the following methods to add a For Each action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the Routing Table action. For example, right-click a Stage node to add a For Each action to it.
Select Insert Into > For Each from the context menu that appears.
Drag the For Each component from the Components window to the appropriate location in the Pipeline Editor. To find the For Each component, select the Message Flow category in the Components window. Next, look under the Flow Control section for the For Each icon.
As you drag the For Each component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the For Each component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the Routing Table action:
In the Pipeline Editor, click the For Each node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Enter a value for For Each Value. Click fx to specify an XPath expression.
Enter values for Value Variable, Index Variable, and Count Variable.
Under Description, specify an optional description for the For Each action.
Click Save in the Oracle JDeveloper toolbar.
Use an If Then action to perform an action or set of actions conditionally, based on the Boolean result of an XQuery expression.
To add an If Then action:
Use one of the following methods to add an If Then action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the If Then action. For example, right-click a Stage node to add an If Then action to it.
Select Insert Into > If Then from the context menu that appears.
Drag the If Then component from the Components window to the appropriate location in the Pipeline Editor. To find the If Then component, select the Message Flow category in the Components window. Next, look under the Flow Control section for the If Then icon.
As you drag the If Then component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the If Then component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the If Then action:
In the Pipeline Editor, click the If Then node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Specify an optional Description for the If Then action.
Select the If: <condition> branch in the If Then node by clicking on it.
In the Properties window, click fx to specify an expression for the If condition.
Drag actions, corresponding to the condition returning true, from the Components window to the branch.
Optionally add more If conditions by clicking on the Add Condition icon in the If Then node.
Repeat steps 3 to 5 for each additional condition that you add.
Click Save in the Oracle JDeveloper toolbar.
Use the raise error action to raise an exception with a specified error code (a string) and description.
To add a Raise Error action:
Use one of the following methods to add a raise error action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the raise error action. For example, right-click a Stage node to add a raise error action to it.
Select Insert Into > Raise Error from the context menu that appears.
Drag the Raise Error component from the Components window to the appropriate location in the Pipeline Editor. To find the Raise Error component, select the Message Flow category in the Components window. Next, look under the Flow Control section for the Raise Error icon.
As you drag the Raise Error component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Raise Error component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the raise error action:
In the Pipeline Editor, click the Raise Error node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
In the Properties window, enter the error Code that you want to raise.
Enter a description of the error code in the Message field.
Specify an optional Description for the raise error action.
Click Save in the Oracle JDeveloper toolbar.
Use the reply action to specify that an immediate reply be sent to the invoker.
The reply action can be used in the request, response, or error pipeline. You can configure it to result in a reply with success or failure. In the case of reply with failure where the inbound transport is HTTP, the reply action specifies that an immediate reply is sent to the invoker.
To add a Reply action:
Use one of the following methods to add a reply action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the reply action. For example, right-click a Stage node to add a reply action to it.
Select Insert Into > Reply from the context menu that appears.
Drag the Reply component from the Components window to the appropriate location in the Pipeline Editor. To find the Reply component, select the Message Flow category in the Components window. Next, look under the Flow Control section for the Reply icon.
As you drag the Reply component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Reply component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the reply action:
In the Pipeline Editor, click the Reply node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Under Option, select With Success to reply that the message was successful. Alternatively, select With Failure to reply that the message has a fault.
Specify an optional Description for the reply action.
Click Save in the Oracle JDeveloper toolbar.
Use the resume action to resume message flow after an error is handled by an error handler. This action has no parameters and can only be used in error pipelines.
To add a Resume action:
Use one of the following methods to add a resume action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the resume action. For example, right-click a Stage node, in an error handler, to add a resume action to it.
Select Insert Into > Resume from the context menu that appears.
Drag the Resume component from the Components window to the appropriate location in the Pipeline Editor. To find the Resume component, select the Message Flow category in the Components window. Next, look under the Flow Control section for the Resume icon.
As you drag the Resume component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Resume component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the reply action:
In the Pipeline Editor, click the Resume node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Specify an optional Description for the resume action.
Click Save in the Oracle JDeveloper toolbar.
Use the skip action to specify that at runtime, the execution of this stage is skipped and the processing proceeds to the next stage in the message flow. This action has no parameters and can be used in the request, response or error pipelines.
To add a Skip action:
Use one of the following methods to add a skip action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the skip action. For example, right-click a Stage node to add a skip action to it.
Select Insert Into > Skip from the context menu that appears.
Drag the Skip component from the Components window to the appropriate location in the Pipeline Editor. To find the Skip component, select the Message Flow category in the Components window. Next, look under the Flow Control section for the Skip icon.
As you drag the Skip component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Skip component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the skip action:
In the Pipeline Editor, click the Skip node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Specify an optional Description for the skip action.
Click Save in the Oracle JDeveloper toolbar.
Use the assign action to assign the result of an XQuery expression to a context variable.
To add an Assign action:
Use one of the following methods to add an assign action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the assign action. For example, right-click a Stage node to add an assign action to it.
Select Insert Into > Assign from the context menu that appears.
Drag the Assign component from the Components window to the appropriate location in the Pipeline Editor. To find the Assign component, select the Message Flow category in the Components window. Next, look under the Message Processing section for the Assign icon.
As you drag the Assign component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Assign component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the assign action:
In the Pipeline Editor, click the Assign node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Click the fx icon to the right of the Value field to specify an XQuery expression. The XQuery expression specifies the value to be assigned to the named variable.
Enter a context variable in the Variable field.
Specify an optional Description for the assign action.
Click Save in the Oracle JDeveloper toolbar.
Use the delete action to delete a context variable or a set of nodes specified by an XPath expression.The delete action is one of a set of update actions.
To add a Delete action:
Use one of the following methods to add a delete action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the delete action. For example, right-click a Stage node to add a delete action to it.
Select Insert Into > Delete from the context menu that appears.
Drag the Delete component from the Components window to the appropriate location in the Pipeline Editor. To find the Delete component, select the Message Flow category in the Components window. Next, look under the Message Processing section for the Delete icon.
As you drag the Delete component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Delete component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the delete action:
In the Pipeline Editor, click the Delete node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Under Location, specify the context variable.
Click the fx icon to specify an XPath expression. All nodes selected by the XPath expression are deleted.
Under the General section, specify an optional Description for the delete action.
Click Save in the Oracle JDeveloper toolbar.
Use the insert action to insert the result of an XQuery expression at an identified place relative to nodes selected by an XPath expression. The insert action is one of a set of update actions.
To add an Insert action:
Use one of the following methods to add an insert action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the insert action. For example, right-click a Stage node to add an insert action to it.
Select Insert Into > Insert from the context menu that appears.
Drag the Insert component from the Components window to the appropriate location in the Pipeline Editor. To find the Insert component, select the Message Flow category in the Components window. Next, look under the Message Processing section for the Insert icon.
As you drag the Insert component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Insert component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the insert action:
In the Pipeline Editor, click the Insert node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Click the fx icon to the right of the Value field to specify an XQuery expression. The XQuery expression is used to create the data that is inserted at a specified location in a named variable.
Under Position, select the relative location from the list. The relative location is used to control where the insert is performed relative to the result of the XPath expression. Select from the following:
Before: As sibling before each element or attribute selected by the XPath expression.
After: As sibling after each element or attribute selected by the XPath expression.
As first child of: As first child of each element identified by the XPath expression. An error occurs if the result of the XPath returns attributes.
As last child of: As last child of each element identified by the XPath expression. An error occurs if the XPath returns attributes.
Under Location, specify the context variable. The XPath evaluates the contents of this variable.
Click the fx icon to specify an XPath expression. Valid configurations include those in which:
- Both the XQuery and XPath expressions return elements.
- Both the XQuery and XPath expressions return attributes.
Click Save in the Oracle JDeveloper toolbar.
Use the Java callout action to invoke a Java method, or EJB business service, from within the pipeline.
To add a Java Callout action:
Use one of the following methods to add a Java callout action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the Java callout action. For example, right-click a Stage node to add a Java callout action to it.
Select Insert Into > Java Callout from the context menu that appears.
Drag the Java Callout component from the Components window to the appropriate location in the Pipeline Editor. To find the Java Callout component, select the Message Flow category in the Components window. Next, look under the Message Processing section for the Java Callout icon.
As you drag the Java Callout component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Java Callout component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the Java callout action:
In the Pipeline Editor, click the Java Callout node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Click the Search icon to the right of the Method field to specify a Java archive (jar). Select a Java class and method corresponding to the selected jar file. The method must be a static method.
The Arguments section is populated with the method arguments. An XQuery expression must be specified for each argument.
Click the fx icon under the Value column for an argument to specify an XQuery expression for it.
If the type of the input value you enter does not match the declared input argument type, Service Bus tries to automatically typecast input values to the declared type of the input argument. For example a string value of "123"
will be converted to integer 123
if the declared type of the input argument is java primitive int
.
Repeat the preceding step for each argument in the selected method.
Under the Return section, specify a Variable to which the result is to be assigned.
Optionally, select As Reference to return the result as a reference. This option makes the return value of a Java Callout invocation a <java-content ref="
jcid
">
reference element regardless of its actual type, where jcid
is the key to the object in the pipeline object repository.
Optionally, click the Search icon to the right of Service Account to specify a service account if there is a security context for the selected Java method.
Click Save in the Oracle JDeveloper toolbar.
Use a JavaScript action to manipulate the contents of an XML or JSON payload using JavaScript expressions.
Use the MFL (Message Format Language) translate action to convert message content from XML to non-XML, or the reverse, in the message pipeline.
An MFL is a specialized XML document used to describe the layout of binary data. It is an Oracle proprietary language used to define rules to transform formatted binary data into XML data, or the reverse. See Defining Data Structures with Message Format Language.
To add an MFL Transform action:
Use one of the following methods to add an MFL translate action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the MFL translate action. For example, right-click a Stage node to add an MFL translate action to it.
Select Insert Into > MFL Translate from the context menu that appears.
Drag the MFL Translate component from the Components window to the appropriate location in the Pipeline Editor. To find the MFL Translate component, select the Message Flow category in the Components window. Next, look under the Message Processing section for the MFL Translate icon.
As you drag the MFL Translate component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the MFL Translate component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the MFL translate action:
In the Pipeline Editor, click the MFL Translate node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Under Translate, select whether you are translating from XML to Native or vice versa.
Click the fx icon to the right of the Input field to specify an input variable using an XQuery expression.
The input must be text or binary when transforming to XML, and must be XML when transforming to non-XML. Binary content in the message context is represented by the binary-content XML element. This XML should be the result of the XQuery expression when the input needs to be binary.
Under MFL, select Static to specify a static MFL resource. Alternatively select Dynamic to select a dynamic MFL resource.
If you selected Static in the preceding step, click the Search icon to select an MFL resource to perform the MFL translation.
If you selected Dynamic in the preceding step, click the fx icon to specify an XQuery expression that dynamically selects the MFL resource to perform the translation.
Specify the Output variable to which the result of the translate is assigned.
Specify an optional Description for the MFL translate action.
Click Save in the Oracle JDeveloper toolbar.
Use the nXSD translate action to convert message content from XML to native format data, or the reverse, in the message pipeline.
See "Native Format Builder Wizard" in Understanding Technology Adapters for information on creating native schemas used for translation.
The nXSD Translate Action supports XML to JSON and JSON to XML translations if the associated XSD resource contains the relevant annotations, as shown in the following example:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://example.com/RestService_Operation1_request"
targetNamespace="http://example.com/RestService_Operation1_request" elementFormDefault="qualified"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" nxsd:version="JSON" nxsd:encoding="US-ASCII">
<xsd:element name="Root-Element">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="country" type="xsd:string"/>
<xsd:element name="circuit" type="xsd:string"/>
<xsd:element name="date" type="xsd:date"/>
…
The nXSD Translate action is enhanced in this version of Service Bus to enforce schema ordering when converting from JSON to XML.
To add an nXSD translate action:
Use one of the following methods to add an nXSD translate action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the nXSD translate action. For example, right-click a Stage node to add an nXSD translate action to it.
Select Insert Into > nXSD Translate from the context menu that appears.
Drag the nXSD Translate component from the Components window to the appropriate location in the Pipeline Editor. To find the nXSD Translate component, select the Message Flow category in the Components window. Next, look under the Message Processing section for the nXSD Translate icon.
As you drag the nXSD Translate component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the nXSD Translate component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the nXSD translate action:
In the Pipeline Editor, click the nXSD Translate node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Under Translate, select whether you are translating from XML to Native or vice versa.
Click the fx icon to the right of the Input field to specify an input variable using an XQuery expression.
The input must be native format when transforming to XML, and XML when transforming to native data format.
Under nXSD Schema, select Static to specify a static XML schema (.xsd
). Alternatively select Dynamic to dynamically specify a schema.
If you selected Static in the preceding step, click the Search icon to select the schema (.xsd
) file corresponding to the native schema.
If you selected Dynamic in the preceding step, click the fx icon to specify an XQuery expression that dynamically selects a native schema.
Specify the Output variable to which the result of the translate is assigned. You can alternatively choose Content of $body as the output.
(Optional) If you are translating from Native format (like JSON) to XML, select the Enforce Schema Ordering option. When selected, this reorders JSON payloads to match the order of elements in the XML schema.
Specify an optional Description for the nXSD translate action.
Click Save in the Oracle JDeveloper toolbar.
Use the rename action to rename elements selected by an XPath expression without modifying the contents of the element. The rename action is one of a set of update actions.
To add a rename action:
Use one of the following methods to add a rename action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the rename action. For example, right-click a Stage node to add a rename action to it.
Select Insert Into > Rename from the context menu that appears.
Drag the Rename component from the Components window to the appropriate location in the Pipeline Editor. To find the Rename component, select the Message Flow category in the Components window. Next, look under the Message Processing section for the Rename icon.
As you drag the Rename component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Rename component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the rename action:
In the Pipeline Editor, click the Rename node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Under Location, specify the context variable that holds the element that you wish to rename.
Click the fx icon to specify an XPath expression that is used to specify the data, in the named variable, that is to be renamed.
Enter a Local Name and Namespace for the renamed element. At least one of these attributes is required.
Under the General section, specify an optional Description for the rename action.
Click Save in the Oracle JDeveloper toolbar.
Use a replace action to replace a node or the contents of a node specified by an XPath expression. The node or its contents are replaced with the value returned by an XQuery expression.
A replace action can be used to replace simple values, elements and even attributes. An XQuery expression that returns nothing is equivalent to deleting the identified nodes or making them empty, depending upon whether the action is replacing entire nodes or just node contents. The replace action is one of a set of update actions.
To add a Replace action:
Use one of the following methods to add a replace action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the replace action. For example, right-click a Stage node to add a replace action to it.
Select Insert Into > Replace from the context menu that appears.
Drag the Replace component from the Components window to the appropriate location in the Pipeline Editor. To find the Replace component, select the Message Flow category in the Components window. Next, look under the Message Processing section for the Replace icon.
As you drag the Replace component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Replace component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the replace action:
In the Pipeline Editor, click the Replace node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Under Location, specify the context variable that holds the element that you wish to replace.
Click the fx icon to specify an XPath expression that is used to specify the data, in the named variable, that is to be replaced.
Click the fx icon to the right of the Value field to specify an XQuery expression. The XQuery expression is used to create the data that replaces the data specified by the XPath in the named variable.
Under Replace, choose one of the following options:
Replace entire node: The nodes selected by the XPath expression are replaced along with all of the contents.
Replace node contents: The node is not replaced; only the node contents are replaced.
Note:
Selecting the Replace node contents option and leaving the XPath blank is more efficient than selecting the Replace entire node option and setting the XPath to ./*
Under the General section, specify an optional Description for the rename action.
Click Save in the Oracle JDeveloper toolbar.
Use a validate action to validate elements selected by an XPath expression against an XML schema element or a WSDL resource. You can validate global elements only; Service Bus does not support validation against local elements.
You can also choose to dynamically select the XML schema element or WSDL resource, at runtime, based on the result of an XQuery expression.
To add a Validate action:
Use one of the following methods to add a validate action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the validate action. For example, right-click a Stage node to add a validate action to it.
Select Insert Into > Validate from the context menu that appears.
Drag the Validate component from the Components window to the appropriate location in the Pipeline Editor. To find the Validate component, select the Message Flow category in the Components window. Next, look under the Message Processing section for the Validate icon.
As you drag the Validate component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Validate component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the validate action:
In the Pipeline Editor, click the Validate node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Under Location, specify the context variable that holds the element that you wish to validate.
Click the fx icon to specify an XPath expression that is used to specify the data, in the named variable, that is to be validated.
Under Schema, select Static to specify a schema or WSDL file to validate against. Alternatively, select Dynamic to dynamically specify the schema or WSDL file at runtime.
If you selected Static in the preceding step, then click the Search icon to specify an element contained in an XML schema (.xsd
) or WSDL file.
If you selected Dynamic in the preceding step, then click the fx icon to specify an XQuery expression. The XQuery expression dynamically specifies a WSDL or schema resource.
Here's an example of dynamically specifying a WSDL resource:
<validate xmlns="http://www.bea.com/wli/sb/context"> <wsdl>default/MyWSDL</wsdl> <schemaType> <namespaceURI>http://openuri.org</namespaceURI> <localname>MyType</localname> </schemaType> </validate>
The following is an example of dynamically specifying a schema resource:
<validate xmlns="http://www.bea.com/wli/sb/context"> <schema>default/MySchema</schema> <schemaElement> <localname>MyElementType</localname> </schemaElement> </validate>
Under Action, select Save Variable to specify a variable that holds the validation result. Alternatively, select Raise an Error to raise an error if the element fails validation against the WSDL or XML schema element.
Under the General section, specify an optional Description for the validate action.
Click Save in the Oracle JDeveloper toolbar.
Use the alert action to generate alerts based on message context in a pipeline, to send to an alert destination.
Unlike SLA alerts, notifications generated by the alert action are primarily intended for business purposes, or to report errors, and not for monitoring system health. Alert destinations should be configured and chosen with this in mind. To learn more about alert destinations, see Working with Alert Destinations.
If pipeline alerting is not enabled for the service or at the domain level, the configured alert action is bypassed during message processing.
To add an Alert action:
Use one of the following methods to add an alert action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the alert action. For example, right-click a Stage node to add an alert action to it.
Select Insert Into > Alert from the context menu that appears.
Drag the Alert component from the Components window to the appropriate location in the Pipeline Editor. To find the Alert component, select the Message Flow category in the Components window. Next, look under the Reporting section for the Alert icon.
As you drag the Alert component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Alert component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the alert action:
In the Pipeline Editor, click the Alert node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Click the fx icon to the right of the Content field to specify an XQuery expression. The XQuery expression is used to specify the message context to be added to the alert message.
Enter a short description of the alert in the Summary field.
This becomes the subject line in the case of an Email notification, and can contain no more than 80 characters. If no description is provided, a predefined subject line that reads, "Oracle Service Bus Alert", is used instead.
Select the Severity level of the alert.
Click the Search icon to the right of the Destination field to select the alert destination.
By default, the alert goes to the Administration Console.
Under the General section, specify an optional Description for the alert action.
Click Save in the Oracle JDeveloper toolbar.
Use the log action to construct a message to be logged and to define a set of attributes with which the message is logged.
To see log data in the log file or standard out (server console), WebLogic Server logging must be set to the following severity levels:
Minimum severity to log: Info
Log file: Info
Standard out: Info
For information on setting log severity levels, see "Using Log Severity Levels" in Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server.
To add a Log action:
Be sure Logging is enabled globally. For more information, see "Configuring Operational Settings at the Global Level" in Administering Oracle Service Bus.
Use one of the following methods to add a log action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the log action. For example, right-click a Stage node to add a log action to it.
Select Insert Into > Log from the context menu that appears.
Drag the Log component from the Components window to the appropriate location in the Pipeline Editor. To find the Log component, select the Message Flow category in the Components window. Next, look under the Reporting section for the Log icon.
As you drag the Log component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Log component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the log action:
In the Pipeline Editor, click the Log node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Click the fx icon to the right of the Content field to specify an XQuery expression. The XQuery expression is used to specify the message context to be logged.
Enter a short description of the alert in the Summary field. This description is logged along with the result of the previously defined expression.
Select the Severity level of the log. Table 17-6 describes the options available.
Table 17-6 Log Action Severity Levels
Severity Level | Typical Usage |
---|---|
Info |
Used for reporting normal operations; a low-level informational message. |
Warning |
A suspicious operation or configuration has occurred but it might not affect normal operation. |
Error |
A user error has occurred. The system or application can handle the error with no interruption and limited degradation of service. |
Debug |
While your application is under development, you might find it useful to create and use messages that provide verbose descriptions of low-level activity within the application. |
Under the General section, specify an optional Description for the log action.
Click Save in the Oracle JDeveloper toolbar.
Use the report action to enable message reporting for a pipeline.
To add a Report action:
Use one of the following methods to add a report action to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the report action. For example, right-click a Stage node to add a report action to it.
Select Insert Into > Report from the context menu that appears.
Drag the Report component from the Components window to the appropriate location in the Pipeline Editor. To find the Report component, select the Message Flow category in the Components window. Next, look under the Reporting section for the Report icon.
As you drag the Report component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Report component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
Use the following steps to set the Properties for the report action:
In the Pipeline Editor, click the Report node to select it. The Properties window displays the properties for the selected node.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Click the fx icon to the right of the Content field to specify an XQuery expression. The XQuery expression is used to create the data that is reported to the Service Bus dashboard.
Under Search Keys, click the Add Key icon, identified by the green plus (+) sign, to add a search key. The Key field is used to specify a key name. The Variable field and XPath field together specify the key value. The Variable field specifies the context variable and the XPath field specifies an XPath expression.
You use key value pairs to extract key identifiers from any message context variable or message payload, and ignore the rest of the message. The keys are a convenient way to identify a message. They are displayed as report indexes in the Reporting module. See and "Working with Message Reports" in Administering Oracle Service Bus.
For example, consider a report action configured on an error handler in a stage. The action reports the contents of the fault
context variable in the event of an error. The report action is configured as follows:
- Key name = errorCode
- Key value = ./ctx:errorCode
in variable fault
Each time this action is executed at runtime, a message is reported through the Reporting Data Stream. The following table shows the results after the report action is executed twice.
Report Index | DB TimeStamp | Inbound Service | Error Code |
---|---|---|---|
errorCode=OSB-382505 |
04/26/07 9:45 AM |
MortgageBroker/ProxySvcs/loanGateway3 |
OSB-382505 |
errorCode=OSB-382505 |
04/26/07 9:45 AM |
OSB-382505 |
You can choose to add more keys by repeating the preceding step. To delete a key, click the Delete Key icon, identified by the red X sign.
Under the General section, specify an optional Description for the report action.
Click Save in the Oracle JDeveloper toolbar.
Implementing error handlers in JDeveloper is very similar to using the Oracle Service Bus Console.
The primary difference is the drag and drop feature of the pipeline designer, and the properties window that appears for each pipeline action.
Use an error handler to specify what should happen if an error occurs in a specific location in the pipeline. You can configure error handling at the pipeline, pipeline pair, route node, and stage level.
Before you begin
Display the message flow for the desired pipeline.
To add an error handler to a pipeline:
Use one of the following methods to add an error handler to the pipeline:
In the Pipeline Editor, right-click the component icon where you wish to add the error handler. You can add an error handler for the following:
To add an error handler at the pipeline level, right-click the start node. Select Add Error Handler from the context menu.
To add an error handler for a request or response pipeline, right-click the Request Pipeline or the Response Pipeline. Select Add Error Handler from the context menu.
To add an error handler for a stage node, right-click the Stage node. Select Add Error Handler from the context menu.
To add an error handler for a route node, right-click the Route node. Select Add Error Handler from the context menu.
Drag the Error Handler component from the Components window to the appropriate location in the Pipeline Editor. To find the Error Handler component, select the Message Flow category in the Components window. Next, look under the Nodes section for the Error Handler icon.
As you drag the Error Handler component to the editor window, yellow circles appear to indicate the valid places where you can drop the component. When you drag the Error Handler component to one of the yellow circles, the circle changes to green indicating that you can drop the component there. Release the mouse button to drop the component.
To change the default name and add a description for the error handler stage, do the following:
Click the error handler stage node to select it. The Properties window displays the properties for the selected component.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Edit the Name and Description fields for the selected stage node.
Click Save in the Oracle JDeveloper toolbar.
To add actions to the error handler stage, see Adding and Editing Actions in Pipelines in JDeveloper.
To add more stages to the error handler, see Adding Error Handlers in JDeveloper.
On the Pipeline Editor, continue to construct the pipeline, as described in Viewing and Editing Pipelines in JDeveloper.
Click Save in the Oracle JDeveloper toolbar.
You can choose to disable an action or a stage in a pipeline. A disabled action or stage is skipped from the message flow execution. A disabled stage or action is not validated at design time.
When you disable an action or a stage, all the nested actions, if any, are implicitly disabled. This means that the nested actions are also skipped from the message flow execution. If you wish to disable the nested actions from design time validation, you need to individually disable these actions.
Note:
If a disabled stage has an error handler, then the error handler is also disabled.
You can still edit the configuration of a disabled action or stage. Refactoring also takes place for disabled actions and stages. This means that if there is a call to a service in the disabled action or stage, and the service gets renamed, then the service callout is automatically updated.
To disable an action or stage:
You can re-enable a disabled stage or action at any time, and the action or stage is no longer skipped in the message flow.