weaver.processes.wps1_process
¶
Module Contents¶
-
class
weaver.processes.wps1_process.
Wps1Process
(provider: str, process: str, request: weaver.wps.service.WorkerRequest, update_status: weaver.typedefs.UpdateStatusPartialFunction)[source]¶ Common interface for WPS Process to be used for dispatching CWL jobs.
Multiple convenience methods are provide. Processes inheriting from this base should provide abstract method implementation as needed or required.
Note
For expected operations details and their execution order, please refer to Workflow Step Operations.
See also
execute()
for complete details of the operations and ordering.-
format_inputs
(self: weaver.typedefs.CWL_RuntimeInputsMap, workflow_inputs) → weaver.typedefs.OWS_InputDataValues[source]¶ Convert submitted CWL workflow inputs into corresponding
OWSLib.wps
representation for execution.- Parameters
workflow_inputs – mapping of input IDs and values submitted to the workflow.
- Returns
converted OWS inputs ready for submission to remote WPS process.
-
format_outputs
(self: weaver.typedefs.JobOutputs, workflow_outputs) → weaver.typedefs.JobOutputs[source]¶ Implementation dependent operations to configure expected outputs for Job execution.
This is an optional step that will simply pass down the outputs as is if no formatting is required. Otherwise, the implementing Process can override the step to reorganize workflow step outputs into the necessary format required for their
dispatch()
call.
-
prepare
(self)[source]¶ Implementation dependent operations to prepare the Process for Job execution.
This is an optional step that can be omitted entirely if not needed.
-
dispatch
(self: weaver.typedefs.JobInputs, process_inputs: weaver.typedefs.JobOutputs, process_outputs) → weaver.typedefs.JobExecution[source]¶ Implementation dependent operations to dispatch the Job execution to the remote Process.
- Returns
reference details that will be passed to
monitor()
.
-
monitor
(self: weaver.typedefs.JobExecution, monitor_reference) → bool[source]¶ Implementation dependent operations to monitor the status of the Job execution that was dispatched.
This step should block
execute()
until the final status of the remote Job (failed/success) can be obtained.- Returns
success status
-
get_results
(self: weaver.typedefs.JobExecution, monitor_reference) → weaver.typedefs.JobResults[source]¶ Implementation dependent operations to retrieve the results following a successful Job execution.
The operation should NOT fetch (stage) results, but only obtain the locations where they can be retrieved, based on the monitoring reference that was generated from the execution.
- Returns
results locations
-