Blog
How to execute an Oracle stored procedure from Java code
This is a working Java method that can be used to execute an Oracle stored procedure. It can be linked to standard Mbo methods, application beans, actions, toolbar buttons, etc. public int callOracleProcedure(String procName, int arg1) throws MXException, RemoteException{ int ret; logger.info("Calling " + procName + "(" + arg1 + ")"); MXServer mxServer = MXServer.getMXServer(); UserInfo userInfo = mxServer.getSystemUserInfo(); Connection dbConnection = mxServer.getDBManager().getConnection(userInfo.getConnectionKey()); try { CallableStatement cs = dbConnection.prepareCall("{call " + procName + "(?)}"); cs.setInt(1, arg1); ret = cs.executeUpdate(); } catch (SQLException e) { logger.error("SQL Error", e); throw new MXApplicationException("Error in procedure " + procName, e.getMessage()); } finally { mxServer.getDBManager().freeConnection(userInfo.getConnectionKey()); } return ret;}
August 4, 2011
How to enable doclinks in a custom Maximo application
Here is an example of how to add the attachment capability to the organizations (MULTISITE) application. Add the ‘attachment’ control to the MULTISITE application using the Application Designer. Then add the DOCLINKS relationship to the ORGANIZATIONS object as shown in the following picture. Please check the ‘Where Clause’ statement and modify it to match your application. The where clause must be: ownertable=’[MAIN_APP_OBJECT]’ and ownerid=:[OBJECT_ID] The [MAIN_APP_OBJECT] can be retrieved in the Application Designer and the [OBJECT_ID] can be determined through the ‘Indexes’ tab in the Database Configuration looking for the unique/internal index. Note that this database change does not require to run dbconfig.
April 5, 2011
How to schedule Preventive Maintenance at the first working day of each month
During one of my consultancies I was asked how it is possible to remind one person to produce a report each month. They want to generate the PM application to generate a work order for the first working day of each month. This can be achieved with a tricky use of a ‘Time Based Frequency’ and ‘Seasonal Dates’ settings. First you need to create a PM entry and set a frequency that is more than one week and less than one month. 20 days is a good choice. Leave the ‘Use Last WO’s Start Information to Calculate Next Due Frequency’ option checked.
April 4, 2011
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.
October 27, 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.
October 11, 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.s
September 30, 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. Backup the original menus.js file located in [maximo_home]/applications/maximo/maximouiweb/webmodule/webclient/javascript
August 17, 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.
August 6, 2010