IBM Support

Update an existing Location's parent via MIF

Troubleshooting


Problem

If you create an object structure to update an existing locations parent to a new parent, you might notice that the parent has not been changed when importing locations via MIF (Maximo Integration Framework).

Cause

When importing the location and hierarchy records via MIF, all the data was correctly set in the LOCHIERARCHY record, but Maximo seemed to ignore the LOCHIERARCHY.NEWPARENT when it imported. That is, the parent is not changed to a new parent in the xml file.

Steps to reproduce the issue:
1. Create an object structure (MXLOCHIERARCHY) which has
parent child relationship
LOCATIONS LOCHIERARCHY LOCHIERLOCONLY
and copy processing classes from MXOPERLOC to this object structure.
2. Include the non-persistent attribute, LOCHIERARCHY.NEWPARENT.
3. Import a location-lochierarchy XML file to update an existing location with a new parent.
4. Retrieve location record and note that description has changed, but parent has not.

Resolving The Problem

1. In the importing XML, include the original LOCHIERARCHY.PARENT. Sample below:

PARENT = BR400 and NEWPARENT = OFFICE for location.
<LOCATIONS>

<LOCHIERARCHY>
<NEWPARENT>OFFICE</NEWPARENT>
<PARENT>BR400</PARENT>
<ORGID>EAGLENA</ORGID>
<SITEID>BEDFORD</SITEID>
<SYSTEMID>PRIMARY</SYSTEMID>
</LOCHIERARCHY>
</LOCATIONS>

2. In the Object Structure application, restrict the PARENT field:
a. Go to the Object Structure application and bring up the object structure (MXLOCHIERARCHY).
b. From the Select Actions menu, open the “Inbound Setting Restrictions” box. If your Maximo version is 7.1.1.5 or an earlier version, you need to do this from Database Configuration application.
c. On LOCHIERARCHY, override PARENT field. That is, tick both Restricted and Override check box for LOCHIERARCHY.PARENT.



Import the XML file again, the parent (BR400) is changed to the new parent (OFFICE).

Please note, if you want to update the location with a new parent, you need to enter both the original parent in PARENT tag and new parent in NEWPARENT tag in the LOCHIERARCHY section.

If you want to update the location parent but enter value in one of these two attributes only, or both tags have the same new parent, you will get an error message, and the importing will be failed.

Please note, this object structure can be used to update an existing location’s parent only. If you want import a new location with parent, you should not use this object structure.
You can use the out of box Maximo object structure, MXOPERLOC.

[{"Product":{"code":"SSLKYL","label":"Maximo Enterprise Adapter"},"Business Unit":{"code":"BU005","label":"IoT"},"Component":"Not Applicable","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.1.1;7.5","Edition":""}]

Document Information

Modified date:
17 June 2018

UID

swg21580211