Moving OSB project from Development to Production Environment

This article is from the excellent Blog by Arpit Rahi Complete article is no longer available on Internet. It is reproduced here for easy reference only. In this document i will discuss how we can move our project from one environment to other. I will take example of a very simple process. A simple File write operation which will write to a particular location in my local folder and then i will import the project in to other server with different location for file to be write. We will create customization file for the same Found in System Administrator of Sbconsole. Ok let’s create a business service for writing data in to particular location. Log in to OSB console http://localhost:port/sbconsole Create a session Navigate to Project Explorer on left menu, under Resource Browser. Click on default Now create a business service using Create Resource > Service > Business Service

G

Give name as FileWrite

Select protocol as file,

After entering the Endpoint URI, you need to click Add button to that rule

Save and activate the change now

Click on Activate button and give some details about this project You can now see the business service

Now we shall create a proxy service

Now choose the business service

Submit then save all and then activate the project. Now test the proxy service with some random input

now if you will go to the C:\output location in your machine you will see a file has been created. It will have some random name as in my case it is 1650839931605045641-3be301d.12e56ff03c1.-7fd8 But if you will open the file you will get the content which you have passed <?xml version="1.0" encoding="UTF-8"?> <a>arpit rahi</a> So now our basic setup is complete, Now we will try to migrate this project to other machine where in our output location in not C:/output but I C:/outgoing Since I am using a single machine I will delete the existing project and reimport it which will essentially be the

same what we wanted to achieve but before that we will create a configuration plan for process. Log in to sb console. Go to system administration Create Customization file And select the process for which you have to create configuration plan

Say create file and it will create a ALSBCustomizationFile.xml which will contain all the details of the existing process Now check for following tags in the file <cus:customization xsi:type="cus:FindAndReplaceCustomizationType"> <cus:description/> <cus:query> <xt:resourceTypes>ProxyService</xt:resourceTypes> <xt:resourceTypes>BusinessService</xt:resourceTypes> <xt:envValueTypes>Service Retry Iteration Interval</xt:envValueTypes> <xt:envValueTypes>UDDI Auto Publish</xt:envValueTypes> <xt:envValueTypes>Service URI Weight</xt:envValueTypes>

<xt:envValueTypes>Service Retry Count</xt:envValueTypes> <xt:envValueTypes>Service URI</xt:envValueTypes> <xt:refsToSearch xsi:type="xt:ResourceRefType"> <xt:type>ProxyService</xt:type> <xt:path>default/Caller</xt:path> </xt:refsToSearch> <xt:refsToSearch xsi:type="xt:ResourceRefType"> <xt:type>BusinessService</xt:type> <xt:path>default/FileWrite</xt:path> </xt:refsToSearch> <xt:includeOnlyModifiedResources>false</xt:includeOnlyModifiedResources> <xt:searchString>Search String</xt:searchString> <xt:isCompleteMatch>false</xt:isCompleteMatch> </cus:query> <cus:replacement>Replacement String</cus:replacement> </cus:customization> Now here you have to make the changes manually. This is just an example and may not sound great to you but you can use this for your application which are much complex than this. Here in our use case we will provide the current folder in search string and will provide the new folder in replacement string so it will look something like this. <cus:customization xsi:type="cus:FindAndReplaceCustomizationType"> <cus:description/> <cus:query> <xt:resourceTypes>ProxyService</xt:resourceTypes> <xt:resourceTypes>BusinessService</xt:resourceTypes>

<xt:envValueTypes>Service Retry Iteration Interval</xt:envValueTypes> <xt:envValueTypes>UDDI Auto Publish</xt:envValueTypes> <xt:envValueTypes>Service URI Weight</xt:envValueTypes> <xt:envValueTypes>Service Retry Count</xt:envValueTypes> <xt:envValueTypes>Service URI</xt:envValueTypes> <xt:refsToSearch xsi:type="xt:ResourceRefType"> <xt:type>ProxyService</xt:type> <xt:path>default/Caller</xt:path> </xt:refsToSearch> <xt:refsToSearch xsi:type="xt:ResourceRefType"> <xt:type>BusinessService</xt:type> <xt:path>default/FileWrite</xt:path> </xt:refsToSearch> <xt:includeOnlyModifiedResources>false</xt:includeOnlyModifiedResources> <xt:searchString>file:///C:/output</xt:searchString> <xt:isCompleteMatch>false</xt:isCompleteMatch> </cus:query> <cus:replacement>file:///C:/outgoing</cus:replacement> </cus:customization>

Now if you have a different environment then import it to new one or if you don’t have delete the existing project and try to reimport the project. Once you have imported the project Again go to System Administration Execute Customization file and import the customization file that we have created as shown below

Verify if command is executed and activate your changes

now once you have made the changes now check you business process you will see that the enpoint location has now changed to the new value that you have provided in replacement string.If you will execute the process now it will now log file in the new folder location.

Sign up to vote on this title
UsefulNot useful