Hello,
I just figured out one work around to make this work.
1) Create an automation script on the
"DOWNTIMEREPORT.ISRUNNING" attribute:
-----------------------Script---------------------------
importPackage(Packages.psdi.mbo);
importPackage(Packages.psdi.server);
importPackage(Packages.psdi.util);
importPackage(Packages.psdi.app.asset);
if (!interactive)
{
operational = mbo.getInt("OPERATIONAL");
changedate =
mbo.getDate("STATUSCHANGEDATE");;
code = mbo.getString("STATUSCHANGECODE");
assetmbo = mbo.getAssetMbo();
assetmbo.recordAssetStatusChange(mbo.getOwner(),changedate,code,operational==1);
}
----------------------- End Script---------------------------
2- Create an object structure (WO_DWNTIME) with
"WORKORDER" as main object and "DOWNTIMEREPORT" as child
object
3- Make the POST request:
Post: http://maximo_server/meaweb/os/WO_DWNTIME
Content-Type: application/xml
----------------------- xml body---------------------------
<SyncWO_DWNTIME
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.ibm.com/maximo">
<WO_DWNTIMESet>
<WORKORDER
action="AddChange">
<WORKORDERID>workorder_id</WORKORDERID>
<SITEID>site</SITEID>
<WONUM>wonum</WONUM>
<DOWNTIMEREPORT
action="Add">
<SITEID>site</SITEID>
<ASSETNUM>asset_num</ASSETNUM>
<ISDOWNTIMEREPORT>0</ISDOWNTIMEREPORT>
<STATUSCHANGEDATE>2020-10-19T17:30:00</STATUSCHANGEDATE>
<STARTDATESOURCE>REPORTDATE</STARTDATESOURCE>
<STATUSCHANGECODE></STATUSCHANGECODE>
<OPERATIONAL>1</OPERATIONAL>
<ISRUNNING>1</ISRUNNING>
</DOWNTIMEREPORT>
</WORKORDER>
</WO_DWNTIMESet>
</SyncWO_DWNTIME>
I hope this can help someone else.
BR
#AssetandFacilitiesManagement#Support#SupportMigration#Maximo