Tailoring the ServiceCenter Service Catalog Best Practices for Adding, Modifying and Removing Service Catalog Connectors HP Management Software IT Service Management Introduction... 2 Prerequisites... 2 Creating a new Service Catalog Connector... 2 Modifying a connector... 5 Adding XML fields for moving data to the fulfillment record... 5 Moving data from a user selection to a field in the fulfillment record... 7 Modifying a form to see user selection fields... 9 Approvals... 10 Defining Approval Roles... 11 Delivery Objectives... 12 Removing a connector... 14 Appendix... 15 Variables used in Service Catalog... 15 For more information... 16
Introduction The ServiceCenter Service Catalog module was introduced with ServiceCenter 6.2. The Service Catalog interface, which is easy to use and set-up, can be used by end users via the Web and administered by Catalog administrators who have no ServiceCenter programming experience. The more advanced tailoring is done by the ServiceCenter administrator, and includes writing JavaScript and creating wizards that the Service Catalog administrator uses to create catalog categories and items. Prerequisites This document discusses the advanced tailoring that the ServiceCenter administrator performs to enable the Service Catalog administrator to create the Catalog of Services. Knowledge in JavaScript and tailoring with wizards is beneficial. Creating a new Service Catalog Connector The following section describes how to add a new connector for the Change Release Management category. Creating a new Service Catalog connector requires the following steps: Existing Service Catalog Connector Copy and Modify New Service Catalog Connector Enter Name in Connector Create Wizard that defines setup of Items using this connector Update Wizard to call the connector wizard 1. Log in as user falcon, and click Service Catalog -> Catalog Connectors. 2. Click Search. 3. As a best practice, it is easiest to create a new connector by basing it on an existing connector and copying it. To do so, click to select the record named Open a Change and change its name to Open a Release Management Change. 4. Click Add to add the record. 5. In the table at the bottom of the screen, remove the line with category since this is not necessary when the category is known. To do that, right-click any row of the table, click Expand Array, and click the category line. Then click the Delete Line button, close the window, and click confirm to remove the line. Check that the complete line has been removed. If not, repeat for each column of that line.
6. Click the Expressions tab, insert a line in the beginning, and enter: category in $L.file="Release Management" 7. Remove all lines with if $L.category=.. where the category is not Release Management. In the lines that are for Release Management, remove only the if ( ) then part. 8. Save the changes to this record.
Next, you set up the wizards for creating items using this connector. 9. Create a wizard called svccat RM Change - Get RM Info 1 as a copy of the wizard svccat Generic Change - Get Generic Info 1. 10. Change Description to: Edit Service Catalog RM Change Information - Setup RM. 11. On the File Selection -> Initial Expressions tab enter: $ approvalvalue="" $priorityvalue="" $type="" $category="release Management" $initial.impact="" $severity="" 12. Click the Next Wizard tab and enter svccat Generic Change - Get Release Mgmt Info 1 and a condition of true. 13. Click Save. 14. Click Service Catalog -> Catalog Connectors and click to select the record Open a Release Management Change. 15. Change the wizard name from svccat Generic Change - Get Generic Info 1 to svccat RM Change - Get RM Info 1. 16. Click Save to save the connector record. Once the connector has been created, it needs to be activated. This means that the connector that has been created needs to be incorporated with the wizard responsible for guiding the Catalog administrator through creating a new item. The previously generated wizard is responsible for ensuring that all required information is passed through to the new item. To get all this information, the wizard that guides the Catalog administrator through creating the new item needs to call the newly created wizard. 17. Go to Database Manager and enter the table name wizard. 18. Search for the record named svccat New Item 2. 19. On the Next Wizard tab, you will find: interface.type in $L.file="Open a Service Desk Interaction" or interface.type in $L.file="Open a Change" or interface.type in $L.file="Open MAC Ticket" or interface.type in $L.file="Open New Request" or interface.type in $L.file="Open a Record Using Web Services 20. Add or interface.type in $L.file= Open a Release Management Change to the end of the condition. 21. Click Save to save the wizard and click OK to exit. 22. Search for the record named svccat New Bundle Item 2. 23. Click the Next Wizard tab; you will find: interface.type in $L.file="Open a Service Desk Interaction" or interface.type in $L.file="Open a Change" or interface.type in $L.file="Open MAC Ticket" or interface.type in $L.file="Open New Request" or interface.type in $L.file="Open a Record Using Web Services 24. Add or interface.type in $L.file= Open a Release Management Change to the end of the condition. 25. Click Save to save the wizard and click OK to exit. 26. Select the wizard record svccat New Item 3.
27. Click the Next Wizard tab and add the following lines before the last line: Wizard Name: svccat RM Change - Get RM Info 1 Condition: interface.type in $L.file="Open a Release Management Change" and false Note: Make sure to keep the line that contains the true condition at the end. 28. Save your changes. Next you verify that these changes worked by creating a new catalog item for the Release Management backend 29. Go to Service Catalog -> Manage Catalog. 30. Click Add new Catalog Item. 31. Choose the Connector named Open a Release Management Change. 32. Choose the Category Software. 33. Click Next. 34. Enter the required fields. 35. Click Finish. 36. Check the result in the new item, on the Connector tab, by clicking on add/edit connector. Modifying a connector Next you add several fields to the connector that will be copied to the fulfillment record in Change Management. Adding XML fields for moving data to the fulfillment record First add an array field that the Catalog Manager will fill in when creating the catalog item. 1. Click Service Catalog -> Catalog Connectors. 2. Select the Connector Open a Release Management Change. 3. In the table at the bottom of the connector enter description at the end of the list of XML fields 4. Initialize the information for the new field by entering the following in the Expressions tab: description in $L.file=jscall("svcCatInterface.getXMLValuesFromObject", interface.info in $L.item, descriptionline", description") 5. Click Save to save the record. 6. Go to Forms Designer and select the form svccat.wizard.get.releasemgt.info.1. 7. Add a text field with array length of 6 and an input of $wiz.assets. 8. Add a multi-line text field with an input of $description
9. Click OK twice to save your changes and exit from Forms Designer. 10. Go to the Database Manager table named wizard. 11. Select the record svccat RM Change - Get RM Info 1. 12. Add $wiz.assets={} and $description={} to the File Selection -> Initialization Expressions. 13. Click Save to save the record and click OK to exit. 14. Next select the wizard svccat Generic Change - Write Info. 15. Click the Actions > Expressions tab and change the following line from: interface.info in $L.file=jscall("svcCatInterface.writeChange", $wiz.assets, $type, $initial.impact, $severity, $reasonvalue, $coordinatorvalue, $category, $subcategory, $assign.dept, $rel.type) To (note the additional comma and field name appended in bold text) interface.info in $L.file=jscall("svcCatInterface.writeChange", $wiz.assets, $type, $initial.impact, $severity, $reasonvalue, $coordinatorvalue, $category, $subcategory, $assign.dept, $rel.type, $description) 16. Add cleanup($description) to the last line of expressions. 17. Click Save to save and OK to exit. 18. In Database Manager go to table name ScriptLibrary. Select the record named svccatinterface. Once there, search for the function writechange. 19. Add the following bold text in the JavaScript, unless it already exists: if (strcategory == "RFC - Advanced" strcategory == "RFC" strcategory=="release Management") { var assetselement = xml.addelement( "assets" ); if ( assets.length() > 0 ) assets = system.functions.denull( assets ); var i = 0; while (i < assets.length()) { (assetselement.addelement("logical.name")).setvalue(assets[i]); i++; } } if (strcategory=="release Management") { var descelement = xml.addelement( description" ); if ( description.length() > 0 ) description = system.functions.denull( description ); var i = 0; while (i < description.length()) { (descelement.addelement( descriptionline")).setvalue(description[i]); i++; }
} 20. In the same svccatinterface JavaScript record search for the function setchangeinfo and add coding for description: var aassets = getxmlvaluesfromobject(xmlstring, "logical.name", "assets"); var adescription = getxmlvaluesfromobject(xmlstring, descriptionline", description"); if (aassets!= null) { vars.$wiz_assets = aassets; } if (adescription!= null) { vars.$description = adescription; } 21. Click Save and OK to save and exit. Next move an existing field from the ServiceDesk record to the fulfillment record 22. Click Service Catalog -> Catalog Connectors. 23. Select the record named Open a Release Management Change. 24. Click the link used in the connector (screlate.incident.cm3r) and click Find. 25. In the link, place your cursor in the first line and click Options -> Select line. 26. At the end of the table that defines the source and target fields, add Source Field: owner.name Target Field: assigned.to 27. Click Save to save and OK (twice) to exit. Moving data from a user selection to a field in the fulfillment record Each Service Catalog category has a defined off-catalog request item. These off-catalog request items are used to enter any request that does not have a specific catalog item defined, and where all information about the request will be entered in free-form text. The information about the request is entered into user-defined fields that are stored in an XML field in the fulfillment record. If the administrator wants to move this information from the XML field into the specific fields in the fulfillment record (in this case, A Request Management Quote) such as the description, he or she can use the xmlfill.getvalue JavaScript call as in the following steps: 1. Go to Service Catalog -> Catalog Connectors. 2. Select the record with the name of Open New Request. 3. Click the Expressions tab and enter an expression in the following format at the end: <your.field> in $L.file=jscall("xmlFill.getValue", svc.options in $L.file, <user selection field> ) For example: description in $L.file=jscall("xmlFill.getValue", svc.options in $L.file, "description") With this change, the information entered in the description field on the off-catalog request will now be entered into the request quote s description. For this to work, the description XML field must be listed in the connectors Connector Detail tab.
The same way, to move data from a user defined field in the example used when creating a new connector, you can follow these steps: 1. Click Service Catalog -> Catalog Connectors. 2. Click to select the record named Open a Release Management Change 3. Click the Expressions tab and enter an expression in the following format at the end: <your.field> in $L.file=jscall("xmlFill.getValue", svc.options in $L.file, <user selection field> ) For example: backout.method in $L.file=jscall("xmlFill.getValue", svc.options in $L.file, "Backout") Then add the user selection named Backout : 4. Click Service Catalog -> Manage Catalog. 5. Click Add New Catalog Item. Item Name: Operating System Release Description: Operating System Release 6. Click Next > to continue. Connector: Open a Release Management Change In Category Software 7. Click Next > to continue. 8. Fill in the required fields as shown below: 9. Click Finish to create the item. 10. In the newly created item, click the User Selections tab. 11. Click Add User Selection. 12. Enter the following information: Name: Backout Label: Backout Select Multitext 13. Click Next > to continue.
14. Click Save to save and OK to exit. A request for this item looks like the following: To test all these modifications, you can order the Operating System Release Catalog item from the Software category. After approval you should see the backout.method assigned to, and the description fields already filled into, the Release Management record (cm3r). Modifying a form to see user selection fields For example, the ocmq.view.summary.g form has the dynamic user options field defined: A new forms designer object called dynamic form can display the XML field called svc.options that exists in the ocmq, cm3r, and incidents dbdicts. The svc.options field is defined in the dbdicts as a character field, but holds XML data of various lengths. Depending on how many user selection fields will be available when ordering an item or requesting a service, it is a best practice to display the data on the first tab of the form, as shown in the example above; or to give the description and user-defined fields their own tab. In our example, we show how to add a new tab and move the user options field onto that new tab. We continue to use the Release Management change process as the example:
1. Go to Forms Designer 2. Select the form cm3r.release. 3. Go into Design Mode. 4. Drag and drop a new notebook tab between the General tab and the Review Release tab. Name it User Options and give it a visible condition of [svc.options]<>. 5. Drag and Drop a dynamic form widget into the new notebook 6. Enter svc.options for the input of the new dynamic form. 7. Click OK to save and exit design mode. 8. Click OK to save and exit Forms Designer. In previous steps, the backout user option field was added. When adding another text field (test) to the user options of the item, the release management change then looks like the following: Approvals Catalog Approval Order and Flow Approval Workflow Customer Request Order From Catalog Add Cart Items Populate The Request Submit The Request Business Approvals Calculated Approval Record Created And Associated To The Interaction Related records added to interaction based on connector definition Interaction updated with status changes of related record Catalog Approval Define Approval Activity Add/Edit An Approval Activity Add Roles/ Operators Add Conditions Add Conditions Service Catalog Approver to perform first level approval OOB Wizard Module Approval Create A Name For The Approval Definition (Given Name) Add Roles/ Operators Add Conditions Define the approval in the phase record (ChM, RM) Module Level approver to perform second level approval OOB Wizard The diagram above shows the different levels of approvals on a timeline that is based on the customer request. The Approval definitions, though shown here, are done independently on the individual customer request during implementation of the Service Catalog system and its fulfillment engines (such as Change Management or Request Management). The catalog approval will be done in the ServiceDesk interaction record created by the Service Catalog request. After the interaction is approved, the related record in the fulfillment backend (such as ChM or RM) is created, again with its approvals already defined. After the fulfillment record is
approved, the interaction is updated with that information, as it is with every change to the approval status or phase in which the backend fulfillment record resides. Defining Approval Roles Approval Roles can be defined in Service Catalog -> Approval Roles. The screen contains the following information: The Approver role can be a named Approver based on the login id in the operator file, or it can be defined via RAD type expressions or JavaScript. The sample above defines the first level manager as the Approver via JavaScript defined in the requesting users contact record. The Approver s operator login id must be written to the variable $L.approval.role.user.
Delivery Objectives Service Level Agreement Record Response SLO provides the cart item response status values Delivery Objectives based on SLA Catalog Service Item Cart Item Delivery Objective provides the duration for the SLO SLO Response record for the Cart Item Delivery Objectives are associated to a certain catalog item. Customers who have access to the delivery objectives based on their SLAs can choose the delivery objective that best matches their requirements if a certain delivery time is needed. Delivery Objectives are defined in ServiceCatalog > Define Delivery Objectives. The definition contains the name of the objective, the time allowed for delivery, and the calendar on which the time is based. Access to the delivery objective is based on the user s SLA. In the SLA definitions, a Service Level Objective (SLO) for the ServiceCatalog area must be defined.
In this SLO, the initial and final state must be set based on the status defined in the Service Catalog Status mapping. To verify the correct name for this status, go through the approvals on the interaction record; proceed to the correct phases and status in the fulfillment record to get the correct wording in the related interaction record; and enter the information in the SLO record accordingly. The duration of the SLO is defined by the duration field in the interaction record, which is filled automatically by the data in the service delivery objective that was selected.
Removing a connector To remove a previously added connector, the wizards that are responsible for creating catalog items that will use the connector will have to be removed or modified; the called Java Script may have to be modified; and the connector record must be removed. To remove the wizards: 1. Go to Service Catalog > Catalog Connectors and select the record that should be removed. Note the name of the wizard, as shown below: 2. Click the Find button 3. Check the Next Wizard tab, on which other wizards were created for the connector. 4. Delete all wizards that are used only for this connector. 5. If a special link record used only for this connector was created, remove that link record. Do the same with the Process record. (Usually, however, these records are shared between multiple connectors and applications.) 6. Go to Database Manager, select the table wizard, and select the record svccat New Item 2. On the next wizard tab, you will find something like: interface.type in $L.file="Open a Service Desk Interaction" or interface.type in $L.file="Open a Change" or interface.type in $L.file="Open MAC Ticket" or interface.type in $L.file="Open New Request" or interface.type in $L.file="Open a Record Using Web Services. Remove the or interface.type in $L.file= <Name of the connector you want to remove> part of the condition.
7. While still in Database Manager, select the table wizard, select the record svccat New Item 3. On the next wizard tab, you will find something like: Wizard Name: <wizard name deleted above> Condition: interface.type in $L.file="<Name of the connector you want to remove>" and false 8. Remove the complete line listed above from the next wizard tab. 9. Optional step: Click the Expressions tab of the connector, check for calls to JavaScript (jscall function), and remove all lines in the JavaScript that are used only from this connector. 10. Delete the connector record itself. Appendix Variables used in Service Catalog Variables commonly used in connector expressions Variable Name Content Explanation $L.item svccatalog file Contains information on the catalog item. Specifically, interface.info in $L.item refers to the values that are set on creation of the catalog item based on requirements defined in the connector. (For example, fill in urgency and impact for cm3r requests.) $L.cartItem svccartitem file Contains information of the individual order in the users cart $L.file fulfillment record Contains information of the fulfillment record (change, service desk interaction etc.) $xml (variable used in wizard) interface.info in the svccatalog file see explanation to $L.item
For more information Please visit the HP Software support Web site at: http://www.hp.com/managementsoftware/support This Web site provides contact information and details about the products, services, and support that HP Software offers. HP 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 and ServiceCenter are registered trademarks of Hewlett-Packard Development Company, L.P. JavaScript is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries 03/2007