OSB_2FirstExample

Embed Size (px)

Citation preview

  • 8/3/2019 OSB_2FirstExample

    1/22

    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 takeexample of a very simple process. A simple File write operation which will write to a particular location in mylocal folder and then i will import the project in to other server with different location for file to be write. Wewill create customization file for the same Found in System Administrator of Sbconsole.

    Ok lets create a business service for writing data in to particular location.Log in to OSB console http://localhost:port/sbconsole

    Create a sessionNavigate to Project Explorer on left menu, under Resource Browser.Click on defaultNow create a business service using Create Resource > Service > Business Service

  • 8/3/2019 OSB_2FirstExample

    2/22

  • 8/3/2019 OSB_2FirstExample

    3/22

    Give name as FileWrite

  • 8/3/2019 OSB_2FirstExample

    4/22

    Select protocol as file,

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

  • 8/3/2019 OSB_2FirstExample

    5/22

    Save and activate the change now

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

    Now we shall create a proxy service

  • 8/3/2019 OSB_2FirstExample

    6/22

  • 8/3/2019 OSB_2FirstExample

    7/22

  • 8/3/2019 OSB_2FirstExample

    8/22

  • 8/3/2019 OSB_2FirstExample

    9/22

  • 8/3/2019 OSB_2FirstExample

    10/22

  • 8/3/2019 OSB_2FirstExample

    11/22

  • 8/3/2019 OSB_2FirstExample

    12/22

  • 8/3/2019 OSB_2FirstExample

    13/22

    Now choose the business service

  • 8/3/2019 OSB_2FirstExample

    14/22

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

  • 8/3/2019 OSB_2FirstExample

    15/22

    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 passedarpit rahi

    So now our basic setup is complete, Now we will try to migrate this project to other machine where in ouroutput location in not C:/output but I C:/outgoingSince I am using a single machine I will delete the existing project and reimport it which will essentially be the

  • 8/3/2019 OSB_2FirstExample

    16/22

    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 administrationCreate Customization fileAnd 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 existingprocess

    Now check for following tags in the file

    ProxyServiceBusinessServiceService Retry Iteration IntervalUDDI Auto PublishService URI Weight

  • 8/3/2019 OSB_2FirstExample

    17/22

    Service Retry CountService URI

    ProxyServicedefault/CallerBusinessServicedefault/FileWritefalseSearch Stringfalse

    Replacement String

    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 aremuch complex than this.

    Here in our use case we will provide the current folder in search string and will provide the new folder inreplacement string so it will look something like this.

    ProxyServiceBusinessService

  • 8/3/2019 OSB_2FirstExample

    18/22

    Service Retry Iteration IntervalUDDI Auto PublishService URI Weight

    Service Retry CountService URIProxyServicedefault/CallerBusinessServicedefault/FileWrite

    falsefile:///C:/outputfalsefile:///C:/outgoing

    Now if you have a different environment then import it to new one or if you dont have delete the existing

    project and try to reimport the project.

    Once you have imported the projectAgain go to System AdministrationExecute Customization file and import the customization file that we have created as shown below

  • 8/3/2019 OSB_2FirstExample

    19/22

  • 8/3/2019 OSB_2FirstExample

    20/22

    Verify if command is executed and activate your changes

  • 8/3/2019 OSB_2FirstExample

    21/22

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

  • 8/3/2019 OSB_2FirstExample

    22/22