17 Working with Pipeline Actions in Oracle JDeveloper

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:

17.1 Adding and Editing Actions in Pipelines in 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.

Before you begin

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:

  1. 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.

  2. 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 icon

    Publish

    Publish a message to a statically specified service.

    Adding Publish Actions in JDeveloper

    Publish Table icon

    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.

    Adding Publish Table Actions in JDeveloper

    Dynamic Publish icon

    Dynamic Publish

    Publish a message to a service identified by an XQuery expression

    Adding Dynamic Publish Actions in JDeveloper

    Routing Options icon

    Routing Options

    Modify any or all of the following properties in the outbound request: URI, Quality of Service, Mode, Retry parameters, Message Priority.

    Adding Routing Options Actions in JDeveloper

    Service Callout icon

    Service Callout

    Configure a synchronous (blocking) callout to a Service Bus-registered proxy or business service.

    Adding Service Callout Actions in JDeveloper

    Transport Headers icon

    Transport Headers

    Set the transport header values in messages

    Adding Transport Header Actions in JDeveloper

    Dynamic Routingn icon

    Dynamic Routing

    Assign a route for a message based on routing information available in an XQuery resource.

    Adding Dynamic Routing to Route Nodes in JDeveloper

    Routing icon

    Routing

    Identify a target service for the message and configure how the message is routed to that service:

    Adding Routing Actions to Route Nodes in JDeveloper

    Routing Table icon

    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.

    Adding Routing Tables to Route Nodes in JDeveloper

    Table 17-2 Pipeline - Flow Control Actions

    Action Description More Information
    For Each icon

    For each

    Iterate over a sequence of values and execute a block of actions

    Adding For Each Actions in JDeveloper

    If Then icon

    If...then...

    Perform an action or set of actions conditionally, based on the Boolean result of an XQuery expression.

    Adding If Then Actions in JDeveloper

    Raise Error icon

    Raise error

    Raise an exception with a specified error code (a string) and description.

    Adding Raise Error Actions in JDeveloper

    Reply icon

    Reply

    Specify that an immediate reply be sent to the invoker.

    Adding Reply Actions in JDeveloper

    Resume icon

    Resume

    Resume message flow after an error is handled by an error handler.

    Adding Resume Actions in JDeveloper

    Skip icon

    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.

    Adding Skip Actions in JDeveloper

    Table 17-3 Pipeline - Message Processing Actions

    Action Description More Information
    Assign icon

    Assign

    Assign the result of an XQuery expression to a context variable.

    Adding Assign Actions in JDeveloper

    Delete icon

    Delete

    Delete a context variable or a set of nodes specified by an XPath expression.

    Adding Delete Actions in JDeveloper

    Insert icon

    Insert

    Insert the result of an XQuery expression at an identified place relative to nodes selected by an XPath expression.

    Adding Insert Actions in JDeveloper

    Java Callout icon

    Java callout

    Invoke a Java method from the pipeline.

    Adding Java Callout Actions in JDeveloper

    MFL Transform icon

    MFL transform

    Convert non-XML to XML or XML to non-XML in the pipeline.

    Adding MFL Translate Actions in JDeveloper

    nXSD Translate Icon

    nXSD translate

    Convert native data format (nXSD) to XML or XML to native data format (nXSD) in the pipeline.

    Adding nXSD Translate Actions in JDeveloper

    Rename icon

    Rename

    Rename elements selected by an XPath expression without modifying the contents of the element.

    Adding Rename Actions in JDeveloper

    Replace icon

    Replace

    Replace a node or the contents of a node specified by an XPath expression.

    Adding Replace Actions in JDeveloper

    Validate icon

    Validate

    Validate elements selected by an XPath expression against an XML schema element or a WSDL resource.

    Adding Validate Actions in JDeveloper

    Table 17-4 Pipeline - Reporting Actions

    Action Description More Information
    Alert icon

    Alert

    Send an alert notification based on pipeline message context.

    Adding Alert Actions in JDeveloper

    Log icon

    Log

    Construct a message to be logged.

    Adding Log Actions in JDeveloper

    Report icon

    Report

    Enable message reporting for a pipeline.

    Adding Report Actions in JDeveloper

  3. Use the following steps to modify the properties for an Action:

    1. 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.

    2. In the Properties window, change the properties, as desired.

    3. Click Save in the Oracle JDeveloper toolbar.

  4. 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:

    • All variable-related and user-defined namespaces from the source (copied) stage are added as user-defined namespaces in the target (pasted) stage.

    • Duplicate namespaces (identical namespaces in both source and target stage) are not copied.

    • Conflicting namespaces (namespace declarations that use the same prefix but different URIs) are copied. Users will be able to save the configuration, but will not be able activate it until the conflicting namespace declarations in stage B are removed.

  5. Click Save in the Oracle JDeveloper toolbar.

  6. In the Pipeline Editor, continue to construct the pipeline, as described in Viewing and Editing Pipelines in the Console.

  7. Click Save in the Oracle JDeveloper toolbar.

17.2 Adding Publish Actions in JDeveloper

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.

Before you begin

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:

  1. 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.

  2. Use the following steps to set the Properties for the Publish action:

    1. 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.

    2. In the Properties window, click the Search icon next to Service to specify a target service for the message.

    3. If the service has operations specified, you can specify an operation to be invoked by selecting it from the Operation list.

    4. Click the General tab on the left side of the Properties window.

    5. Under Description, enter an optional description for the action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.3 Adding Publish Table Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the Publish Table action:

    1. 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.

    2. 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.

    3. Under Description, specify an optional description for the Publish Table action.

  3. Click a Case construct in the Publish Table node to select it. The Properties window displays the properties for the selected node.

  4. In the Properties window, select an operator, and a value for the XQuery expression in the Value field.

  5. Configure the Publish action corresponding to the Case. See Adding Publish Actions in JDeveloper. for more information on configuring Publish actions.

  6. Optionally add more cases by clicking the Add Case icon. Repeat steps 3 to 5 for each new case that you add.

  7. Configure the Publish action corresponding to the Default case. See Adding Publish Actions in JDeveloper. for more information on configuring Publish actions.

  8. Click Save in the Oracle JDeveloper toolbar.

17.4 Adding Dynamic Publish Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the Dynamic Publish action:

    1. 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.

    2. 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.

    3. Click the General tab on the left side of the Properties window.

    4. Under Description, specify an optional description for the Dynamic Publish action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.5 Adding Routing Options Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the Routing Options action:

    1. 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.

    2. 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.

  3. Click Save in the Oracle JDeveloper toolbar.

17.6 Adding Service Callout Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the Service Callout action:

    1. 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.

    2. Click the Search icon next to Service to specify a business or proxy service.

    3. 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.

    4. 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.

    5. 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.

    6. Specify an optional Description for the Service Callout action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.7 Adding Transport Header Actions in JDeveloper

Use a transport header action to set the header values in messages.

To add a Transport Header action:

  1. 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.

  2. Use the following steps to set the Properties for the Transport Header action:

    1. 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.

    2. 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
      
    3. Optionally select Copy Headers to copy the header from inbound message to outbound message and vice versa.

    4. 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.

    5. Repeat the preceding step to add any additional headers.

    6. To delete a header, you can select the row, and click the Delete Header icon, identified by the red X sign.

    7. Specify an optional Description for the Transport Callout action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.8 Adding Dynamic Routing to Route Nodes in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the Dynamic Routing action:

    1. 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.

    2. 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.

    3. Specify an optional Description for the Dynamic Routing action.

    4. Proceed to add actions to the Request Action and Response Action branches.

  3. Click Save in the Oracle JDeveloper toolbar.

17.9 Adding Routing Actions to Route Nodes in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the Routing action:

    1. 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.

    2. Click the Search icon to the right of the Service field to specify a service. The Resource Chooser dialog appears.

    3. Select a service from the resources, and click OK.

    4. If you selected a WSDL-based service, then select an Operation corresponding to the service.

    5. Specify an optional Description for the Routing action.

    6. Proceed to add actions to the Request Action and Response Action branches.

  3. Click Save in the Oracle JDeveloper toolbar.

17.10 Adding Routing Tables to Route Nodes in JDeveloper

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 next 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:

  1. 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.

  2. Use the following steps to set the Properties for the Routing Table action:

    1. 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.

    2. 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.

    3. Under Description, specify an optional description for the Routing Table action.

  3. Click a Case construct in the Routing Table node to select it. The Properties window displays the properties for the selected node.

  4. In the Properties window, select an operator, and a value for the XQuery expression in the Value field.

  5. Configure the Routing action corresponding to the Case. See Adding Routing Actions to Route Nodes in JDeveloper. for more information on configuring Routing actions.

  6. Optionally add more cases by clicking the Add Case icon. Repeat steps 3 to 5 for each new case that you add.

  7. 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.

  8. Click Save in the Oracle JDeveloper toolbar.

17.11 Adding For Each Actions in JDeveloper

Use the for each action to iterate over a sequence of values and execute a block of actions.

To add a For Each action:

  1. 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.

  2. Use the following steps to set the Properties for the Routing Table action:

    1. 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.

    2. Enter a value for For Each Value. Click fx to specify an XPath expression.

    3. Enter values for Value Variable, Index Variable, and Count Variable.

    4. Under Description, specify an optional description for the For Each action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.12 Adding If Then Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the If Then action:

    1. 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.

    2. Specify an optional Description for the If Then action.

  3. Select the If: <condition> branch in the If Then node by clicking on it.

  4. In the Properties window, click fx to specify an expression for the If condition.

  5. Drag actions, corresponding to the condition returning true, from the Components window to the branch.

  6. Optionally add more If conditions by clicking on the Add Condition icon in the If Then node.

  7. Repeat steps 3 to 5 for each additional condition that you add.

  8. Click Save in the Oracle JDeveloper toolbar.

17.13 Adding Raise Error Actions in JDeveloper

Use the raise error action to raise an exception with a specified error code (a string) and description.

To add a Raise Error action:

  1. 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.

  2. Use the following steps to set the Properties for the raise error action:

    1. 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.

    2. In the Properties window, enter the error Code that you want to raise.

    3. Enter a description of the error code in the Message field.

    4. Specify an optional Description for the raise error action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.14 Adding Reply Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the reply action:

    1. 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.

    2. Under Option, select With Success to reply that the message was successful. Alternatively, select With Failure to reply that the message has a fault.

    3. Specify an optional Description for the reply action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.15 Adding Resume Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the reply action:

    1. 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.

    2. Specify an optional Description for the resume action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.16 Adding Skip Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the skip action:

    1. 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.

    2. Specify an optional Description for the skip action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.17 Adding Assign Actions in JDeveloper

Use the assign action to assign the result of an XQuery expression to a context variable.

To add an Assign action:

  1. 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.

  2. Use the following steps to set the Properties for the assign action:

    1. 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.

    2. 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.

    3. Enter a context variable in the Variable field.

    4. Specify an optional Description for the assign action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.18 Adding Delete Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the delete action:

    1. 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.

    2. Under Location, specify the context variable.

    3. Click the fx icon to specify an XPath expression. All nodes selected by the XPath expression are deleted.

    4. Under the General section, specify an optional Description for the delete action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.19 Adding Insert Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the insert action:

    1. 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.

    2. 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.

    3. 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.

    4. Under Location, specify the context variable. The XPath evaluates the contents of this variable.

    5. 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.

  3. Click Save in the Oracle JDeveloper toolbar.

17.20 Adding Java Callout Actions in JDeveloper

Use the Java callout action to invoke a Java method, or EJB business service, from within the pipeline.

To add a Java Callout action:

  1. 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.

  2. Use the following steps to set the Properties for the Java callout action:

    1. 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.

    2. 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.

    3. 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.

    4. Repeat the preceding step for each argument in the selected method.

    5. Under the Return section, specify a Variable to which the result is to be assigned.

    6. 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.

    7. 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.

  3. Click Save in the Oracle JDeveloper toolbar.

17.21 Adding MFL Translate Actions in JDeveloper

Use the MFL (Message Format Language) translate action to convert message content from XML to non-XML, or vice versa, 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 vice versa. See Defining Data Structures with Message Format Language.

To add an MFL Transform action:

  1. 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.

  2. Use the following steps to set the Properties for the MFL translate action:

    1. 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.

    2. Under Translate, select whether you are translating from XML to Native or vice versa.

    3. 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.

    4. Under MFL, select Static to specify a static MFL resource. Alternatively select Dynamic to select a dynamic MFL resource.

    5. 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.

    6. Specify the Output variable to which the result of the translate is assigned.

    7. Specify an optional Description for the MFL translate action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.22 Adding nXSD Translate Actions in JDeveloper

Use the nXSD translate action to convert message content from XML to native format data, or vice versa, in the message pipeline. See "Native Format Builder Wizard" in Understanding Technology Adapters for information on creating native schemas used for translation.

To add an nXSD translate action:

  1. 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.

  2. Use the following steps to set the Properties for the nXSD translate action:

    1. 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.

    2. Under Translate, select whether you are translating from XML to Native or vice versa.

    3. 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.

    4. Under nXSD Schema, select Static to specify a static XML schema (.xsd). Alternatively select Dynamic to dynamically specify a schema.

    5. 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.

    6. Specify the Output variable to which the result of the translate is assigned. You can alternatively choose Content of $body as the output.

    7. Specify an optional Description for the nXSD translate action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.23 Adding Rename Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the rename action:

    1. 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.

    2. Under Location, specify the context variable that holds the element that you wish to rename.

    3. 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.

    4. Enter a Local Name and Namespace for the renamed element. At least one of these attributes is required.

    5. Under the General section, specify an optional Description for the rename action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.24 Adding Replace Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the replace action:

    1. 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.

    2. Under Location, specify the context variable that holds the element that you wish to replace.

    3. 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.

    4. 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.

    5. 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 ./*

    6. Under the General section, specify an optional Description for the rename action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.25 Adding Validate Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the validate action:

    1. 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.

    2. Under Location, specify the context variable that holds the element that you wish to validate.

    3. 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.

    4. 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.

    5. 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>
      
    6. 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.

    7. Under the General section, specify an optional Description for the validate action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.26 Adding Alert Actions in JDeveloper

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:

  1. 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.

  2. Use the following steps to set the Properties for the alert action:

    1. 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.

    2. 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.

    3. 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.

    4. Select the Severity level of the alert.

    5. 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.

    6. Under the General section, specify an optional Description for the alert action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.27 Adding Log Actions in JDeveloper

Use the log action to construct a message to be logged and to define a set of attributes with which the message is logged.

Before you begin

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:

  1. Be sure Logging is enabled globally. For more information, see "Configuring Operational Settings at the Global Level" in Administering Oracle Service Bus.

  2. 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.

  3. Use the following steps to set the Properties for the log action:

    1. 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.

    2. 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.

    3. Enter a short description of the alert in the Summary field. This description is logged along with the result of the previously defined expression.

    4. 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.

    5. Under the General section, specify an optional Description for the log action.

  4. Click Save in the Oracle JDeveloper toolbar.

17.28 Adding Report Actions in JDeveloper

Use the report action to enable message reporting for a pipeline.

To add a Report action:

  1. 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.

  2. Use the following steps to set the Properties for the report action:

    1. 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.

    2. 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.

    3. 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

    4. 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.

    5. Under the General section, specify an optional Description for the report action.

  3. Click Save in the Oracle JDeveloper toolbar.

17.29 Adding Error Handlers in JDeveloper

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.

17.29.1 How to Add Error Handlers in Pipelines in JDeveloper

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:

  1. 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.

  2. To change the default name and add a description for the error handler stage, do the following:

    1. 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.

    2. Edit the Name and Description fields for the selected stage node.

    3. Click Save in the Oracle JDeveloper toolbar.

  3. To add actions to the error handler stage, see Adding and Editing Actions in Pipelines in JDeveloper.

  4. To add more stages to the error handler, see Adding Error Handlers in JDeveloper.

  5. On the Pipeline Editor, continue to construct the pipeline, as described in Viewing and Editing Pipelines in JDeveloper.

  6. Click Save in the Oracle JDeveloper toolbar.

17.30 Disabling an Action or a Stage in JDeveloper

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.

Note:

If a disabled stage has an error handler, then the error handler is also disabled.

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.

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.

17.30.1 Disabling an Action or Stage

To disable an action or stage:

  1. In the Pipeline Editor, right-click the stage or action icon that you wish to disable.
  2. Select Disable from the context menu that appears.

    The action or stage is disabled, and the Disabled icon appears next to it.

  3. Click Save in the Oracle JDeveloper toolbar.

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.

17.30.2 Re-Enable an Action or Stage

To re-enable an action or stage:

  1. In the Pipeline Editor, right-click the disabled stage or action icon.
  2. Select Enable from the context menu that appears.

    The Disabled icon next to the stage or action disappears, and the stage or action is enabled.

  3. Click Save in the Oracle JDeveloper toolbar.