Category: Configuration

Setup Cognos 11 to send email with Gmail (2020)

When I tried to set up Cognos 11 to send notifications 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 turned this setting
off again. So I had to create an App Password for my Gmail account to make it
work by 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
 
 

  • Click on “App Passwords” to generate a new one. 
  • On the next page, choose “Mail” app, and “Other (Custom Name)” in the Select Device drop-down
  • On the next page, enter “Cognos” for the name of the app, then click on “GENERATE”
  • On the next page, copy the password, paste it to Notepad, then click on Done
 
 
Step 2: Configure Cognos:
  • Open “IBM Cognos Analytics” > “IBM Cognos Configuration” (not the one with the same name under “Framework Manager”)
  • Open “Notification” on the left side Explorer bar, enter
    the configuration as follows:

    • SMTP Mail Server: smtp.gmail.com:465
    • Account and Password:
      • User ID: <account_name>@gmail.com
      • Password: <Generated app password
        from the previous step>
    • Default Sender: <account_name>@gmail.com
    • SSL Encryption Enabled: True
  • Click Ok. Then Save the setting
  • Right-click “Notification” on the left Explorer menu again, and click on “Test” to check if the connection is working.
  • After the SMTP connection has been tested, to send a report from Cognos via email, we have to restart Cognos service for the change to take effect.

How to generate DBC Script for Maximo? (2023)

This post includes some of my notes on using DBC for the deployment of Maximo’s configuration. In case you wonder why using DBC, the short answer is if you’re happy with whatever method you’re using to deploy configuration, whether it is manual or using Migration Manager, ignore this post. But if you’re looking for a way to streamline the development process for a large team by collaborating and source controlling using GIT, or if you want to fully automate the deployment process, DBC is the way to go.

IBM has been using DBC script for a long time, but only recently, they published a
reference guide so 3rd party consultants like us. DBC Script can be used to automate most of the common configuration for Maximo. It has standard commands to create/modify common low-level objects like tables, indexes, domains etc. For many other configurations that don’t have a specific DBC command, we still can handle the deployment using the <freeform> or <insert> statement to put anything into Maximo DB. Below are some specific notes on certain types of changes:

DB Configuration and System Objects:

Operations to add/modify many low-level objects like tables, views, maxvars… are available as DBC commands. However, manually writing all of the scripts can be laborious. We can instead make the changes from Maximo’s front end, then generate a DBC script for the changes by using the ScriptBuilder.bat tool (found under tools/maximo/internal). Simply add the objects you want to generate script, then choose File > Generate Script. The script file will be created in the same folder:

Application Design

The standard method to export/import XML files using App Designer is simple enough and suitable for version control. However, if we want to fully automate the deployment process (for CI/CD) we can export the changes to DBC script using the mxdiff.bat tool (found under tools/maximo/screen-upgrade). For example, if we add a new column to the List tab of the Work Order Tracking app, we can export the XML files of the before and after versions of the app. Copy the two files into the screen-upgrade folder and execute this command: 

mxdiff.bat -bWOTRACKOLD.XML -mWOTRACKNEW.XML -t001.mxs

It will produce the script as shown in the image below. (Do note that the extension for changes in app layout design should be .mxs instead of .dbc)

Automation Script

For simple manual deployment, I still prefer to use the Import/Export function as it is very convenient. Note that the permission to see the Import/Export buttons is not granted to maxadmin by default. Thus, you have to give it to the maxadmin security group first.

However, if we need to generate DBC for automated deployment, we can use the following approach. First, create an automation script called GENDBC with the source code below:

Now, whenever we need to generate a DBC file for an automation script, execute the GENDBC tool above by calling it from a browser:

https://[MAXIMO_HOST]/maximo/oslc/script/gendbc?source=SCRIPT&name=[YOUR_SCRIPT_NAME]

The output DBC file will be created in the /script folder, under your Integration Global Directory (specified in the mxe.int.globaldir system property)

Note: I recently found out this approach doesn’t work with Oracle database. It gave me the error below. In the project I worked with, we used a tool created by someone else and I can’t share it here. If you’re using Oracle, you can try the tool created by Jason @ Sharptree.

Invalid column type: getString/getNString not implemented for class oracle.jdbc.driver.T4CBlobAccessor

Integration Artifacts

To generate DBC script for integration artifacts such as Object Structure, JSONMAP, Publish Channel etc., we can also use the GENDBC tool mentioned above. For example:

  • To extract Object Structure, run the script with the following parameters:
https://[MAXIMO_HOST]/maximo/oslc/script/gendbc?source=MEA&name=[OBJECT_STRUCTURE_NAME]
  • To extract Publish Channel:
https://[MAXIMO_HOST]/maximo/oslc/script/gendbc?source=MEA&pubChannel=[PUBLISH_CHANNEL_NAME]
  • To extract Enterprise Service:
https://[MAXIMO_HOST]/maximo/oslc/script/gendbc?source=MEA&entService=[ENT_SERVICE_NAME]
  • To extract JSON Mapping:
https://[MAXIMO_HOST]/maximo/oslc/script/gendbc?source=JSONMAP&name=[JSONMAP_NAME]

The output files for Object Structure, Publish Channel, and Enterprise Service will be in the [GlobalDir]/mea folder. And the output for JSONMAP will be in the [GlobalDir]/jsonmap folder

Other configurations

For many other configurations such as escalation, messages, workflow etc., there is no standard DBC command to create or modify those objects. However, all such configurations are stored inside Maximo’s database and if we can export and then import the correct data to the target environment, it would work well (some objects will require a Maximo restart to refresh the cache). The easiest method is to use the geninsertdbc.bat tool. To use it, we simply have to give it a table name and a where clause, it will generate the data found as DBC insert statements.

For example, to export all rows of the table MAXINTOBJECT for the object structure ZZWO we can run the command below:

geninsertdbc.bat -tMAXINTOBJECT -w"INTOBJECTNAME='ZZWO'" -fOUTPUT

The output file will look like below:

Note: This tool generates Null value as an Empty string. Thus, it could cause errors in certain logic that require the value to be Null such as when using mbo.isNull(“FieldName”). I found it worked most of the time for me, but it did cause me some headaches in a few instances. To fix it, we can delete these lines from the generated DBC script or add another UPDATE SQL statement to correct it.

The main tables that contain configuration for some common objects are
listed below:

  • Escalation: ESCALATION, ESCREFPOINT
  • Cron Task: CRONTASKDEF , CRONTASKINSTANCE
  • Workflow: WFPROCESS, WFNODE, WFASSIGNMENT
  • Saved Query: QUERY
  • Start Center Template: SCTEMPLATE

Note: for Start Center and Result sets to be displayed correctly, there are other dependent objects that need to be migrated such as Object Structure, security permission etc.

Maximo Crash Course on Youtube – Starting point for a complete beginner

After posting a bunch of Maximo training videos in Vietnamese on Youtube, I got some requests for similar contents in English. On the web, there are plenty of Maximo resources in English; so I didn’t think it is necessary to create new duplicated content. But someone recently pointed out to me that as a beginner, he doesn’t know where to start. So here it is, a bunch of *super short* videos to get you started with Maximo. After going through these, I’m sure you will have a better idea on which direction you want to learn more about the software.

 Basic concepts in Maximo asset management: These tutorials are done on the IBM public Maximo preview site, so you don’t need to set up anything to do some exercises




 Basic Maximo configuration tutorials: 



Setting up development environment and writing customized java code for Maximo:

For configuration and customization, you’ll need MAXADMIN access to a Maximo environment to do the exercises. This shouldn’t be a problem if you are working for a company that already has Maximo. But if you are a student or freelance developer, at this point I don’t know of an easy and relatively cheap way to get this. The cheapest option is to buy an IBM Value Package for $999 which will give you access to *all* IBM software and support services. But I guess that’s too expensive for an individual just to learn about a system.
I guess you can ask somebody you know who have a development environment VM to give you a copy. Although this may not be completely legitimate. I believe IBM should allow free download to a trial version or demo VM like Microsoft or Oracle. It only helps them to expand the popularity of the product. Anyway, that’s enough for complaining. 
I hope these stuffs help you get started.

How to modify (almost) any Maximo data with no database access

Being Maximo consultants, we often come into a scene where the client gives us MAXADMIN access to the system but access to the database is an absolute No-No. This is usually the case with companies that have a clear separation of the App Admin and DB Admin roles. This is also one of the key restrictions with Maximo as a Service.
 
If you have been doing a bit of admin and config activities, you will surely understand the limitation of having no database access. It’s like having to work with tied hands. Luckily, we can use MXLoader to query/update almost any data tables in Maximo. Below is an example on how to do it.
 
Let’s say we’re working with a Maximo SaaS and IBM only gives us front-end admin access, but no access to the back-end. Sometimes, Maximo is stuck while applying DB config, and we cannot turn off Admin Mode. This is usually not a big problem when we have full DB access. To fix this, we simply have to update the CONFIGURING flag in MAXVARS table to 0. However, with Maximo on the cloud, under standard procedure, we’ll need to raise a support ticket asking for IBM to update the flag. This could take a few days to resolve. It’s a horrible situation since we cannot do anything while Maximo is in Admin Mode.
 
Without DB access, we can update the MAXVARS table using MXLoader using the steps below:
 
1 – Create an Object Structure for the MAXVARS table:
  • OS Name: DBMAXVARS
  • Consume By: Integration
  • Add a new row, set Object Name: MAXVARS
 
 2 – Use MXLoader, add
a new ‘PEOPLE’ sheet:
 
 
 
With the new ‘People’ sheet added, replace ‘MXPERSON’ object structure with ‘DBMAXVARS’ and ‘PERSON’ object with ‘MAXVARS’ object. To identify what columns are available MAXVARS table we can open the ‘DBMAXVARS’ object
structure, and open the ‘Exclude/Include fields’ dialog from the Select Action
menu. In this case, I only need two fields: VARNAME and VARVALUE
 
3 – Set operation method to ‘Query’ and where clause to VARNAME
= ‘CONFIGURING’
, then execute the query by clicking on the ‘Run’ button to retrieve
the record.
 
 
 
4 – After we get the record for ‘CONFIGURING’ variable, set VARVALUE to 0, then change the operation method to ‘Sync-Change’ then execute the operation. We will now be able to turn off Admin Mode.
 
 
 
Some other examples of using MXLoader to update the system
tables include:
 
  • MAXMENU – To move/add an app to a different module menu
  • APPFIELDDEFAULTS – To set a default value when inserting new
    record
  • MAXSESSION – To release user sessions that got stuck in Admin
    mode and the user cannot log in
  • MAXDOMAIN – To create a new Synonym Domain
In case we do not have permission to use the Object Structure application, another method is to create a new single-page application using Application Designer to expose data of the object on GUI. It would enable us to achieve the same result and only take a few minutes to do. However, I like MXLoader a lot more as we can use it to bulk insert/update normal app data, and it doesn’t leave a bunch of junk apps in the system which is quite difficult to remove.
 
The policy to restrict DB access is usually there for a good reason. And MXLoader is an extremely powerful tool. I find it a lot easier to make mistakes updating the wrong data or to the wrong environment. So please be very careful when using it and you should always have a backup of the before and after versions of the data set that you work on.

[Update 2023]: an easier and more powerful way to achieve this task is using API Automation script

Automation Scripting Tutorial

Got a request from someone overseas to teach him on configuring automation script in Maximo. All of my previous tutorials posted have been in Vietnamese.

I have always wanted to do this but haven’t found the time. So here it is, the first one in English.

Maximo Immersion Training Video Recordings (Vietnamese)

When I started working with Maximo, my supervisor gave me a bunch of training books. The books are created by MRO (the company which owns Maximo before it was acquired by IBM) to provide its customers and business partners basic training to get started with the software. 
The first book I had to read is “MED 0146 – Immersion Training for EAM” written in 2008 for Maximo v7.1. This book is 900+ pages long and is provided as the material when you take the 5-day immersion training course. The problem with following tutorials in the book is that it starts with the basic applications on the first few days, and only at the 4th or 5th day, it starts to connect different concepts to build a complete picture of how an O&M organization can organize its data and processes in the software.

So for the first few days, I was doing the tutorial one by one without any understanding of the whole high level concept.

Later on, I realized that many of my colleagues who joined the company before me had to take a lot more time, some took several months, some took a few years through real project experience to really pick up all of the core concepts in Maximo. There are two reasons for that: first, some of them are not very comfortable reading such a large book in English all day long with all of the technical IT and Engineering terms that they are not familiar with; second, with a huge amount of detailed information and fragmented content, it is more difficult for them to relate the concept to real world examples.
After a year working for the company, I took on the responsibility to recruit and train new technical consultants. So to speed-up the learning process for the new employees, I created a 2-month training plan which covers key objectives as follow:

  1. Able to install the software
  2. Know all core software functions (core processes & concepts such as asset, work, inventory, job plan, preventive maintenance, purchasing, and contracts)
  3. Know how to configure the software (organization /site configuration, security administration, DB configuration, application design, and workflow configuration
  4. BIRT report design & development
  5. Java customization
To help the trainees with having a basic understanding of the core concepts first before they have to dive in into the detailed information covered in the book, I had to setup workshops to run through with each guy to show them the software. It is a condensed version of the core team training class which we usually given to our customers during the first phase of a Maximo implementation project.
Later on, I found that this method takes up a lot of my time because in most cases, we only hire one or two new guys at a time. And I simply cannot find the time give them a few days one-on-one training session every time. Finally, I came up with the idea to record myself giving a presentation to various software functions and how it can be applied in practice. For each of the new employees that we recruited, I simply give him the copies of the recording to watch and learn at his own pace. For each objective, I only have to setup a review session which normally takes a few hours to review and make sure the learner understood the core concepts and be able to relate with real world examples. By doing it this way, after only two months, we were able to formalize the training process and able to bring new employees with no previous experience with Maximo up to the level of competency that we are comfortable to assign them to real implementation project and able to give customer professional level consulting service.
Below is the links to the recording of me giving introduction to Maximo business functions. It corresponds to Objective 2 which I considered the most important topic that every technical consultant must have deep knowledge on. It can also be used by Maximo users or people who are interested in knowing what the software can do.

Links:
01 Basic Navigation: https://youtu.be/1yYXam_mKIg
02 Asset Management: https://youtu.be/hlnU-bmOU74
03 Preventive Maintenance: https://youtu.be/PYs2CDzdPoc
04 Work Management: https://youtu.be/ob0OnJ7jw0o
05 Work Request: https://youtu.be/FS7KUZT19dw
06 Inventory management: https://youtu.be/523qaQeL7LQ
07 Inventory Issue, Transfer: https://youtu.be/CCBVSYlc6zs
08 Purchase Requisition: https://youtu.be/Yr2vx3ZqyuE
09 Request for Quotation: https://youtu.be/E-NTu1xZ6EQ
10 Purchase Order, Receipt: https://youtu.be/hl1OSsIp4Cg
11 Invoice Payment: https://youtu.be/swKUm7m6uAY
12 Blanket (Framework) Contract: https://youtu.be/Trqsfb-m7do
(Bonus) Full End-to-End Process of Maximo: https://youtu.be/uq3MCOjD41M

The links below are for basic training on how to configure the software to address specific client requirements. This part corresponds to Objective 3 of the training course. This targets the implementers or administrators who need to modify the software to address specific requirements from end-users.

Links:
01 User & Security Administration: https://youtu.be/qmrq2hSQk2Q
02 Database Configuration: https://youtu.be/hp7rbNGdwrY
03 Application Designer: https://youtu.be/BN9mAbmnfFk
04 Application Designer (advanced): https://youtu.be/xZWeK3XMMnE
05 Workflow Designer: https://youtu.be/lL22WwOYD8I
06 Automation Scripting: https://youtu.be/K7SJkatMOvA
(Bonus) All Maximo standard functionality: https://youtu.be/GB6n7oprP5A

*NOTE* for tutorials in English, please read this newer post

© 2024 Maximo Consultant

Theme by Anders NorenUp ↑