Maximo

  • 1.  It works! Access the UI via an automation script (using getWebClientSession)

    Posted 02/03/20 01:05 PM
    Edited by System Admin 03/22/23 11:45 AM
    I thought I'd share something interesting I learned back in October 2019:

    In Maximo 7.6.1.1, we can use the service.webclientsession() method to access the UI:

    from psdi.common.context import UIContext
    wclause = service.webclientsession().getCurrentApp().getResultsBean().getMboSet().getUserAndQbeWhere() 
    service.error("The WHERE clause is : ", wclause);

    I think that could be handy in some scenarios.

    Some notes:


    #AssetandFacilitiesManagement
    #Maximo


  • 2.  RE: It works! Access the UI via an automation script (using getWebClientSession)

    Posted 02/04/20 12:03 PM
    I think that's pretty cool too. Thanks for sharing.

    ------------------------------
    Robert Goff
    ------------------------------



  • 3.  RE: It works! Access the UI via an automation script (using getWebClientSession)

    Posted 05/07/21 10:02 PM
    FYI, a related post here:

    New java classes & methods in 7.6.1.2?


  • 4.  RE: It works! Access the UI via an automation script (using getWebClientSession)

    Posted 02/05/20 02:37 AM
    Hi,

    There is a thing made the life a bit more easier by using service method as follows:

    wcs = service.webclientsession()
    wcs...​


    Don't need import UIContext and it can be written code more concise.

    Thanks


    • Add to Phrasebook
      • No word lists for English -> Japanese...
      • Create a new word list...
    • Copy
    • Add to Phrasebook
      • No word lists for English -> Japanese...
      • Create a new word list...
    • Copy


    ------------------------------
    YASUTAKA NISHIMURA
    ------------------------------



  • 5.  RE: It works! Access the UI via an automation script (using getWebClientSession)

    Posted 02/06/20 11:46 AM

    Cool.

    So this bit...
    UIContext.getCurrentContext().getWebClientSession().getCurrentApp().getResultsBean().getMboSet().getUserAndQbeWhere() 

    ...can be written more concisely as: 
                                                          service.webclientsession().getCurrentApp().getResultsBean().getMboSet().getUserAndQbeWhere() 



    ------------------------------
    Thanks
    ------------------------------



  • 6.  RE: It works! Access the UI via an automation script (using getWebClientSession)

    Posted 06/25/21 02:04 PM
    Is there any similar option for Maximo 7.6.0.9?? 

    I am facing an issue with a dialog box, in which the dialog box has OK button which is linked to Action Launch Point Automation script but once the automation script gets executed the dialog box doesn't get closed unless you click close button manually. 
    I tried multiple ways like savemode="ONLOADUNLOAD" and other steps but nothing works.
    I tried the above script but it doesn't work due to version issue (service.webclientsession() method doesn't exists) so is there any other option for Maximo 7.6.0.9?


    ------------------------------
    Murli Swami
    ------------------------------



  • 7.  RE: It works! Access the UI via an automation script (using getWebClientSession)