In this post, we are going to cover Templates and Levels of Templates in SOA 12c which is one of the new features in SOA 12c and mainly focuses on reusability of the code in Oracle SOA Suite.
Templates in SOA 12c:
- Templates are reusable components.
- The concept of the template helps developers to reuse a standardized piece of code that has been published in the form of templates.
- It leads to reduced development time and more reusability.
Levels of Templates:
Templates in SOA 12c can be created at three different levels:
- Project Level Template
- Component Level Template
- Custom Activity Level Template
Project Level Template:
This template contains a full project along with all the artifacts, components and references. We can create a project template from Jdeveloper using the following steps:
1. Right-click on the SOA Project to be converted into project template and Select the option Create SOA Template.
2. Specify the path to the store template.
3. Check all the files that are required to be included in the template and hit finish.
4. Project Level Template gets successfully created.
We can build new projects from this project template, the new project imports all the artifacts, components and references which are there in the project template.
Below are the steps to create a new project using projects template:
1. Go to file—>New—->Project
2. Select the SOA Project and click ok.
3. Name the Project as per your context and click Next.
4. Select the radio button SOA Template and choose the template on the basis of which you want to create a project and hit the finish button.
Component Level Template:
- This template contains service components.
- We can create a template from any composite component.
- It also contains all reference components and resources which are there inside that component.
- You can find this template in the SOA composite application’s Components window and it appears as a custom service component.
Below are the steps to create the component level template:
1. Right Click on the component to be converted into a component level template
2. Select the option Create Component Template.
3. Select all the files that are required to be included in the template and hit finish.
4.A component template gets successfully created.
We can build new components from the existing component templates, the new component imports all the artifacts which are there in the component template.
Below are the steps to create a new component using the component template:
1.Right-click on the service component lane and select the insert option. Choose Component Template.
2.Select the Component Template on the basis of which you want to configure your new component and hit Ok.
Custom activity Level Template:
- This template contains a set of activities of a BPEL process which may include assign, transform, invoke, and receive and partner link.
- We can use this template in the same BPEL or in any other BPEL.
- This template also contains all the variables, references and artifacts which are related to that activity. Custom activities will be available in the BPEL palette.
Below are the steps to create a custom activity level template:
1. All the activities which are required to be converted into a template are required to be pushed into a scope.
2. Right Click on the scope and select the option Create Custom Activity Template
3. Specify the name of the template and select the location to create the template. Hit Next.
4. Select all the dependent variables to be included in the Custom Activity Template. Hit Next.
5. Select all the dependent files and click finish.
6.SOA Custom Activity Template gets successfully created.
7.This custom activity template gets added in the component pallette as shown below:
We can reuse these custom activity templates by dragging them from the component pallette into BPEL.
So, this is all about the Templates and Levels of Templates in SOA 12c.
We cover this in one of the modules of our Oracle SOA Dev where we also cover Develop SOA Composite, Orchestration, Managing and Monitoring Composite Applications, Fault Handling, DVM & MDS, JCA Adapters, Mediator, Business Rule Component and much more interesting and latest features in SOA 12C.
Did You Find this Blog useful?
Leave a Comment.
Some Interesting Topics in SOA Dev:
- [Video] Oracle SOA Suite Development: Meta Data Service (MDS) Click here
- [Video] Oracle SOA Suite Development: Domain Value Map (DVM) Click here
- [Blog]Error Hospital in Oracle SOA Suite 12C Click here
- Enterprise Manager Partition in Oracle SOA Suite 12c/11g Click here
- Subprocess in Oracle SOA Suite 12C Click here
Next Task for you:
Register for our FREE Masterclass on “Be An Expert With Oracle SOA Suite Development” as it will help you clear your doubts and concepts about SOA Suite before you start your journey.