Automation script to implement Yes/No confirmation messages in Maximo
Below script can be used to implement Yes/No prompt message taken from IBM documentation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # Business logic implementation if user selects Yes choice (clicks Yes button) def yes (): service.log("Sending Email") # Business logic implementation if user selects No choice (clicks No button) def no (): service.log("Not Sending Email") # Business logic to present the choice message initially def dflt (): params=[str(priority)] service.log("Throw ERROR") # Use the service utility's yncerror() method to push the choice message |
Above code calls the yes() or no() method using python's dictionary. If it looks slightly confusing you can find a somewhat similar StackOverflow answer here.
Comments
Post a Comment