Tailgating The Process in The Format of HPSM
Tailgating The Process in The Format of HPSM
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.
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.
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.
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.
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
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
Troubleshooting
14
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