October 27, 2010

Add description field in the Unit of Measure lookup

By default Maximo 6 does not show the units of measure description in the lookup dialog.
To add this column you must edit the LOOKUPS.xml system configuration file.
Open th Maximo Application Designer: Go To > Configuration > Application Designer
In the dropdown box select 'Export System XML'.
Select the LOOKUPS entry and save the resulting xml file.
Locate the 'measureunit' table and add the description attribute. You will have something like this.

<table id="measureunit" inputmode="readonly" selectmode="single">
<tablebody id="measureunit_lookup_tablebody" filterexpanded="true" filterable="true" displayrowsperpage="20">
  <tablecol id="measureunit_lookup_tablebody_col_1" dataattribute="MEASUREUNITID" mxevent_desc="Go To %1" mxevent="selectrecord" sortable="true" type="link" /> 
  <tablecol id="measureunit_lookup_tablebody_col_2" dataattribute="ABBREVIATION" mxevent_desc="Go To %1" mxevent="selectrecord" sortable="true" type="link" /> 
  <tablecol id="measureunit_lookup_tablebody_col_desc" dataattribute="DESCRIPTION" mxevent_desc="Go To %1" mxevent="selectrecord" sortable="true" type="link" /> 
  <tablecol id="measureunit_lookup_tablebody_col_3" dataattribute="siteid" mxevent_desc="" mxevent="selectrecord" sortable="true" type="link" /> 

Import back the LOOKUPS.xml file as you would normally do to import an application definition using the Import Application Definition icon.

October 11, 2010

Editing 'Go To' menu

Maximo 6 and 7 do not provide a mean to create groups in the 'Go To' menu or to move applications from one menu to another. I this article I describe a procedure to edit the Maximo 'Go To' menu.
WARNING: I strongly suggest to backup your database before making these changes.

Where and how information are stored

Maximo 'Go To' menu structure and information are stored into MAXMENU table. To understand how this information is structured you can execute the following database query and compare the results with the actual content of the Go To menu.
select * from MAXMENU
where menutype = 'MODULE'
order by position, subposition

You will see that some entries in the table do not show up in the menu. This is because the visible field is set to 0 (hidden) or because the application specified in the KEYVALUE field does not exists.
A simple list of menus is also stored in the MAXMODULES table.
select * from MAXMODULES

Create a menu group

Calculate group position (GROUP_POS)

Using the following query identify the maximum value of the POSITION column:
select max(position) from MAXMENU where menutype = 'MODULE'

The returned value is typically around 4200. Add some hundreds to this to get a suitable value for the GROUP_POS needed later. Setting GROUP_POS=8000 is a safe value.

Calculate menu id (GROUP_ID)

Using the following query identify the maximum value of the MAXMENUID column:
select max(maxmenuid) from MAXMENU

The returned value is typically around 10000. Add some thousands to this to get a suitable value for the GROUP_ID needed later. Setting GROUP_ID=20000 is a safe value.

Identify menu icon (ICON_FILE)

Menu groups have an associated icon. Available icons are in the following folder: Maximo\applications\maximo\maximouiweb\webmodule\webclient\images. It must be a 16x16 GIF icon.

Create menu group

Choose a suitable name (GROUP_NAME) and description (GROUP_DESC) for your group and execute the following SQL statement.
insert into MAXMENU (
values (
  1, '[ICON_FILE]', [GROUP_ID])

Insert the menu in the MAXMODULES table.
insert into MAXMODULES (
values (
  '[GROUP_NAME]', '[GROUP_DESC]', 50)

Restart Maximo application.

Move applications in a different menu

Identify the application that must be moved using the following query:
select * from MAXMENU
where menutype = 'MODULE' order by position, subposition

The ELEMENTTYPE field should be ‘APP’.
Check the selection with a query like this:
select * from MAXMENU
where elementtype='APP' and keyvalue='[APP_NAME]';

Only one row with your application must be returned.
Find a suitable position id (APP_POS) and change the select statement into an update in the following way:
update MAXMENU set position=[APP_POS]
where elementtype='APP' and keyvalue='[APP_NAME]'

Restart Maximo application.

September 30, 2010

Quick Maximo Development Environment Setup

This entry is part of the Maximo Java Development series.

This is the quickest and simplest procedure that I know to setup an Eclipse environment to develop Java customizations for IBM Maximo products.

Eclipse Installation

The first step is to install Eclipse on the development system.
Download Eclipse 3.5 from Eclipse website.
Extract the downloaded zip file into a local folder (e.g. C:\Eclipse).

Java Runtime Environment

Eclipse requires a Java VM to run. If you try to launch Eclipse (C:\Eclipse\eclipse.exe) and you don't have a suitable JVM installed you will get the following error.

The best approach is to use the Java Virtual Machine (JVM) embedded in the application server in which Maximo runs. This ensures that you are using the right version of JRE.
The JRE must be copied into C:\Eclipse\jre. For WebShpere application server it is located in [WebSphere]\AppServer\java\jre folder.
After this, try to execute C:\Eclipse\eclipse.exe to ensure that everything is ok.

Configuring Eclipse for Maximo development

The right Java compiler must be selected:
  • Maximo 6: Java 1.4
  • Maximo 7: Java 1.5
  • Maximo 7.5: Java 1.6
Set it in Eclipse preferences: Windows > Preferences > Java > Compiler > Compile compliance level.

Project Setup

Create an empty Java project.

Extract [SMPDIR]\maximo\deployment\default\maximo.ear into a folder named maximo in your workspace.
Refresh project tree in Eclipse (F5).

Add the following jars to the project classpath: Project > Properties > Java Build Path > Libraries > Add Jars.
  • maximo/lib/*.jar
  • maximo/businessobjects.jar

Create a class named AssetCust in src\custom\app\asset (package custom.app.asset) and paste the following code into it.

package custom.app.asset;

import java.rmi.RemoteException;

import psdi.app.asset.Asset;
import psdi.mbo.MboSet;
import psdi.util.MXException;

public class AssetCust extends Asset {

  public AssetCust(MboSet ms) throws MXException, RemoteException {

  public void save()throws MXException, RemoteException {
    int id = getInt("ASSETID");
    String desc = getString("DESCRIPTION");
    System.out.println("Saving Asset ID=" + id + " desc=" + desc);

The custom Mbo class gets quickly compiled and is ready to be deployed on your Maximo server.

AppBean development

If you need to develop application customization you need to add some more libraries to your project classpath.
The first one is the j2ee.jar file which can be found in [SMPDIR]\maximo\applications\maximo\lib folder.
The second library must be built manually. If you go in the folder where you extracted the maximo.ear file, you will see a maximouiweb.war file. Extract this file (it is a zip file) to a directory named maximouiweb. Refresh project tree in Eclipse (F5) and include maximouiweb.war\WEB-INF\classes class folder to your classpath.

August 17, 2010

Fix Maximo 6 UI problem with Microsoft Explorer 8

With latest versions of Internet Explorer have problems when trying to open sub-menus under the Go To main menu. This problem seriously affects Maximo's UI navigation.
The support for Microsoft Explorer 8 has been included in the IBM Maximo 6.2.5 FixPack

If you cannot apply the entire FixPack in your environment you can apply few small changes to a Javascript file to fix the IE8 issue.

  1. Backup the original menus.js file located in [maximo_home]/applications/maximo/maximouiweb/webmodule/webclient/javascript
  2. Replace the setPopLocation function in the script with the one reported below and save menus.js file.
  3. If you are using WebSphere application server you also need to replace the menus.js file located under [WebSphere]\AppServer\profiles\[profilename]\installedApps\[CellName]\MAXIMO.ear\maximouiweb.war\webclient\javascript
  4. Clean the local cache of your Microsoft Internet Explorer: Tools - Delete Browsing History... - Temporary Internet Files.
  5. Refresh the page and... enjoy Maximo on IE8!

Code to be updated in menus.js file

function setPopLocation(popObj)
  var opener = popObj.openermenu;
  hrequired = parseInt(document.body.clientWidth-2) - parseInt(popObj.offsetWidth)-10;
  vrequired = parseInt(document.body.clientHeight-2) - parseInt(popObj.offsetHeight) + document.body.scrollTop;
  if(menuX >= hrequired)
      menuX= menuX-opener.clientWidth-popObj.clientWidth;
      menuX= hrequired;


  if(menuY > vrequired)
    tempTop = menuY - popObj.offsetHeight + 16;
    cName = popObj.className;
    if(tempTop<5 && cName.indexOf("menu")>=0)
      menuY = tempTop;


Reference links

August 12, 2010

Maximo and Asset Management self-education resources

Having a technical backgound, my first attempt was to try to dive in the product and look at it with a bottom-up approach. After few days installing, configuring and playing with some Maximo product i found myself lost and decided to step back in my chair and take some time to study some ITSM (IT service management), AM (Asset Management) and Maximo stuff from a higher level.

The IBM Tivoli Information Center is a good source of information but I think it is not the right place to start. IBM Redbooks have a more tutorial style so are more approriate for me. Searching for the word 'Maximo' i found several books. Here are the query results.

Among them I have selected the Certification Study Guide Series: IBM Maximo Asset Management V7.1. It may be boring but it is very useful to understand the asset management business and have an overview of Maximo features.

August 6, 2010

Welcome to IBM Maximo Customization and Development Blog

Welcome to my new blog. I work for IBM since 2000 and I recently joined the IBM Tivoli Advanced Technology Group. My primary focus will be on customization and integration of IBM Maximo products.
During my first days of self-study I'm feeling excited about the new challenge but I often loose myself in tons of product documentation. In many cases i have tried to search on the web to solve specific problems and I seldom found answers to my questions. That's why I decided to create my blog to discuss and share IBM Maximo features, customization and development topics that I'm going to tackle in the next years.
The first topics will be about learning resources and tips I discovered to speed up my knowledge of Maximo. I few months I plan to be able to share advanced customization and development techniques.
So... lets start.