Maximo Open Forum

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

    Posted 04-22-2024 18:49
    Edited by Eric Zuo 04-22-2024 19:35

    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 04-23-2024 09:16

    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 04-25-2024 13:43

    HI Jason,

    Thank you very much for your instruction.  

    Eric



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



Featured Podcast
Episode 1 is live: IBM Maximo Application Suite 9.2

Watch or listen to Steven Shull and Phil Runion discuss the practical MAS 9.2 updates Maximo teams should know.

Watch the Podcast
MORE by Naviam Episode 1 cover
Watch the latest episode