Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Duplicating a large WO hierarchy: Session times-out before the user can save

    Posted Wed April 14, 2021 01:41 PM
    Edited by System Admin Wed March 22, 2023 11:48 AM
    MAM 7.6.1.2:

    I have a parent WO with 2000 child WOs. I want to duplicate the WOs by using the Duplicate WO action.
    • I've noticed that the Duplicate WO action doesn't run behind the scenes (unlike the Generate WO action, which does run behind the scenes). The user needs to manually save the duplicated WOs once the operation is complete. Otherwise, the WOs will be lost.
    • The duplication action takes several hours to complete.

    Question:

    What happens if Maximo times-out before the process finishes (after 15 minutes of inactivity)? The user wouldn't have a chance to save the WOs and so the WOs would be lost. 
    • Sure, the user could open a new Maximo tab in the browser, and click around a bit, every 14 minutes, to prevent the other tab from timing-out. But that's not really practical to do over several hours while the user waits for the process to finish.

    Is there a more reasonable way to handle this scenario?

    Also, where are the un-saved records stored? In memory on the Maximo server? Or are they in a temporary table somewhere in the DB that can be queried?

    Thanks.


    #Maximo
    #AssetandFacilitiesManagement


  • 2.  RE: Duplicating a large WO hierarchy: Session times-out before the user can save

    Posted Wed April 14, 2021 02:04 PM
    Edited by System Admin Wed March 22, 2023 11:44 AM


  • 3.  RE: Duplicating a large WO hierarchy: Session times-out before the user can save

    Posted Thu April 15, 2021 08:57 AM
    Unsaved MBOs should be discarded after Maximo invalidates the user session. These objects are only in memory until the data is committed to the database which won't occur until the save. 

    I've never tried to duplicate WO hierarchies this large so I'm not surprised this doesn't work well given how much has to be duplicated on each WO in the hierarchy. I would probably look at creating an async job to do it (similar to how Generate WO in background) functions. I provided an example here: Working example of asynchronous automation script? (7.6.1.2) | Maximo (ibm.com)

    The one piece I don't know is if you can get away with just calling woMbo.duplicate() or if that only duplicates the one WO and you need to do something special to duplicate the entire hierarchy.

    The advantage to async job is cron tasks typically are isolated from the UI so you're less likely to impact users on your system. And this can take as long as it needs to work. I would suggest, however, isolating this from the rest of the async jobs with a new crontaskinstance to avoid other async jobs from waiting for this to complete.

    ------------------------------
    Steven Shull
    Director of Development
    Projetech Inc
    Cincinnati OH
    ------------------------------



  • 4.  RE: Duplicating a large WO hierarchy: Session times-out before the user can save

    Posted Thu April 15, 2021 10:24 AM
    Edited by System Admin Wed March 22, 2023 11:53 AM

    @Lacey Lurges : Just a head's up, here's another example where large WO hierarchies (for outdoor work) has​ issues.




  • 5.  RE: Duplicating a large WO hierarchy: Session times-out before the user can save

    Posted Thu April 15, 2021 10:29 AM
    In addition to what Steven provided about MBO creation in memory, this bring out a performance question:  How many JVM's and what size are they for the relative environment in which you are operating.  Additionally your Garbage collection policy on your application server, as well as server performance set up for you DB all come into play with this kind of activity.  How often are you doing this action? How many user are doing this action?  If quite often then as Steven said you should seriously consider an alternative method of invocation.

    By setting up a asynchronous cron job using his script example, you will gain the advantage of not having to make the user wait and tie up his ui, you will offload the process to a less used JVM (and hopefully see up performance for that reason too), and you can better optimize you overall system resources.  Depending on frequency and volume of invocation you may well end up resizing you environment to handle this activity.



    ------------------------------
    Bradley K. Downing , MBA
    IBM Certified Adv. Deployment Prof. Maximo v7.6.1
    IBM
    Bakersfield CA
    ------------------------------