Recently I got some time to explore the new Federated MBO
feature. I like it a lot because it is very simple to configure and quite
powerful. Of course, prior to Maximo 7.6, the same functionality can be done with
Java programming, but with this new feature, it is so easy to incorporate data
from external systems into Maximo business logic and make a seamless experience
to the end-users.
Basically, Federated MBO allows you to link API from an
external system and make it looks like a standard object in Maximo and treat it
like other standard Maximo objects such as displaying data on GUI or setting up
workflow conditions or writing automation script against it. The key difference
here is that data is not stored inside Maximo database but queried from the API
on-the-fly when the object is accessed.
I can immediately think of several applications that are
enabled by this feature:
- Integrate with Data Historian, SCADA, or external sensors to display real-time operation conditions of assets. It is always beneficial for maintenance personnel and asset managers to know the current conditions of the assets or locations when planning works. Traditionally, operation conditions of critical assets can be imported/synchronized into asset meters for conditional monitoring PM or analytical reports. But it is not real time data, and we don’t generally import every meter data we have into Maximo. It will overload the database and consume valuable system resource. With this capability, we will only query data of a specific asset or location directly from external system and don’t store it in the DB. However, we still can interact with the data as part of Maximo functionality which is a distinct advantage over other methods such as embedding the web page of an external system inside Maximo or directing user to an external system’s web page on a separate browser.
- Integrate with security access systems to display in real-time the current whereabouts of a worker. This could help with work planning and coordination activities.
- Integrate with external service to verify ID, Certificates etc. for the labour self-registration process.
- Integrate with weather service to assist work planning process. For example, Maximo will remind the planner when planning to work in an open area if extreme heat, high UV, or heavy rain is forecasted. The planner thus can choose to plan the work on a different date or ensure proper PPE tools and equipment are provided to the workers. The same can be done if we deploy sensors to report temperature, noise level, humidity etc. on certain work locations.
Step 1: Register OpenWeatherMap API account, and retrieve data on browser:
- Go to OpenWeatherMap.org to register a free account.
- Sign-in with your new account, go to Account home page, open “API keys” tab and copy your API key to use it to access the API.
- Paste the following link into a new browser tab, replace the XXX with your API key, you should be able to retrieve JSON data of the UV Index forecast for the next 8 days as shown in the image below http://api.openweathermap.org/data/2.5/uvi/forecast?lat=-33.8688&lon=151.2093&cnt=7&appid=XXX
- If you couldn’t retrieve the data, go to the site’s API document to read the instructions. The REST API syntax is very simple.
- Go to Integration module, open the “JSON Resource” application. Under the “More Actions” menu, click “Create JSON resource” to start the wizard
- Create a new Resource named: “OW_UVI”; Resource Usage: “OBJECT”; Resource Type: “REST”; Then copy/paste the URL in the previous step into the URL field.
- Note: In this case, to simplify the example, we hard-code the latitude and longitude of the location in the URL. Later on, you can make this dynamically filled from main MBO object by putting the field name inside a bracket such as lat={LOCATIONS.LATITUDE}&lon={ LOCATIONS.LONGITUDE}
- Click “Next”.
- Copy/Paste the sample JSON data we retrieved in previous step from OpenWeatherMap into the JSON Data text area. This will allows Maximo to parse to understand the structure of the data that will be returned from the API
- For Parent Object, enter “WORKORDER”. This will create a relationship on the “WORKORDER” object to point to the new JSON object “OW_UVI” we are creating
- Click Next to proceed to the next screen. This screen summarizes how Maximo parsed and construct new MBO structure from the sample data provided.
- Leave the default value, click Process to finish.
- Open “Database Configuration” app to examine the new object “OW_UVI” it just created for us. It also adds a relationship “OW_UVI” on the “WORKORDER” object to link to this new mbo.
- To check if our JSON resource can query data from the API correctly, use Application Designer, add a Table to anywhere, such as the “Map” tab. Open properties of the table, make “OW_UVI” as the relationship of the table. Add two columns and assign the “DATE_ISO” and “VALUE” field to the two columns.
- Open the Work Order Tracking app, open any work order, the table will display some UV forecast data:
Step 4: Create a warning using Automation Script
- Open “Database Configuration” app, choose Action >> Messages to open the Message dialog. Create a new Warning Message: Message Group: “WOTRACK”, Message Key: “HighUVI”, and Value: “High UV Index is forecasted for the scheduled date. Ensure proper sun protection PPE has been planned.”
- Note: Message Group and Message Key are Case sensitive. Thus, in the automation script, it should use the exact case in order for the message to be displayed
- Open Automation Script app, Create an "Attribute Launch Point": Launch Point: “SCHEDSTART”, Object: “WORKORDER”, Attribute: “SCHEDSTART”, Event: “Validate”.
- Click Next to the next screen, give the script a name such as “Check_UVI”, choose Python as language
- Click Next. Copy/Paste the following source into the Source code text area, then click “Create” to finish creating the script
- In this script, I compare and identify if the Scheduled Start Date is in the next 8 days, and if the UV Index is higher than 7. If this condition is met, Maximo will display the warning we created above.
One more extra step: with Maximo 7.6, we can setup to assign Service Address to Location with coordinate of the location. When a Work Order is created against a location, it will inherit the coordinate of the location. We can use it to fill into the parameter of the API request, and retrieve the actual forecast of the Work Order’s location. If you’ve read my previous blog post on creating custom chart, we can also modify the app to display UV Index forecast in a chart for visualization. A planner after receiving the warning can then open the “Map” tab to see the location of the work, and see the UV Index forecast on a chart to determine what day is better to carry out the work.
I hope you have fun with this new Maximo feature. If you can think of any creative application using this feature to make Maximo better, please suggest by leaving me a comment. I would love to try it out.
This comment has been removed by the author.
ReplyDeleteHi Viet,
ReplyDeleteI am using warngroup and warnkey to show a warning to user when a Date in a field is below today's date. However, the warning message is not showing as soon as user tabs out from the field but is showing when user change some data in other fields. Can you help here?
Hi Viet,
ReplyDeleteI have tried using {LOCATIONS.LONGITUDE} to create a dinamic query but it doesn't work. Our latitude/longitude have "," instead of "." as separating symbol and i saw OpenWeather doesn't work with ",". Is there a way to convert "," to "." during the dynamic get of data?
Does it need a different relationship to work and get the right values?
Regards
Carmine
After reading tech note , I felt how easy to use Jason Resources to integrate with real time system . Great job VIET
ReplyDelete