Friday, 9 November 2018

Alternative procedure to migrate Maximo configurations - using MXDIFF,runscriptfile and MXAPPLY


Purpose: The purpose of this article is to explain the use of MXDIFF and MXAPPLY in Maximo.  These tools are very handy and you can migrate only the changes i.e. delta to other environments.

Example: You have a requirement to add a field “Require Permit” to work order object and include the field in Work Order application (WOTRACK.xml). And then apply the same to all environments.

Procedure:
Apply the configuration changes to dev
1.    In dev, initially, export wotrack.xml and save it to any folder for ex. C:\temp
2.    Add the field MC_PERMITREQ to WORKORDER object
3.    Add the field “Permit Required” to WOTRACK through application designer (or modify the wotrack.xml directly)
Prepare the migration package
1.    Export the modified version and rename as WOTRACK_MODIFED.xml. Save the modified file to C:\temp
2.    Now, we will create a transactions file which contains only the difference of the xmls.
3.    Open the CMD as administrator
CD to D:\IBM\SMP\maximo\tools\maximo\screen-upgrade
4.    Execute
mxdiff.bat –b”C:\temp\wotrack.xml" -m”C:\temp\wotrack.xml" -t"C:\temp\CHG1024_plusgwo.mxs"
-b : Original file
-m: modified file
-t: Transaction file which will contain the difference
5.    Next, we will create a dbc file to add, modify or delete attributes. Prepare a .dbc as explained in the link https://drive.google.com/file/d/1kIHrIv4wxY4MsVK7mpAiRtIvXAFLSFzR/view?usp=sharing

Apply the package
1.    In the destination environment, Copy the CHG1024.dbc to tools\maximo\en\script
2.    In the above path, MC is a custom folder to copy the customer’s .dbc files
3.    Open CMD as administrator and CD to <maximo_root>\tools\maximo\internal
4.    Execute runscriptfile.bat -f<script> [-c<subdirectory]
runscriptfile.bat –fCHG1024
runscriptfile.bat –fCHG1024_plusgwo_xml
5.    The attributes will be added to the object and wotrack.xml
6.    Turn admin mode on & off for the changes to be effective



Alternatively, use MXAPPLY to apply the xml differences (.mxs)
1.    Open the CMD as administrator
CD to D:\IBM\SMP\maximo\tools\maximo\screen-upgrade
2.    Execute
mxapply.bat -t\\dc2ap871\server1\dmnd0004124_plusgwo.mxs -pmaximo.properties