Maximo Open Forum

 View Only

 MAS 8.11.12: Replicating CLASSSTRUCTURE.HIERARCHYPATH non-persistent Logic in SQL

  • Administration
  • Analytics
  • Maximo Application Suite
Philip Marrone's profile image
Philip Marrone posted 08-20-2024 12:59

Hey everybody. I hope you're having an amazing start to your week:

I was attempting to generate the value for the CLASSSTRUCTURE.HIERARCHYPATH field within a DB2 SQL statement, similar to how the application does it. However, since this field is non-persistent and requires specific logic to be set, I so I would need to replicate this logic in my query manually. I am not aware of how to do this. This could involve joining multiple tables and mimicking the application’s process, which might be complex and challenging to achieve without having visibility into how the application does this.

Does anyone know how to achieve this? I am specifically trying to get the classifications onto a sheet next to other properties from the 'TICKET' table, which I was able to JOIN with CLASSSTRUCTURE without issue.

Currently running MAS 8.11.12, Manage 8.7.9.

Martin Fabra's profile image
Martin Fabra

Hi !

HIERARCHYPATH is solved by a java class (FldClassStructureHierarchyPath). We have solved it so that, there is an added field called TICKET.CLASIFICACION where CLASSSTRUCTURE.HIERARCHYPATH is pasted, then, when you need to make an SQL query, you add that field and it is solved. We have this applied in most tables where CLASSSTRUCTUREID is used. Surely, someone here will tell you how to do it, since it is possible to put it together, looking at the description of the last class, adding the previous part of the parent class separated with a slash. But precisely to avoid doing that, we resolved it this way.

Regards!

Philip Marrone's profile image
Philip Marrone

Thank you @Martin Fabra. This sounds great, how was the solution built out? Was it an automation script? Please advise, thanks.

Martin Fabra's profile image
Martin Fabra

Hi Phillip! 

I've been checking. What they have configured here is that they created different escalations on different objects (SR, WORKORDER) and where they check if classstructureid exists and ars_clasificacion does not exist ("ars_clasificacion" is a field they created in different tables to copy the description of the classification). For example, the escalation on TICKET says: ars_clasificacion is null and classstructureid is not null.
 
Then they execute an action of the type "set value" and in the value define it has loaded ":CLASSSTRUCTURE.HIERARCHYPATH" and in parameter/attribute it has loaded ars_clasificacion. In this way, when the escalation is executed, it updates the ars_clasificacion that you can then use to export to excel or report, etc. Can it be improved? Yes, with a script... but they solved it here (I didn't do this... it's very old).
Regards!