Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
Expand all | Collapse all

Maximo reset meter transaction via MIF

  • 1.  Maximo reset meter transaction via MIF

    Posted Mon August 16, 2021 07:44 AM
    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


  • 2.  RE: Maximo reset meter transaction via MIF

    Posted Fri October 22, 2021 03:31 PM

    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
    ------------------------------



  • 3.  RE: Maximo reset meter transaction via MIF

    Posted Tue October 26, 2021 08:29 AM
    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
    ------------------------------



  • 4.  RE: Maximo reset meter transaction via MIF

    Posted Wed October 27, 2021 08:48 AM
    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
    ------------------------------



  • 5.  RE: Maximo reset meter transaction via MIF

    Posted Fri November 05, 2021 09:15 AM
    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
    ------------------------------



  • 6.  RE: Maximo reset meter transaction via MIF

    Posted Fri November 05, 2021 10:01 AM
    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
    ------------------------------



  • 7.  RE: Maximo reset meter transaction via MIF

    Posted Mon November 08, 2021 12:08 PM
    Hi Steven,

    I tried the approach that you suggested. I even tried removing the line to check the data. I see that its going to the line where you are resetting the meter but it still doesn't resets to 0. It can reset it to anything > 0. I did not tried negative values.

    def afterMboData(ctx):
    mbo = ctx.getMbo()
    struct = ctx.getData()
    if mbo.getName() == "ASSETMETER":
    mbo.resetMeter()

    Thanks
    Vivek Singh


    ------------------------------
    Vivek Singh
    ------------------------------



  • 8.  RE: Maximo reset meter transaction via MIF

    Posted Thu March 03, 2022 05:35 AM
    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
    ------------------------------



  • 9.  RE: Maximo reset meter transaction via MIF

    Posted Tue October 26, 2021 08:19 AM
    can you pls make sure those 2 non-persistent attributes are included as part of the object structure - as without that this will not work.

    ------------------------------
    Anamitra Bhattacharyya
    IBM
    Bedford MA
    ------------------------------



  • 10.  RE: Maximo reset meter transaction via MIF

    Posted Wed March 02, 2022 04:02 PM
    Even after Including those field in OS reading is not getting updated.
    I am using fields LASTREADINGNEW,SINCELASTINSTALLNEW,LASTINSPECTORNEW
    I am trying to reset last meter reading through Reset/Replace capablity of Asset application.
    Please suggest if its possible through CSV Import.

    ------------------------------
    Reetika Agrawal
    ------------------------------



  • 11.  RE: Maximo reset meter transaction via MIF

    Posted Wed March 02, 2022 09:45 PM
    Did you add the Automation Script I described above to call the resetMeter() method? This customization is required because this logic is not invoked by any of the MIF processing classes.

    ------------------------------
    Steven Shull
    ------------------------------