Added more logging
This commit is contained in:
parent
a045121d45
commit
93d65b8bf5
@ -678,6 +678,8 @@ Service SendPMNotifications()
|
|||||||
PMRec<PM_EARLY_NOTIF_SENT$> = Datetime()
|
PMRec<PM_EARLY_NOTIF_SENT$> = Datetime()
|
||||||
Database_Services('WriteDataRow', 'PM', PMKey, PMRec, 1, 0, 1)
|
Database_Services('WriteDataRow', 'PM', PMKey, PMRec, 1, 0, 1)
|
||||||
if Error_Services('NoError') then
|
if Error_Services('NoError') then
|
||||||
|
UpdatedPMRec = Database_Services('ReadDataRow', 'PM', PMKey, True$, 0, False$)
|
||||||
|
If UpdatedPMRec<PM_EARLY_NOTIF_SENT$> NE '' then
|
||||||
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey)
|
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey)
|
||||||
if Error_Services('NoError') then
|
if Error_Services('NoError') then
|
||||||
LogData = ''
|
LogData = ''
|
||||||
@ -707,6 +709,16 @@ Service SendPMNotifications()
|
|||||||
LogData<4> = 'EARLY notification failed - ' : errMessage
|
LogData<4> = 'EARLY notification failed - ' : errMessage
|
||||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||||
end
|
end
|
||||||
|
end else
|
||||||
|
errMessage = 'EARLY Notifcation wasn not marked as completed when it should have been.'
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||||
|
LogData<2> = Tool
|
||||||
|
LogData<3> = PMDesc
|
||||||
|
LogData<4> = 'EARLY notification failed - ' : errMessage
|
||||||
|
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||||
|
end
|
||||||
|
|
||||||
end else
|
end else
|
||||||
errMessage = Error_Services('GetMessage')
|
errMessage = Error_Services('GetMessage')
|
||||||
LogData = ''
|
LogData = ''
|
||||||
@ -731,6 +743,8 @@ Service SendPMNotifications()
|
|||||||
PMRec<PM_DUE_NOTIF_SENT$> = Datetime()
|
PMRec<PM_DUE_NOTIF_SENT$> = Datetime()
|
||||||
Database_Services('WriteDataRow', 'PM', PMKey, PMRec, 1, 0, 1)
|
Database_Services('WriteDataRow', 'PM', PMKey, PMRec, 1, 0, 1)
|
||||||
if Error_Services('NoError') then
|
if Error_Services('NoError') then
|
||||||
|
UpdatedPMRec = Database_Services('ReadDataRow', 'PM', PMKey, True$, 0, False$)
|
||||||
|
If UpdatedPMRec<PM_DUE_NOTIF_SENT$> NE '' then
|
||||||
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey)
|
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey)
|
||||||
if Error_Services('NoError') then
|
if Error_Services('NoError') then
|
||||||
LogData = ''
|
LogData = ''
|
||||||
@ -760,6 +774,16 @@ Service SendPMNotifications()
|
|||||||
LogData<4> = 'DUE notification failed - ' : errMessage
|
LogData<4> = 'DUE notification failed - ' : errMessage
|
||||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end else
|
||||||
|
errMessage = 'DUE Notifcation was not marked as completed when it should have been.'
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||||
|
LogData<2> = Tool
|
||||||
|
LogData<3> = PMDesc
|
||||||
|
LogData<4> = 'DUE notification failed - ' : errMessage
|
||||||
|
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||||
|
end
|
||||||
end else
|
end else
|
||||||
errMessage = Error_Services('GetMessage')
|
errMessage = Error_Services('GetMessage')
|
||||||
LogData = ''
|
LogData = ''
|
||||||
@ -784,6 +808,9 @@ Service SendPMNotifications()
|
|||||||
PMRec<PM_LATE_NOTIF_SENT$> = Datetime()
|
PMRec<PM_LATE_NOTIF_SENT$> = Datetime()
|
||||||
Database_Services('WriteDataRow', 'PM', PMKey, PMRec, 1, 0, 1)
|
Database_Services('WriteDataRow', 'PM', PMKey, PMRec, 1, 0, 1)
|
||||||
if Error_Services('NoError') then
|
if Error_Services('NoError') then
|
||||||
|
//Check to make sure this change is commited by rereading in the record
|
||||||
|
UpdatedPMRec = Database_Services('ReadDataRow', 'PM', PMKey, True$, 0, False$)
|
||||||
|
If UpdatedPMRec<PM_LATE_NOTIF_SENT$> NE '' then
|
||||||
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey)
|
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey)
|
||||||
if Error_Services('NoError') then
|
if Error_Services('NoError') then
|
||||||
LogData = ''
|
LogData = ''
|
||||||
@ -813,6 +840,16 @@ Service SendPMNotifications()
|
|||||||
LogData<4> = 'LATE notification failed - ' : errMessage
|
LogData<4> = 'LATE notification failed - ' : errMessage
|
||||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end else
|
||||||
|
errMessage = 'LATE Notifcation was not marked as completed when it should have been.'
|
||||||
|
LogData = ''
|
||||||
|
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||||
|
LogData<2> = Tool
|
||||||
|
LogData<3> = PMDesc
|
||||||
|
LogData<4> = 'LATE notification failed - ' : errMessage
|
||||||
|
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||||
|
end
|
||||||
end else
|
end else
|
||||||
errMessage = Error_Services('GetMessage')
|
errMessage = Error_Services('GetMessage')
|
||||||
LogData = ''
|
LogData = ''
|
||||||
@ -822,6 +859,7 @@ Service SendPMNotifications()
|
|||||||
LogData<4> = 'LATE notification failed - ' : errMessage
|
LogData<4> = 'LATE notification failed - ' : errMessage
|
||||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||||
end
|
end
|
||||||
|
|
||||||
end else
|
end else
|
||||||
LogData = ''
|
LogData = ''
|
||||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||||
|
Loading…
x
Reference in New Issue
Block a user