diff --git a/internal/am/start_transfer.go b/internal/am/start_transfer.go index 8f05fee00..af5d94251 100644 --- a/internal/am/start_transfer.go +++ b/internal/am/start_transfer.go @@ -49,7 +49,7 @@ func (a *StartTransferActivity) Execute( payload, resp, err := a.amps.Create(ctx, &amclient.PackageCreateRequest{ Name: opts.Name, - Type: "zipfile", + Type: "zipped bag", Path: opts.Path, ProcessingConfig: processingConfig, AutoApprove: true, diff --git a/internal/am/start_transfer_test.go b/internal/am/start_transfer_test.go index 55b179039..efc82cd3e 100644 --- a/internal/am/start_transfer_test.go +++ b/internal/am/start_transfer_test.go @@ -32,7 +32,7 @@ func TestStartTransferActivity(t *testing.T) { mockutil.Context(), &amclient.PackageCreateRequest{ Name: opts.Name, - Type: "zipfile", + Type: "zipped bag", Path: opts.Path, ProcessingConfig: "automated", AutoApprove: true, @@ -59,7 +59,7 @@ func TestStartTransferActivity(t *testing.T) { mockutil.Context(), &amclient.PackageCreateRequest{ Name: opts.Name, - Type: "zipfile", + Type: "zipped bag", Path: opts.Path, ProcessingConfig: "automated", AutoApprove: true, diff --git a/internal/workflow/processing.go b/internal/workflow/processing.go index bbec15397..911ef46c0 100644 --- a/internal/workflow/processing.go +++ b/internal/workflow/processing.go @@ -430,7 +430,7 @@ func (w *ProcessingWorkflow) SessionHandler( } // Bundle transfer as an Archivematica standard transfer. - { + if !w.cfg.Preprocessing.Enabled { // For the a3m workflow bundle the transfer to a directory shared with // the a3m container. var transferDir string @@ -949,7 +949,7 @@ func (w *ProcessingWorkflow) preprocessing(ctx temporalsdk_workflow.Context, tin return err } - tinfo.TempPath = filepath.Join(w.cfg.Preprocessing.SharedPath, filepath.Clean(result.RelativePath)) + tinfo.Bundle.FullPath = filepath.Join(w.cfg.Preprocessing.SharedPath, filepath.Clean(result.RelativePath)) tinfo.IsDir = true return nil diff --git a/internal/workflow/processing_test.go b/internal/workflow/processing_test.go index 54ab30574..b90735fa5 100644 --- a/internal/workflow/processing_test.go +++ b/internal/workflow/processing_test.go @@ -739,17 +739,6 @@ func (s *ProcessingWorkflowTestSuite) TestPreprocessingChildWorkflow() { nil, ) - s.env.OnActivity(activities.BundleActivityName, sessionCtx, - &activities.BundleActivityParams{ - SourcePath: prepDest, - TransferDir: s.transferDir, - IsDir: true, - }, - ).Return( - &activities.BundleActivityResult{FullPath: transferPath}, - nil, - ) - s.env.OnActivity(a3m.CreateAIPActivityName, sessionCtx, mock.AnythingOfType("*a3m.CreateAIPActivityParams")). Return(nil, nil). Once() @@ -784,7 +773,7 @@ func (s *ProcessingWorkflowTestSuite) TestPreprocessingChildWorkflow() { s.env.OnActivity( filesys.RemoveActivityName, sessionCtx, - &filesys.RemoveActivityParams{Paths: []string{downloadDir, transferPath}}, + &filesys.RemoveActivityParams{Paths: []string{downloadDir}}, ).Return(&filesys.RemoveActivityResult{}, nil) s.env.OnActivity(activities.DeleteOriginalActivityName, sessionCtx, watcherName, key).Return(nil, nil).Once()