Automation interfacing with SMTP sends same email for different alarms
search cancel

Automation interfacing with SMTP sends same email for different alarms

book

Article ID: 231823

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

I am building automation for stopped stored procedures to sent emails. While testing with 2 different alarms firing and needing to send emails both alarms fired but the email being sent was the same. I am thinking it has to do with the values being set with OPSVALUE before calling the SMTP interface (the indi value more specifically).  Is there doc that highlights what needs to take place so that the messages do not corrupt one another?

Environment

Release : 14.0

Component : OPS/MVS

Resolution

The cause of the same email being triggered was due to multiple requests coming in at the same time using the same messageID.   To differentiate, unique messageIDs should be used.   There are several ways to do this, but OPS/MVS provides the AOF variable wtoid.   

For example, the line indi = mid in the below email routine should be modified to use the wtoid:  

/*  use this routine to email notification                          */          
Email1:                                                                         
                                                                                
indi = mid    

     Change this to:  

/*  use this routine to email notification                          */          
Email1:                                                                         

wtoid=C2D(msg.wtoid)                                                                                
indi = mid || '.' || wtoid

 

Additional Information

More information on wtoid can be found in the section titled "AOF Variables Available in MSG Rules" section of the Using manual.  

AOF Variables Available in MSG Rules