WebSphere brand IBM WebSphere Premises Server, Version 6.1.x

Importing resource data to Location Awareness Services for WebSphere Premises Server

This topic describes how to import resource data into Location Awareness Services for WebSphere® Premises Server.

Location Awareness Services for WebSphere Premises Server provides an application that acts as an intermediary component between an enterprise's legacy systems and Location Awareness Services for WebSphere Premises Server to allow information about tagged items (people or assets) to be imported into Location Awareness Services for WebSphere Premises Server and, subsequently, to be updated or deleted. The application reads records from comma-separated values (CSV) files that are provided by the existing enterprise application and forms a Java™ Message Service (JMS) request. The application sends the JMS request to Location Awareness Services for WebSphere Premises Server through the messaging engine and then logs the responses in a log file.

Configuring properties

Procedure
  1. Configure the properties in the following properties files:
    Data_Export.properties
    Contains properties that identify JMS resources and the location of the CSV and class properties files. A sample is provided in LAS_HOME\AtlasIntegrator\Data_Export.properties. A sample CSV file and its associated properties files are also provided in the same location.
    Verify that the following properties are set correctly:
    • batchsize: Enter the size of the JMS batch. For example, a value of 50 means that AtlasIntegrator sends packets of 50 items for import.
      Note: Set this number to a low value, such as 20, if you experience timeouts (for example, if you get a message saying that no response was received from WebSphere Application Server).
    • locale_language: Specify the language corresponding to the data you wish to import. The language value should be a valid ISO language code, such as en for English or de for German.
    • locale_country: Specify the country corresponding to the data you wish to import. The country value is a valid ISO country code. These codes are the uppercase, two-letter codes as defined by ISO-3166. For example, US for the United States or DE for Germany.
    • locale_variant: Specify the variant. The variant value is vendor or browser-specific code. For example, use WIN for Windows®, MAC for Macintosh, and POSIX for POSIX. If you are unsure about the system you are using, leave this property empty.
    • CSV: Enter the location of the CSV file.
      Note: The following conventions must be followed in the CSV file:
      • Each row must contain exactly one data row. You can use the new line character (\n) to force a new data row. If you want to include the new line character in a data cell without forcing a new row, enclose the contents of the data cell in double quotation marks ("item1/nitem2").
      • The data cells of a data row must be delimited by a comma. A comma forces a new data cell. If you want to include a comma without forcing a new data cell, enclose the contents of the data cell in double quotation marks ("item1,item2").
      • If you need to use double quotation marks in a data cell without indicating the beginning or end of the data cell contents, enclose the contents of the data cell in double quotation marks ("Error: "error_message"").
    • log: Enter the location of the log file.
    • hostname: Enter the fully qualified host name or IP address of the provider of the Service Integration bus.
    • secure: Specify whether security has been enabled for WebSphere Application Server. The default value is no.
      Note: If security has been enabled for WebSphere Application Server, the Data_Export.bat file may need to be edited. The default configuration points to the sample key store and trust store files provided with WebSphere Application Server. If you use different key and trust stores or different passwords for these files, edit the Data_Export.bat file as needed. The trace.log file contains detailed logs about the communication process, including possible security related issues.
    • port: Enter the SIB_ENDPOINT_ADDRESS of your messaging engine. The default value is 7276. If security has been enabled for WebSphere Application Server, enter the SIB_ENDPOINT_SECURE_ADDRESS of your messaging engine, which is usually 7286.
    • request_q: Enter the name of the request queue, such as AtlasImportRequestQ.
    • response_q: Enter the name of the response queue, such as AtlasImportResponseQ.
    • propertiesFileLocation: Enter the directory that contains the ClassMapping.properties file and the class_name.properties files. Leave this property empty to specify the current directory from which the import application (Data_Export.bat) is running.
    • class: Enter the column in the CSV data file that contains class names. This value must be specified in the attribN format, where N is the integer representing the column number. For example, if the class names are in column 7, then class=attrib7.
    • action: Enter the action to be performed on the record being sent to ATLAS. Valid values include:
      • createUpdate: Create a new record if the tagged item does not already exist in the Location Awareness Services for WebSphere Premises Server database. Otherwise, update the existing record.
      • create: Create a new record if the tagged item does not exist in the Location Awareness Services for WebSphere Premises Server database. Otherwise, return an error.
      • update: Update an existing record in the Location Awareness Services for WebSphere Premises Server database. If the record does not exist, return an error.
      • delete: Delete an existing record from the Location Awareness Services for WebSphere Premises Server database. If the record does not exist, return an error.

      If you do not specify an action, the default action is createUpdate.

    • group: Enter the column in the CSV data file that contains group names. This value must be specified in the attribN format, where N is the integer representing the column number. For example, if the group names are in column 8, then group=attrib8.
      Note: If you want to retain the relationship of an item to multiple groups during the import and HierarchicalGroups is set to off, you can specify multiple groups names in this column, separating the group names with a pipe symbol (|).
    • defaultClass: Enter the name of the class that new records from the CSV file are added to if the corresponding class name specified in the CSV file is not found in the ClassMapping.properties file. For example, if a record in the CSV file contains the class name RESOURCE SECURITY and that class name is not found in the ClassMapping.properties file, the record is added to the class specified in this property. For example, defaultClass=Contractor.
    • defaultGroup: Enter the name of the group that new records from the CSV file are added to if group information is not specified. For example, if a record in the CSV file does not contain group information, the record is added to the group specified in this property. For example, defaultGroup=Contractor.
    • tagId: Enter the column in the CSV data file that contains tag ID values. This value must be specified in the attribN format, where N is the integer representing the column number. For example, if the tag IDs are in column 13, then tagID=attrib13.
    • mq_response_timeout(secs): The Location Awareness Services for WebSphere Premises Server imports client sends a JMS request containing a batch of ten records from the CSV data file to Location Awareness Services for WebSphere Premises Server. Enter the number of seconds that the Location Awareness Services for WebSphere Premises Server imports client waits for the JMS response from ATLAS. The default value for this property is 60 seconds.
    ClassMapping.properties
    Provides a mapping from the names in the class column of the CSV data file to class names that are defined within the Location Awareness Services for WebSphere Premises Server database. See Planning for classes and items for tips on defining the Location Awareness Services for WebSphere Premises Server class hierarchy. For example, a ClassMapping.properties file might read as follows:
    ACME INC.=Employee 	
    Sunspot Heating and Cooling=Contractor

    This file indicates that the records with ACME INC. in the class column are to be assigned to the Location Awareness Services for WebSphere Premises Server class Employee and those records with Sunspot Heating and Cooling are to be assigned to the Location Awareness Services for WebSphere Premises Server class Contractor.

    class_name.properties
    Provides the attribute details about any class. A sample is provided in LAS_HOME\AtlasIntegrator\Person.properties. The file name of the class properties file should be the class name. There should be one file for each Location Awareness Services for WebSphere Premises Server class.
    Verify that the following properties are set correctly:
    • label: Enter the attributes and text strings, separated by a plus sign (+), that automatically fill the tag label field and surround blank spaces with quotation marks. For example, attrib5+" "+attrib6+" "+attrib4.
    • icon: Enter the attributes and text strings, separated by a plus sign (+), that represent the name of the graphic file that will represent the class items in the Spatial Management Client. For example, if the value of attrib3 is Susan, which represents a specific item in the Person class, the following entry will equate to Susan.png: attrib3+".png". Surround extensions with quotation marks.
    • attribN: Enter the name of an attribute and its corresponding Location Awareness Services for WebSphere Premises Server property name, where N corresponds to the column in the CSV file that contains the information. For example, attrib2=First Name indicates that column 2 in the CSV file contains the first name of the item and is mapped to the Location Awareness Services for WebSphere Premises Server property named First Name.
    • KeyProperties: Enter the list of attributes, separated by commas, that represents key properties. For example, attrib5,attrib3.
  2. Run the data import application from the LAS_HOME directory, specifying your messaging engine user ID and password:
    Data_Export.bat user_ID password [Data_Export.properties ClassMapping.properties]
    Tip:
    • Because the Data_Export.properties and ClassMapping.properties files are entered as parameters to the import application, you can replace these file names of these properties with names that are more meaningful to you. This allows you to set up a series of properties files with different names that reflect different tasks or mappings. For example, you could distinguish between the initial import of enterprise data and later maintenance imports.
    • This command assumes that the import application is running from the AtlasIntegrator directory. If the Data_Export.properties file is not in the same location as the import application, provide the complete directory path. For example:
      Data_Export.bat user_ID password D:\Properties\Data_Export.properties 
      ClassMapping.properties
    • If the remaining properties files, such as ClassMapping.properties and class_name.properties, are not in the same location as the import application, the directory location can be specified in the propertiesFileLocation in the Data_Export.properties file. For example, if the ClassMapping.properties file and the class_name.properties files are located in D:\Properties, set propertiesFileLocation=D:\\Properties\\. If the ClassMapping.properties file and the class_name.properties file are located in the same directory as the Data_Export application, leave the value for proertiesFileLocation empty: propertiesFileLocation=.
  3. Look at the log file specified in Data_Export.properties file to verify that the import application ran successfully.
    Note: Look at the trace.log file if you are experiencing connection problems.

Library | Support | Terms of use

(c) Copyright IBM Corporation 2004, 2008. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.