Intro

Maximo, a comprehensive asset management system from IBM, allows users to manage their assets, work orders, and maintenance operations. One powerful feature of Maximo is the ability to use automation scripts to customize the system to meet specific business needs. In this article, we will discuss the best practices for using Maximo automation scripts, the importance of using proper validation and access checks, and alternative methods for achieving similar goals.

Overwriting Maximo Business Logic with MboConstants

When working with automation scripts and Java code written for Maximo, a wide range of MboConstants can be used to control how the script interacts with Maximo's business logic. It is crucial to choose the right constants for your code to ensure it works correctly and does not compromise the system's integrity. Approach each use case with the least intrusive MboConstants that work for the situation.   

For example, the NOVALIDATION_AND_NOACTION or 9L constant represents no validation and no action, meaning the script will not trigger any additional automation or check the entered values. While this may be useful in some cases, it can lead to undesired results or even break Maximo's business logic. A more appropriate constant for most situations is NOVALIDATION or 1L, which allows the script to run without validating the data that is being set or suppressing other MBO logic.

Commonly Used MboConstants

All available constants can be found in the Java Docs: https://ibm.ent.box.com/v/maximojavadocs 

Different Ways to Utilize MboConstants 

There are a few ways to reference the MboConstants. IBM code often uses a long value like “2L,” which can be difficult to read unless you have the reference table memorized. Using the written-out constant value greatly increases readability. You can either do this by importing the MboConstants class or by referencing the MBO. In the examples below, the NOACCESSCHECK is set in three different ways.

No Constant

        mbo.setValue("DESCRIPTION","Test Value")

Value MboConstants

        mbo.setValue("DESCRIPTION","Test Value",2L)

Importing MboConstants class

        from psdi.mbo import MboConstants

        mbo.setValue("DESCRIPTION","Test Value",MboConstants.NOACCESSCHECK)

MBO to Pull MboConstants

        mbo.setValue("DESCRIPTION","Test Value",mbo.NOACCESSCHECK)

Bonus: Combining Constants with Java Pipe

mbo.setValue("DESCRIPTION","Test Value",mbo.NOACCESSCHECK|mbo.NOVALIDATION)

Maximize Your EAM ROI with World-Class Maximo Expertise

Unleash the Full Power of Your Maximo Journey

You’ve taken the first step by diving into our blog—now let Naviam’s unparalleled team of seasoned Maximo SMEs turn insight into impact. With the deepest bench of IBM Maximo experts on the planet, we deliver tailored strategies, proven best practices, and hands-on support that drive efficiency, uptime, and long-term growth. Whether you’re just getting started or aiming to optimize a mature deployment, we’re here to architect and execute a roadmap as unique as your business.

What you'll gain:

  • Proven Cloud Leadership: Delivering IBM Maximo in the cloud since 1999—longer than anyone else on earth.

  • Global Presence: Nearly 400 dedicated professionals spanning 14 countries, ready to support your EAM needs.

  • World-Class Products: Comprehensive Mobile, GIS, Operations, and Data & Reporting solutions to power every aspect of your program.

Schedule your free discovery call
×

ActiveG, BPD Zenith, EAM Swiss, InterPro Solutions, Lexco, Peacock Engineering, Projetech, Sharptree, and ZNAPZ have united under one brand: Naviam.

You’ll be redirected to the most relevant page at Naviam.io in a few seconds — or you can go now.

Read Press Release