From a25c759dcbeac431c056e23226fe56c771279371 Mon Sep 17 00:00:00 2001
From: mancini <mancini@astron.nl>
Date: Wed, 13 Oct 2021 16:12:16 +0200
Subject: [PATCH] Add missing filename field to ingest object

---
 compress_pipeline.cwl   | 3 +++
 steps/format_ingest.cwl | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/compress_pipeline.cwl b/compress_pipeline.cwl
index fcd6f49..e76a0a3 100644
--- a/compress_pipeline.cwl
+++ b/compress_pipeline.cwl
@@ -119,6 +119,9 @@ steps:
         source: extract_sip_meta/ingest
       - id: output_name
         default: compressed
+      - id: file_name
+        source: compress/compressed
+        valueFrom: $(self.basename)
     out:
       - id: ingest
     run: steps/format_ingest.cwl
diff --git a/steps/format_ingest.cwl b/steps/format_ingest.cwl
index 073e6e8..51cbbac 100644
--- a/steps/format_ingest.cwl
+++ b/steps/format_ingest.cwl
@@ -6,7 +6,8 @@ inputs:
 
   - id: output_name
     type: string
-
+  - id: file_name
+    type: string
 outputs:
   - id: ingest
     type: Any
@@ -16,6 +17,7 @@ expression: |
   ${
     return { "ingest": {
         "path": inputs.output_name,
+        "file_name": inputs.file_name,
         "metadata": inputs.metadata
       }
     }
-- 
GitLab