Hi Steven
Thanks the above code is working when trying to reset "LASTREADINGNEW" along with other fields for which i am giving reset value 'ROLLOVERNEW', 'SINCEINSTALLNEW', SINCELASTINSPECTNEW , SINCELASTOVERHAULNEW, SINCELASTREPAIRNEW .
But when I am only trying to reset these fields 'ROLLOVERNEW', 'SINCEINSTALLNEW', SINCELASTINSPECTNEW , SINCELASTOVERHAULNEW, SINCELASTREPAIRNEW without giving 'LASTREADINGNEW' new value .Code isnt working for reset.
Could you please suggest a possible modification i can do in code so that in both ways it works.
Thanks
------------------------------
Reetika Agrawal
------------------------------
Original Message:
Sent: Fri November 05, 2021 10:00 AM
From: Steven Shull
Subject: Maximo reset meter transaction via MIF
Sorry my check mbo.getDouble("LASTREADINGNEW") will return false for 0. You'll have to get the StructureData and verify that it's in the StructureData instead. Something like:
def afterMboData(ctx):
mbo = ctx.getMbo()
struc=ctx.getData()
if mbo.getName()=="ASSETMETER" and struc.isInCurrentData("LASTREADINGNEW"):
mbo.resetMeter()
------------------------------
Steven Shull
Original Message:
Sent: Fri November 05, 2021 05:46 AM
From: Vivek Singh
Subject: Maximo reset meter transaction via MIF
Hi Steven,
Thanks for sharing the code. I tried the same but its not allowing me to reset the meter reading to 0. If I try to process a transaction with LASTREADINGNEW > 0 it works. Please suggest.
Thanks.
------------------------------
Vivek Singh
Original Message:
Sent: Wed October 27, 2021 08:47 AM
From: Steven Shull
Subject: Maximo reset meter transaction via MIF
Yeah it looks like the bean class calls a resetMeters method on the set when it's in this dialog and that's required for the logic to fire. It's relatively simple to fix in an automation script though.
In the Create->Script for Integration dialog choose the object structure you are using and leave Inbound Processing selected. Then provide the following script (language is jython/python)
def afterMboData(ctx):
mbo = ctx.getMbo()
if mbo.getName()=="ASSETMETER" and mbo.getDouble("LASTREADINGNEW"):
mbo.resetMeter()
------------------------------
Steven Shull
Original Message:
Sent: Tue October 26, 2021 08:29 AM
From: Kalaiselvan Matheswaran
Subject: Maximo reset meter transaction via MIF
Hi Divyani,
Response we received from IBM is - it is not enabled OOB using MIF. Even if we include this in OS - we will not get any error response and it will not get processed also.
Some custom solution needs to be developed as per my understanding.
------------------------------
Kalaiselvan Matheswaran
Original Message:
Sent: Fri October 22, 2021 03:06 AM
From: Divyani Kulkarni
Subject: Maximo reset meter transaction via MIF
Hi Kalaiselvan,
I got the same requirement, I am also trying to load reset meter reading value information.
Please share me the solution , if you find any solution for this issue.
Thank you in advance.
Regards
Divyani Kulkarni
------------------------------
Divyani Kulkarni
Original Message:
Sent: Mon August 16, 2021 07:43 AM
From: Kalaiselvan Matheswaran
Subject: Maximo reset meter transaction via MIF
Dear All,
Is it possible to do maximo reset meter transaction via MIF/MxLoader ?
Tried passing values to LASTREADINGNEW,LASTREADINGDATENEW non persistent attribute - but reset transaction/meter reading is not getting recorded. (Not throwing any errors also)
Scenario: When history values are loaded - we wanted to load reset value information also.
------------------------------
Kalaiselvan Matheswaran
------------------------------
#Maximo
#AssetandFacilitiesManagement