April 27, 2012

Maximo 7.5 scripting guide

Scripting is a powerful new feature that was introduced in Maximo 7.5.
Checkout this hidden Scripting with Maximo guide from IBM lead developers.

A very comprehensive list of examples is available here.
My colleague Mathias has also a very interesting blog on scripting.

Other articles and resources


April 26, 2012

Maximo URLs

TPAE-based products like MAM, TAMIT, TSRM, CCMDB or SCCD provide a common way to open an application and perform some basic action like displaying a specific entry or performing a simple query. This can be very useful to integrate Maximo with other applications implementing navigation integration or launch in context.

The base URL has this syntax: http://[hostname]/maximo/ui/maximo.jsp?[arguments]
where:
  • hostname - Server's host name
  • arguments - A set of name-value pairs, similar to the HTTP GET request

In the arguments, you can define the following information:
  • Run an application - event=loadapp&value=[appname]
  • Login - login=true&username=[user]&password=[pwd]
  • Open a record - uniqueid=[uniqueidnumber]
    The unique ID is created using an identity column and is typically hidden. It contains an integer sequence with increasing value.
  • Open an application tab - tabid=[tabid] or changetab=[tabid]
    To determine the ID of a specific application tab, open the application in the Application Designer, and then open the Properties window for the tab. This parameter is used only when the search for a record yields exactly one response.
  • Force refresh - forcereload=true
    ensure that the page is refreshed on subsequent launch of the target page.
  • Perform an action - additionalevent=[action]
    Look at application sigotions for available values.
  • Perform a query using QBE - additionalevent=useqbe&additionaleventvalue=[qbe]
    The additional event value contains a list of attribute value pairs in the format of key1=value1|key2=value2...
  • Perform a query using a where clause - additionalevent=useqbe&additionaleventvalue=[qbe]
    The additional event value has the where clause of a valid SQL statement.
  • Use the new skin - skin=tivoli09
  • Use the old skin - skin=classic
Note: URLs must be properly escaped. For example the "=" character must be converted to "%3D" and spaces must be converted to "%20".


Examples

Here are some useful links (URL) that can be used to open Maximo UI and perform some action.

Move to home page
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=startcntr

Move to home page (with automatic login)
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=startcntr&login=true&username=maxadmin&password=maxadmin

Open ROLE application
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=role

Create a new PERSON record
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=person&additionalevent=insert

Create a new PERSON recor and populates some fields
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=person&additionalevent=insert&additionaleventvalue=firstname=Scott|lastname=Dickerson

Display an ASSET record using the UID of the record
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=asset&uniqueid=1152

Display a WORKORDER record using the WONUM of the record
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=wotrack&sqlwhere=WONUM%3D1000

Display a WORKORDER record using the WONUM of the record (using additionalevent)
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=wotrack&additionalevent=sqlwhere&additionaleventvalue=WONUM%3D'1000'

Display a WORKORDER record using the WONUM of the record (using QBE)
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=wotrack&additionalevent=useqbe&additionaleventvalue=wonum=1000

Display all work orders with status WAPPR
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=wotrack&additionalevent=sqlwhere&additionaleventvalue=status%20in%20('WAPPR')

Display a WO record AND call a Maximo Action
http://localhost/maximo/ui/maximo.jsp?event=loadapp&value=wotrack&uniqueid=133&additionalevent=viewcosts


April 25, 2012

Rotating and non-rotating assets in Maximo

In Maximo/TPAE applications assets can be either rotating or non-rotating. The difference between those two types of assets is sometimes not clear.

Rotating assets are assets that are interchangeable, such as motors, pumps, fire extinguishers, or PC monitors. Rotating assets have both a unique asset number and an inventory item number. The item number lets you track assets as a group as they are moved in and out of inventory and other types of locations, while the asset number is useful to track individual instances of the asset as it is moved from one location to another and from one site to another.
Non-rotating assets do not move in and out of storerooms. A non-rotating asset has a unique asset number, but does not have an item number because it is not tracked in inventory.


Rotating assets
  1. Rotating assets are assets that are interchangeable.
  2. Rotating assets have a unique asset number and an inventory item number; the item must be marked as rotating. Service Items cannot be marked as rotating; the items found in the Item Master or Tools application can be marked as rotating. Non-rotating assets do not reference an item number.
  3. Before you can create a record for a rotating asset, the rotating item record must first be created in the Item Master application.
  4. Rotating assets can be located in a storeroom, either an item storeroom or a tool storeroom.
  5. Rotating assets can also exist in labor and courier locations where these have been set up to maintain a balance of an item. Non-rotating and rotating assets can exist in Operating Locations, Vendor, Salvage, and Repair Locations.
  6. Rotating assets can have an Item Assembly Structure (IAS) applied. The IAS can be considered as a template for a hierarchy of assets, saving time when creating many similar asset hierarchies.
  7. The classification of a rotating asset is determined from its rotating item. If the attribute values are updated on the rotating item, they are also changed on all rotating assets that belong to this rotating item.
  8. During the receiving process rotating assets have to be given an asset number.
Example of a rotating asset

A company might have four identical (same make, same model) centrifugal pumps, so all four pumps would have the same item number. To track the use, the repairs, and the locations of each individual pump, each pump has its own, unique asset number.


Non-rotating assets
  1. Non-rotating assets can be purchased, received, and issued directly to the person who requisitioned the item.
  2. Non-rotating assets are not associated to an Item.
  3. Non-rotating assets do not have to share a common classification.

April 24, 2012

WebSphere plugin password expire April 26 2012

Remember that tomorrow your Maximo servers may face this critical issue: WebSphere plugin-key.kdb password to expire on April 26, 2012.
This is the procedure to fix the problem.

April 18, 2012

How to schedule a CSV/XML file export through MIF

This entry is part of the Maximo Integration Framework series.

In standard Maximo/TPAE there is no way to schedule the invocation of an outbound interface in order to periodically export a CSV or XML file at a specific interval. This can be accomplished with a little custom Java class. I have used the Java code described in this post as a starting point to develop my own generic procedure. In this example I will show how periodically export in a CSV file all the assets that contains the word 'pump' in the description. The procedure can be adapted to periodically invoke any Publish Channel you like.

Java CronTask setup
First of all you need to compile the Java class that implements the custom crontask. If you are not a Java guru, don't worry. Here is the class file already compiled for you. To deploy it on your Maximo server you must copy the RunPublishChannelCrontask.class to SMP\maximo\applications\maximo\businessobjects\classes\custom\integration\cron directory, rebuild and redeploy the Maximo EAR file. Restart the application server and login as maxadmin on Maximo UI.

MIF Configuration
Create an Integration Object Structure MYASSET and add the ASSET object as source.

Remember to select 'Support Flat Structure' if you need CSV export.

Now create the Publish Channel MYASSETS.

Create an External System (or reuse your own) and add the MYASSETS Publish Channel to it.

Enable publish channel and test that everything is ok using the 'Data Export' button. A CSV file should appear in few minutes in your MIF output folder (see mxe.int.globaldir system property). If you have problems check the JMS queues, JMSQSEQCONSUMER crontask and anything that may block the publish channel functionality.

Cron Task Configuration
If everything is ok it's now time to schedule the invocation of the Publish Channel. Go to System Configuration - Platform Configuration - Cron Task Setup and create the crontask instance setting custom.integration.cron.RunPublishChannelCrontask in the Class field.


Activate and reload the crontask instance with the Action - Reload Request command.
You should now see a new CSV file published every 2 minutes in the MIF output folder.

April 14, 2012

Maximo location types

Locations are places where assets are stored. Locations are typically the places where assets operate, but include any building, place, or other areas that contain assets, where maintenance work might be performed.
A Maximo Location stores aggregated data of all events and costs performed within that Location. This includes the movement of assets into and out of the location, as well as the use of labor and materials charged to that location.

Location types

  • Operating - Locations where assets operate. Assets are moved between Operating Locations. Assets are issued or returned between Storerooms and Operating Locations.
  • Storeroom - Locations where inventory is maintained. Items are issued or returned to and from a Storeroom Location. Items are transferred between Storerooms.
  • Vendor - Used to record that an asset is off-site with external vendor usually for repairing.
  • Salvage - Used to record the end-of-life for an asset. They are usually created with the labels like "Scrapped", "Sold", "Destroyed", and "End-of-lease"
  • Repair - Used to record that an asset is being repaired internally or at an on-site workshop by trade staff.
  • Courier - Used to record that the asset is in transit to another location by using a courier company, where it will be received at its destination. The destination might be another storeroom or another vendor.
  • Labor - Used to record that the asset is in transit to another location by using a labor (normally a staff member), where it will be received at its destination. The destination might be another storeroom or another vendor. Alternatively it might a location used to record all company issued items or tools under the care of that labor, and when the labor has finished with the asset, it can then be returned to the storeroom.
  • Holding - Used as part of the rotating item receiving process as a temporary storeroom while the item gets either inspected and/or turned in an asset by using serialization. There can only be one per Maximo site, and while in this location it does not count towards a storeroom's balance nor does it incur any cost until the inspection/serialization process is complete.

April 13, 2012

Effective approach on maintenance KPIs and metrics

Do you want to learn more about maintenance performance monitoring?
Check out Jason's new post on Tivoli User Community: First things first for Maximo KPI's and Metrics
 

April 12, 2012

How to delete a Maximo application

Maximo does not allow to delete applications from the Application Designer. However, there is a trick well hidden in the Application Developer Guide to accomplish this task using a SQL client. Note that only user defined application should be deleted. Out-of-the-box applications can be hidden using the standard Maximo security mechanism.

It is better to backup the Maximo database and shut down the application server before proceeding.
To delete an application, open a database editor and complete the following steps:
  1. Open an SQL client and connect to MAXIMO database.
  2. Type the following commands, replacing the variable with the name of the application you want to delete. Enter the application name in all uppercase. For example, if the name of the application you want to delete is TEST, replace APPNAME with TEST in all the commands.
delete from maxapps where app='APPNAME';
delete from maxpresentation where app='APPNAME';
delete from sigoption where app='APPNAME';
delete from applicationauth where app='APPNAME';
delete from maxlabels where app='APPNAME';
delete from maxmenu where moduleapp='APPNAME' and menutype!='Module';
delete from maxmenu where elementtype='APP' and keyvalue='APPNAME';
delete from appdoctype where app= 'APPNAME';

Remember to commit the transactions.
When using this procedure I discovered that there are other two tables that must be cleaned.
delete from sigoptflag where app='APPNAME';
delete from wfapptoolbar where appname='APPNAME';