IBM Support

Configuring Feature Classes to Save Maximo Records in Map Service's ArcGIS Table

Technical Blog Post


Abstract

Configuring Feature Classes to Save Maximo Records in Map Service's ArcGIS Table

Body

Configuring Map Services in Maximo is quite an easy task when using Spatial 7.6, allowing you to visualize, create, edit, and link map features.  However, there are other types of configuration that are a bit unusual and not that obvious.  In this document you can see how to save Maximo records (assets, for this example) automatically into an ArcGIS table that's published in a Map Service.

We will use the example of recloser banks (a map feature) and recloser units (a table).  In this example assume these entities need to be configured as locations and assets.  Your recloser banks are able to contain multiple recloser units, making a one-to-many relationship.  In this situation the Map Service recloser banks are regular point features and recloser units as lines in a table on the GIS side that will receive the assets created by Maximo.  When you create an asset which is associated with a location that is a recloser bank, Maximo writes the asset record to the GIS table when the Save button is clicked.

For more information on following the steps in this document, you can check these screen shots of the Map Service being used to make the configuration:

imageimageimageimageimage


To make this scenario work, you must start your configuration with the Map Manager application:

1. Create a new Map Manager record (or pick an existing one) and add a description to it.  You make sure to change the "Map provider name" to Maximo Spatial.

image

2. Add a site to your map record.

image

3. In the Map Services section, click "New Row" and add the Map Service information (URL, Name and Order) along with a supported Basemap (in this example, we are using Esri's

Basemap: http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer).

image

4. Save your Map record.

image

5. Inside the Recloser line you added in the Map Services section, scroll down to the Service Layers section and click Select Layers.

image

6. For this step, configure the Recloser Units table, you can select any layer you want and click OK.

image

7. Expand the line you just added, change the ID and Name fields to the information that corresponds to your Recloser Unit.

image

8. Let's create a GIS object name for our Recloser Unit service layer and choose its parent MBO. For this example it'll be RECLOSERUNIT and ASSET, respectively.

image

9. Leave the system of record as Maximo and click "Execute GIS Configuration".

image

10. Leave all fields checked and click OK.

image

11. Click "Create/Update GIS relationship Configuration" and configure the relationship as ASSETNUM = MXASSETNUM.

image

12. Configure your Recloser Banks layer and configure the location.

image

13. Click Save.

image

Now you need to configure a JSON Mapping record for your recloser unit, but before that, a minor change must be made in your ARCGISASSET through the Object Structures application.

Go to the Object Structures application and follow these steps:

1. Filter the list by using the word "ARCGISASSET" and access the returned record.

image

2. In the Source Objects for ARCGISASSET section, click "New Row".

image

3. Populate the fields as shown in the image.

image

4. Click Save.

image

By adding the LOCATIONS object as a source object, you are able get the facilityid attribute from the location record  in the JSON-Mapping application which is related to the recloser unit asset.  Now you can configure your JSON-Mapping record, which will determine which attributes will be recorded in your GIS table.

Go to the JSON-Mapping application and follow the steps:

1. Create a new record.

image

2. Change the Direction field to Outbound Processing and populate the Object Structure field with the value "ARCGISASSET".

image

3. Paste a query URL in the URL field which allows Maximo to extract the object structure from the response and tab out.  In this case, since you don't have many lines in your GIS table, use a query which returns ALL lines.  However, a query returning only one line is enough.

image

4. Click Save.

image

5. Move over to the Properties tab.

image

6. In the JSON Object Mapping section, click "Map More Objects".

image

7. Click "//features"

image

8. Expand the line you created and populate the Object Path field with the "ASSET" value.

image

9. Click "Map More Objects" and then click "//features/attributes".

image

10. Expand the line you created and populate the Object Path field with the "ASSET" value.

image

11. Repeat steps 9, 10 and 11, but this time populate the Object Path field with the "ASSET/LOCATIONS" value.

image

12. Select the line in the JSON Object Mapping section.

image

13. Scroll down to the JSON Properties Mapping for Process and map the two values from the image.  You can map as many attributes as you want, but in this example you are only using two.

image

14. Select the line in the JSON Object Mapping section.

image

15. Scroll down to the JSON Properties Mapping for Process and map the value from the image.

image

16. Click Save.

image


Now that you have mapped the attributes which have their values written in the GIS table, you need to place the JSON mapper in the Map Manager record.

Go to the Map Manager application and follow the steps:

1. Open the Map Manager record you configured.

image

2. Open the recloser map service in the Map Services section.

image

3. Open the recloser unit service layer in the Service Layers section.

image

4. Scroll down to populate the Response JSON Mapper Name and Outbound JSON Mapper Name fields with the name of the JSON mapper you created.

image

5. Click Save.

image


Now you need a way to identify whether the location being associated with the asset is a recloser bank.  You are able to automatically fill the FEATURECLASS and PLUSSISGIS attributes with the values "RECLOSERUNIT" and "1".  This is the flowchart for the process:

image
To complete this part of the configuration, you need to use automation scripts.  To use the basic steps to complete the scenario illustrated in the flowchart, you can look at the  Maximo Automation Scripting community on the links below:
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/IBM%20Maximo%20Asset%20Management/page/Customizing%20with%20automation%20scripts
https://www.ibm.com/developerworks/community/groups/service/html/communitystart?communityUuid=4ed1bb0d-a7d4-4484-b114-660fbd269690


Go to Automation Scripts application and follow the steps:

1. Under More Actions, click Create Script.

image

2. Populate the fields according to the image.

image

3. In the Source Code text area, place the following code:

    from psdi.mbo import MboConstants;

    if mbo.getMboSet("ASSET_LOCATIONS").getMbo(0).getString("plussfeatureclass") == 'RECLOSERBANK':
        mbo.setValue("plussfeatureclass","RECLOSERUNIT",MboConstants.NOACTION | MboConstants.NOVALIDATION | MboConstants.NOACCESSCHECK);
        mbo.setValue("plussisgis",True,MboConstants.NOACTION | MboConstants.NOVALIDATION | MboConstants.NOACCESSCHECK);

4. Click Create.

image

5. Go back to the Application List.

image

6. Under More Actions, click Create Script with Attribute Launch Point.

image

7. Populate the Step 1 fields according to the image.

image

8. Populate the Variables section in step 2 according to the image.

image

9. Populate the Step 3 fields according to the image.

image

10. Click Create.

You can now save your recloser unit records in a GIS table.

Observation:

Despite showing a different way to set up your Spatial environment, depending on how Spatial is used, the configuration in this document can bring complications to other Spatial components.  For example, records using this config are not meant to be used with other Spatial functionalities involving geometry data such as auto-locate, auto-create, edit tool, etc.  Please note this is a workaround to allow mbos to interact with GIS tables using Spatial 7.6.0.3.

[{"Type":"MASTER","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSG2D3","label":"Maximo Spatial Asset Management"},"ARM Category":[{"code":"a8m50000000CbPaAAK","label":"Industry Solutions->Maximo for Spatial Asset Management"}],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.6.0"}]

UID

ibm11113075