Skip to content

Blog



Share this:

Reset the value of a field when another field is modified

This entry is part of the Maximo Java Development series. Today I want to share with you some Java sample code to reset the value of a field when another field is modified. In the example below I have implemented a little piece of logic to reset the WORKORDER.SUPEVISOR field when the WORKORDER.OWNERGROUP is modified. Here is the Java code. package cust.psdi.app.workorder;import psdi.mbo.*;import psdi.util.*;import java.rmi.*;/** * Custom field class to reset the supervisor when the Owner Group is changed */public class FldWOOwnerGroup extends psdi.app.workorder.FldWOOwnerGroup{ public FldWOOwnerGroup(MboValue mbv) throws MXException { super(mbv); } public void action() throws MXException, RemoteException { if (!getMboValue().isNull() && !getMboValue().equals(getMboValue().getPreviousValue())) { getMboValue("SUPERVISOR").setValueNull(NOACCESSCHECK|NOVALIDATION_AND_NOACTION); } super.action(); }} Deploy the FldWOOwnerGroup.class file in your Maximo source tree and attach it on WORKORDER.OWNERGROUP field using the Database Configuration application.

Read more →

October 26, 2012

How to create Maximo demo database (MAXDEMO)

The Maximo contains an extremely useful command to create a demo database filled with a sample data. This can be really helpful when learning haw Maximo works. Tho create the demo database perform these steps. Stop the application server (MXServer) Open a command prompt Move to:[SMP_DIR]\maximo\tools\maximo Issue the following command: maxinst -s[INDEXTABLESPACE] -t[DATATABLESPACE] By default both tablespaces are equals to MAXDATA so the following command should work. maxinst -sMAXDATA -tMAXDATA To create an empty databasse add the -imaximo parameter.

Read more →

October 19, 2012

IBM's mobile solutions for Maximo

This article is outdated! IBM Anywhere is now available. In several forums and groups I have recently seen, there is some confusion around the current IBM’s mobile solutions for Maximo so I will try to give my personal view on this hot topic. Before going on keep in mind that this analysis is updated to the current situation as of October 2012 and may become outdated in few months. Overview

Read more →

October 19, 2012

Custom condition Java class

Sometimes standard Conditional Expressions are not enough. Sometimes the logic to implement is too complex to be implemented using an SQL expression. In such cases Maximo allows to implement the condition logic in a custom condition class using Java. To implement a condition class you must extend psdi.common.condition.CustomCondition and override evaluateCondition and toWhereClause methods. Here is a sample class. public class IsIssueProblem implements CustomCondition{ public boolean evaluateCondition(MboRemote mbo, Object obj) throws MXException, RemoteException { if (mbo.getString("ISSUETYPE").equalsIgnoreCase("PROBLEM")) { return false; } else { return false; } } public String toWhereClause(Object obj, MboSetRemote mbs) throws MXException, RemoteException { // ensure this method is not called by throwing an Exception throw new MXApplicationException("", ""); }} The provided snippet works for all Conditional Expression usages except for QUALIFIED security restrictions. In this cases you have to implement the toWhereClause method to return a valid SQL clause.

Read more →

October 18, 2012

Find large Maximo tables on DB2

I this article I have explained how to list the larger database tables and indexes on Oracle. On DB2 you can use the following one. SELECT name, card, npages, fpages, stats_timeFROM sysibm.systablesWHERE creator = 'MAXIMO' AND type='T'ORDER BY card DESC; The returned columns are:

Read more →

October 17, 2012

How to change Maximo skin

As you probably know, in recent versions of Maximo IBM has introduced a new look of the user interface. The two available skins are called classic and tivoli09. The following screenshots show the two looks. Skin: classic Skin: tivoli09 The new skin is available starting from Maximo 7.1.1.5 although it may not be set as the default one. You can easily switch between the different skins in several ways described hereafter.

Read more →

October 14, 2012

How to display a YES/NO dialog and get user input

This entry is part of the Maximo Java Development series. In this little article I’m going to show how to display a dialog box with Yes/No or OK/Cancel buttons and how to capture the user’s input to execute some custom logic. For example, you have a Java method attached to a button on the toolbar or to an action menu entry as described in this article and you want to display a warning message asking for confirmation before executing some processing.

Read more →

October 11, 2012

Let's celebrate the 100th post!!!

MaximoDev has now reached 100 posts of useful tips, tutorials and small guides to help the Maximo technical community. After more than 2 years of MaximoDev activity, I have achieved an incredible success becoming the most followed and visited free and ads-free web site about IBM Maximo features, configuration, customization and development topics. To explain you the success of this blog I will show the historical trend of the website’s monthly page views.

Read more →

September 29, 2012

How to check for null values

This entry is part of the Maximo Java Development series. A very common doubt when extending MBOs is what value returns the Mbo.getString() method when the target field has a null value. The answer is: It returns an empty string “”. Thus to check if the DESCRIPTION of an Mbo is empty or null you can use two basic approaches. getString("DESCRIPTION").equals("") or

Read more →

September 27, 2012

What's new in Maximo Asset Management 7.5.0.3

Maximo Asset Management version 7.5.0.3 incorporates several new features, such as the ability to link Maximo Asset Management applications to external applications and the option to configure high availability for your environment. 7.5.0.3 also introduces email interaction, which enables a user to change the status of an object or workflow assignment by email. In addition to these enhancements, version 7.5.0.3 provides improved documentation in areas such as installation and automation scripting.

Read more →

September 26, 2012