flowserv.client.app.workflow module
Wrapper that provides access to a workflow via the service API.
- class flowserv.client.app.workflow.Workflow(workflow_id: str, group_id: str, service: flowserv.service.api.APIFactory)
Bases:
objectWrapper object for a single workflow. Maintains workflow metadata and provides functionality to execute and monitor workflow runs via the service API.
- cancel_run(run_id: str, reason: Optional[List[str]] = None)
Cancel the run with the given identifier.
Raises an unauthorized access error if the user does not have the necessary access rights to cancel the run.
- Parameters
run_id (string) – Unique run identifier
reason (string, optional) – Optional text describing the reason for cancelling the run
- delete_run(run_id: str)
Delete the run with the given identifier.
Raises an unauthorized access error if the user does not have the necessary access rights to delete the run.
- Parameters
run_id (string) – Unique run identifier
- description() str
Get descriptive header for the application.
- Return type
string
- get_file(run_id: str, file_id: Optional[str] = None) flowserv.model.files.FileHandle
Get handle for run result file. If the file identifier is not given the handle for the run result archive is returned.
- Parameters
run_id (string) – Unique run identifier.
file_id (string, default=None) – Unique file identifier.
- Return type
- get_postproc_results() flowserv.client.app.run.Run
Get results of a post-processing run. The result is None if no entry for a post-porcessing run is found in the workflow handle.
- Return type
- property identifier: str
Get the identifier of the associated workflow.
- Return type
string
- instructions() str
Get instructions text for the application.
- Return type
string
- name() str
Get application title.
- Return type
string
- parameters() flowserv.model.template.parameter.ParameterIndex
Get parameter declaration for application runs.
- Return type
flowserv.model.template.parameters.ParameterIndex
- poll_run(run_id) flowserv.client.app.run.Run
Get run result handle for a given run.
Raises an unauthorized access error if the user does not have read access to the run.
- Parameters
run_id (string) – Unique run identifier
- Return type
- start_run(arguments: Dict, config: Optional[Dict] = None, poll_interval: Optional[int] = None) flowserv.client.app.run.Run
Run the associated workflow for the given set of arguments.
- Parameters
arguments (dict) – Dictionary of user-provided arguments.
config (dict, default=None) – Optional implementation-specific configuration settings that can be used to overwrite settings that were initialized at object creation.
poll_interval (int, default=None) – Optional poll interval that is used to check the state of a run until it is no longer in active state.
- Return type