Import asset classification hierarchies and classification attributes with MIF

There is a built in object structure called MXCLASSIFICATION that we will use to import classification hierarchies and also the classification attributes using the Maximo Integration Framework (MIF). I will be using my default method of importing data which is by way of interface tables. If you aren’t familiar with interface tables, you can read this post to catch up before you continue with this tutorial.  Also with this tutorial you can download a sample excel document with classification hierarchies and attribute that I used to import into Maximo.

First, open the MXCLASSIFICATION object structure and set the checkbox for “Support Flat Structure?” cause we will be using interface tables.  You can use any interface table name you want, but I have set mine to IFACECLASSIFICATION in the MXCLASSInteface Enterprise Service.  In your MXCLASSIFICATION object, since we are use the flat structure we will have to modify some column aliases.  Go to Select Action -> Add/Modify Alias.  Click on the CLASSSPEC object and prepend the duplicate fields with “CLASSSPEC_”.  Don’t forget the underscore.  You can use whatever you want, but if you want to use the sample excel that I have provided then set it to that so it’s the same.  Next, click on CLASSSPECUSEWITH and prepend any duplicates with “CSUW_”.  Next, click on CLASSUSEWITH and prepend those fields with “CUW_”.  Save your changes.

Now we need to include more fields for the import.  Click Select Action -> Exclude/Include fields.  For the CLASSIFICATION object, we need to include the HASCHILDREN and PARENT fields, so we can uncheck the boxes for those fields.  Now click on the ‘Non-Persistent Fields’ tab and uncheck the OBJECTNAME and HIERARCHYPATH fields.

Next, don’t forget to add the MXCLASSInterface enterprise service to your external system and enable it.  Mine is called EXTIMPORT.  Once you have generated the interface table, you can import the sample data from this excel document:

[wp_eStore_free_download:product_id:7:end]

As you can see, this sample document is pretty crazy, but it works.  I will try to explain some of what I did.  The first column is the CLASSSTRUCTUREID.  This is a unique number that is used for each classification.  You can set this value to whatever you want as long as it’s unique because we will use this number as reference point for the attributes.  This value will change once it’s imported into Maximo, but more on this later.  Next is the CLASSIFICATIONID which is the ID you specify.  Moving forward to HASCHILDREN.  Make sure that if you plan on creating a child classification, you set this value to 1.  Otherwise set it to zero.  HIERARCHYPATH is another important column to specify the classification hierarchies.  Notice that these use the CLASSIFICATIONID’s with a backslash and a space to the left and right.  This is also important as well.  Next is the OBJECTNAME.  You may not have this field in your interface table, so you may need to go into your object structure and include this field.  I use this field to specify what object this row is really associated with.  As for the attributes, if you are using a DOMAINID, make sure all that exists already in Maximo otherwise you will get a lot of error messages.  The last thing I want to mention is that you notice how I ordered the data.  I made sure I created the parent classifications first, so when it imports, it won’t have any missing links when creating the hierarchies.

Now you can import this data into your interface table and go ahead and run the import process.  Now, hopefully you have everything setup properly and you didn’t run into any issues.  I had mentioned that the CLASSIFICATIONID will change once you import it into Maximo, so once you have completed the import, I want you to go and run this SQL statement:

SELECT * FROM CLASSSTRUCTURE

You will notice that the CLASSSTRUCTUREID value is now different than what you specified in the excel.  This is because Maximo automatically generated these autokeys and used them instead.  So why did we have to specifiy them in the excel, you ask?  Well, we needed to specify them so that Maximo can then use that as a reference ID for creating the parent/child relationships during the import process.

Series Navigation< Import PM’s and PM sequences with Maximo Integration Framework (MIF)Exporting data to XML with MIF event listener for any changes on an object automatically >

Did You Know...

As Maximo Experts, we have developed several add-on products for Maximo that mobilize the work force, simplifies assignments, provides ad-hoc reporting capabilities and facilitates the seamless integration of Service Requests into Maximo.

Check out our products by clicking on the following links: EZMaxMobileEZPLanner and EZInsight.

Find Out More

3 thoughts on “Import asset classification hierarchies and classification attributes with MIF

Leave a Reply