Maximo

 View Only
  • 1.  Need a common method at bean/mbo/mboset level

    Posted Sat November 16, 2024 06:33 AM
    Edited by Suhas Joshi Sun November 17, 2024 03:41 AM

    Hi,

    We have a requirement where user can search for a particular record (either using Find option/advanced search/where clause/list tab) and open it. As soon as the record is opened (main tab), we need to perform a logic to write specific information of that mbo to a log file. We also need to perform this using an httpsession only.

    Looking for a common method at mbo/set/bean level which can do all of the above. Tried using getMboSet(), initializeApp() and getCurrentRow() methods but these methods are getting executed more than once even if there is only one record.

    Any pointers on this would be really useful.

    #IBMMaximo

    #IBMMaximoAssetManagement



    ------------------------------
    Suhas Joshi
    ------------------------------



  • 2.  RE: Need a common method at bean/mbo/mboset level

    Posted Mon November 18, 2024 10:06 AM

    I'm thinking about two possible approaches.

    1. A custom event triggered by the tabchangeevent tag on the main tab of the application. Look here about the tabchangeevent tag and here about how to link that event to an automation script. Look here about how to trigger to automation script (the button is replaced by the tabchangeevent tag).
    2. Use a hidden non-persistent attribute on the main tab of the application and attach an automation script on the attribute "Initialize Value" event. Maximo should invoke the script only when the attribute is displayed (see here).


    ------------------------------
    Bruno Portaluri
    Maximo Principal Consultant
    OMNINECS Europe
    Rome
    +393355784962
    ------------------------------



  • 3.  RE: Need a common method at bean/mbo/mboset level

    Posted Mon November 18, 2024 01:17 PM

    Thanks Bruno. I will try these options. Option 1 was clear but option 2 is still not clear. When you say script should be triggered only when attribute is displayed, do you mean we should display attribute conditionally?



    ------------------------------
    Suhas Joshi
    ------------------------------



  • 4.  RE: Need a common method at bean/mbo/mboset level

    Posted Tue November 19, 2024 04:52 AM

    I think Brune has an idea, that you need:

    1. Create a non-persistent attribute for objects, that you want to be logged.
    2. Put this field on the main tab and add sigoption "HIDE". Sigoption access should not be granted to any group. 
    3. Create a script with attribute launch point on initValue and put all your logic there. 


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



  • 5.  RE: Need a common method at bean/mbo/mboset level

    Posted Tue November 19, 2024 05:04 AM
    Edited by Andrey Ilinskiy Tue November 19, 2024 05:05 AM

    I wolud propose to create script with object launch point on Init and then filter inside of script events using methods from AppBean() ( UIContext.getCurrentContext().getWebClientSession().getCurrentApp() ) such as 

    getName()

    onListTab()

    and etc. 

    Also, add validations for nullPointers before method calling.  



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