One of the new features in Service Bus 12c is the ability to use pipeline templates. Usually the Oracle Service Bus pipelines in an environment have many common steps. Think of the re-use of logging, error handling, alerts and pattern + naming convention for your stages. In practice with OSB 11g we often used a “template” or existing OSB project which we then copied and modified. With the “clone” option of 12c this task is already easier, but the use of pipeline templates is even better. Since templates and concrete pipelines (generated pipelines from a template) remain linked we can update our services easier with new insights. For example, when you want to change your default logging or fault handling behavior.
- How to create a Service Bus 12c pipeline template
- How to generate and use a concrete pipeline from a template
- How to customize your Service Bus 12c pipeline templates
There are multiple ways to create pipeline templates, in this blogpost we will show 2 common options.
In this example I will use a common project in my JDeveloper SBApplication named “CommonObjects” with a folder “templates” to host my templates.
While selecting the templates folder we first select New -> Pipelin Template from the JDeveloper menu
In the next wizard step we can select a name for the new template. For now we will leave the “from pipeline” option empty. For the template naming convention I have chosen to include the transport choice (in this case SOAP 1.2).
The result is an empty template which you can customize by adding message flow actions from the Components palette.
Generate template from existing pipeline
However in most environments you will likely have some existing services which contain logic that you want to re-use in the form of pipeline templates. In that case we we can repeat the step New -> Pipeline Template. However this time we select the “from pipeline” option in the wizard. In the example we will generate a pipeline template from our earlier created entity GetCaseservice. The purpose is to use the newly created the new PipelineTemplate_soap12_entity for multiple new SOAP 1.2 entity services we will generate in the near future.
The result is a basic template we can re-use for our new pipelines / services.
- You cannot create pipeline templates in the SB console, only in JDeveloper 12c. You can however see template resources in the SB console project navigator.
- You can manually refresh your templates in JDeveloper. You will need this from time to time and for some reason these are seperated from your application artifacts regarding refresh options.