Migration Process using Web Service

One way to export and import the migration project from a source server to a target server is using web service. The high level steps involved in this process are:

  1. Create the Export Migration Project on the source server.
  2. Importing the Migration Project using the web service option on the Migration Project Import Process on the target server by providing the web service definition of the source server and the source export project ID.

When you use this process, you invoke the process from the target server. Once invoked, the export project definition of the export project defined on the source is pulled using the “exportProjectDefiniton” web service operation and the response is used to create an import project on the target server. Using this import project definition, you will request details of each object group using the “exportObjectGroup” web service definition and response is used for importing the objects of this group to the target server.

Follow the steps below to create a migration project and import the project using web service.

Creating a Web Service

You need to create a web service definition of the CommandService web service of the source OTM Server in the target OTM server.

  1. Get the WSDL URL for the CommandService web service from the source server. Go to Business Process Automation > Integration > Integration Manager > Retrieve WSDL, for the web service CommandService click on “View WSDL Content”. In the WSDL, get the web service end point. You can get the web service endpoint using Service tag.

For example:

<wsdl:service name="CommandService">

<wsdl:port binding="tns:Command" name="Command">

<soap:address location="https://example.com:8002/GC3Services/CommandService/call"/>

</wsdl:port>

</wsdl:service>

The URL https://example.com:8002/GC3Services/CommandService/call is the endpoint and you can get the wsdl by appending wsdl as a query parameter to the URL i.e. the URL to retrieve the WSDL is https://example.com:8002/GC3Services/CommandService/call?wsdl.

  1. Define the WSDL Document. Go to Business Process Automation > Document Manager > New. Create a new document without associating it to any Document Type and Content Management System and after you click Document Detail, OTM provides the Storage as URL and the wsdl URL for the CommandService.
  2. Go to Business Process Automation > Communication Management > Web Services > New. Create a new WSDL document suing step 2 or if you have already created the WSDL document, provide the WSDL document and click Service Details.
  3. In the Web Service Endpoints section, edit the web service end point to add the login user name and password details of the source server.

Note: Make sure that the source server and target server domain names are same. Also, both the servers must be in sync which means the UTC time of both servers should be the same.

Run Migration Project Import Process

Select the Import Using Web Service option on the Migration Project Import to view the General and Source Migration Project Details section

General Section

  1. On a target server (unit server), in the Migration Project Import, select the Import Using Web Service option.
  2. Provide the Migration Project ID of import type. If no Migration Project ID is specified, the import process will generate a new ID based on the BNG. E.g. Combination of the current date and a unique sequence i.e. YYYYMMDD-nnnn.
  3. While you import the data, you have an option to control when an error occurs i.e. Action On Error option:
    • CONTINUE: mark group/object as ERROR status and attempt next group.
    • FAIL: stop processing immediately and mark project as ERROR.

Source Migration Project Details Section

  1. Enter the source server Export Migration Project as TEST.SERVER TO SERVER. Use this field to specify source server migration project ID along with the domain name. For example, domain.export migration project ID.
  2. Enter the web service ID which you have created above.  This indicates a name of the web service.  This enables you to communicate between source server and the target server.  This web service ID contains source server URL and credentials.
  3. Ensure that the import project and all the migration object group’s status is IMPORTED.

Note: If you enter the Migration Project ID, data will be loaded in the given migration project ID by replacing all its content. Search for the data which is part of the imported project and verify if all the data is available. Also verify if the Export Project ID and the web service ID can be viewed in the import Migration Project UI.

Import Status

If the import process fails for an object ID in a migration project group it will be placed in an ERROR status. If one or more object ID in a group is given an ERROR status, then the group itself is given an ERROR status.

Similarly, if one or more migration object groups in the project are in ERROR status then the project status will be PARTIAL. If all object IDs in all migration object groups are in ERROR status, then the migration project status is Failed.

Migration Project Lifetime Events

As the Migration Project changes state throughout its various lifetime events will be available to drive notification and agent workflow. All events use the MIGRATION_PROJECT_EVENT Notify Function ID. These events include (all prefaced with “MIGRATION PROJECT –”):

  • CREATED – Export Migration Project has been created
  • MODIFIED: Migration Project updated e.g. Object Group or Object PKs added/removed.
  • REMOVED: Migration Project deleted.
  • EXPORTED: Migration Project successfully exported.
  • EXPORT SEND PACKAGE FILE: Migration Project package has been created and will be included as attachment (EMAIL com method is the only supported option).
  • EXPORT FAILED: Migration Project exported failed.
  • EXPORT PARTIAL: Migration Project exported but not all requested data was exported.
  • IMPORTED: Migration Project successfully imported.
  • IMPORT FAILED: Migration Project imported failed.
  • IMPORT PARTIAL: Migration Project import completed but not all data was imported successfully.

Command Line Tools

The use of migration project package files will require some level of system administrator access to the application servers. Consequently, it may be appropriate to delegate the execution of the export and import to an administrator via formal “change requests”, etc.

The command line tools described below provide access to all the same features available via the UI and so are suitable for this purpose.

Only the Migration Process using the zip file is supported using the command line tools.

Export – mpExport.sh (Unix) / mpExport.cmd (MS Windows)

The format of the mpExport command is as follows: -

mpExport[.sh|.cmd] –app [app server host:port] –username [OTM user] […parameters (below)]

Parameter

Description

projectGID {GID} [Mandatory] The {GID} value corresponds to the unique ID of the project to be exported
packageFileName {name} [Optional] The {name} value is specified when a specific file name is to be used to hold the exported package. If no packageFileName parameter is specified the filename will be constructed using the XID of the exported project GID, replacing any spaces with underscore (‘_’). The file extension will be ‘.zip’.

 

For example,

mpExport.sh –app localhost:7001 –username GUEST.ADMIN –projectGID GUEST.RELEASE_1 –packageFileName /tmp/release1.zip

[will be prompted for specified user’s password (in this example for GUEST.ADMIN)]

Import – mpImport.sh (Unix) / mpImport.cmd (MS Windows)

The format of the mpExport command is as follows:-

mpImport[.sh|.cmd] –app [app server host:port] –username [OTM user] […parameters (below)]

Parameter

Description

packageFileName {name} [Mandatory] The {name} value specifies the file name containing the Migration Project Package. is to be used to hold the exported package. If no packageFileName parameter is specified the filename will be constructed using the XID of the exported project GID, replacing any spaces with underscore (‘_’). The file extension will be ‘.zip’.
projectGID {GID} [Optional] The {GID} value corresponds to the unique ID of the project record that will be created (or updated if it already exists) by importing the specified package file.
actionOnError {CONTINUE|FAIL} [Optional] Specifies action to take when an error occurs processing the package content. Defaults to CONTINUE.

 

For example,

mpImport.sh –app localhost:7001 –username USER –packageFileName /tmp/release1.zip

[will be prompted for specified user’s password (in this example for USER)]

Related Topics