Maximo

Maximo

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

 View Only
  • 1.  Automation script for dialog

    Posted Tue January 09, 2024 06:35 AM

    Hi! 

    Is it possible already to create scripts for dialog beans? 

    Especially looking for the possibility of making custom dolongop functions



    ------------------------------
    Andrey Ilinskiy
    Handz.on
    https://www.on.de/
    München
    ------------------------------


  • 2.  RE: Automation script for dialog

    Posted Tue January 09, 2024 07:29 AM

    Not sure what exactly you are looking for but have you tried below already?

    https://www.linkedin.com/pulse/running-automation-scripts-when-closing-dialog-maximo-nishimura

    Regards,

    Suhas



    ------------------------------
    Suhas Joshi
    Pune
    ------------------------------



  • 3.  RE: Automation script for dialog

    Posted Tue January 09, 2024 08:22 AM

    Nope. 

    In a new version of MAS was introduced possibility to create automation scripts for Applications beans. So, I want to clarify is also possible to make scripts for custom dialogs the same way ?



    ------------------------------
    Andrey Ilinskiy
    Handz.on
    https://www.on.de/
    München
    ------------------------------



  • 4.  RE: Automation script for dialog

    Posted Tue January 09, 2024 08:24 PM

    Hi Andrey,

    There is new system property mxe.script.allowbeanscript which is to be enabled. Then create script with APPBEAN.APPNAME ( For e.g. APPBEAN.WORKORDER ) as script name and ensure "Allow Invoking Script Function" is enabled.

    There is good presentation by Steven Shull which explains this along with example. 

    Please refer below thread:.

    https://moremaximo.com/discussion/msug-automation-scripts-in-maximo-application-suite

    Or below recording

    https://register.gotowebinar.com/recording/9000796134191766017



    ------------------------------
    Manoj Sawant
    ------------------------------



  • 5.  RE: Automation script for dialog

    Posted Wed January 10, 2024 04:06 AM

    Thanks for your answer. I saw that presentation, unfortunately only only in recording. The idea is do not to create script for application action, but for dedicated dialog only to extend existing logic. 

    For example, i have import csv dialog. I need to override existing logic if based on users selection. All that logic is dialog bean, so is it possible to do something here?



    ------------------------------
    Andrey Ilinskiy
    Handz.on
    https://www.on.de/
    München
    ------------------------------



  • 6.  RE: Automation script for dialog

    Posted Thu January 11, 2024 03:25 AM

    Hi,
    Am I correct that you are using custom dialog bean to import csv file with a list of mbos? If yes, so you can use non-persistent attribute (yes / no) to determine your logic execution.



    ------------------------------
    Viet Nguyen
    Technical Lead / Delivery Manager
    Avenue JSC
    84 8 5410 1820
    ------------------------------



  • 7.  RE: Automation script for dialog

    Posted Thu January 11, 2024 08:57 AM

    If you read the comments on the link above on the MORE Maximo community, I talk through how to create a script that hooks into the dialog events (by creating a DATABEAN.NAME script with two implicit variables that describe the app it is in and the id of the bean). In the script, declare a function with the identical name of the event. You can intercept the event at that point and do whatever you need to do. For example, if you want to completely handle the event in the automation script (never make it to the bean class event), call:

    ctx.setEventHandled()

    And that will prevent the framework from proceeding on to the bean class event. Or you can just manipulate the data as needed and then after your script is done it will proceed on to the bean class even itself. 



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