Hello Ahmed.
In general, if the status on the WO (or PO, or etc) is not shown in history, it is because WORKORDER.STATUS was set to that value instead of woMbo.changeStatus() being called to do that job. Scripts can call woMbo.setValue() on status. Integration can allow values for STATUS without requiring STATUSIFACE to be set. Workflow can use SETVALUE action on STATUS. This method for WOSTATUS getting out of sync with WORKORDER is the most common.
However, in your screenshots, you point out WOSTATUS (also known as work order status history) suggesting a work order was close but the status being something else. I have never seen something write to WOSTATUS and forget to update WORKORDER, so I think what you are seeing is another instance of WORKORDER.STATUS being updated directly instead of by a call to changeStatus() (or invoking a CHANGESTATUS action from workflow / escalation or by setting STATUSIFACE during integration). I think the WO made it to CLOSE legitimately (e.g. via changeStatus()), but then was set to "INPRG" illegitimately.
You said in response to other comments that you use workflow to change status. So, check for the places in workflow where status gets changed and make sure it gets changed by an Action of Type = Change Status and not Type = Set Value. And make sure status change is never attempted if :historyflag = 1. If you are trying status changes when historyflag is set, it means your work orders are going to CLOSE or CAN (i.e. history) too fast and need to stay in COMP for longer.
------------------------------
Blessings,
Jason Uppenborn
Sr. Technical Maximo Consultant
Cohesive
------------------------------
Original Message:
Sent: Tue April 18, 2023 07:01 AM
From: Ahmed Waguei
Subject: workorder.status different from last line in wostatus.status
Hello everyone,
We're facing an unusual issue. From time to time, we notice that the status in workorder do not match the last one in the table wostatus for the same workorder.
The standard workorder workflow is : WAPPR > WAPPR1,2,3,4,5 > APPR > INPRG > COMP > CLOSE
We can also go to CAN from all of the previsous statuses (except COMP and CLOSE) or go back to WAPPR when in WAPPRx, APPR and INPRG.
For instance, we have a workorder which went through the statuses: WAPPR > WAPPR1 > APPR > INPRG > COMP > CLOSE
But in wostatus, the last status recorded is COMP. No sign of CLOSE.
In other time, you have a workorder.status = INPRG while the last wostatus.status = CLOSE
or workorder.status = CAN while the last wostatus.status = INPRG.
Please find attached another example.
It seems like some changes in workorder.status/workorder.statusdate are not recorded in wostatus.status/wostatus.changedate and vice versa.
This is happenning for any kind of worktype, woclass, child workorder, status, ...
We're running on Maximo 7.6.1.2 with Transportation and we also custom the java code.
Do you have any clue where this might come from or what we can check?
Also if you need additional information, please let me know.
Thanks for you time. Regards.
------------------------------
Regards, Francesco
------------------------------