Loading...

Creation And Display Of Custom Messages In A Maximo Application

The capability to exhibit a message on the graphical user interface is a common requirement during Maximo application Customizations.
Starting step in this procedure we will have to define the custom message.  We have to open the Database Configuration application and select Messages for the Action menu. we can create a new entry filling the necessary information:
Message Group: Messages can be organized in to groups, so that it will be easy for identifying the entries. For example we can put the name of the customer as the message group, this name convection allows to fastly list all the custom entries.
Message Key:  We have to provide unique ID for the message. This field together with the MSGGROUP uniquely recognizes the message.
Display Method:  Here we can choose either 'MSGBOX' or 'STATUS'. The 'MSGBOX' display a typical popup window exhibits  the message and a set of customizable buttons. The 'STATUS' displays the text above the tool bar and does not require user interference.
Message ID: Provides unique ID of the message. The typical format of custom messages is BMX[CC][NNNN][T] , Here [CC] is the two letters code that identifies your customization, [NNNN] is a four digits number and [T] is the type of message and can be E (Error), W (warning) or I (Info). Maximo suggest to use [CC]='ZZ' for custom messages
Value: Text that will be displayed. Use {N} tags for parameters to be replaced at runtime. Use \n to insert a newline.
Here is a example for New Message for reference

IBM Maximo custom Messages creation


Now we are done with defining the new message in the database, now the next step is to display it. The display technique or logic depends or differs whether we are using AppBean Or a Mbo Class.
If you are in a custom application bean class (extending AppBean) those two Java lines will bring up the custom message box.

String params[] ={"Hi there!"};
clientSession.showMessageBox(
clientSession.getCurrentEvent(), "MyGroup", "HelloMsg", params);

As you can see the {0} tag in the message will be substituted with the string 'sample' described in the params array. Visibly it is possible to define multiple tags.
It is also expected to display this message box when an exception is thrown. For example the following two rows will exhibit the same message but will also log a stacktrace in the system logs.

String params[] ={"Hi there!"};
throw new MXApplicationException("MyGroup", "HelloMsg", params);

If you are in an Mbo or MboSet (businessobject project) we can 'attach' the message to the MboSet with the MboSet.addWarning(MXException e) method.

String params[] ={"Hi there!"};
this.addWarning(new MXApplicationException("MyGroup", "HelloMsg", params));

On the other hand it is possible to throw an MXApplicationException like this.

String[] params = {"Hi there!"};
throw new MXApplicationException("MyGroup", "HelloMsg", params);
Web Services 6060464677476383585

Post a Comment

  1. • Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updating IOT Online Training

    ReplyDelete
  2. Its most perceptibly horrendous piece was that the item just worked spasmodically and the data was not exact. You unmistakably canot confront anyone about what you have found if the information isn't right.
    https://360digitmg.com/course/project-management-professional-pmp

    ReplyDelete
  3. This is a great motivational article. In fact, I am happy with your good work. They publish very supportive data, really. Continue. Continue blogging. Hope you explore your next post
    hrdf claimable

    ReplyDelete
  4. Hello there to everyone, here everybody is sharing such information, so it's fussy to see this webpage, and I used to visit this blog day by day
    https://360digitmg.com/course/certification-program-in-data-science

    ReplyDelete
  5. Happy to visit your blog, I am by all accounts forward to more solid articles and I figure we as a whole wish to thank such huge numbers of good articles, blog to impart to us.
    https://360digitmg.com/india/data-science-using-python-and-r-programming-in-delhi

    ReplyDelete
  6. I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Same as your blog i found another one Oracle BPM .Actually I was looking for the same information on internet for Oracle BPM and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for all the details.

    ReplyDelete

emo-but-icon

Home item

Blog Archive

Popular Posts

Random Posts

Flickr Photo