This chapter describes designing prototype message flows using pipeline templates. It also describes how to use Oracle JDeveloper to design and configure pipeline templates and concrete pipelines.
Note:
You cannot create a pipeline template in Oracle Service Bus Console. However, you can see existing template resources in the Project Navigator and view template properties like binding type and message handling options. You can also delete a template, rename a template, and move the template into a different folder or project.
Use pipeline templates to design prototype message flows for proxy services. A pipeline template defines the general shape or pattern of the message flow. Concrete pipelines can then be generated out of the pipeline template. All concrete pipelines use the message flow defined by the pipeline template with designated places where custom logic can be inserted.
The following sections describe working with pipeline templates in Oracle JDeveloper:
Use pipeline templates to design prototype message flows for proxy services. A pipeline template defines the general shape or pattern of the message flow.
After creating a pipeline template, you can edit it using the Template Designer. You can specify settings like message handling configuration settings for the template, and edit the message flow for the template.
Use the Template Designer to configure the settings and message flow for a pipeline template.
To edit a pipeline template:
The external services listed in the Start Node are those invoked outside the context of the pipeline. They are specified in an Invoke Service node but are listed here for convenience.
To view external services:
To view external services, click the left-arrow button on the Start Node. The External Services box appears to the left of the Start Node. Hover your mouse over an external service to view the complete path of the service resource.
The shared variables listed in the Start Node are the variables that the pipeline can share with other pipelines in the same call chain.
Note:
If two pipelines in a single call chain declare the same shared variable, then they read and modify the same variable in the scope of the invocation call chain. In other words, if pipeline P1 declares a shared variable var, and pipeline P1 invokes pipeline P2, which also declares a shared variable var, then any changes to var in P1 are visible in P2, and vice versa. A shared variable must be of the String, Boolean, or XML data type.
To view external services:
To view shared variables, click the left-arrow button on the Start Node. The Shared Variables box appears to the left of the Start Node. You can right-click the Shared Variables box to get a context menu. The context menu enables you to perform tasks like add or delete shared variables.
When a pipeline template defines a template placeholder of a particular type, a concrete pipeline can add zero or more nodes of the same type to the template placeholder. For example, the actions template placeholder can contain zero or more action nodes in the concrete pipeline.
Template placeholders can be of the following types:
Nodes: A nodes template placeholder can contain the following nodes:
Concrete pipeline pair nodes that contain stages/actions
Conditional branch nodes
Operational branch nodes
REST branch nodes
Route node
For example, a node placeholder block may contain a pipeline pair node followed by a route node in the concrete pipeline.
Stages: A stages template placeholder can contain zero or more stages in the concrete pipeline. Each stage can in turn contain actions.
Actions: An actions template placeholder can contain zero or more actions in the concrete pipeline.
Route: A route template placeholder is a placeholder for routing actions in the concrete pipeline.
Conditional: A conditional template placeholder enables you to specify a conditional branch node for the concrete pipeline.
Operational: An operational template placeholder enables you to specify an operational branch node for the concrete pipeline when using WSDL SOAP binding.
REST: A REST template placeholder enables you to specify a REST branch node for the concrete pipeline when using the REST binding.
If you have specified all required properties for an action added to a pipeline template message flow, and you wish all concrete pipelines to use the same values for the properties, then you can lock the action in the pipeline template message flow.
A locked action cannot be edited in the concrete pipeline. You must make sure that you have specified all the required properties, and any optional properties, in the pipeline template.
You can lock an action from the Properties window in Template Designer.
Before you begin:
Make sure you are editing the message flow in the Template Designer, as described in Editing a Pipeline Template
To lock an action:
Concrete pipelines implement the message flow pattern defined by the pipeline template. You can customize the message flow for the concrete pipeline at designated places.
The concrete pipeline inherits its message flow form the pipeline template. You can complete the message flow in the Pipeline Editor. You can add nodes and actions to template placeholders in the message flow. In addition, you can edit or complete the properties for other unlocked actions defined in the pipeline template. You cannot edit locked actions in the concrete pipeline.
Use the Pipeline Editor to edit the message flow for a concrete pipeline. You can add nodes and actions to template placeholders, and edit other unlocked actions defined in the pipeline template.
To edit the message flow for a concrete pipeline:
Make sure you have the Service Bus project open in Oracle JDeveloper.
Use one of the following methods to edit the message flow for a pipeline:
In Application Navigator, locate the pipeline node. Right-click the pipeline node and select Open. You can alternatively double-click the pipeline node to open it.
In Application Navigator, click the project node (or overview.xml) to open the Overview Editor.
In the Overview Editor, double-click the pipeline component to open the Pipeline Editor.
The Pipeline Editor appears. Ensure that the Design tab is selected at the bottom left corner of the editor.
The Pipeline Editor shows the message flow designed in the pipeline template.
To edit the property for an unlocked action:
Select the action in the Pipeline Editor message flow by clicking on it. The Properties window displays the properties for the selected action.
Note:
If the Properties window is not visible, select Properties from the Window main menu.
Edit the properties in the Properties window.
Use one of the following methods to edit a template placeholder:
Right-click the template placeholder icon to get options for message flow components that you can add. Click Insert Into from the context menu that appears.
Figure 18-5 shows the options available for the actions template placeholder.
Figure 18-5 Adding a Node to a Template Placeholder
Drag the desired component from the Components window to the template placeholder in the Pipeline Editor.
As you drag the 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. Release the mouse button to drop the component.
Continue to build the message flow by editing more actions, or dropping more nodes into template placeholders.
Click Save in the Oracle JDeveloper toolbar.
If you no longer need a concrete pipeline to be associated with a pipeline template, you can break the template link to convert the pipeline in to a regular pipeline. The regular pipeline can be edited without the restrictions applicable to concrete pipelines.