Maximo

 View Only
  • 1.  MAS 9 Manage - Launching automation scripts from a custom dialog in List tab

    Posted 12 days ago
    Edited by Aneesh Joseph 12 days ago

    Hi Maximo Experts!

    I have an interesting technical question for this forum.

    I created a custom dialog in the SR application. The intent is to show multiple SR records (based on a specific query) when the dialog is opened. The user will then select rows (multiselect) and press a button which should then do some processing. The dialog XML is shown below (I've removed all customer references)

    <dialog beanclass="psdi.webclient.system.beans.MultiselectDataBean" id="SR2ASSET" label="Create/Update Asset from SR" mboname="SR" whereclause="customfield=1 and historyflag=0 and status != 'RESOLVED'">

            <table id="sr2asset_select_table" label="Asset Service Requests" selectmode="multiple">
                <tablebody displayrowsperpage="15" filterable="true" filterexpanded="false" id="sr2asset_select_table_tablebody">
                    <tablecol filterable="false" id="sr2asset_select_table_tablebody_1" mxevent="toggleselectrow" sortable="false" type="event"/>
                    <tablecol dataattribute="ticketid" id="sr2asset_select_table_tablebody_2"/>
                    <tablecol dataattribute="description" id="sr2asset_select_table_tablebody_3"/>
                    <tablecol dataattribute="status" id="sr2asset_select_table_tablebody_5"/>
                    <tablecol dataattribute="siteid" id="sr2asset_select_table_tablebody_6"/>
                </tablebody>
            </table>
            <buttongroup id="sr2asset_button_group">
                <pushbutton id="sr2asset_button_group_2_1" label="Resolve" mxevent="SR2ASSETCREATE"/>
                <pushbutton id="sr2asset_button_group_2_2" label="Void" mxevent="SR2ASSETVOID"/>
                <pushbutton default="true" id="sr2asset_button_group_2_3" label="Cancel" mxevent="dialogcancel"/>
            </buttongroup>
        </dialog>
    The dialog is launched from the List tab of the SR application. I have created SIGOPTIONS for the dialog event and button events. The button events are linked to sigoptions (with UI option toggled) that are linked to actions that launch automation scripts.
    The problem that I have is that my custom events SR2ASSETCREATE and SR2ASSETVOID only trigger if I have at least one record in the list tab of the SR application. If the List tab is empty, these buttons do not make any invocations to the server. Therefore there is no way for the automation scripts to get triggered.
    Has anyone experienced this issue before and how did you resolve it? 
    Many Thanks


    ------------------------------
    Aneesh Joseph
    Director and Solutions Architect
    objec3d
    Melbourne, Australia
    https://www.objec3d.com
    ------------------------------



  • 2.  RE: MAS 9 Manage - Launching automation scripts from a custom dialog in List tab

    Posted 12 days ago

    Hi Aneesh
    I have the same problem and I did not find a way around :(

    Here is an example that I used in past: https://www.sharptree.io/blog/2022/2022-01-17-custom-button-action/

    I am wondering if it is a limitation of current implementation of Action launch points. 



    ------------------------------
    Alexey Potanin
    ------------------------------



  • 3.  RE: MAS 9 Manage - Launching automation scripts from a custom dialog in List tab

    Posted 12 days ago
    Edited by Andrzej Więcław 12 days ago

    Hi Aneesh,

    this is clearly framework limitation - simply automation script execution is being handled in consequence of a chained WFACTION -> ACTION -> AUTOSCRIPT sequence of actions. The thing is that WFACTION (and ACTION) always require MBO context to run. 

    When you run such action from a details screen you can always be sure MBO exists. On a list screen however result set may be empty therefore action is ignored (to be completely clear the button itself is not even triggering the event).

    In this case you may need to get into customisation, either by providing custom dialog bean or, if you're on MAS Manage (as you specifically are) then you can go for UI Bean Scripting



    ------------------------------
    Andrzej Więcław
    Maximo Technical SME
    ZNAPZ B.V.
    Wrocław, Poland
    ------------------------------



  • 4.  RE: MAS 9 Manage - Launching automation scripts from a custom dialog in List tab

    Posted 11 days ago

    A little late and I think Andrzej has answered this well, but to add a little bit.  Dialogs on the list screen require that you have a result set in the list before attempting to perform the action.  To get this to work just have results in the list and then your dialog and actions should work as expected.  



    ------------------------------
    Jason VenHuizen
    Sharptree
    https://sharptree.io
    https://opqo.io
    ------------------------------



  • 5.  RE: MAS 9 Manage - Launching automation scripts from a custom dialog in List tab

    Posted 12 days ago

    Hi Joseph,

    Yes. It is expecting atleast SR mbo to process the execution. In the dialog box, I see a relationship from SR to ASSET. In order to trigger the event, I assume to have one SR record. 

    What is the exact requirements? 

    Thank you 

    Pavan Uppalanchu 

    Thank you. 



    ------------------------------
    pavan uppalanchu
    ------------------------------



  • 6.  RE: MAS 9 Manage - Launching automation scripts from a custom dialog in List tab

    Posted 8 days ago

    Thank you everyone for your valuable responses! I really appreciate it :)

    Yes, it looks like bean scripting might be the solution for this. I'm keen to explore this further but for the moment we are just using a workaround where the user selects a Query to ensure records exist in the List screen, as suggested by Jason before opening the dialog.

    Have a great week!



    ------------------------------
    Aneesh Joseph
    Director and Solutions Architect
    objec3d
    Melbourne, Australia
    https://www.objec3d.com
    ------------------------------