Maximo

Maximo

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

 View Only
  • 1.  Function to clear stuck COMP workorders

    Posted Fri August 28, 2020 04:13 AM
    Always had this issue appear on different versions of Anywhere and different clients.

    Is there a way we could just write a javascript to remove these records from the mobile devices?

    Sometimes adding a worklog clears them off  but not always.

    ------------------------------
    Christopher Kung
    ------------------------------



    #Maximo
    #MaximoAnywhere
    #AssetandFacilitiesManagement


  • 2.  RE: Function to clear stuck COMP workorders

    Posted Tue September 01, 2020 07:53 PM
    Edited by System Admin Tue August 22, 2023 04:43 PM
    Christopher,

    The primary driver for "stuck" COMP work orders is when users, other than the one on whose device the WO is stuck, get in and make a status change on the workorder.  The user for whom the WO gets "stuck" usually has a WOSTATUS record which needs to go up to core. It cannot send it because core Maximo already has a COMP status transaction so the WO in question is "orphaned".  This is a human problem.  As you know on core Maximo there is nothing preventing a different user from the one who is "working" the WO, from going in and making a status change.  When this happens during a current session, the core Maximo user will get a record re-fetch error, and they cannot submit certain transactions until they re-fetch the record.  This follows the mantra "last in wins".

    With this understanding you should encourage your client's users NOT to work on other's work orders.  That said, there are certain use cases where multiple users are indeed working the same work order at the same time. In those scenarios assignments work best.  Even then, the users need to be educated NOT to change status on the work order.  Common thing to do is to disable the "Complete" button on the Work Order Timer related Labor Transaction view (view id="WorkExecution.StopWorkView"), or to modify it to a synonym of INPRG signifying that a particular piece of work was complete, but still allowing others to submit work and "complete" their portion.

    The technical challenge here is any given device (JSON instance) has no idea how many other "copies" of the work order have been downloaded to other devices.  As such, there is no mechanism designed, which could (in an offline manner,) go and interrogate all other devices to see if that given work order was on any other device. So, it is difficult to conceive of a tool which could find out if any other device ( which may or may not be offline at any moment) may or may not have downloaded "my" work order.  

    Thinking about it another way, the mechanism we would have to conceive of, would need to send some message to the server, (before it sends its own transactions) which would then be sent to all other devices to see if that work order was on any other device and interrogate the following a) status on the WO on said devices, b) any impending transactions in the given status for the given WO, and c) any intended further action by the user on that device. Then, the mechanism would have to sort through all that and order it and then process any transactions (in date time order) and then and only then send a single COMP status transaction.  

    Whew that's a LOT of programming.  Just not economical or practical.  Better thing to do is get on the radio.... "Hey Joe? You done yet?" then process the transaction.

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



  • 3.  RE: Function to clear stuck COMP workorders

    Posted Wed September 02, 2020 12:38 AM
    Hi Christpher,

    I am in complete agreement with Bradley Downing that ' this is a human and process error' and that resolving this would require some thinking and logic to be written.
    Yet, I think as a short development activity below are my thoughts on dealing with this issue:

    1.  Create a Synonym value for In-progress where you can work out all the possible scenarios. So, All the mobile users use that synonym value to remove the work order from their assignment queue i.e. they change the status of the Work Order to say "FIELDCOMP". Of course, this does not solve the issue. Now, create a logic in Maximo to skip Work Order status change request if the status change change request is same as the current status but accept all the other updates to the work order( this will require some thinking). This will make sure that work Order status change is done only once and users' assignment is cleared.
    2. You can also customize the work order status change request in the Anywhere app and wrap it with a sync promise request to Maximo which will run a logic to send update of work order status record in the success promise response or skip status change in error promise response. I would try this option.
    3. There is one other thing which you can explore is the work order edit mode. I am not sure if it can be called from anywhere request but if it can called from Anywhere( if not an RFE to IBM would be  good idea). This is enable users to move a particular work order into EDIT MODE in that particular session and there by not allow anyone else to edit. But, this will work only in the online mode. Also, I think it will be a very complicated solution.

    I hope this helps!

    ------------------------------
    Biplab Choudhury
    Maximo Consultant
    Tata Consultancy Services
    Melbourne
    ------------------------------