Thursday, September 12, 2013

Common customization file to deploy OSB services to different environments

Common customization file to deploy OSB services to different environments

The customization file can be used to customize the OSB services.
This post will explain how to use the common customization file to customize the OSB services.

Steps to use common customization file to customize the OSB services

1. Create a environment specific property files with the end point details ex Dev_build.properties

# SFDC Details
sfdc.protocol=http
sfdc.host=10.23.23.11

siebel.protocol=http
siebel.host=10.23.23.12


2. Common customization file

To customize the end point details for the business service, we have to change the Service URI and Service URI Table.
we have to tokenize the endpoint details so that the values can be replaced from the environment specific file.

For each new OSB service generate the customization file and copy the required sections(mainly <cus:envValueAssignments> of Service URI and Service URI table <cus:envValueAssignments>) to the common customization file.

<?xml version="1.0" encoding="UTF-8"?>
<cus:Customizations xmlns:cus="http://www.bea.com/wli/config/customizations" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xt="http://www.bea.com/wli/config/xmltypes">
  <cus:customization xsi:type="cus:EnvValueCustomizationType">
    <cus:description/>
    <cus:envValueAssignments>
      <xt:envValueType>Service URI</xt:envValueType>
      <xt:location>0</xt:location>
      <xt:owner>
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_ServCloudVenusInbound</xt:path>
      </xt:owner>
      <xt:value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">@sfdc.protocol@://@sfdc.host@/services/service1</xt:value>
    </cus:envValueAssignments>

    <cus:envValueAssignments>
      <xt:envValueType>Service URI Table</xt:envValueType>
      <xt:location xsi:nil="true"/>
      <xt:owner>
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_ServCloudVenusInbound</xt:path>
      </xt:owner>
      <xt:value>
        <tableElement xmlns="http://www.bea.com/wli/sb/transports">
          <URI>@sfdc.protocol@://@sfdc.host@/services/service1</URI>
          <weight>1</weight>
        </tableElement>
      </xt:value>
    </cus:envValueAssignments>

    <cus:envValueAssignments>
      <xt:envValueType>Service URI</xt:envValueType>
      <xt:location>0</xt:location>
      <xt:owner>
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_RCRMVenusInbound</xt:path>
      </xt:owner>
      <xt:value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">@siebel.protocol@://@siebel.host@/eai_enu/start.swe</xt:value>
    </cus:envValueAssignments>
    <cus:envValueAssignments>
      <xt:envValueType>Service URI Table</xt:envValueType>
      <xt:location xsi:nil="true"/>
      <xt:owner>
        <xt:type>BusinessService</xt:type>
        <xt:path>VenusOSB/BusinessServ/BS_RCRMVenusInbound</xt:path>
      </xt:owner>
      <xt:value>
        <tran:tableElement xmlns:tran="http://www.bea.com/wli/sb/transports">
          <tran:URI>@siebel.protocol@://@siebel.host@/eai_enu/start.swe</tran:URI>
          <tran:weight>1</tran:weight>
        </tran:tableElement>
      </xt:value>
    </cus:envValueAssignments>

  </cus:customization>