diff --git a/internal/workflow/preprocessing.go b/internal/workflow/preprocessing.go index ef30f64a..7a049c43 100644 --- a/internal/workflow/preprocessing.go +++ b/internal/workflow/preprocessing.go @@ -229,8 +229,12 @@ func (w *PreprocessingWorkflow) Execute( return result, nil } + // Write PREMIS XML. + ev = result.newEvent(ctx, "Create premis.xml") if e = writePREMISFile(ctx, identifySIP.SIP); e != nil { - return nil, e + result.systemError(ctx, e, ev, "premis.xml creation has failed") + } else { + ev.Succeed(ctx, "premis.xml creation successful") } // Re-structure SIP. diff --git a/internal/workflow/preprocessing_test.go b/internal/workflow/preprocessing_test.go index d3448f9d..82251fa1 100644 --- a/internal/workflow/preprocessing_test.go +++ b/internal/workflow/preprocessing_test.go @@ -414,6 +414,13 @@ func (s *PreprocessingTestSuite) TestPreprocessingWorkflowSuccess() { StartedAt: testTime, CompletedAt: testTime, }, + { + Name: "Create premis.xml", + Message: "premis.xml creation successful", + Outcome: enums.EventOutcomeSuccess, + StartedAt: testTime, + CompletedAt: testTime, + }, { Name: "Restructure SIP", Message: "SIP has been restructured",