The way MBOs work, you will need to create the parent first. Maximo will not allow you to reference in a single pass an object which has not yet completed creation. That is what you will do when you try to create children to a parent that you have not finished creating. Same thing happens with Assets, Locations, nested Job plans etc. Any parent-child MBO relationship requires the parent to be created first when the parent object is of the same object structure. Another thing that is particularly true for workorders is not only WONUM referencing but also WOGROUP. To be able to populate the children records with a WONUM in a REST POST call for an object that does not yet exist would truly be magic. ;)
Bradley K. Downing , MBA
Original Message:
Sent: Mon January 27, 2025 10:28 AM
From: Theo Pozzy
Subject: Maximo integration object structure with parent and child WORKORDER objects
Thank you for the suggestion. However, I am trying to create work orders with a POST operation. Therefore, I need to have the child work order be a JSON object inside the parent work order object.
------------------------------
Theo Pozzy
Original Message:
Sent: Sun January 26, 2025 03:57 AM
From: Bartosz Marchewka
Subject: Maximo integration object structure with parent and child WORKORDER objects
Hi Theo,
Depends on your requirement I think you don't need to have this done in object structure definition for GET calls. Maybe, it will be enough if you use "rel" notation "rel.<relation name>
" in your case rel.childnotask
in oslc.select
section.
Please observed that in this example I used out of the box MXAPIWO object.
{{MASURL}}/maxrest/api/os/mxapiwo?oslc.where=wonum="1118"&oslc.select=wonum,description,siteid,orgid,rel.childnotask{wonum,description,parent}&lean=1
Sample json response:
------------------------------
Bartosz Marchewka
IBM Maximo Consultant
AFRY
Original Message:
Sent: Sat January 25, 2025 05:36 PM
From: Theo Pozzy
Subject: Maximo integration object structure with parent and child WORKORDER objects
I am trying to create REST API calls on work orders, and I would like to have the parent and child work orders in the same message. I know I can use the WOACTIVITY object (view) to get tasks to a work order, but I'm having problems creating an object structure with the WORKORDER as the primary object and then as a child object. The WORKORDER object has a relationship available named "CHILDNOTASK" that seems ideal for this case.
However, when I add the WORKORDER object a second time to the object structure, the Object Structures application gives me the following error:
BMXAA1236E - Only one instance of a MBO set can be specified in the MBO location path.
What options do I have to get this to work?
-Theo Pozzy