Skip to main contentCarbon Design System

MXException automation script

MXException provides automation script developers a script point for MXException to execute the script when an MXException is thrown from Maximo code. This primarily helps add more information to an existing message, for example, adding a user name, someone who would have caused the exception, to the message. This can also help in taking some automated action geared towards serviceability, like sending an email alert to an admin.

Trigger point

Script name should be MXERR.{Err Group}.{Err Key} A script can be associated per error key/group. Event trigger point is when the exception is instantiated and not when it is thrown.

Variable nameVariable typePurpose
egroupINError group name
ekeyINError key name
eparamsINError params as an array
mxerrormsgOUTThe additional message that gets appended at the end of the original error message

The following example script sends an email when there is a specific error.

Example Script

from psdi.server import MXServer
if egroup=="iface" and ekey="something":
MXServer.sendEmail("to@b.c","from@b.c",egroup+"#"+ekey+" happened.","look at queue error reprocessing app for error message and retry")