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!
UID
ibm11129815