Maximo Open Forum

 View Only

 Table.Column: CLASSSTRUCTURE.HIERARCHYPATH

  • Assets
  • Customizations
  • Integrations
  • Work Management
Appu nair's profile image
Appu nair posted 08-20-2021 11:31
In the ASSET application, we see a Classification Entry and when you look at output XML for the MXASSET OS you can see it in the schema and in the Exclude/Include fields one sees HIERARCHYPATH in the Non-OPersistent with a tick mark. Is that the CLASSTRUCTURE.HIERARCHYPATH or <HIERARCHYPATH>Value</HIERARCHYPATH> one sees when the publish channel runs?. If so why won't it work the same way for Work Order? When we look at the output XML spit out all we see is <HIERARCHYPATH /> almost indicating the OS does not have it populated? But if you look in the WOTRACK application one sees values populated?

I looked in classtructure table and it says it is this class that does it psdi.app.assetcatalog.FldClassStructureHierarchyPath does it imply something like assetcatalog is part of the ASSET OS(MXASSET) and hence it comes?
I removed the full lines but here is what I see in GUI and what I am after

<?xml version="1.0" encoding="UTF-8"?>
<PublishMXWO xmlns="http://www.ibm.com/maximo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creationDateTime="2021-08-20T15:23:56+00:00" transLanguage="EN" baseLanguage="EN" messageID="1722537.1629473037322253057" maximoVersion="7 6 20170418-0100 V7608-61" event="1">
<MXWOSet>
<WORKORDER action="Replace">
<ASSETNUM>13110</ASSETNUM>


<WOLO9/>
<WONUM>6004</WONUM>
<WOPRIORITY>2</WOPRIORITY>
<WORKLOCATION/>
<WORKORDERID>10</WORKORDERID>
<WORKPACKMTLSTATUS/>
<WORKTYPE>EM</WORKTYPE>
<WORTS1/>
<WORTS2/>
<WORTS3/>
<WORTS4 xsi:nil="true"/>
<WORTS5 xsi:nil="true"/>
<WOSEQUENCE xsi:nil="true"/>
<ASSET>
<ANCESTOR/>
<ASSETHEALTH xsi:nil="true"/>
<ASSETID>21</ASSETID>
<ASSETNUM>13110</ASSETNUM>
<ASSETTAG>13403</ASSETTAG>
<ASSETTYPE/>
<ASSETUID>127</ASSETUID>
<HIERARCHYPATH/>

</ASSET>

</WORKORDER>
</MXWOSet>
</PublishMXWO>
Steven Shull's profile image
Steven Shull
Asset has a non-persistent attribute HIERARCHYPATH that contains no processing class (meaning it needs to be set or initialized somewhere else). MXASSET has an outbound definition class (psdi.iface.app.asset.MoutAssetProcess) and it's in this class that the value from CLASSSTRUCTURE.HIERARCHYPATH is being set to this non-persistent attribute. When you use the MXWO object structure there is no outbound processing class to try and set this value so it returns as null.

You have a few options that I can think of currently.
1) An option is you include CLASSSTRUCTURE as a child object of ASSET and then bring in hierarchy path that way.
2) You could create an outbound definition automation script on your object structure and in the checkBusinessRules set this attribute by putting the value in the override column map (similar to what is done for MXASSET).
3) Since you're using a publish channel, you could add a processing rule with an action of SET and providing the sub-record fields to get the value from classstructure.hierarchypath
4) You could write an initialize value automation script on the HIERARCHYPATH attribute to set the value based on the relationship. Since this is non-persistent and has no validation logic today, it should be pretty safe, but I tend to avoid messing with values on out of the box attributes. 

There's probably a few others but the key is you have to set it yourself or modify the object structure to retrieve it from CLASSSTRUCTURE.