Você está na página 1de 15

Migrating Service Desk Projects to Service Manager Changes

Using Connect-It to migrate Projects into Service Manager Changes


HP Management Software Service Management

Introduction......................................................................................................................................... 2 Requirements....................................................................................................................................... 2 Implementation.................................................................................................................................... 2 Planning the migration...................................................................................................................... 2 Defining the extaccess record in Service Manager ............................................................................... 3 Creating the Service Desk UI View ..................................................................................................... 4 Creating the Connect-It Scenario........................................................................................................ 4 Setting up the connectors............................................................................................................... 5 Define the Mapping ....................................................................................................................... 10 Defining a JavaScript to relate the Project to Changes ........................................................................ 13 Executing the Scenario ....................................................................................................................... 14 Start the involved systems................................................................................................................ 14 Troubleshooting ................................................................................................................................. 14 For more information.......................................................................................................................... 15

Introduction
Service Desk customers frequently employed a Project Module to plan their change projects. Customers want to be able to move the information on their projects to Service Manager during the migration, but the migration scenarios do not provide this data migration. This white paper will give an overview of an example connect-it scenario used to move data from Service Desk projects to Service Manager changes.

Requirements
The following products and knowledge of these products are required to successfully implement the steps described in this paper: Service Manager 7 or higher o o SysAdmin access to Service Manager Migration unloads loaded into Service Manager

Connect-It 3.81 Service Desk 4.5 SP23 or higher Data Migration Scenarios (Data Migration Tool) were executed successfully Load the attached unload that contains the JavaScript discussed in the Defining a JavaScript to relate the Project to Changes section as well as the Change Category (cm3rcategory) and Change Phase (cm3catphase) records. To load the unload, store it in a local directory, then go to Tailoring Database Manager. On the database Manager screen, go to the Options dropdown or right mouse click and select Import / Load. Enter the filename and path to the unload sent with this document and click on Load FG to load it. Custom fields are not mapped in this example. Refer to the White Paper Migrating Custom Fields from Service Desk to Service Manager for information on how to map custom fields.

Implementation
The implementation occurs in 4 steps: Planning the migration determine which fields need to be moved from Service Desk to Service Manager Defining the extacess record in Service Manager define the fields that need to be moved into Service Manager Defining the UI View in Service Desk the UI View is used to define the selection of records that will be mapped Creating / Adjusting the Connect-It Scenario either use the example scenario that comes with the white paper and adjust as directed, or create a new scenario from scratch as described.

Planning the migration


The first step in the implementation is determining which field on the Service Desk side corresponds to which field on the Service Manager side. In most cases a match can be found. If a field in Service Desk has no equivalent in Service Manager, use the dbdict utility to add the corresponding new field in the Service Manager cm3r dbdict. Refer to the Service Manager online documentation on how to add a new field to a dbdict.

Note: If possible, we recommend re-using unused fields. Search for a field that does not contain any data and that is not marked as System or Application in the corresponding Data Policy record and change the name and type to match the new requirement. Renaming fields will result in the RDBMS table being copied and in large tables will take a longer time.

Defining the extaccess record in Service Manager


Once the mapping is planned out and all missing fields were added to the cm3r dbdict, the extaccess record for the project migration has to be created. For easiest setup, copy the existing SDMigChange extaccess record and adjust the fields to map as described below:
1. 2. 3. 4. 5.

Log in to Service Manager as a System Administrator such as falcon Go to Menu Navigation > Tailoring > WSDL Configuration Search for Object Name SDMigChange Change the Object Name to SDMigChangeProject Click on Add

6. The only changes need to be made on the Fields tab. Enter all fields here that need to be mapped

and are not listed yet. Ensure to enter the appropriate type for all non-String Type fields.

Creating the Service Desk UI View


Create a view against the project table that is later used in the Migration Connector in Connect-It. The purpose of this view is mainly to filter the records that are being pushed to Service Manager. In this example, only records that contain a filled in status field are supposed to be pushed to Service Manager. Set up the view as pictured below:

Creating the Connect-It Scenario


The document shows how to create a new scenario as well as discusses how to use the sample scenario that comes with this white paper and adjust it to individual systems. Store the scenario in the same directory as the other SDSM scenarios, eg. [..]\Connect-It 3.81 unicode en\scenario\sdsm

Setting up the connectors


The Connect-It scenario consists of 3 connectors: The Service Desk 4.5 Migration connector, the Service Manager Web Services connector and the SC Legacy Connector. The mapping will occur between the Service Manager and Service Desk connectors. The Service Desk Migration Connector To create the connector, click on Service Desk 4.5 Migration Connector under Service Management Connectors > Service Desk Connectors and drag and drop it to the scenario diagram on the right. To modify the example connector, right mouse click on the connector and select Configure connector. Enter a unique name for the Connector or accept the example name and click on Next>

Enter the connection information for your Service Desk system, test the connection and click Next>

Enter the Chunk size and Migration Status Folder as pictured below and click Next>

Enter the name of the UI View created earlier and click Next>.

Accept the number of records per page and click Finish. The Service Manager Web Services Connector To create a new Service Manager Web Services connector, drag and drop it from Hewlett-Packard > Service Management Connectors > ServiceCenter / Service Manager connectors to the scenario diagram. To modify the connector in the example scenario, right mouse click and select Configure connector.

To set up the Service Manager connector, enter a unique name and click Next>

Fill in the Connection Information as shown above and click Test. On successful test click Finish. The Legacy Service Center Connector To create a new ServiceCenter / Service Manager connector, drag and drop it from Hewlett-Packard > Service Management Connectors > ServiceCenter / Service Manager connectors to the scenario diagram. To modify the connector in the example scenario, right mouse click and select Configure connector. This connector is not linked to the others via a mapping, but is necessary for the communication between Service Manager and Connect-It. Use the following settings to set this connector up:

Enter a unique name for the connection, usually SM7_SC_01. Enter the connection information as pictured below and click the Test button. On successful connection test, click Finish.

After the connector is defined, producing document types have to be assigned to the connector. To do this, right click on the connector and select Edit a document type.

Add the following document types to this connector by clicking on the Create (empty sheet) button in the upper right corner of the window.

Click OK to save and exit.

Define the Mapping

Two mappings have to be defined for this scenario: The mapping from Service Desk to Service Manager to move the data as well as a loopback mapping that sends messages back to Service Desk / Connect-It with information if the move was successful. To create a new mapping, drag and drop

10

from the light gray part of the source connector to the target connector. Double click the mapping engine to edit the mapping. The data mapping

The data mapping receives data from the Project table (ProjectSrc) as determined by the View defined in Service Desk and creates Change records as defined in the CreateSDMigChange extaccess Object. The following picture shows the mapping from Service Desk to Service Manager. A lot of required fields use expressions to ensure that a valid value is moved. These expressions are listed below the picture in Connect-Its Basic language. To enter these expressions click on the mapped fields in the mapping section in the center of the window. The mapping window for this connection will appear on the bottom of the center section and you can enter your expressions. Important: You have to click the checkbox to the right of the window section to save the entered script. Otherwise your updates will be discarded. Note: If the Project Module contains custom fields, you must map the Service Desk project ObjectId field to the ForeignID in Service Manager Change Management to prepare for mapping the custom fields.

11

Assigned To: If [Assignment.AssigneePerson.Account.LoginName] ="" Then Retval = "UNKNOWN Else retval = [Assignment.AssigneePerson.Account.LoginName] End If AssigneeDept If [Assignment.AssWorkgroup.Searchcode] ="" Then Retval = "UNKNOWN Else retval = [Assignment.AssWorkgroup.Searchcode] End If Category Retval=SD Project ChangeNumber (This is the unique key in Service Manager and has to be filled in) Retval=CP + str([ID]) Status '[Status.Text] retval= "initial" Coordinator If [EnteredByPerson.Account.LoginName] ="" Then Retval = "icmalorl" Else retval = [EnteredByPerson.Account.LoginName] End If RequestedBy If [Requestor.Searchcode] ="" Then Retval = "UNKNOWN" Else retval = [Requestor.Searchcode] End If Subcategory '[Category.Text] retval = "Standard" PlannedStartDate If isnull([PlanStart]) or [PlanStart]="" Then if isnull([PlanFinish]) or [PlanFinish]=[RegistrationDate] then Retval = [RegistrationDate] Else retval=DateAdd([PlanFinish],-3600) end if else retval = [PlanStart] End If PlannedEndDate If isnull([PlanFinish]) or [PlanFinish]="" Then Retval = DateAdd([RegistrationDate],3600) Else retval = [PlanFinish] End If CurrentPhase retval="SDProject" Open

12

retval=1 MiscArray1 (will contain array of changes related to the project) retval="C" + str([Change.Change.ID]) The loopback Mapping The loopback mapping is used to return a status and messages to Connect-It to ensure easier isolation of issues.

The mapping is between the Process Report Source (=Service Manager) and the Response (=ConnectIt).

The expressions used in the mapping are listed below: Status If [Success] = 0 Then RetVal = "REJECTED" Else RetVal = "DUPLICATE" End If ObjectID RetVal=[$ParentDoc$.$ParentDoc$.ObjectID] Message If [Success] = 0 Then RetVal = "Rejected" End If

Defining a JavaScript to relate the Project to Changes


Go to Tailoring > ScriptLibrary Enter name: createProjectRelation Click Add Enter the following JavaScript: function createProjectRelation(ProjectRecord) { // print("Entering Function"); var screl=new SCFile("screlation")
1. 2. 3. 4.

var jsChangeIDs=ProjectRecord.misc_array1.toArray(); // print(jsChangeIDs) var noOfChanges=jsChangeIDs.length; // print(noOfChanges);

13

for (var i=0;i<noOfChanges;i++) { screl.source=ProjectRecord.number; screl.source_filename="cm3r"; screl.depend=jsChangeIDs[i]; screl.depend_filename="cm3r"; // print(screl); screl.doInsert(); } return null; }
5. Go to Tailoring > Format Control 6. Select the cm3r format control record 7. Go to the JavaScript section

In the Add field enter: category in $file="SDProject" In the JavaScript enter: system.library.createProjectRelation.createProjectRelation(system.vars .$file); 8. Click OK to save and exit

Executing the Scenario


Start the involved systems
Start the Service Desk Application Server Start the HP Service Manager 7.00 service Start the Legacy ServiceCenter listener from the Service Manager\Server\LegacyIntegration\RUN directory: scenter listener:12670 RPCReadOnly Right click on the Service Desk 4.5 Migration connector and select Produce Now. This will move all mapped fields from Service Desk Projects to Service Manager Change Management.

Troubleshooting

14

For more information


Please visit the HP Management Software support Web site at: www.hp.com/go/hpsoftwaresupport This Web site provides contact information and details about the products, services, and support that HP Management Software offers. HP Management Software online software support provides customer self-solve capabilities. It provides a fast and efficient way to access interactive technical support tools needed to manage your business. As a valued customer, you can benefit by being able to: Search for knowledge documents of interest Submit and track progress on support cases Submit enhancement requests online Download software patches Manage a support contract Look up HP support contacts Review information about available services Enter discussions with other software customers Research and register for software training Note: Most of the support areas require that you register as an HP Passport user and sign in. Many also require an active support contract. To find more information about support access levels, go to the following URL:
http://www.hp.com/managementsoftware/access_level

To register for an HP Passport ID, go to the following URL:


http://www.managementsoftware.hp.com/passport-registration.html

2007 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. HP, AssetCenter, Connect-It, Service Desk and Service Manager are registered trademarks of Hewlett-Packard Development Company, L.P. Microsoft and Windows are U.S. registered trademarks of Microsoft Corporation. 12/2007

Você também pode gostar