Maximo

 View Only
  • 1.  MAS9 - Maximo Child Workorder

    Posted Thu January 02, 2025 02:40 PM
      |   view attached

    Hi,

    We are trying to implement child workorder functionality in Maximo Mobile. We have used similar logic as Follow-up Workorder. 

    RelatedWoController.js openEditWo() function uses myworkCreatedLocally datasource to open the follow up workorder details page in device. But this ds lets us open only the wo reported by the user.

    In Child Wo page, we would like to open all the child wos irrespective of the reported user. When we removed the reported by clause from the saved query, the volume of records became huge which resulted in the mobile app getting hung. So we tried creating a datasource which has all child WOs by passing parent WO in run time. This approach works as expected first time, but fails when we try to open a different WO. Attaching the code here for reference.

    Please let us know if someone has idea on this or if you've developed this functionality with a different approach. 




    ------------------------------
    Finny Charles R
    ------------------------------

    Attachment(s)

    docx
    Childwo.docx   16 KB 1 version


  • 2.  RE: MAS9 - Maximo Child Workorder

    Posted 6 days ago

    @Steven Shull Could you please provide some insights on this



    ------------------------------
    Finny Charles R
    ------------------------------



  • 3.  RE: MAS9 - Maximo Child Workorder

    Posted 4 days ago

    Since you are trying to navigate to the workOrderDetails page and not a custom read-only page, I assume you're trying to make this editable? That's a pretty significant enhancement to the app to do properly. I can't help you implement this, but I will provide some high-level guidance.

    Right now, your childwods datasource uses a where clause that uses a state variable. This isn't possible in most Maximo Mobile flows because we normally download these records via the navigator application which won't have this state variable set (since the state variable here is specific to the app, TECHMOBILE or your clone of TECHMOBILE). The forceReload() doesn't trigger an outbound request to the server normally in Maximo Mobile. forceReload will reload the data from the sqlite database typically, but if a datasource has never been loaded it would trigger it to make the outbound request then. Since you have not configured this datasource to offline-immediate-download, the very first time forceReload is called this will retrieve from the server but won't thereafter. You could use forceSync() instead which would trigger it to go to the server. Just be aware that it won't work offline and depending on your timeout settings, this could be disruptive to the user. For example, if it takes 4 minutes to download, your user is stuck waiting for 4 minutes since it is an await in your JavaScript method. There are no limits to the number of records returned and you need to wait for all records to be returned.

    If you don't care about offline access, and are on 9.0, I would consider using the mobile-server-search on the datasource instead. This triggers the Maximo mobile framework to automatically go to the server when a search is executed against the datasource. As soon as a new search is executed, it removes other records that had previously matched the search criteria. It limits the number of records returned based on the page-size of the datasource to avoid an undesirable situation where hundreds or thousands of records are returned, impacting the user experience. 



    ------------------------------
    Steven Shull
    ------------------------------



  • 4.  RE: MAS9 - Maximo Child Workorder

    Posted 2 days ago

    Hi, I get curious of why and of what UseCase/Story you are trying to solve?  If you are confident in that you are on correct path of solving the original case, I have no question to ask.  



    ------------------------------
    Mia ILKKO
    ------------------------------