Maximo Open Forum

 View Only
  • 1.  Possible to eliminate any customized java class in Maximo by automation scripts?

    Posted 05-23-2023 17:41

    Dear experts,
    Currently we have Maximo 7.6.1.2,  and it going to be upgraded to V8. I would like to ask, is it possible to replace all the customized java class with  auto scripts?  I am writing a auto-script to replace a java class that handle web client action  from a dialog, it does not work well. I asked a question in this site: 
             WRITE AUTOSCRIPT TO REPLACE FUNCTION OF WEBCLIENT JAVA CLASS
    But I have not gotten enough help. I wonder some class may cannot be replaced by python code.
    I know I short of stills in Autos Scripts.  could you please forward instruction in how to get the skills, such as an advanced book or links that introduce advanced knowledge  in porting the Maximo java class to auto scripts?
    Thanks,

    Eric


    #Customizations
    #EverythingMaximo
    #MaximoApplicationSuite
    #MaximoUserGroups

    ------------------------------
    Eric Zuo
    San Francisco Bay Area Rapid transit
    ------------------------------


  • 2.  RE: Possible to eliminate any customized java class in Maximo by automation scripts?

    Posted 05-23-2023 17:58

    Hi Eric,

    It isn't currently possible to replace all Java classes with automation scripts.
    The developers are extending the automation script capabilities but I think it will be quite a while before all the classes can be replaced.

    In terms of learning automation scripts. I prefer Jython to Javascript when I teach people how to write automation scripts.
    There are a lots of example Jython scripts out there, although the quality can vary.
    Some will clearly show how to solve a particular problem but they may cause other problems e.g. a resource leak.

    The IBM guys have put together a couple of PDFs about automation scripts but they were written on the understanding that you have some prior knowledge.
    You should be able to find them by googling the IBM site.

    best regards,
    Mark



    ------------------------------
    mark robbins
    Cohesive
    IBM Champion 2017-2023 Inclusive
    See my blog on Maximo support related topics here:
    https://www.linkedin.com/pulse/maximo-support-advice-from-non-ibm-engineer-article-mark-robbins/
    ------------------------------



  • 3.  RE: Possible to eliminate any customized java class in Maximo by automation scripts?

    Posted 05-23-2023 18:19

    HI Mark,
    Thank you very much for the quick response. We already have many automation scripts in Python.
    Do you know what kind of java class currently  not able to be converted to automation script? Is there a document that descripts it?
    To me the classes that  handle webclient sessions/actions are complicated.
    Thank you again,
    Eric



    ------------------------------
    Eric Zuo
    San Francisco Bay Area Rapid transit
    ------------------------------



  • 4.  RE: Possible to eliminate any customized java class in Maximo by automation scripts?

    Posted 05-24-2023 09:14

    Eric,

    You can replace pretty much every custom class with an automation script, including the most of the web client stuff, although there are a few exceptions.  Such as you can't run automation scripts on startup, but even that has some work arounds. Eventually though you wind up creating complicated and frankly hacky solutions just so you can say you don't have java classes. I am not sure the tradeoff is worth it.

    For resources I would strongly recommend you check out the VS Code extension so you can start to put some discipline around your development.

    https://marketplace.visualstudio.com/items?itemName=sharptree.maximo-script-deploy

    You can also review our blog https://sharptree.io/blog  which has a lot of automation script examples.

    If you have a specific problem you want to discuss you can reach out to Charlie or Jay and they can put you in touch with me.

    - Jason



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



  • 5.  RE: Possible to eliminate any customized java class in Maximo by automation scripts?

    Posted 05-24-2023 10:35

    If you haven't seen it already, please look at our wiki on automation script development. https://ibm-maximo-dev.github.io/maximo-autoscript-documentation/

    There's a lot more I'd like us to get added to it but finding the time to add more documentation is always a challenge. If there are particular areas you'd like to see in the documentation let me know.

    As for what you can and can't do with automation scripts, as Jason & Mark explain it will depend on what you are trying to do. Around business objects we have a pretty robust set of capabilities. We started really adding some UI interaction capabilities in 7.6.1.X. In the latest MAS release (Manage 8.6), we started the work to add more hooks around bean classes. It's disabled out of the box and we haven't built the documentation around it yet, but I wanted to make it known that it is an area we're continuing to invest. There are areas around serviceability that we're focused on improving as well. For example, we added a way to automatically clean up sets that were opened via an automation script and weren't properly closed. This was added in Manage 8.5 or 8.6 and disabled by default (system property mxe.script.autocleanup). We added better support for testing automation scripts. And we have a lot more coming still. 



    ------------------------------
    Steven Shull
    IBM
    ------------------------------



  • 6.  RE: Possible to eliminate any customized java class in Maximo by automation scripts?

    Posted 05-24-2023 13:16

    Hi Steven,
    Thank  you very much, all the responses from you 3 experts are very instructive. I really appreciate it. 
    I am on a task to write an auto script to replace a java function for virtual asset removal, it is an action that responses OK button in a dialog in a customized WorkOrder application. The error will occur if I modify (and then saved) another field in the work order before the virtual asset removal. I think it is not a good time to do it.
    My conclusion is that, on Maximo 7.6.1.*., even MAS 8 early version, it is not the time to replace all the customized java classes, such as bean classes,  those involve UI interaction, with auto script right know.  Am I correct?

    In addition, I would like to ask another question. Since Maximo uses java behind, is the automation script in Jython better than in Python? Currently our script is *.py.

    Thank you again.,

    Eric



    ------------------------------
    Eric Zuo
    San Francisco Bay Area Rapid transit
    ------------------------------