Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/wapi_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 15 additions & 1 deletion workflow/workflow_abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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": "<error message>",
# }


class MessageDispatcher(ABC):
"""The class handling the sending of messages (on the Data Manager message bus)."""
Expand Down