Maximo Integration

 View Only
Expand all | Collapse all

Invoke Publish Channel on click of Button without enabling event listener

  • 1.  Invoke Publish Channel on click of Button without enabling event listener

    Posted Thu June 23, 2022 07:07 AM
    Is there a way to invoke publish channel on click on a button from Maximo UI without enabling event listener? I have tried the below logic on action launch point which is mapped to a button  

    PublishChannelCache.getInstance().getPublishChannel("Publishchannelname").publish(mbo, True) > Does not work , no error. 

    The below logic resulted in an error > BMXAA7837E - An error occured that prevented the CXTEST script for the CXTEST launch point from running. java.lang.IndexOutOfBoundsException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 in <script> at line number 10

    from psdi.server import MXServer
    server = MXServer.getMXServer()
    adminuser = server.getUserInfo("MAXADMIN")
    locMbo = service.getMbo()
    extSysName = 'EXTSYSNAME'
    ifaceName = 'PUBNAME'
    whereClause = "LOCATION='"+mbo.getString("LOCATION")+"'"
    maxRecCount = 1
    server.lookup("MIC").exportData(ifaceName, extSysName, whereClause, adminuser, maxRecCount)

    Please advise whether it is possible to invoke publish channel using button.

    ------------------------------
    MAX092012
    ------------------------------


  • 2.  RE: Invoke Publish Channel on click of Button without enabling event listener

    Posted Wed November 30, 2022 02:03 AM
    There are two ways you can Invoke the Invocation Channel.

    1. You can create an Action and put the Invocation Channel details in that Action application. Then create a sig option to call the action.

    Below is the Link to enter the details of Invocation Channel into action.

    https://www.ibm.com/docs/en/cdfsp/7.6.0?topic=channels-configuring-action-call-invocation-channel

    2. You can create an Action Automation Script and call the Invocation Channel. In the automation script you can call the below code.

    InvokeChannelCache.getInstance().getInvokeChannel("INVOKCHANNEL").invoke(null, mbo, mbo, null)

    ------------------------------
    keshav ravindran
    ------------------------------