diff --git a/tests/wapi_adapter.py b/tests/wapi_adapter.py index aaa633d..bb51af8 100644 --- a/tests/wapi_adapter.py +++ b/tests/wapi_adapter.py @@ -360,3 +360,10 @@ def get_running_workflow_steps(self, *, running_workflow_id: str) -> dict[str, A item["id"] = key steps.append(item) return {"count": len(steps), "running_workflow_steps": steps} + + def realise_outputs( + self, *, running_workflow_step_id: str, variables: dict[str, str] + ) -> tuple[dict[str, Any], int]: + del running_workflow_step_id + del variables + return {}, 0 diff --git a/workflow/workflow_abc.py b/workflow/workflow_abc.py index 26af608..80cc962 100644 --- a/workflow/workflow_abc.py +++ b/workflow/workflow_abc.py @@ -126,7 +126,10 @@ class WorkflowAPIAdapter(ABC): """The APIAdapter providing read/write access to various Workflow tables and records in the Model that is owned by the DM. It provides the ability to create and retrieve Workflow, RunningWorkflow and RunningWorkflowStep records returning dictionary - (API-like) responses.""" + (API-like) responses. + + This adapter also provides methods to copy outputs to the + corresponding Project from Workflow steps that generate outputs.""" @abstractmethod def get_workflow( @@ -318,6 +321,17 @@ def get_job( # } # If not present an empty dictionary should be returned. + @abstractmethod + def realise_outputs( + self, *, running_workflow_step_id: str, outputs: list[str] + ) -> tuple[dict[str, Any], int]: + """Copy (link) the step's files as outputs into the Project directory. + A step ID is provided, along with a list of outputs (files).""" + # Should return an empty map or: + # { + # "error": "", + # } + class MessageDispatcher(ABC): """The class handling the sending of messages (on the Data Manager message bus)."""