Tuesday, December 2, 2008

SOA SDLC using OSR, OER

I was asked by a customer how to do SOA SDLC in an Oracle SOA Suite environment.

The idea was to use dynamic lookups using UDDI in Oracle BPEL and the Oracle ESB components, thus migrating the same code between different environments. See Antony Reynolds' blogs -
http://blogs.oracle.com/reynolds/2008/11/bpel_deployment_framework.html and http://blogs.oracle.com/reynolds/2008/05/register_of_interest.html for detailed approach.

After creating entries and replicating the entries from one registry to another registry instance, simulating a dev->qa->dev migration, we figured out it is going to be a very difficult process to implement with no automation and a lot of 'search and replace'.

I investigated the use of the Oracle Enterprise Repository and was suprise that Oracle does not push the product harder into the market.

The steps I followed, after installation of the OER, SOA Suite (including Oracle Service Registry) and JDeveloper, was as follows:

1. Configured JDeveloper to use the OER plugin to deploy artifacts from JDeveloper directly into the repository. See instructions in BEA_HOME/repository103/core/tools/solutions/OER103-SOA-BPM-Harvester.zip readme file.



2. Configured the types which should be exposed in the UDDI registry to either a UDDI Business Entity or UDDI Business Service Entity. Documented in http://download.oracle.com/docs/cd/E13164_01/oer/docs10134/regman/index.html


3. Configured the OER103-RR-ExchangeUtility to talk to the UDDI Registry, with a query of what information should be published to the UDDI.


<uddi:registryManagerSettings xmlns:uddi="http://www.bea.com/aler/integration/config/uddi">
<repository>
<uri>http://localhost:7101/oer</uri>
<credentials>
<user>admin</user>
<password>admin</password>
</credentials>
</repository>
<query>
<repositoryQuery> <-OER to OSR query
<businessEntities/>
<services>
<service name="%"/>
</services>
<destinationRegistries>
<destinationRegistry>TEST_UDDI</destinationRegistry>
</destinationRegistries>
</repositoryQuery>
<registryQuery>
<-OSR to OER query
<businessEntities/>
<services>
<service name="%"/>
</services>
<qualifiers>
<qualifier>approximateMatch</qualifier>
</qualifiers>
<sourceRegistry>TEST_UDDI</sourceRegistry>
</registryQuery>
</query>
<registries>
<registry name="TEST_UDDI">
<inquiryURI>http://localhost:8080/uddi/inquiry</inquiryURI>
<publishURI>http://localhost:8080/uddi/publishing</publishURI>
<securityURI>http://localhost:8080/uddi/security</securityURI>
<credentials>
<user>admin</user>
<password>admin</password>
</credentials>
</registry>
</registries>
</uddi:registryManagerSettings>

4. Deployed an existing BPEL Project from JDeveloper to OER. (As easy as right-click on the project and 'Submit this project to Oracle Enterprise Repository')

[repository.submit] Saving the attributes for asset {http://xmlns.oracle.com/OERDemoBPEL}OERDemoBPEL.wsdl
[repository.submit] Saving the attributes for asset {http://xmlns.oracle.com/OERDemoBPEL}__OERDemoBPEL.wsdl
[repository.submit] Saving the attributes for asset {http://xmlns.oracle.com/OERDemoBPEL}OERDemoBPEL.bpel-2
[repository.submit] Saving the attributes for asset {OERDemoBPEL.jpr}BusinessProcess/OERDemoBPEL
[repository.submit] Saving the attributes for asset {OERDemoBPEL.jpr}Interface/OERDemoBPEL
[repository.submit] Saving the attributes for asset {OERDemoBPEL.jpr}Interface/OERDemoBPELCallback
[repository.submit] Saving the attributes for asset {OERDemoBPEL.jpr}Interface/OERDemoBPEL
[repository.submit] Saving the attributes for asset {http://xmlns.oracle.com/OERDemoBPEL}OERDemoBPEL.xsd
[repository.submit] Saving the attributes for asset {OERDemoBPEL.jpr}Interface/OERDemoBPELCallback


5. Manually executed the Registry Exchange tool in a publish mode.

OER Exchange Utility : v10.3 - 09/29/2008
usage:alrrx <-mode-map-publish_tmodel-link>

-mode : "publish" to publish Services
: "receive" to receive Services
-config : File that configures the Registry Manager
-map : Generate the UDDI Mapping file
-publish_tmodel : Publish the t-models
-link : Link a Service in OER to a Service in OSR.

OK, maybe it was not that easy, as I still have to figure out why the actual BPEL invocation endpoint did not filter through.


A couple of interesting facts:
  • The registry entries can be filter to go to different UDDI registries, depending on the query specified. An example might be to send SOA artifacts which got a status of 'In development' to a development registry and a status of 'Production' to a production registry.
  • The UDDI registry key stays the same, even if a new version of an artifact is created.
  • Existing information can be harvested using various methods. Introspection of code, HTTP, UDDI imports and directory harvesting is some of the options available to gather artifacts and populate the repository.

By using the dynamic UDDI functionality of the Oracle SOA Suite components, the above method can expose an easy way of controlling the life-cycle of your SOA artifacts. AND that is not even taken the standard functionality of OER into account.

Another interesting aspect of the OER is the emission of events. These events can be interrogated and automatic deployment can be triggered. An example might be if an artifact is mark as production ready, it can be deployed automatically to the production environment. - But I leave that investigation for another day !