Maximo

 View Only

Replacing custom WOChangeStatusBean with automation script or something else

  • 1.  Replacing custom WOChangeStatusBean with automation script or something else

    Posted Tue May 24, 2022 12:38 PM
    Edited by System Tue August 22, 2023 04:40 PM
    Hello,

    A decade ago, we developed a custom work order change status bean class that allows restricting the work order status values based upon the name of the application (e.g. we have custom wo tracking application) So our java code, inspects the app name and if the app name is equal to custom app, then, it removes certain values from the status list. 

    /* Sample java code */
    public class LBLWOChangeStatusBean extends psdi.webclient.beans.workorder.WOChangeStatusBean
    {
        public MboSetRemote getList(int nRow, String attribute)  throws MXException, RemoteException
        {
         String strAppname=this.sessionContext.getCurrentApp().getApp();   // it seems to be deprecated now
         if (strAppname.equalsIgnoreCase("WOTRACK") || strAppname.equalsIgnoreCase("FACWOTRACK"))
          {
              if( ! currentList.isEmpty())
               {
                   for(int i=0; currentList.getMbo(i) !=null;i++)
                   {
                     if (currentList.getMbo(i).getString("description").contains("WF")  
                           currentList.remove(i);
                     } 
               }
               return currentList;
         }

     
    The above is working fine. However, we want to replace the custom java codewith the relevant technologies (preparing for the cloud rollout).

    Any hints on whether we can accomplish the same using automation script or any other mechanism?

    Please guide.

    Thanks and regards

    ------------------------------
    Pankaj Bhide
    Computer Systems Engineer
    Berkeley National Laboratory
    Berkeley CA
    ------------------------------


    #MaximoIntegrationandScripting
    #AssetandFacilitiesManagement
    #Maximo