Technical Blog Post
Configuring Feature Classes to Save Maximo Records in Map Service's ArcGIS Table
Configuring Map Services in Maximo is quite an easy task when using Spatial 7.6, allowing us to viasulize, create, edit and link map features. However, there are other types of
configuration that are a bit unusual and not that obvious. In this post, we'll see how to save Maximo records (assets, for this example) automatically into an ArcGIS table that's
published in a Map Service.
We'll use the example of recloser banks (a map feature) and recloser units (a table). Let's say you want to configure them as locations and assets, respectively. Your recloser
banks are able to contain multiple recloser units, making this a one-to-many relationship. For this situation, we have in our Map Service recloser banks as regular point
features and recloser units as lines in a table on the GIS side that will receive the assets created by Maximo. So whenever we create an asset which is associated with a location that is a recloser bank, Maximo will write the asset record in the GIS table when the Save button is clicked.
In case you have any doubt regarding the Map Service while following the steps in this document, check these screenshots of the Map Service being used to make the
To make this scenario work, we must start our configuration with the Map Manager application:
1. Create a new Map Manager record (or pick an existing one) and add a description to it.(don't forget to change the "Map provider name" to Maximo Spatial)
2. Add a site to your map record.
3. In the Map Services section, click "New Row" and add Map Service information (URL, Name and Order) along with a supported Basemap (in this example, we are using Esri's
4. Save your Map record.
5. Inside your Recloser line you just added in the Map Services section, scroll down to the Service Layers section and click Select Layers.
6. For this step we are configuring the Recloser Units table, so you can select any layer you want here (we'll be changing it in the next step) and click OK.
7. Expand the line you just added and change the ID and Name fields to the information that corresponds to your Recloser Unit.
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.
9. Leave the system of record as Maximo and click "Execute GIS Configuration".
10. Leave all the fields checked and click OK.
11. Click "Create/Update GIS relationship Configuration" and configure the relationship as ASSETNUM = MXASSETNUM.
12. Configure your Recloser Banks layer normally (don't forget to configure it as a location!).
13. Click Save.
Now we will need to configure a JSON Mapping record for our recloser unit, but before that, a minor change must be done in our ARCGISASSET through the Object Structures
Go to the Object Structures application and follow the steps:
1. Filter the list using the word "ARCGISASSET" and access the returned record.
2. In the Source Objects for ARCGISASSET section, click "New Row".
3. Populate the fields as shown in the image below.
4. Click Save.
By adding the LOCATIONS object as a source object, we'll be able get the facilityid attribute from the location record (in the JSON Mapping application) which is related to the
recloser unit asset. Now we can configure our JSON Mapping record, which will determine which attributes will be recorded in our GIS table.
Go to the JSON Mapping application and follow the steps:
1. Create a new record.
2. Change the Direction field to Outbound Processing and populate the Object Structure field with the value "ARCGISASSET".
3. Paste a query URL (in the URL field) which allows Maximo to extract the object structure from the response and tab out from it. In my case, since I don't have many lines in
my GIS table, I'm using a query which returns ALL lines from it (you can notice that by looking at the end of URL, which is "query?where=1%3D1&outFields=*&f=pjson"). However, a
query which returns only one line is enough.
4. Click Save.
5. Move over to the Properties tab.
6. In the JSON Object Mapping section, click "Map More Objects".
7. Click "//features"
8. Expand the line you just created and populate the Object Path field with the "ASSET" value.
9. Again, click "Map More Objects" and then click "//features/attributes".
10. Expand the line you just created and populate the Object Path field with the "ASSET" value.
11. Repeat steps 9, 10 and 11, but this time populate the Object Path field with the "ASSET/LOCATIONS" value.
12. Select the following line in the JSON Object Mapping section.
13. Scroll down to the JSON Properties Mapping for Process and map the the two values from the image below. (you can map as many attributes as you want, but in this example we
are only using these two)
14. Select the following line in the JSON Object Mapping section.
15. Scroll down to the JSON Properties Mapping for Process and map the value from the image below.
16. Click Save.
Now that we have mapped the attributes which will have their values written in the GIS table, we need to place this JSON mapper in the Map Manager record.
Go to the Map Manager application and follow the steps:
1. Open the Map Manager record which we configured previously.
2. Open the recloser map service in the Map Services section.
3. Open the recloser unit service layer in the Service Layers section.
4. Scroll down and populate the Response JSON Mapper Name and Outbound JSON Mapper Name fields with th name of the JSON mapper we created previously.
5. Click Save.
Now we need a way to identify wether the location being associated with the asset is a recloser bank. That way we'll be able to automatically fill the FEATURECLASS and
PLUSSISGIS attributes with the values "RECLOSERUNIT" and "1". Here's the flowchart of the process:
flowchart above, if you want to go deeper into automation to complete more complex tasks, we recommend you to check both our developerWorks Wiki and Maximo Automation Scripting
community on the links below:
Go to Automation Scripts application and follow the steps:
1. Under More Actions, click Create Script.
2. Populate the fields according with the image below.
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.
5. Go back to the Application List.
6. Under More Actions, click Create Script with Attribute Launch Point.
7. Populate the Step 1 fields according with the image below.
8. Populate the Variables section in step 2 according to the image below.
9. Populate the Step 3 fields according with the image below.
10. Click Create.
Done! Now, after these long steps, you'll be able to save your recloser unit records in a GIS table.