Added more logging
This commit is contained in:
parent
a045121d45
commit
93d65b8bf5
@ -678,35 +678,47 @@ Service SendPMNotifications()
|
||||
PMRec<PM_EARLY_NOTIF_SENT$> = Datetime()
|
||||
Database_Services('WriteDataRow', 'PM', PMKey, PMRec, 1, 0, 1)
|
||||
if Error_Services('NoError') then
|
||||
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey)
|
||||
if Error_Services('NoError') then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
LogData<2> = Tool
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'EARLY NOTIFICATIONS Prechecks passed, message okay to send.'
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
|
||||
Subject = 'PM Task Coming Due'
|
||||
Message = 'Tool: ': Tool : ' - ' :PMDesc:" is coming due. Scheduled due by " : OCONV(PMStatusLine<1,COL$DUEBY>, 'DT')
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
LogData<2> = Tool
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'EARLY NOTIFICATIONS OBJ_Notes has been called by this point, message should have been sent.'
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
UpdatedPMRec = Database_Services('ReadDataRow', 'PM', PMKey, True$, 0, False$)
|
||||
If UpdatedPMRec<PM_EARLY_NOTIF_SENT$> NE '' then
|
||||
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey)
|
||||
if Error_Services('NoError') then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
LogData<2> = Tool
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'EARLY NOTIFICATIONS Prechecks passed, message okay to send.'
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
|
||||
Subject = 'PM Task Coming Due'
|
||||
Message = 'Tool: ': Tool : ' - ' :PMDesc:" is coming due. Scheduled due by " : OCONV(PMStatusLine<1,COL$DUEBY>, 'DT')
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
LogData<2> = Tool
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'EARLY NOTIFICATIONS OBJ_Notes has been called by this point, message should have been sent.'
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
errMessage = Error_Services('GetMessage')
|
||||
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
|
||||
errMessage = Error_Services('GetMessage')
|
||||
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
|
||||
|
||||
end else
|
||||
errMessage = Error_Services('GetMessage')
|
||||
LogData = ''
|
||||
@ -731,34 +743,46 @@ Service SendPMNotifications()
|
||||
PMRec<PM_DUE_NOTIF_SENT$> = Datetime()
|
||||
Database_Services('WriteDataRow', 'PM', PMKey, PMRec, 1, 0, 1)
|
||||
if Error_Services('NoError') then
|
||||
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey)
|
||||
if Error_Services('NoError') then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
LogData<2> = Tool
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'DUE NOTIFICATIONS Prechecks passed, message okay to send.'
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
UpdatedPMRec = Database_Services('ReadDataRow', 'PM', PMKey, True$, 0, False$)
|
||||
If UpdatedPMRec<PM_DUE_NOTIF_SENT$> NE '' then
|
||||
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey)
|
||||
if Error_Services('NoError') then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
LogData<2> = Tool
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'DUE NOTIFICATIONS Prechecks passed, message okay to send.'
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
|
||||
Subject = 'PM Task Due'
|
||||
Message = 'Tool: ': Tool : ' - ' :PMDesc:" is due. Scheduled due by " : OCONV(PMStatusLine<1,COL$DUEBY>, 'DT')
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
LogData<2> = Tool
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'DUE NOTIFICATIONS OBJ_Notes has been called by this point, message should have been sent.'
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
errMessage = Error_Services('GetMessage')
|
||||
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
|
||||
|
||||
Subject = 'PM Task Due'
|
||||
Message = 'Tool: ': Tool : ' - ' :PMDesc:" is due. Scheduled due by " : OCONV(PMStatusLine<1,COL$DUEBY>, 'DT')
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
LogData<2> = Tool
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'DUE NOTIFICATIONS OBJ_Notes has been called by this point, message should have been sent.'
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
errMessage = Error_Services('GetMessage')
|
||||
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$)
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
end
|
||||
end else
|
||||
errMessage = Error_Services('GetMessage')
|
||||
@ -768,7 +792,7 @@ Service SendPMNotifications()
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'DUE notification failed - ' : errMessage
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
end
|
||||
end
|
||||
end else
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
@ -784,34 +808,47 @@ Service SendPMNotifications()
|
||||
PMRec<PM_LATE_NOTIF_SENT$> = Datetime()
|
||||
Database_Services('WriteDataRow', 'PM', PMKey, PMRec, 1, 0, 1)
|
||||
if Error_Services('NoError') then
|
||||
Recipients = PM_Services('GetPMNotificationRecipients', PMSpecKey)
|
||||
if Error_Services('NoError') then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
LogData<2> = Tool
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'LATE NOTIFICATIONS Prechecks passed, message okay to send.'
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
//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)
|
||||
if Error_Services('NoError') then
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
LogData<2> = Tool
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'LATE NOTIFICATIONS Prechecks passed, message okay to send.'
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
|
||||
Subject = 'PM overdue'
|
||||
Message = 'Tool: ': Tool : ' - ' :PMDesc:" is overdue. Scheduled due by " : OCONV(PMStatusLine<1,COL$DUEBY>, 'DT')
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
LogData<2> = Tool
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'LATE NOTIFICATIONS OBJ_Notes has been called by this point, message should have been sent.'
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
errMessage = Error_Services('GetMessage')
|
||||
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
|
||||
|
||||
Subject = 'PM overdue'
|
||||
Message = 'Tool: ': Tool : ' - ' :PMDesc:" is overdue. Scheduled due by " : OCONV(PMStatusLine<1,COL$DUEBY>, 'DT')
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
LogData<2> = Tool
|
||||
LogData<3> = PMDesc
|
||||
LogData<4> = 'LATE NOTIFICATIONS OBJ_Notes has been called by this point, message should have been sent.'
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
errMessage = Error_Services('GetMessage')
|
||||
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$)
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
end
|
||||
end else
|
||||
errMessage = Error_Services('GetMessage')
|
||||
@ -822,6 +859,7 @@ Service SendPMNotifications()
|
||||
LogData<4> = 'LATE notification failed - ' : errMessage
|
||||
Logging_Services('AppendLog', objLogNotifications, LogData, @RM, @FM, False$)
|
||||
end
|
||||
|
||||
end else
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM;//Defined at entry of subroutine
|
||||
|
Loading…
x
Reference in New Issue
Block a user