About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Technical Blog Post
Abstract
HOWTO: Throwing a Warning Dialog in an Automation Script
Body
In this brief blog, we'll throw a warning dialog in an Automation Script. We'll be using python.
The script necessary to throw the warning will take the following form:
if some_condition:
warngroup = "warning_group"
warnkey = "warning_key"
If there are parameters in the message, you can create a string array with the necessary substitutions, e.g.:
warnparams = [string1, string2, etc.]
If it's an error dialog you want then use errorgroup, errorkey and params.
As an example, let's make a simple SR object automation script with the following code snippet:
if mbo.getString('ticketid') == "TEST":
warngroup = "mygroup"
warnkey = "mykey"
warnparams = ["dog","cat"]
Happy Scripting!
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
UID
ibm11129815