Thursday, January 1, 2015

As we know Oracle SOA 12c comes with lot of new features, one of that is service bus is merged with SOA Suite i.e. we need not to use separate IDE to build service bus projects. In 12c we use Jdeveloper to build service bus projects.

In previous post we discuss about SOA templates which helps to improve developer productivity, similarly in service bus we have pipeline template. We will discuss about pipeline template in this post, we see how to create pipeline template and how to use pipeline template.

A pipeline template depicts the general message flow and we can generate concrete message flow using this pipeline template.

One point which we need to keep in mind that we cannot create a pipeline template in Oracle Service Bus Console.

How to create pipeline template


Now we see how to create pipeline template from Jdeveloper. To create pipeline template, create a new project and choose “Service Bus project” option. Also provide the project name and click on finish.

OSB 12c Pipeline Template Create project

OSB 12c Pipeline Template Create Pipeline Project


Now to create pipeline template, right click on newly created project and go to New àPipeline Template option. Also provide pipeline template name and also specify the location for that template. You can also provide the description for this template if you want to.

OSB 12c Pipeline Template Create Template

OSB 12c Pipeline Template Provide Template Name

Now choose the service type, for this post we choose “Any XML” as we receive any type of XML and click on Finish. Once you click on finish, wizard open another window where you see message flow and that message flow have only start node.

OSB 12c Pipeline Template Choose Service Type


OSB 12c Pipeline Template Default Message Flow


Now you can add all required actions or nodes in the message flow which you want to have in pipeline template. For this post, I have simply added one pipeline pair and log activates to request & response pipeline.

OSB 12c Pipeline Template Message Flow


Now deploy your pipeline template, to do that right click on the project and choose Deploy option and then deploy this project to server.

OSB 12c Pipeline Template Deploy


OSB 12c Pipeline Template Deploy To Server


How to use pipeline template

In above steps we have seen how to create pipeline template, now we see how to use above created pipeline template. To do that create a new service bus project, specify project name and click on finish.

OSB 12c Use Pipeline Template Create Project


Right click on the newly created project and go to New and then choose “Pipeline” option.

OSB 12c Use Pipeline Template Create Project From Template


This opens the wizard; in first step specify service name and description. Also check the “From Template” checkbox, this is required when you want to use pipeline template to create your service. To browse the pipeline template click on search button and choose pipeline template which we created in above step.

OSB 12c Use Pipeline Template Specify Service Name

OSB 12c Use Pipeline Template Specify Pipeline Template


Once you click on next in above step, you see below screen, in that window choose “Any XML” service type and check “Expose as a Proxy Service” checkbox as we want to expose pipeline as proxy service. Specify the proxy service name and also choose the proxy service transport.

OSB 12c Use Pipeline Template Specify Proxy Service Name


Once you click on finish in above step, wizard will take you to the message flow which got generated from pipeline template. You notice that all the actions and nodes which we have added in pipeline template, we can see all that in below message flow. Now you can add required actions to this message flow.

OSB 12c Use Pipeline Template Message Flow


After this step, your composite look like below.


OSB 12c Use Pipeline Template Composite



2 comments :

  1. After creating the Service Bus project from a template project, if you want to add any new action (like assign/replace/alert), can't we add it?. I see that it is freezed. I couldn't add any thing new.

    ReplyDelete
    Replies
    1. To anyone trying to figure out how to edit the template, go to this link: https://docs.oracle.com/middleware/1213/osb/develop/GUID-A576603C-212B-40FE-B799-FE689A77C280.htm#OSBDV88682

      You will need to add template placeholders to the template, that create freedom to add actions in the implementations of the templates. For example, add an "Actions" placeholder, and then you can add custom actions to the implementations. The cool thing is that when you edit the template and save/redeploy the changes, the implementations reflect those changes.

      Best of luck!

      Delete