Hi ,
Good Day!
I'm facing below issue with my Object Structure Integration. I'm using one Object Structure to load data using Application Import/Export options.
I have 3 objects with the following hierarchy in my object structure,
<WARVIEW>(Object 1)
<WARASSET> (object 2)
<CONTLINEASSET></CONTLINEASSET> (Object 3) (Child of Object 2)
</WARASSET>
</WARVIEW>
With the 3rd object added to my object structure the data for the object 2 is not getting processed properly. I'm not able to process more than one mbo for the object 2.
Example: If I want to load 3 records to WARASSET object (Object-2), but maximo is always trying to load the 1st asset again and again or at once.
Every time I can add only one record for one transaction. But I want to load multiple record into Object 2(WARASSET).
I have an Integration script for my object structure to process the WARASSET object based on our requirement.
Here's what I have in my integration script,
I'm setting assetId field of WARASSET object based on the data provided in assetnum field.
def beforeMboData(ctx):
mboSet = ctx.getMboSet()
mbo=mboSet.moveFirst()
if(ctx.getProcessTable()=="WARASSET"):
struc=ctx.getData()
assetNum=struc.getCurrentData("ASSETNUM")
siteid=struc.getCurrentData("SITEID")
asset_set=MaxUtils.getMboSetRemote("ASSET","assetnum= '"+assetNum+"' and siteid = '"+siteid+"'", "", MXServer.getMXServer().getSystemUserInfo())
if asset_set.isEmpty()==False:
assetId=asset_set.getMbo(0).getInt("ASSETID")
struc.setCurrentData("ASSETID",assetId)
As per my understanding the context API methods will get triggered for each mbo in the inbound message. But here the first mbo of WARASSET object only getting processed!!
Am i missing anything ? What's that factor that disrupts the processing of all mbos for this object-2 alone.
Note: With the absence of Object-3(Child of Object-2) I can add any number of records to object-2 but I need object-3 also in this Object Structure.
Any clue or help would be appreciated!
Regards,
Manju