1 - Create a Communication Template:
- Template ID: MY_COMM_TEMPLATE
- Description: Test Communication Template
- Applies To: ASSET
- Send From: <your_email@address> (Note: to make this work, you must have setup smtp and able to send email from Maximo first
- Subject and message as shown below
- In the "Recipients" tab, add an Email recipient pointing to your own email:
2 - Create an Automation Script with Object Launch Point on the "ASSET" object, on the SAVE (Update) event, choose Language = Python and copy/paste the following sample script:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from psdi.server.MXServer import getMXServer as MXS | |
if mbo.isModified("status") and mbo.getString("status") == "INACTIVE": | |
commTpltSet = MXS().getMboSet("COMMTEMPLATE", MXS().getSystemUserInfo()) | |
commTpltSet.setWhere("templateid='MY_COMM_TEMPLATE'") | |
commTpltSet.reset() | |
commTpltSet.getMbo(0).sendMessage(mbo, mbo) |
No comments:
Post a Comment