Maximo Open Forum

 View Only

 Launch Automation Script from Button on Table Control Related to WORKORDER

Jump to Best Answer
  • Customizations
Jared Schrag's profile image
Jared Schrag posted 04-08-2024 15:54

I'm following this blog post in an attempt to implement a new Push Button to launch an Automation Script on a Table control that is configured wusing a newrelationship from the WORKORDER object within the WOTRACK application to a new Object. When I click the button, it does not launch the script. What should I try next?

Below are my configurations. I've tried this with the new button on the Main tab, not associated with any table and it works fine. However, I'm needing it to be launched from the context of a Push Button associated to a table control configured to show data from a new Object via a new relationship from the WORKORDER object to the new Object. This seems to me to imply that the Object context is not WORKORDER like the configuration expects. Not sure how to proceed from here.

SigOption

  • OptionName: TEST_SO
    • App: WOTRACK
    • Visible
    • Sig Option Flag: Requires a UI action

Security Groups

  • MAXEVERYONE
    • Granted the new SigOption (TEST_SO) to the MAXEVERYONE Security Group and logged out/in

Application Design

  • App: WOTRACK
  • Tab: Actuals
  • Add a new tab control to the existing tabgroup that contains "Labor", "Materials", "Services", and "Tools":
<tabgroup id="actuals_actuals">
   <tab label="Labor" ...>...</tab>
   <tab label="Materials" ...>...</tab>
   <tab label="Services" ...>...</tab>
   <tab label="Tools" ...>...</tab>
   <tab label="My New Tab" id="actuals_actuals_mynewtab">
      <table id="mynew_table" relationship="MYNEWTABLERELATIONSHIP"> <!-- New Reationship from WORKORDER to MYNEWOBJECT -->
      <tablebody .../>
      <tabledetails ...>
      </tabledetails>
      <buttongroup id="mynew_table_bg">
         <pushbutton id="mynew_table_bg_1" label="Do Something" mxevent="TEST_SO"/>  <!-- I've also tried adding the attribute: sigoptiondatasrc="MAINRECORD" but that doesn't work either -->
      </buttongroup>
      </table>
   </tab>
</tabgroup>

Action

  • Action: TEST_SO
    • Type: CUSTOM
    • Object: WORKORDER
    • Value: com.ibm.tivoli.maximo.script.ScriptAction
    • Parameter: MYSCRIPT,MYLAUNCH,TEST_SO
    • Accessible From: ALL

Automation Script

  • AutoScript: MYSCRIPT (simply write to the log file to indicate success)
  • Launch Point:
    • Name: MYLAUNCH
    • Type: ACTION
    • Object: WORKORDER
Jared Schrag's profile image
Jared Schrag Best Answer

I believe I have discovered the answer. I'm open to any other suggestions or alternative answers as well. If I specify the data source for the buttongroup control then it seems to work properly. This is in the WOTRACK application for the table control I've added within a new tab to show the rows for a new object that is related from the WORKORDER object (compare to the Application Design in the origianl post).

      ...
      </tabledetails>
      <buttongroup id="mynew_table_bg" datasrc="MAINRECORD">
         <pushbutton id="mynew_table_bg_1" label="Do Something" mxevent="TEST_SO"/>
      </buttongroup>
   </table>