This post is about a feature in Oracle’s SOA Suite / JDeveloper 10.1.3.x that may easily go unnoticed: the option to publish a BPEL process as a template by using the Mark as Template option in JDeveloper.
The use case is the following: you have assembled a BPEL process that contains functionality that needs to be used in other BPEL processes. A good example is the usage of a generic ‘Error Hospital’ BPEL process from other BPEL processes. This becomes easy to understand and reuse when a sample or template is made available.
In previous BPEL versions, using a BPEL process as a template meant copying the BPEL project folder, renaming the BPEL process and subsequently searching for and replacing all namespaces in it. In 10.1.3.x you publish your BPEL code as a template to make it instantly available to your team members and also easily reusable by them. All it takes are a few simple steps.
When you have finished BPEL process creation, select the option Mark as Template from the context menu (right-click) of the BPEL project folder JDeveloper as shown in the following screen shot.
In the Name your Template screen specify a meaningful name for your template.
Note that the context menu for the BPEL process now reflects that it has been marked as a template.
You can now reuse the template as the basis for a new BPEL project. Create a new BPEL Process Project in JDeveloper. In the BPEL Project Creation Wizard you can now select your new template from the Template drop down box.
Once selected, JDeveloper takes care of renaming the contents of your template for use in your new BPEL process.
Custom templates cannot be managed from within JDeveloper. Templates are stored in XML file ‘template.xml’ that is maintained by JDeveloper in JDEV_HOME/integration/bpm/template. Edit that file for changing the names of your templates or for removing these. Share the file with your team mates through a source code control system. Enjoy!