Thursday, 17 September 2015

MBO Date Formats

Sometimes we need to filter the MboSet records based on dates.
  • By using MXFormat.dateToSQLString(Date d) you can get the date format as "yyyy-MM-dd".

For example:
MboSetRemote mboSetRemote = getMboSet("ASSET");

Here MXFormat.dateToSQLString will return date as string and format is '2015-09-17' (with single quotes).

  • If your database is using different date format, then update it in system properties and use SQLFormat.getDateFunction(Date d)

For example:
MboSetRemote mboSetRemote = getMboSet("ASSET");

Here SQLFormat.getDateFunction will return date as string in two ways:

1. If is not null/blank then it will return string with given date format in this property.
for example: If is dd-MM-yyyy, then return string will be '17-09-2015' (with single quotes)
2. If is null/blank, then it will return same as MXFormat.dateToSQLString method, i.e. '2015-09-17' (with single quotes).

Hope it helps :)

Wednesday, 9 September 2015

BMXAA6002E - You cannot save object JOBPLAN : Job Plan=TESTJP1 Organization=ORG1 Site=SITE1 Revision=0 because of the data security restrictions. If you save the object, it becomes read-only and hidden

Error: BMXAA6002E - You cannot save object JOBPLAN : Job Plan=TESTJP1 Organization=ORG1 Site=SITE1 Revision=0 because of the data security restrictions. If you save the object, it becomes read-only and hidden

Environment: Maximo

Steps to reproduce above error:

1. Create a job plan and save it with DRAFT status.
2. Create a condition expression "status <> 'DRAFT'".
3. Create a global data restriction --> Object restriction --> Object JOBPLAN , app JOBPLAN , READONLY and add condition created in step 2.
4. Create a new user and associate a security group which has access job plan application (not maxadmin group).
5. Login with new user and go to job plans application.
6. Change status of job plan created in step 1 to ACTIVE and save the record.
7. Above error will occur.

Note: These steps will reproduce error in Maximo In Maximo 7.1, job plans are editable even status is ACTIVE. So above steps will not reproduce errors in Maximo 7.1.

Cause: Out of box Job plan mbo is flagged to readonly when status is ACTIVE or INACTIVE. In our case, condition again trying to flag it readonly for the same mbo, hence this error occurs.

Solution: No need to put condition for Job plan to make it READONLY when status is ACTIVE or INACTIVE.

These are just my findings, if anyone have different approach, please provide your inputs in comments.

Friday, 4 September 2015

Maximo restore database error in SQL Server

System.Data.SqlClient.SqlError: RESTORE cannot process database '<DbName>' because it is in use by this session. It is recommended that the master database be used when performing this operation.

While restoring database, faced above issue.

Even though all services stopped, still restore database given error that “Database is in use by this session”


Connect to Sql server management studio:

Expand Security à Login à Right click on “maximoà Click Properties

 Default database:” value = <your database name>. Change it to “master”.

Friday, 24 July 2015

Automation Script - Retrieve List

Sample code - Retrieve list event of attribute launch point in automation script:

In my example, I want to display only PR companies starting with "SK".

1. Created a table domain, TEST_COMP_SK
2. Create a attribute launch point and select option "Retrieve List".

Launch point name: TEST_PRVENDOR
Object: PR
Attribute: VENDOR

Script Language: jython

Source Code:

domainid = "TEST_COMP_SK"
listWhere = "COMPANY LIKE 'SK%'"
listOrder = "COMPANY"

Save the script.


Now you can test in PR application - Company lookup - It will display companies starting with SK and order by company name ascending.

Below information will give the list of implicit variables in Retrieve List event:

1. domainid - Specifies the domain that is used to provide the list of values that are shown for the attribute launch point.
2. listWhere - Establishes which set of result data is displayed and which filter is set before the results are shown. Set the listWhere variable to a WHERE clause that uses the related MBO.
3. listOrder - Set to any ORDER BY attribute names that are used to order the results of the retrieve list event.
4. relationObject - Applies to the related MBO that is searched from the current MBO.
5. relationWhere - Establishes the criteria that is used to perform the retrieve list event. Set to a WHERE clause that queries the related MBO.
6. srcKeys - Applies to the set of attribute names from the current MBO that is used to lookup a related record in another related or target MBO. For example, the set of attribute names from the current MBO might be used to look up that FAILURECODES field from the ASSET business object.
7. targetKeys - Applies to the set of attribute names in the target MBO that is looked up from the current MBO on which the attribute launch point is defined.
8. listErrorGroup - Identifies the group ID of the message that the user sees when the retrieve list event fails.
9. listErrorKey - Identifies the key ID of the message that the user sees when the retrieve list event fails.



Monday, 15 June 2015

Error: The mbo value info for atttribute AUTHALLGLS for object grpreassignauth could not be retrieved

One of my friend faced this issue. This error is little bit tricky, because there is no attribute called "AUTHALLGLS" exist in GRPREASSIGNAUTH table. But still maximo throws this error. And also error logs will not provide any detailed information. This error can find in system out log as a warning.

This error can occur while creating new security group or assigning security group to user.

Cause: Few security groups has granted access to create users.

Solution: Except for MAXADMIN security group, need to remove granted access to create users for other security groups.

I am providing this in my blog, just in case, if anyone faces this issue and not to waste their time to solve it.


Tuesday, 9 June 2015

Continous queue stopped processing records into queue.

While importing records into Maximo using continuous queue, after certain amount of errors (in my case, after every 10 errors) in message reprocessing application, continuous queue stopped working.

To solve this issue, I followed below steps:

1. Enable MDB bean for cqin err:

Take a backup of "ejb-jar.xml" from "<Drive>:\IBM\SMP\maximo\applications\maximo\mboejb\ejbmodule\META-INF"
Open the file from "ejb-jar.xml" in notepad++, search for "MEA MDB for error queue". Uncomment it.


<!-- MEA MDB for error queue


<!-- MEA MDB for error queue-->

Take a backup of "ibm-ejb-jar-bnd.xmi" from "<Drive>:\IBM\SMP\maximo\applications\maximo\mboejb\ejbmodule\META-INF"
Open the file from "ibm-ejb-jar-bnd.xmi" in notepad++, search for "MEA MDB for error queue". Uncomment it.

<!-- MEA MDB for error queue
  <ejbBindings xmi:type="ejbbnd:MessageDrivenBeanBinding" xmi:id="MessageDrivenBeanBinding_1" activationSpecJndiName="intjmsacterr">
    <enterpriseBean xmi:type="ejb:MessageDriven" href="META-INF/ejb-jar.xml#MessageDriven_JMSContQueueProcessor_2"/>
<!-- MEA MDB for error queue-->
  <ejbBindings xmi:type="ejbbnd:MessageDrivenBeanBinding" xmi:id="MessageDrivenBeanBinding_1" activationSpecJndiName="intjmsacterr">
    <enterpriseBean xmi:type="ejb:MessageDriven" href="META-INF/ejb-jar.xml#MessageDriven_JMSContQueueProcessor_2"/>

Rebuild and Redeploy maximo.

2. Login into Maximo:

Go to --> System Configuration--> Platform Configuration --> Select "Crontask setup" --> Search for "JMSQSEQCONSUMER" and open it.

Create a crontask instance of "CQINERR", Schedule "30s,*,*,*,*,*,*,*,*,*", Runas user "MAXADMIN".
 In parameters, Enter below values:
MESSAGEPROCESSOR = psdi.iface.jms.QueueToMaximoProcessor
QUEUENAME = psdi.iface.jms.QueueToMaximoProcessor

Activate the instance and save the crontask.

3. Change destination of errors in websphere:
Login into websphere.
In Left panel --> Expand "Service Integration" --> Click on "Buses" --> Right panel click on "intjmsbus"-->Under "Destination Resources" click on "Destinations" -->Click on CQINBD -->Under "Exception Destination" select "Specify"--> Enter the value CQINERRBD --> Click "Apply" --> Save it into master --> Click ok --> Save it into Master.
Note: No need to restart server.


Import 100 error records into any application and search in message processing that all 100 records exists in it. Earlier it was only 10 error records in my case, now it shows all 100 records.
In websphere, you can notice that all error records are moved into cqinerrbd destination.

I hope this article may help to some one who are new to maximo websphere process. As I suggest always, first try in development environments and also above mentioned parameters may differ based on environments.


BMXAA0667E - The value of the changed attribute could not be assigned.

Error: BMXAA0667E - The value of the changed attribute could not be assigned.

 I faced this error, when trying to update length of one field in INVENTORY table. The field which I am trying to update length is a same as object and same as attribute in INVVENDOR table. So I started investigating INVVENDOR table, then I found below cause.

In my environment, problem is, INVVENDOR has a audit table A_INVVENDOR, but audit enabled is unchecked.
While investigating, found that, audit table A_INVVENDOR details available in MAXATTRIBUTECFG and MAXATTRIBUTE tables, but A_INVVENDOR table itself not exist.

Note: Before doing below changes, make sure you have backup of database. And better try in your development environment first.


1. In database configuration, INVVENDOR table, make sure audit is disabled and audit table field is blank. In my case, audit enabled is false, but audit table field has value A_INVVENDOR. To remove, audit table field (it is read only), first check the check box of audit enabled, it makes audit table field editable. Now remove value of audit table field and uncheck audit enabled field. Save the record.

2. Apply configuration changes. It will remove A_INVVENDOR meta data available in MAXATTRIBUTECFG and MAXATTRIBUTE tables.

3. Now, change the length of the required field in INVENTORY table and save the record. Error will not occur.


Tuesday, 2 June 2015

Maximo attachments - doclinks

Step 1:
Create folder doclinks in your drive. And also create subfolders under doclinks --> "attachments", "images" and "diagrams".
Names of the folders are case sensitive.

Step 2:

1. Take a backup fo httpd.conf file from path <drive>\IBM\HTTPServer\conf
2. Open httpd.conf file from path <drive>\IBM\HTTPServer\conf
3. Find ‘DocumentRoot’ and change DocumentRoot "D:\doclinks"
4. Save and close the file.

Step 3:
Go to System properties application:
1. mxe.doclink.doctypes.defpath = D:\doclinks
2. mxe.doclink.path01 = D<PATH>\doclinks = http://<servername or IP>
3. mxe.doclink.doctypes.topLevelPaths = D:\doclinks
4. Rebuild and restart the server.

Step 4:
Login into Maximo.
Go to any application --> From select action menu click on "Manage folders"
Attachments = D:\doclinks\attachments
Images = D:\doclinks\images
Diagrams = D:\doclinks\diagrams

Step 5: Testing
Go to PR application --> Click new row and attach a document
Save it. Then click view attachments and click on the attached file. File will be opened.

Hope this topic will be helpful!! :)

Tuesday, 26 May 2015

Automation Script - get current date and time.

In automation script, there is no implicit variable available to get current date and time. I followed below procedure, to get current date and time to set date time field.

from java.util import Calendar

#Create a instance for Calendar
cal = Calendar.setInstance();

#Get Current date and time by using cal.getTime()
currentDateTime = cal.getTime();


if worktype="CM":
 tsd = currentDateTime

Hope it helps to someone who are new to set date time in automation script.


Friday, 22 May 2015

Route stops data loading

While loading route stops, make sure below fields are exist in your file:

ROUTESTOPID (This field is to provide sequence number of route stop for a respective route)

If those fields are not exist and trying to load route stops with locations, error will appear "XXXXX is not a valid location".

ROUTESTOPID will help to avoid routestop duplicates.
For example:

if you don't provide ROUTESTOPID, when doing routes data loading second time, it will add duplicate records.
Below format will create duplicate records in route stops:

PM Records data loading

While data loading PM records, make sure USEFREQUENCY = 1 for frequency based PMs.

Otherwise, problem is, even though you saved the record, it will ask again to save the pm record. PM Work orders will not generate.

Monday, 18 May 2015

Actions in Maximo Integration Framework

Add – Add records
AddChange – Add or update existing records
Change – Update existing records
Delete – Delete records
Replace – Substitute existing records
null – Add records or replace records depending on whether the primary record exists in the database.
  • If the primary record does NOT exist in the database, the system performs an Add action
  • If the primary record DOES exist in the database, the system performs a Replace action.

Friday, 8 May 2015

Maximo training videos

IBM Maximo Education Assistant:!/tivoli_iea/ 

Tuesday, 5 May 2015

Increase list of display applications in "My Recent Applications"

System properties has a property called "webclient.maxRecentApps".

Default value is 8.
Increase/decrease the value and save the record. Click on the 'Live Refresh' and click Ok.

The property will now be updated.

If you want to disable this option. Set value to 0 and save the record. Click on the 'Live Refresh' and click Ok.

Automation Script - get difference between dates

If you want to get a difference between two dates in Maximo automation scripts, I tried below process:

For example:
In Work Order, you want to find a days between Target Start Date and Target Finish Date.

Target Start Date is "01/Apr/2015"
Target Finish Date is "25/Apr/2015"
Difference from Target Start Date and Target Finish Date is 25

Lets see how to write automation script:


Varibles declared as:

tsd = Target Start Date
tfd = Target Finish Date
dayselapsed = CUSTOM_DAYSELAPSED (Custom attribute to set days - integer)

Script as follows:

#************** AUTO SCRIPT START ***************
#Define a function to get date difference
#************** FUNCTION START ***************
def getDateDiff(timeDiff):

#Seconds in Millis
 milliseconds = 1000

#Minutes in Millis
 milliminutes = milliseconds * 60

#Hours in Millis
 millihours = milliminutes * 60

#Days in Millis
 millidays = millihours * 24

#Get days diff
daysDiff = timeDiff / millidays

#Get hours diff
hoursDiff = timeDiff/millihours

#Get minutes diff
minDiff = timeDiff / milliminutes

#Return days difference
if(daysDiff != 0):
 return int(daysDiff)

#Return hours difference
if(hoursDiff != 0):
 return int(hoursDiff)

#Return minutes difference
if(minDiff != 0):
 return int(minDiff )

#************** FUNCTION END ***************

#Time difference between two dates
timeDiff = tsd.getTime() - tfd.getTime()
daysDiffernce = getDateDiff(timeDiff)
dayselapsed = daysDifference

#************** AUTO SCRIPT END ***************

For few developers, if above script confuses you, below script without comments, to return days difference:

#************** AUTO SCRIPT START ***************
#Define a function to get date difference
#************** FUNCTION START ***************

def getDateDiff(timeDiff):
 milliseconds = 1000
 milliminutes = milliseconds * 60
 millihours = milliminutes * 60
 millidays = millihours * 24

daysDiff = timeDiff / millidays
hoursDiff = timeDiff/millihours
minDiff = timeDiff / milliminutes

if(daysDiff != 0):
 return int(daysDiff)

#************** FUNCTION END ***************

timeDiff = tsd.getTime() - tfd.getTime()
daysDiffernce = getDateDiff(timeDiff)
dayselapsed = daysDifference

#************** AUTO SCRIPT END ***************


Automation script integer variables

When I started writing a auto script to copy one INTEGER value into another INTEGER value, I feel that it is very easy to do. Offcourse it is easy, except you are able to solve the below error:

java.lang.ClassCastException: java.math.BigInteger incompatible with java.lang.String

I will explain you in detail, when you will face this error

For example, in work order I would like to set wopriority and assetlocpriority based on work type.

Created a attribute launch point script.

Variables declared as follows:

object is WORKORDER

worktype = WORKTYPE

Script as follows:
#Script is for if work type is CM, then copy assetlocpriority to wopriority

if worktype == "CM":
 wp = alp

# Here you will get a error that
"java.lang.ClassCastException: java.math.BigInteger incompatible with java.lang.String"

This is because auto script considering these wp and alp as longs. I am not sure why it is like that and why it is throwing an error.
Hence I tried to print it.

print wp
#output is 2L
print alp
#output is 4L

From above output, I felt that, error is because of "L". Hence I tried to change to output without "L" like 2 and 4

So I did casting with integer like int(alp), it is printing output as "2" (without "L")

Corrected Script as follows:
#Script is for if work type is CM, then copy assetlocpriority to wopriority

if worktype == "CM":
 wp = int(alp)

Now it is working fine. No error.


Automation Script dates

To add DAYS to date:

For example, in Work Order we have target start date and target finish date:

now we will get the Target Start Date and Target Finish Date as variables tsd" and "tfd respectively.

In automation script, if we want to add two days to "Target Start Date" and copy it into "Target Finish Date"

# First import Calendar
from java.util import Calendar

#Create a Calendar instance
cal = Calendar.getInstance()

#Set calendar date as Target Start Date. Variable is defined in automation script as "tsd"


cal.add(cal.DATE, 2*7)

cal.add(cal.DATE, -2*7)




tfd = cal.getTime();


Maximo automation script mboset iteration

To iterate mboset records using automation script:

Usually we do below coding in java using Maximo API:

In the below example, taking PR as MboSet:

MboSetRemote prSet = MXServer.getMXServer().getMboSet("PR",MXServer.getMXServer().getSystemUserInfo());
prSet.setWhere("prnum = '"+<PRNUM>+"' and siteid = '"+<SITEID>+"'");

MboRemote pr = null;
int i = 0;

  while((pr=prSet.getMbo(i)) != null){
      pr.setValue("description","TEST PR");


Now we will do above logic in Automation Script:

from psdi.server import MXServer

mxServer = MXServer.getMXServer()

prSet = mxServer.getMboSet("PR",mxServer.getUserInfo())
prSet.setWhere("prnum = '"+<PRNUM>+"' and siteid = '"+<SITEID>+"'")

prRemote= prSet.moveFirst()
while prRemote:
 prRemote= prSet.moveNext()

Monday, 20 April 2015

Throw warning in Maximo Automation Script

To throw warning in automation script:

warning = MXApplicationException(msggroup, msgkey, msgparams);


Throw error in Maximo Automation script

In Maximo, all messages like errors, warnings and info are available in maxmessages table with msgkey and msggroup.

To throw an error in autoscript:


In case of parameters:

For example I have created an error message in maximo using database administration --> Messages

msggroup = TESTGRP
msgkey = TESTKEY
msgvalue = "This is a test message"

in automation script, it is easy to display error message by using below code:


in case of params:

For ex: my message value has : msgvalue = "This is a test message by {0}"



Maximo Automation Script - Create Action Launch Point

It is simple to create a action launch point.

In my case, I have created a sigoption in Purchase Order application.

1. Sigoption name is : CREATEPOEXT - by using app designer

In sigoption --> Advanced Signature Options --> select the radio button "This is an action that must be invoked by user in the UI"

Give the position in your select action menu in app designer.

Grant access to this sigoption in your security group applications.

2. Automation script

Go to System Configuration --> Platform Configuration --> Automation Script application
From list tab --> Select "Create" --> click on "Script with Action Launch Point"

Enter Launpoint name same as your sigoption created for your application:
Active: Yes
Object: PO
Note: Action name will auto generate same as launch point name.
Click next and enter your variables and automation script. Save the record. That's it.

3. Main point is, you don't have to create a Action separately in Actions applications.
for ex: Action "CREATEPOEXT" automatically created in Action applications.

Action will be created like below, in our case:

Object: PO
Type: Custom Class
Note: Above value is common class for all action launch point related actions.
In parameter, you noticed that there are three values. Let me explain what are they
1. Script name
2. Launch point name
3. Action name
in my case all names are "CREATEPOEXT"

So by any chance, if you miss any of those values in your "parameter" field of action, then it will throw error at the point of automation script execution.


Tuesday, 29 July 2014

Create multiple instances of Maximo

I found below link to create multiple instances of Maximo in websphere. We strongly recommend that this procedure be used only for educational and experimental environments and must not used in commercial situations.


We recommend this procedure be used only for educational and experimental environments. While you may find that you can satisfy Sarbanes-Oxley requirements for multiple environments this way, please don;t. Yes, this is a disclaimer. However, if you insist that you need a second environment and this your only way to go, here's a free, no mystery, step-by-step procedure. Do so at your own risk. Please remember that you didn't get this here.

The "How To" and "Start Here"

First, always create a backup copy of your Maximo production database. It is assumed you know how to do that, but if you don't, google for guide for backing up a DB2, SQL Server or an Oracle database and learn the procedure well. After you have created a backup, restore the database and name it MaxTest.

Log into the Websphere admin console. The default username is 'wasadmin'. Expand 'Servers' and click on 'Application Servers'. There you should find one instance called 'MXServer' which is the one you already installed. Click on 'New' to create a new app server. Enter 'MXTest' as your server name and hit 'Next'.

Accept the default template and check the box for 'Generate Unique Ports'. Finish and confirm your new app server. Finally save directly to your master configuration.

Click on the 'MXTest' app server. Under 'Server Infrastructure', expand 'Java and Process Management' and click on 'Process Definition'. Click on 'Java Virtual Machine' under the Additional Properties. Here you need to set the Initial Heap Size to 512 and the Maximum Heap Size to 1024.
Don't forget to save to master.

Now we need to know what our new application server is using for ports. Go back to your Application Server list and click on 'MXTest', expands 'Ports' and make note of the ports numbers for the four port names that begin with 'WC'. Take note of the port numbers, which should look like this:

Websphere ports 1
Websphere ports 1
Create a new virtual host. Expand 'Environment' in the left pane and click on 'Virtual Hosts'. Here you will see a list o ghosts such as maximo_host, admin_host, etc. Click on 'New' and name it 'maxtest_host' and click on Apply. Now click on 'Host Aliasses'. This list should be empty, and we will be creating 5 new aliases. Click on 'New' and accept the default port 80 and click 'Apply'. Next, create four more ports that look like the following:

Host aliases
Host aliases
Go to your Maximo installation directory, the default is "C:/ibm/SMP". Just beneath SMP you will find a directory named "maximo". Copy that entire directory and rename it 'maxtest'. We find this is a better choice than copying the entire ivm/SMP branch. This will not only save space, but will avoid confusion later on.

Next, navigate to the "C:/ibm/SMP/maxtest/applications/maximo/META-INF" folder and open the 'application.xml' file. Search for '<context-root>/maximo</contextroot>' and change it to '<context-root>/maxtest</context-root>'. This will be used in the url of reconnecting to your new instance. For example, the url for connecting to your  Maximo test application server will be

Go find and edit the same property in the 'deployment-application.xml' as well. Save both files.

Open your file at 'C:/ibm/SMP/maxtest/applications/maximo/properties'. Change the 'database' to the name of your newly created SQL Server database. The database property should
look something like this:


Also change the 'mxe.registry.port' property. Keep it simple, just add one to the existing value.

Finally, the last property to modify is ''. Change it to:{servername}:9081/meaweb/

Finally, rebuild and deploy your maximo ear fils for the newly created maxtest application server. Access your Maximo test environment at ''http://servername:9081/maxtest'

Copy Job plan description to PM generated Work Order

To copy Job Plan description to auto generated PM Work Order description, I have found below link from IBM website:

Source: IBM

Wednesday, 23 July 2014

Maximo database migration error

Below errors may occur while doing Maximo 7.5 SQL Server migration to DB2 by using maxinst.bat (to import .db2 file). 

Error: The row length of the table exceeded a limit of "32677" bytes.

Generated "db2demo.db2" file from unlvct.bat contains wrong lengths for few columns.

For example: MAXMESSAGES table has more columns which has varchar (2000). But create table script in db2demo.db2 file may contain varchar (4000). It means unlvct.bat file doubled the length of the column.

To resolve the issue open the .db2 file and modify a error table (not always MAXMESSAGES) to decrease the length half (from 4000 to 2000, some cases 2000 to 1000 or 8000 to 4000).

Error: "N.ROWSTAMP" is not valid in the context where it is used.

Generated "db2demo.db2" file from unlvct.bat contains trigger scripts for interface related tables. Just modify .db2 file to remove/comment all scripts related to interface tables triggers.

For example:
and also interface table related triggers. For instance, there was an existing interface table for PO called PO_IFACE. There must be a triggers in .db2 file, PO_IFACE_T and PO_IFACE_U. Just remove these trigger scripts in .db2 file.

Hope this article may help. Please correct me, if anything wrong.

BMXAA4076E - There was no value found for the system start date. The database load may not have completed successfully. Contact your system administrator to ensure that the database was installed properly.

BMXAA4076E - There was no value found for the system start date. The database load may not have completed successfully. Contact your system administrator to ensure that the database was installed properly.

This error will occur when maxinst.bat or configdb.bat or updatedb.bat file execution completed with errors.  Make sure all are executed successfully without any errors. Thereafter, there will be an entry in dummy_crypto column of dummy_table. Based on this crypto value "System Start Date" will generate by class (MXServer).

PM generating WO but not able to see record in Work Order Tracking application

We can generate a work order from PM application. Some times we can see the message that work order is generated, but not able to find that WO in work order tracking application.

Cause: When PM is created while admin mode is ON, it will create a PM record, but doesn't create a record in PMANCESTOR table. Such PM's doesn't generate work order and also it will not throw any error, just displays a message "PM **** generated work order ****".

Work Around: Identify the PM's which doesn't has entry in PMANCESTOR. Insert a record in PMANCESTOR from backend. Restart the server and generate a work order. It will successfully create a WO.

Solution: Before creating PM, make sure admin mode is OFF.

Thursday, 29 May 2014

Maximo: update table without rowstamp

In system properties, you can find property called "mxd.db.updateWithoutRowstamp". If this property is 1, then we can update table without rowstamp.

Usually interface tables doesn't have rowstamp. To update these kind of tables by using mbo customization, set this property to 1.

Wednesday, 28 May 2014

how to customise rich tooltips / record hovers

Please find the information by clicking below link - IBM site:

Thursday, 10 April 2014

Import classifications in Maximo 7.x

While importing classifications in Maximo 7.1 version, I was facing many problems like class structure is blank and hierarchal problems.

Firstly, my requirement is to load classifications with given hardcoded class structure id rather than auto generated integer number.

Secondly, need to import parent and child hierarchal structure.

1.       Duplicate MXCLASSIFICATION Object Structure and name it as per your requirement, remove the Inbound processing class.
2.       In ‘Restrict Attributes’ menu option, In the Source Object List, select CLASSSTRUCTURE
3.       Uncheck Restrict checkbox and check Override checkbox for below fields:
a.       Classstructureid
b.      Parent
4.     - Select Action > Exclude / Include Fields
5.     In the Source Object List, select CLASSSTRUCTURE
6.     In the Persistant Fields sub-tab, look for HASCHILDREN and UNCHECK the EXCLUDE checkBox. This will include the field in the schema.

Tuesday, 8 April 2014

Using discardable MBOs

Whenever we are going to get MboSet for traversing purpose, then it is better to make mbo set discardable.
By this, Mboset will not cache the MBOs as it fetches from directly from database. This will minimise the JVM memory usage.

Discardable Mbo Sets used for traversing forward only and not to be edited/saved. Discardable Mbo Sets are always read only.

Sample Code:

MboSetRemote poSet = getMboSet("PO");
poSet.setFlag(MboConstants.DISCARDABLE, true);

Disable Maximo 7.x login page autocomplete

Some times clients will ask not to store either user name or password in Maximo login page.

There are two ways to do disable auto complete:

1. By using IE settings. Hopefully every body aware about this. But this is applicable to entire Internet Explorer, irrespective of any login page.

2. Another way is by modifying Maximo login.jsp.

Source: IBM

1. Modify the login.jsp file and add autocomplete="off" to the input lines pointed by the arrow below. Login.jsp is usually located
at <MAXIMO_Root>\applications\maximo\maximouiweb\webmodule\webclient\login\ directory:

Existing login.jsp:

After changes:

2. Save the modified file.
3. Stop the MXServer
4. Rebuild maximo ear (make a backup of the existing maximo ear before rebuilding)
5. Deploy the new maximo ear
6. Start the MXServer
7. Clear the browser cache.

The auto-complete will be disabled. You will have to type in the username/password every time logging in to Maximo.

Sort maximo start centre inbox assignments

Sorting Maximo 7.x start center inbox assignments :

I used below logic to set order by to due date (Descending) on start centre inbox assignments.

Create a custom class and extend WFAssignmentSet. Write a code in getInboxAssignment() method.

Sample Code:

package test.workflow;

import java.rmi.RemoteException;

import psdi.mbo.MboServerInterface;
import psdi.util.MXException;
import psdi.workflow.WFAssignmentSet;
import psdi.workflow.WFAssignmentSetRemote;

public class TestWFAssignmentsSet extends WFAssignmentSet implements WFAssignmentSetRemote
     public TestWFAssignments(MboServerInterface ms) throws RemoteException {

public void getInboxAssignments() throws RemoteException, MXException
            setOrderBy(" DUEDATE desc");

Error deploying maximo.ear file in Websphere

A composition unit with name MAXIMO already exists. Select a different application name.
ADMA5011I: The cleanup of the temp directory for application MAXIMO is complete
ADMA5014E: The installation of application MAXIMO failed.

Delete caches in websphere:
1. Stop the maximo server
2. Go to services.msc  : stop ctgCellManager01 and node agent
3. Delete Maximo directory -- IF FOUND IN BELOW PATH:    
  • <Drive>:\IBM\WebSphere\AppServer\profiles\ctgDmgr01\config\cells\ctgCell01\blas
  • <Drive>:\IBM\WebSphere\AppServer\profiles\ctgDmgr01\config\cells\ctgCell01\cus
4. Delete maximo.ear -- IF FOUND IN BELOW PATH:
  • <Drive>:\IBM\WebSphere\AppServer\profiles\ctgAppSrv01\config\cells\ctgCell01\applications
  • <Drive>:\IBM\WebSphere\AppServer\profiles\ctgDmgr01\config\cells\ctgCell01\applications
5. Delete all files in the following directories:
  • <Drive>:\IBM\WebSphere\AppServer\profiles\ctgAppSrv01\temp
  • <Drive>:\IBM\WebSphere\AppServer\profiles\ctgAppSrv01\wstemp
  • <Drive>:\IBM\WebSphere\AppServer\profiles\ctgAppSrv01\config\temp
  • <Drive>:\IBM\WebSphere\AppServer\profiles\ctgDmgr01\temp
  • <Drive>:\IBM\WebSphere\AppServer\profiles\ctgDmgr01\wstemp
  • <Drive>:\IBM\WebSphere\AppServer\profiles\ctgDmgr01\config\temp
6. Start services. I think automatically server will start. So stop the server again.
7. Deploy maximo.ear file. After successful deployment, save the changes into master repository.
8. Start the maximo server.

Thursday, 18 July 2013

Restricting Synonym domain lookup values in List tab

This can be done by using Security Group data restrictions.

1) Create a condition as below:
Condition Name : TESTSTATUS
Condition expression is VALUE IN ('APPR','WAPPR','DRAFT') <Make sure there is no colon (:) in the expression and also no validation required>

2) Apply condition in Security group :
Select require security group and go to data restrictions tab.
Enter new row :
Application : <Application name>
Type : Qualified
Condition : TESTSTATUS
Reevaluate : Checked

Save the security group and signout & signin again.
Now you can able to see the only require statuses in List and Advanced Search Tab.

Note : 
1. In condition, make sure there will be no COLON ':' in condition expression. No validation require at condition.
2. By applying condition to SYNONYMDOMAIN at security group data restrictions, it will be applicable all synonymdomains for that application. Usually for any application, synonym domains values (not maxvalue) will be unique.

Increase a field value like workorder/jobplan taskid.

1. Create a seed name and seed interval in MAXVARS table.

For example : if you want as 10, 20, 30 40..etc
insert into MAXVARS (varname,varvalue,orgid,siteid,maxvarsid) values ('TESTSEED',10,NULL,'SITENAME',<MAXVARSID.NEXTVAL>);
insert into MAXVARS (varname,varvalue,orgid,siteid,maxvarsid) values ('TESTSEEDINTERVAL',10,NULL,'SITENAME',<MAXVARSID.NEXTVAL>);

For example : if you want as 5, 10, 15, 20..etc
insert into MAXVARS (varname,varvalue,orgid,siteid,maxvarsid) values ('TESTSEED',5,NULL,'SITENAME',<MAXVARSID.NEXTVAL>);
insert into MAXVARS (varname,varvalue,orgid,siteid,maxvarsid) values ('TESTSEEDINTERVAL',5,NULL,'SITENAME',<MAXVARSID.NEXTVAL>);

2. Write a mbo code to set value in 'TESTID' : <set default value of TESTID is 0>
Modify add() method of main MBO :

int testID = this.getInt("TESTID");
int newTestID = CommonUtil.getNextTaskID(testID, "TESTSEED", "TESTSEEDINTERVAL", getOrgSiteForMaxvar("TESTSEED"));

Hope it will be usefull. :)

Increase MAXSEQUENCE in SQL Server

Some times developers will insert records using sql script.

Oracle database : you can get sequenceid by using NEXTVAL.

SQL Server : There is no function called NEXTVAL. Below are the steps you can follow :


--Declare integer variable
declare @seqid int

--Update MAXSEQUENCE table by increasing MAXRESERVED value+1.
update [maxsequence] set [maxreserved] = [maxreserved]+1 where [tbname] = 'MAXATTRIBUTE' and [name] = 'MAXATTRIBUTEID'

--Get MAXRESERVED from MAXSEQUENCE table and Set to integer variable (in this case @seqid)
SET @seqid = (select maxreserved from maxsequence  where [tbname] = 'MAXATTRIBUTE' and [name] = 'MAXATTRIBUTEID')

--When inserting use @seqid at your sequenceid value. Below case, MAXATTRIBUTEID value replaced with @seqid.
( @seqid,<OBJECTNAME>,<ATTRIBUTENAME>,.........)

For multiple inserts, add 'update step' and 'set sequenceid in variable step' before every insert :

--Update MAXSEQUENCE table by increasing MAXRESERVED value+1.
update [maxsequence] set [maxreserved] = [maxreserved]+1 where [tbname] = '<OBJECTNAME>' and [name] = '<OBJECTSEQUENCEIDNAME>'

--Get MAXRESERVED from MAXSEQUENCE table and Set to integer variable (in this case @seqid)
SET @seqid = (select maxreserved from maxsequence  where [tbname] = '<OBJECTNAME>' and [name] = '<OBJECTSEQUENCEID NAME>')

 (OBJECTSEQID,,.................) VALUES
( @seqid,,.........)

Hope it will be useful. :)

Add default value to long description field.

It is same as assigning default values to other fields.

Go to Application Designer --> Select your application --> go to require section --> drag and drop default value control from control palette --> select control properties for default value :

Attribute : Click on lookup and select attribute as DESCRIPTION_LONGDESCRIPTION for your object.
Value : <Add your default text>
Default Type : Insert <this will work while inserting new record in your application>

Save the application designer and try to insert new record in your application. Long description field will display your default text value entered in VALUE field.

Hope it will be useful :)

Friday, 7 September 2012

Maximo 7: System properties objects/tables

System properties are storing in below objects:


1. MAXPROP: This object stores the header information of system property. "propname" is unique.
2. MAXPROPVALUE: This object stores the system property value. "propname" is unique.
3. MAXPROPINSTANCE: This object stores the information of instance properties.

Friday, 22 June 2012

BMXAA7136E - Validation failed when the database default values are set to the object during its creation.

Error: BMXAA7136E - Validation failed when the database default values are set to the object during its creation. BMXAA3097E - The person does not exist or is not active.


1. Verify if SR.REPORTEDBYID default value is &USERNAME&
2. if it exists, change it to &PERSONID&

Mostly this error will occur, when inserting new record into service requests application. If default value is set to &username&, it is trying to put login username into reportybyid field. Which is wrong. Reportbyid field is validating against Persons, not for user names.

Note: This error will occur, if userid and personid is not same.

Saturday, 26 May 2012

Change status of Inbound interface records using MIF

This article may be helpful to Maximo Integration developers.

There may be some cases where some application records maintains in both Maximo and external ERPs. Sometimes, statuses of those records get updated in external ERP and will send data to Maximo. In such cases, Maximo get data from inbound interfaces by using Maximo Integration Framework.

Lets take a example of Invoice application;
  1. Created a Invoice 'I1234'  with line times and status is 'ENTERED'.
  2. Sent Invoice record details to External ERP.
  3. External ERP changed status to 'APPR' and sent Invoice status details to Maximo.
  4. To receive status data from External ERP to Maximo, you must use 'STATUSIFACE' field of INVOICE object.
    1. It means, while creating object structure for inbound interfaces (enterprise services), add STATUSIFACE field of your main object.
    2. Object sturcture: TESTINVOCIE
    3. Object: INVOICE
    4. Exclude/Include fields option: exclude all fields which are not required and make sure STATUSIFACE field is not excluded.
    6. Inbound data will be : I1234,SITE01,APPR,0
    7. In enterprise services, Object processing rule, set STATUSIFACE = 1.
    8. Inbound data will change to : I1234,SITE01,APPR,1
    9. This will change the status of Invoie to APPR in Maximo.

Thursday, 5 April 2012

How to create field validation class which extends MAXTableDomain

1. Write a custom field validation class and extend MAXTableDomain. (import psdi.mbo.MAXTableDomain)
2. Create a constructor and set a relationship with Object (table name).
3. Set a list criteria in the constructor itself (where clause for the above object).
4. If you would like to filter with more where clauses then write a getList() method.
5. Associate this field validation class to attribute in DB Configuration. And make sure that domain is not associated to this attribute.
Sample Class:
public class CustomFeildClass extend MAXTableDomain

public CustomFeildClass (MboValue mbv) throws RemoteException

String thisAttrName = getMboValue().getAttributeName();
setRelationship("FAILURELIST","failurecode=:"+ thisAttrName)
// Note: Here FAILURELIST is a Object. Most of the developers will confuse that it is a relationship name.
setListCriteria("parent is null");
//Note: this sets a where condition for the above object.
public MboSetRemote getList() throws MXException, RemoteException
String additionalWhere ="orgid=:orgid";
//Note: this sets additional where conditional to display when user clicks on lookup.

Wednesday, 4 April 2012

How to create custom condition class

There are two types of Conditions in Condition Expression Manager:
1. Expression
2. Class

To use Type Class in Condition, need to create a custom condition class.
1. Create a custom condition class which implements CustomCondition interface.
public class ConditionClass implements CustomCondition {
public boolean evaluateCondition(MboRemote mbo, Object param)throws MXException, RemoteException
if(<business logic>)

<business logic>
return true;
<business logic>
return false
public String toWhereClause(Object parm, MboSetRemote msr)throws MXException, RemoteException

<business logic>
 return <sql>

2. CustomCondition interface have two methods:
a. evaluateCondition(MboRemote mbo, Object param): this method is used to evaluate condition and returns either true or false based on the business logic written in it. This return boolean value.
 b.toWhereClause(Object parm, MboSetRemote msr) : This method is used to return sql to the object which this condition is applied.This returns String.

Friday, 10 February 2012

Maximo jre versions

  1. Maximo 7.6 supports jre 1.7
  2. Maximo 7.5 supports jre 1.6
  3. Maximo 7.1.x supports jre 1.5
  4. Maximo 6.x supports jre 1.4
  5. Maximo 5.x supports jre 1.3

Setup Maximo in Eclipse

To create a Maximo environment in Eclipse, follow below steps

To create a Maximo Mbo classes in Eclipse:

1. Install Eclipse J2EE version.
2. Create a new Java project. (Eg. name: Maximo Mbo Classes)
3. Go to Java Build Path: click on Add external jars
4. Browse up to <maximoroot>/maximo/applications/maximo/lib and select all (ctrl+a)
5. click add/ok.
6. Click on add class folder and browser <maximoroot>/maximo/applications/maximo/businessobjects/classes and click ok.
7. Create a new package.
8. Create a new class and enter super class as any mbo (  (For e.g. public class Test extends PO )

To create a Maximo Bean classes in Eclipse:

1. Create a new Java project. (Eg. name: Maximo Bean Classes)
2. . Click on add class folder and browser <maximoroot>/maximo/applications/maximo/maximouiweb/web-inf/classes and click ok.

Creating a new Maximo Service

Upon Maximo start up all the services will initialize. These services are stored in MAXSERVICE table.

To create a new Service in Maximo 7.1, follow the steps

Step 1: Go to Database configuration --> List Tab
Step 2: Click on "Select Action Menu" and select "Services"
Step 3: A dialog box will open and display all the services.
Step 4: Click on New Row.
Step 5: Enter your service name and class name (service class) path.
Step 6: Enter id as 1000 or above and click ok.
Now new service is created.

Note: To create a Maximo custom service class you need to extend AppService class. If you want to use this service class methods in your mbo classes, you have to define your method as static.

Tuesday, 18 October 2011

How to make object readonly or editable by using maximo API coding?

To make Object Readonly: setFlag(7L,true);
To make Object Editable: setFlag(7L,false);

1.If object is readonly, can't make fields editable in that object.
2. If object is readonly, then make object editable using setFlag(7L,false);. Now all the fields will be editable, and make other fields readonly by using setFieldFlag("<attributename>",7L,true);

Tuesday, 4 October 2011

How to Initiate Work Flow in maximo 7 through coding?

Step 1: import psdi.server.MXServer;
            import psdi.workflow.WorkFlowServiceRemote;
Step 2: Now write the below code in your method:

                  MXServer mx = MXServer.getMXServer();
                  WorkFlowServiceRemote wfsr = (WorkFlowServiceRemote)mx.lookup("WORKFLOW");

                   RFQRemote  rfq = (RFQRemote)getMbo();
                   wfsr.initiateWorkFlow("<work flow name>",rfq);
              catch(Exception e)

Note: i) In the above sample code, I was initiated work flow of RFQ. So I used RFQRemote. Like that you can use your required application remote class. For example: If you want to initiate PO work flow, then you have to PORemote instead of RFQRemote.
          ii) initiateWorkFlow("<here you have to give WF name which you want to initiate>", <here you have to give MBO name, in the above example "rfq" is the instance of RFQRemote which is storing mbo of RFQ>);

How to add parameters in crontask (maximo 7)?

Step 1. import;
Step 2. import java.rmi.RemoteException;
Step 3:
public class CustomCronTask  extends SimpleCronTask{
 public CrontaskParamInfo[] getParameters() throws MXException,RemoteException
   CrontaskParamInfo parameters[] = new CrontaskParamInfo[2];
   parameters[0] = new CrontaskParamInfo();
   parameters[0].setName("Parameter 1");
   parameters[1] = new CrontaskParamInfo();
   parameters[1].setName("Parameter 2");
   return parameters;

Step 4: ***** This is very important *****
        i) If it is a new crontask, after creating an instance, parameters will display on the screen.
        ii) If you are adding parameters to the existing crontask, then you have to create a new crontaskinstance and save the record. Then parameters will display on the screen.

Wednesday, 14 September 2011

How to add warnings in Maximo 7.x ?

Below is the syntax to add warnings in maximo 7.x :
getThisMboSet()).addWarning(new MXApplicationException(msggroup, msgkey, params));

Tuesday, 13 September 2011

Where to find the JMS Queues in web sphere?

Path to find JMS Queues in websphere is : Buses > intjmsbus > Messaging engines > ctgNode01.MXServer-intjmsbus > Queue points > SQOUTBD@ctgNode01.MXServer-intjmsbus > Messages > File

Wednesday, 17 August 2011

How to make field readonly, required and set value null

By using maximo api we can make fields read-only, required and set values null to the attributes:

To make field Readonly: setFieldFlag("<attributename>",7L,true);
To make field Editable: setFieldFlag("<attributename>",7L,false);
To set value as null: setValueNull("<attributename>",2L);
To make field Required: setFieldFlag("<attributename>",8L,true);

Thursday, 21 July 2011

Default value in XML file

Syntax to give default value in xml file is:

<defaultvalue dataattribute="<Attribute name>" id="1234567" value="<enter the value>"/>

For example: Setting default value for PRIORITY as 2 while inserting new PM in Preventive Maintenance application.

<defaultvalue dataattribute="priority" id="1234567" value="2"/>

Duplicate Existing application in Maximo 7

Step 1: Go to "Application Designer" and select the existing application which needs to duplicate.
Step 2: Click on "Select Action" menu, then click on "Duplicate Application Definition".
Step 3: Dialog box will appear.
            Enter "Application" name (Valid characters are A through Z, 0 through 9, underscore(_), and $. First            character must be A through Z. Allowed only 10 characters.).
            Enter "Description" (Description will appear as application name in Maximo).
            "Main Object" is a read only and having object name same as existing application. It means, the data entered in new application will also store in the same object.
Step 4: Click on Save button on the Application designer.
Step 5: Go to "Security Group" application and select your group.
Step 6: Click on Applications tab and Select the newly created application.
Step 7: Grant access to the application.

Tuesday, 12 July 2011


I would like to post all the Maximo related information here, which is very usefull to technical and functional consultants.

Please feel free to raise a questions and also correct me if anything wrong in my blog.

Maximo Techie