Maximo

 View Only
  • 1.  Trigger java code/class on application

    Posted Thu June 23, 2022 07:40 AM
    Hello,

    I have a question about how to trigger java class on application.

    I have custom application where main object is ASSET. Inside this application I have tab and there is table data where is relationship from ASSET table to my custom table/object.

    Here on this buttons I set event for my method RINFDUPLICATE.

     

    I also set bean class on this table:


    I deploy java class inside webclient on server.

    But problem here is that java class is not triggered.

    For test I tried to create new custom application where main object is my custom object and there I set App Bean Class: si.sz.webclient.asset.SzDuplicateRINF so my new java class and its working, but in previous code is not triggered, any idea?

    ------------------------------
    Blaz Rakar
    ------------------------------


  • 2.  RE: Trigger java code/class on application

    Posted Fri June 24, 2022 11:01 AM
    Hi,

    I believe what you are seeing is related to naming convention.  When you associate an event (in this case RINFDUPLICATE), the system will loog for a dialog with this name and if found open the dialog.  If it is not found, the system will look for a method on the beans with this name.  Finally, it will look for a method on the MBO with this name.  Do you have RINFDUPLICATE as the method name on the java class?

    Steve

    ------------------------------
    Steve Hauptman
    ------------------------------



  • 3.  RE: Trigger java code/class on application

    Posted Wed June 29, 2022 08:55 AM
    Yes, I have method 

    public int RINFDUPLICATE() throws MXException, RemoteException {
    try {
    LOGGER.logDebug("SzDuplicateRINF.MXZRINFDUPL", "START");
    duplicateMbo1();
    this.parent.fireDataChangedEvent();
    this.parent.fireStructureChangedEvent();
    this.parent.fireChildChangedEvent();
    } catch (Exception var14) {
    LOGGER.logDebug("ERROR MXZRINFDUPLICATE:", var14);
    }

    return 1;


    ------------------------------
    Blaz Rakar
    ------------------------------



  • 4.  RE: Trigger java code/class on application

    Posted Fri June 24, 2022 12:22 PM
    I am not clear on your business process definition/requirements, however, you might look at executing a system command (javaw...) from an integration, using the framework to listen to the mbo in question (attribute event to a script to an integration)... I think there's another shortcut I've used, but I don't recall at the moment...

    ------------------------------
    keith simmons
    ------------------------------