Avoiding recursion filter on Publish Channel

The standard way to send a message from Maximo to an external system is by setting up a Publish Channel and enabling Event Listener. By default, Integration Framework doesn’t re-publish a change if it comes from another inbound interface to prevent recursion on a bi-directional interface. Although I don’t agree with this logic as one-way integration is much more common, but anyway, IBM said it is easy to override that by extending the Event Filter javaclass.

The problem is, with the rise of automation script, no one wants java customization anymore. Of course, for massive systems where performance is critical, it is still the best choice. But, for most medium-sized clients I work with, they’re all moving away from java customization.

Anyway, an approach we can deal with this is not to use Event Listener at all. Instead, we can trigger a publish from an Object Save launch point from automation script using the example python code below:

from psdi.iface.mic import PublishChannelCache
PublishChannelCache.getInstance().getPublishChannel("PUBLISH_CHANNEL_NAME>").publish(mbo, True)
 

 Happy coding!


Check Network/Firewall Status using PowerShell

Working with Maximo, we have to deal with network/firewall all the time. I can spend a whole day telling you fun stories (or extremely frustrating experience) I had with IT/Network guys. But that's not the point. If you end up here, I guess you're having an issue with firewall. So below is a quick recap of my tricks:

- Ping: the first thing we try when we want to see if a server is accessible from our current machine. But don't jump to a conclusion too early if it shows the server is unreachable. Sometimes, the Network Admin has disabled ping response to enhance security. 

- Telnet: to check if a port is opened, we can use telnet from Windows Command console (e.g. telnet google.com 80). If it can be connected, means the target server is accessible on the specified port. But if it doesn't, first, make sure the server is listening on that port, before jumping to a conclusion that it's a Firewall issue. I made this mistake a few times, blaming the network, then it turned out it's Websphere/Maximo service is not running on the port that I assumed it should be running on

- PowerShell: in many cases, the server is not connected to the Internet, and Telnet is not installed, (and yes, you don't have permission to install new software either). We can use PowerShell to check network connectivity using the two commands below:

$connection = New-Object System.Net.Sockets.TcpClient("google.com", 80)
Write-Host $connection.Connected

The first line will return some errors if it cannot connect to the server, like the screenshot below: 


 If the server is accessible via the provided IP and port, the 2nd line will return the status = Connected




Common use cases for EAM mobile solutions

In some organisations, when starting a mobile project, the stakeholders may not have prior experience with mobility solutions for EAM, as such, we are sometimes asked to implement features that do not add value to the business. As consultants, it is satisfying to see something we implement being used and helps the end-users on the field. And nothing can be more frustrating than spending time building features that are not going to be used. In this post, I will list out based on my experience some commonly used and not used functions of a mobile app:

Work Execution: despite its name is Asset Management software, 80% of activities in Maximo happen around the work management process. It is not a surprise work execution is the number one use-case for a mobile app. However, work management is a big process with several major stages and many different activities. Only certain activities need to be recorded in the field with a mobile device. Below are some common ones:


A case for EzMaxMobile

I spend a large portion of my time working with mobile solutions, but I haven’t talked much on this topic. In this post, I will give a bit of praise to EzMaxMobile.

Why should you listen to me: I know a bit about mobile solutions for Maximo. I’ve done several (failed) pilots with the Maximo mobile suite (of the olden days). I’ve built a mobile app which is pretty successful and is being used by some large Oil & Gas operators. I have a bit of experience on a few small Anywhere projects, with Datasplice, and a few smaller home-grown apps.

Why shouldn’t you listen to me: the settings and the level of my involvement for each of the above projects/deployments are vastly different, as such, my opinion on this matter is heavily biased (toward EzMaxMobile).



String Concatenation in WebMethods

Manipulating string is probably the most frequent operation we need to do when transforming data. Thus, I’d like to talk a bit about string concatenation in WebMethods. The most basic way to add two strings is to use the pub.string.concat service in the WmPublic package as shown below:

Image 01. pub.string.concat service

Play around with Map control in Cognos Analytics

There’s been quite a bit of talk recently on the web about the new partnership with MapBox to deliver new map capabilities to Cognos Analytics (and there isn’t much talk about the discontinuation of support for ArcGIS in this new version). I decided to spend a bit more time to learn about the map functionality in this new Cognos version. The best way to get to know something is by doing it. So I cooked up some “real” requirements and tried to build a few dashboards.

The first one, I like to see whether a change in average temperature will affect the number of calls to fix break/leak issues related to water supply piping system, and whether a change in average rainfall will affect number of calls related to sewage/drainage systems. The data should be broken down to suburb and post-code level. Below is what I got:

For the second one, I like to compare the average planned vs actual labour hours spent on maintenance work, and the amount of time field workers spent to get to work location vs the amount of time spent on doing actual maintenance work. The purpose is to see whether there is a difference in remote areas and if it affects planned vs actual ratio. Below is what I got:

Overall, I am impressed with the ease of use, the responsiveness, and the level of interactivity of this new Map control in Dashboard. However, through this exercise, I found there are quite a number of limitations to this new map control:

  • This map control is only available in Dashboard. With Report, and Active Report, a different version of Mapbox control, and older map controls are available. However, they are both a lot less interactive and much more limited in functionality.
  • It only supports X/Y coordinates, thus, if your data is easting/northing, it needs to be converted to X/Y coordinates first.
  • For high-lighting map regions, Australian Postcode is supported and is the lowest level of detail. High-lighting suburbs is not supported, the lowest level of detail is council/city regions and the region names must match with the Mapbox pre-defined list. Thus, some level of data cleansing must be done if the region names in your data doesn't match exactly with the city/region name in this list.
  • It is possible to upload custom maps to MapBox to achieve more refined areas, however, there was an issue with MapBox changing the way to manage Layout ID. The issue is only corrected with newer versions of Cognos (from 11.1.x). Thus, this custom map function doesn’t work with older versions (including v11.0.11 which is bundled with Maximo)


Implement If-Then-Else Logic in WebMethods

Conditional Logic is the most important building block of any software development tool. WebMethods is not a programming language, but since we use it to build integration interface, which is also software, it means we are also programming with it. Writing a simple “If-Then-Else” condition in WebMethod is way too verbose to me though. The official tutorial on SoftwareAG teaches us to implement an if-then-else logic using the BranchSequence, and Map nodes as depicted in the sample below:


My failed attempt to get Maximo to work with Azure SQL database

Recently, I started playing with Azure by attempting to migrate a Maximo instance from my local VM to Azure platform. Although the attempt was a success. I didn’t realize SQL Server and Azure SQL are different databases (or more correctly, two different versions). There were a few issues during the process, but I figured out how to work around them and got Maximo running on Azure VM and Azure SQL. After sharing the result on LinkedIn, there were some comments that Maximo couldn’t be installed on Azure SQL and IBM doesn’t support it, so I spent a bit more time digging and thought I should share the details and some of my opinions on this matter.

First, let us be clear, Azure is a big cloud platform which offers many different services. I’m not a cloud expert, but from what I understand, we are talking about two main services:


Framework Manager crashes when creating Project

I tried to create a new Framework Manager project to build a package which I will join some big Maximo tables (Assets, Workorder etc.) with some general geo/demographical data I pulled from the Web. Framework Manager kept crashing with this annoying error. After some quick search on the web, I realized the issue with FM crashing is not uncommon, and there can be a thousand reasons for that. To be honest, from the perspective of a software developer, most of these are simple and stupid exceptions which should be caught or fixed easily by the Cognos R&D team. Good software should give the end-users useful error messages about what they did wrong. But anyway, this is not another post to complain, just a quick note on another crash scenario so you can avoid:


Display password stored in System Properties


I had to look at an existing interface in production which sends data to an external system. The interface is working well but we don’t have any documentation. I like to use POSTMAN to send some test requests to figure out how the API works. Unfortunately, the API password is kept in a System Properties and is masked and encrypted.


Mess around with Azure: Migrate Maximo to Cloud


Last week, while attending a call to discuss an integration interface between Maximo and an Azure SQL database, the other consultant mentioned a few Azure terms like “blob storage”; I realized I didn’t know anything about Azure despite the fact that the cloud platform has been adopted by the large number of the clients I work with. So today, I decided I should play around a bit with it by trying to migrate a Maximo instance from my local VM to Azure.

Before I go into the technical details, for those of you non-technical readers, I like to sum up the whole experience I had with this platform in one word: magical. That’s it, I went to the website, signed up for a trial account, followed some wizards or clicked on a few buttons or menus that I think were features I need, and boom, I got a running Maximo instance on the cloud in just a few hours. No training, no muss, no fuss, everything just works. Not much else to say. I’m in love now. I think will spend the next couple of weeks, months or even years to learn more about Microsoft stuff.

Convert Australian GDA94 Easting/Northing values to Latitude/Longitude in SQL Server

As I play around with the Cognos Analytics map controls, it appears to me it only understands Latitude/Longitude values, but the sample dataset I have is in UTM format. So, I have to find ways to convert Easting/Northing values to Lat/Long. Since I use SQL Server, attempting to create a column in "Geometry" data type from Easting/Northing value, then convert it to a "Geography" data type (Lat/Long) does not seem to work for me.

After some scrambling on the web, the below SQL Functions seem to work for me to convert Easting/Northing values (on the Australian GDA94, Zone 56 standard). The key to get it to work is setting the correct datum details in the constant section. A quick test of this function does seem to give me the correct Lat/Long coordinates of Sydney Habour Bridge:

A sample point from latlong.net


My top 3 beginner gotchas with Cognos 11


Working with Maximo, perhaps we all have the same frustration with the constant changes by IBM marketing team who work hard and are very successfully in their attempt to confuse us. The most visible problem is the continuous changes to their website which essentially breaks any links from external sources pointing to their KB pages which are more than a few years old. When I started with Cognos, I realized they have brought it (the confusion part) to the next level with this product. Below are the top 3 gotchas that I had to learn the hard way when I started with this product:

Gotcha #1: Cognos Business Intelligence vs Cognos Analytics
From Version 11, IBM started calling it Cognos Analytics. Previous versions were called Cognos Business Intelligence. This does not seem like a big problem when scratching the surface. But as a beginner, I was totally lost when searching for technical information from the web. Initially, when I read something that mentions Cognos BI or Cognos Analytics, to me it meant the same thing “Cognos”. In many cases, I didn’t realize, when talking about changing behaviors or different functionalities, if people mentioned something is available in Cognos Analytics or something is not possible in Cognos BI, they were talking about different versions. I learned this the hard way and thought how much trouble it could have saved me if I knew about this sooner.


BMXAA4017E Error when running custom code


I went in to help this client fixing a few issues in Maximo. There were some pieces of buggy Java code, so I took the opportunities to remove those Java customization and rewrite them with autoscript. One piece of code worked well in DEV but when rolled out to PROD, it did not seem to work. It is triggered by user’s Save event, but executed at "post commit", thus does not give any error on UI. In the log file, it shows error BMXAA4017E “object cannot be saved with the data that was provided” from the mbo.checkQualifiedRestriction method:



Setup Cognos 11 to send email with Gmail (2020)



When I tried to to setup Cognos 11 to send notification via Gmail, it failed because Google blocked access from Unsecured App. Even if I tried to turn off this option and tried again, it still failed because Google automatically turns this setting off again. So I had to create an App Password for my Gmail account to make it works following the steps below:

Step 1: Configure Gmail account
  • Log in to my Gmail account, go to “Manage your Google Account page”, then go to “Security” section
  • Enable 2-Step Verification
  • Once 2-Step Verification is enabled, the App Passwords option will be visible under the 2-Step verification option




Troubleshooting Maximo JVM Out-of-Memory error with Heap Analyzer


Occasionally, Maximo became unavailable for a short period of 5-10 minutes. Alarms were raised, IT help desk was called, and the issue got escalated to the Maximo specialist (you). You logged into the server, checked the log file, and found a Java Out-of-Memory (OOM) issue. Not a big deal, the server usually restarted itself and became available soon after that. You reported back to the business and closed the issue. Does that scenario sound familiar to you?

If such an issue has only occurred to your system once, it was probably treated as a simple problem. But since you had to search for a solution on the web and ended up here, reading this article, probably it has occurred more than once, the business requires it to be treated as a critical incident. As the Maximo specialist, you’ll need to dig deeper to report the root cause of the issue and provide a fix to prevent it from occurring again. Analyzing low level Java issue is not an easy task, and this post describes my process to deal with this issue.