Monday 15 August 2016

Supporting Canonical Message across multiple composites

In any integration projects multiple SOA/BPM projects or composite are created that use a set of common xml schemas. The Business Components are created based on these  xml schemas to be used to define the process input/output. An effective mechanism needs to be institutionalized to store these common  xml schemas in a central place and referred by all SOA/BPM composites.

This can be achieved using Metadata service (MDS) in Oracle SOA Suite.  At design time XSDs are defined in JDeveloper and pushed to local MDS, also knows as DesignTimeRepository, which is file based MDS and stored on developer's local filesystem. The XML schemas stored in DesignTimeRepository are accessible to any project within the BPM Application and even across the Applications while developing in JDeveloper. By default this DesignTimeRepository is located in the <userhome>\jdeveloper\soamds folder. The DesignTimeRepository folder should be configured under version control system, so that all common artifacts are version controlled and synchronized across every developers' local DesignTimeRepository. During design time these common schemas are used in different SOA composites, but before deployment to SOA server, the components in DesignTimeRepository should be imported into runtime MDS of the SOA server. 

The example below illustrates the steps to save XML schemas in DesignTimeRepository, refer that in multiple BPM projects (using Oracle BPM 12.2.1) and deploy them in MDS on SOA server.

First, create a BPM Application.


In the "Create BPM Application" wizard, create a BPM project.


Next, create a XML schema claim.xsd in the BPM project.




Now, we need to store the claim.xsd into the DesignTimeRepository. Right click on the claim.xsd and select "Share using SOA - Design Time MDS Repository" option on the menu. This will move the claim.xsd from the project to the  DesignTimeRepository.



You can view the components stored in DesignTimeRepository from the component window.  All the components you store in the DesignTimeRepository, is stored under "apps" folder.



Once the claim.xsd is stored in the DesignTimeRepository, you can refer to that from any project.  Create another BPM Project. Then create a Business Object based on External Schema. Select the claim.xsd from the MDS.





That's it. You can do the same for all projects and shared artifacts.

Now, it is time to deploy the projects on SOA server. If you try to deploy, the  deployment will fail as the claim.xsd is not available on SOA Server MDS. 

To save the components from local DesignTimeRepository to SOA Server MDS, login to EM and navigate to soa-infra > Administration > MDS Configuration.




Enter the folder location of DesignTimeRepository, the default location is <userhome>\jdeveloper\soamds and click import. That's it. Now you can deploy the projects which refer the claim.xsd.

If you dont have access to EM, you can also deploy the shared components using WLST or the SOA bundle deployment.  Refer this blog to understand how to use WLST to add/delete shared components on SOA MDS. 

No comments:

Post a Comment