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
------------------------------
Original Message:
Sent: Fri August 28, 2020 04:13 AM
From: Christopher Kung
Subject: Function to clear stuck COMP workorders
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
------------------------------
#AssetandFacilitiesManagement
#MaximoAnywhere
#Maximo