Maximo

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

    Posted Mon February 03, 2020 01:05 PM
    Edited by User1971 Fri May 07, 2021 10:02 PM
    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:



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

    Posted Tue February 04, 2020 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 Fri May 07, 2021 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 Wed February 05, 2020 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 Thu February 06, 2020 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)

    InnerCircle
    Posted Fri June 25, 2021 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)

    Posted Sun September 12, 2021 04:18 PM
    Edited by User1971 Mon September 13, 2021 11:53 PM