Christopher_Poullard_6587

How to stop email if "failed" is not found in process

Discussion created by Christopher_Poullard_6587 on Sep 14, 2016
Latest reply on Sep 14, 2016 by Peter WIRFS

I don't want the process to send a email if "failed" is not found in process. How can script the if else statement to do this.

:SET &MISSED# = PREP_PROCESS_REPORT(,,,"*failed*")
:SET &EMAILBODY# = ""
:SET &CRLF# = UC_CRLF()
:SET &MSG1 = "Do not reply this is an unattened email."
:SET &MAGICMSG1 = 'PRODUCTIONQ ####'
:SET &MAGICMSG2 = 'CAT##PRODUCTION SERVICES REQUEST##'
:SET &MAGICMSG3 = 'URG##SEV3 Non-Critical##'
:SET &MAGICMSG4 = 'TickType##Incident##'
:SET &MAGICMSG5 = 'IMP##NORMAL##'
:SET &MAGICMSG6 = 'ADDRESOLUTION##True##'
:PROCESS &MISSED#
:  SET &LINE# = GET_PROCESS_LINE(&MISSED#)
:  PRINT &LINE#
:  SET &EMAILBODY# = STR_CAT(&EMAILBODY#, "&LINE#&CRLF#")
:ENDPROCESS
:SET &OUT# = SEND_MAIL('christopher.poullard@vizientinc.com',,'Backup Failure','&MSG1 &CRLF# &EMAILBODY#')
! :SET &OUT# = SEND_MAIL('remedyforce@vizientinc.com',,'Create a Ticket','&CRLF#&MAGICMSG1 &CRLF#&CRLF# &CRLF#&MAGICMSG2 &CRLF#&MAGICMSG3 &CRLF#&MAGICMSG4 &CRLF#&MAGICMSG5 &CRLF#&MAGICMSG6 &CRLF#&CRLF# &CRLF#&EMAILBODY#')

Outcomes