1 Reply Latest reply on Mar 1, 2016 11:09 PM by WVanSluys1

    FDMEE email when validation fails

    2886698

      Hello experts,

      I would like to create a python script in FDMEE which emails recipients by location with validation errors. this is what i have so far but i am not receiving any emails of errors. What this script is supposed to do is email recipients by location, my email settings have been entered in the integration section of FDMEE. i.e smtp, recipient email and sender email. I should receive an email with any validation errors that occur. I am adding my script to AftValidate saving and then running the validation. I know the validation fails as i am getting kick outs but i am not receiving any emails.

       

      thanks

       

       

      -------------------------------------------------------------------------------

      import smtplib

       

      rsLoc = fdmAPI.getLocationDetails (fdmContext ["LOCKEY"])

      while (rsLoc.next()):

          strHypInstance = rsLoc.getString("PARTINTGCONFIG1")

          strSMTPServer = rsLoc.getString("PARTINTGCONFIG2")

          strFromAddress = rsLoc.getString("PARTINTGCONFIG3")

          strToAddress = rsLoc.getString("PARTINTGCONFIG4")

      rsLoc.close()

       

      strSubject = "Oracle Hyperion FDMEE Validation Process failed for "

       

      strEmailMSGLine = "Oracle Hyperion FDMEE Validation process for ?? was not successful"

       

      strMessage = """\From: %s\nTo: %s\nSubject: %s\n\n%s

                  """ % (strFromAddress, ", ".join(strToAddress), strSubject, strMessage

                 

      stat = fdmAPI.getProcessStates(fdmContext ["LOADID"])

      if str(stat["VALSTATUS"])=="0":

          try:

              smtpServer = smtplib.SMTP (strSMTPServer,portnumber)

              smtpServer.ehlo()

              smtpServer.starttls()

              smtpServer.sendmail(strFromAddress, strToAddress, strMessage)

              fdmAPI.logInfo("Successfully sent email")

          except Exception, e:

              fdmAPI.logInfo ("Error: unable to send email: " + str(e))

          smtpServer.close()

        • 1. Re: FDMEE email when validation fails
          WVanSluys1

          It may be your Stat check.

           

            

          PROCESSSTATUSKEY

          PROCESSSTATUSDESC

          PROCESSSTATUSCODE

          0

          No Process

          NA

          1

          Import OK

          IMP

          2

          Import Error

          IMPx

          10

          No Validation

          NO VAL

          11

          Validation OK

          VAL

          12

          Validation Error

          VALx

          20

          NoExport

          NO EXP

          21

          Export OK

          EXP

          22

          Export Error

          EXPx

          30

          No Load

          NO LOAD

          31

          Load OK

          LOAD

          32

          Load Error

          LOADx

          40

          No Check

          NO CHK

          41

          Check

          CHK

          42

          Check Error

          CHKx