Maximo

 View Only
  • 1.  Product.xml - Removing OOB class from an attribute

    Posted Tue May 10, 2022 06:47 PM
    Hi guys,

    Environment: Maximo 7.6.1.2

    I have a number of java customizations that I documented using a product.xml file. See articles 
    Extending Maximo using Java Classes - Product XML and Extension Settings
    Customizations with Add-on products 

    I also removed an OOB class from one of the attributes (INVUSELINE.ISSUETO, trying to make it a free text field).
    How do I document this change so when I run updateDB.bat utility the OOB class is not restored?

    Much appreciate your help!

    Regards,
    Alexey


    ------------------------------
    Alexey Potanin
    ------------------------------


  • 2.  RE: Product.xml - Removing OOB class from an attribute

    Posted Tue May 10, 2022 07:03 PM

    If you are removing a class you can do that through the DBC script associated with the product.xml, something like the following, which will remove the class from the INVUSELINE .ISSUETO when you run the updatedb.bat / sh.

     

    I did not test this specific script so  you may need to adjust it.

     

    <?xml version="1.0" encoding="UTF-8"?>

    <script author="Alexey Potanin" scriptname="V1000_01">

        <description>Add Barcode Printing configurations.</description>

        <statements>     

          <modify_table name="INVUSELINE">

                <attrdef attribute="ISSUETO" classname="" />

            </modify_table>

        </statements>

    </script>

     

     

     

    Jason VenHuizen

     

    +1-206-669-6430 | sharptree.io

     






  • 3.  RE: Product.xml - Removing OOB class from an attribute

    Posted Wed May 11, 2022 08:41 AM
    First a disclaimer: Removing classes isn't supported and you are likely to cause issues by doing this. The proper way to do this would be to add a new field and don't utilize the ISSUETO if you want it to be free text. 

    If you're set on doing this, be aware that DBC files won't work for this type of change. DBC files are designed to run once when you define a product XML. We keep track of your version and run all the scripts required to get to the latest version. That means we'll run this script only once. Classes for the out of the box attributes are stored in a classnames.dat file in the tools\maximo\en\script and get applied when you run updatedb. So this class will be added back every time you run updatedb. This file is also updated on releases so if you removed the class reference here today it would get added back when you apply a patch. 

    If you absolutely decide to go with this approach, I'd just add it to your SOP to remove the class on every maintenance window.

    ------------------------------
    Steven Shull
    ------------------------------



  • 4.  RE: Product.xml - Removing OOB class from an attribute

    Posted Tue May 17, 2022 04:36 AM
    Thank you @Steven Shull. Very insightful!
    Agree on the custom java class as a preferred method.​

    And "Classes for the out of the box attributes are stored in a classnames.dat file in the tools\maximo\en\script and get applied when you run updatedb. So this class will be added back every time you run updatedb." goes into my knowledge base!

    ------------------------------
    Alexey Potanin
    ------------------------------



  • 5.  RE: Product.xml - Removing OOB class from an attribute

    Posted Tue May 10, 2022 07:07 PM

    Blatant self-promotion, but if you are interested in using the product.xml and DBC scripts to manage your configurations, you might want to check out the blog I wrote on migrating screen changes with the mxdiff utility.

     

    https://www.sharptree.io/blog/2022/2022-03-29-mxdiff/

     

    The resulting mxs files can be used in the just like DBC scripts, which is pretty cool. 

     

    A project that uses this can be found here.

     

    https://github.com/sharptree/zebra-label

     

    Cheers,

    Jason

     

     

    Jason VenHuizen

     

    +1-206-669-6430 | sharptree.io

     






  • 6.  RE: Product.xml - Removing OOB class from an attribute

    Posted Wed May 11, 2022 12:48 AM
    Thank you @Jason VenHuizen.
    How did you know that the customization for Anywhere solution? :)​

    ------------------------------
    Alexey Potanin
    ------------------------------