Maximo Open Forum

 View Only
  • 1.  How to Call IBM outbox Java Function in Maximo Autoscript

    Posted 11 days ago
    Edited by Eric Zuo 11 days ago

    Dear experts,

    I need to write python scripts in Maximo to call action()  and getList() of psdi.app.workorder.FldWOJobPlan.class.   With customized java class, I can use super.action() and super.getList(). But How to do it in python auto script?

    First I may need to call the constructor FldWOJobPlan(MboValue mbv)  to create an instance.  I tried:

       supper = FldWOJobPlan ( curMbovalue )
       supper.action()

    It does not work. Could you please forward instruction?

    Thank you in advance.

    Eric


    #MaximoApplicationSuite
    #MaximoUserGroups

    ------------------------------
    Eric Zuo
    ------------------------------



  • 2.  RE: How to Call IBM outbox Java Function in Maximo Autoscript

    Posted 10 days ago

    Eric,

    Generally I would just re-implement whatever the base class is doing so you have full control over it and in most cases the actions in a field adapter are pretty simple. With that said, you can do something like the following.

    from psdi.app.workorder import FldWOJobPlan
    
    def action():
        superField = FldWOJobPlan(mbo.getMboValue("ATTRIBUTE_NAME"))
        superField.action()
        # Do your custom actions here.
    
    action()
    

    You can take a similar strategy for the the get list and here is a blog post I wrote for reference on implementing lists with automation scripts.  

    https://www.sharptree.io/blog/2022/2022-02-14-script-retrieve-list/

    Regards,

    Jason



    ------------------------------
    Jason VenHuizen
    Sharptree
    ------------------------------



  • 3.  RE: How to Call IBM outbox Java Function in Maximo Autoscript

    Posted 8 days ago

    HI Jason,

    Thank you very much for your instruction.  

    Eric



    ------------------------------
    Eric Zuo
    ------------------------------