add final status

This commit is contained in:
Jonathan Jenne 2024-01-15 13:54:52 +01:00
parent 6460c2b4ea
commit a4ed41419d
3 changed files with 15 additions and 2 deletions

View File

@ -9,8 +9,8 @@
EnvelopeSent = 1004 ' Nicht verwendet
EnvelopePartlySigned = 1005
EnvelopeCompletelySigned = 1006
EnvelopeArchived = 1007
EnvelopeTransmittedDMS = 1008
EnvelopeReportCreated = 1007
EnvelopeArchived = 1008
EnvelopeDeleted = 1009
AccessCodeRequested = 2001
AccessCodeCorrect = 2002

View File

@ -119,6 +119,11 @@ Namespace Jobs
Throw New ApplicationException("Document could not be finalized")
End If
If ActionService.CreateReport(oEnvelope) = False Then
Logger.Warn("Document Report could not be created!")
Throw New ApplicationException("Document Report could not be created")
End If
Logger.Debug("Creating report..")
Dim oReport As Byte() = ReportCreator.CreateReport(oEnvelope)
Logger.Debug("Report created.")

View File

@ -124,4 +124,12 @@ Public Class ActionService
Return EmailService.SendDocumentCompletedEmailToCreator(pEnvelope, pAttachment)
End Function
Public Function CreateReport(pEnvelope As Envelope) As Boolean
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeReportCreated, "System") = False Then
Return False
End If
Return True
End Function
End Class