-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hernán Vargas
committed
Mar 20, 2024
1 parent
cb6ac2c
commit 4cf1122
Showing
7 changed files
with
54 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,39 @@ | ||
# Method Adapter | ||
|
||
A [DISK](https://disk.isi.edu) Method adapter is the implementation of the `MethodAdapter` abstract class (at the end). | ||
This adapters are used to gain control of the workflow system from [DISK](https://disk.isi.edu). | ||
A [DISK](https://disk.isi.edu) Method adapter is the implementation of the `MethodAdapter` abstract class (shown at the end). | ||
These adapters are used to give [DISK](https://disk.isi.edu) control of the workflow system. | ||
|
||
The method adapter must be able to perform at least the following operations: | ||
|
||
- Get a list of methods | ||
- Get details of parameters | ||
- Send a workflow execution | ||
- Monitor workflows | ||
- Monitor a workflows execution | ||
|
||
Code examples available in [our repository](https://github.com/KnowledgeCaptureAndDiscovery/DISK-API/blob/main/server/src/main/java/org/diskproject/server/adapters/AirFlowAdapter.java). | ||
|
||
|
||
```java | ||
public abstract class MethodAdapter { | ||
public MethodAdapter () {} | ||
|
||
public List<Method> ListMethods (); | ||
public Method GetMethodInfo (String methodid); | ||
public boolean RunMethod (Method method); | ||
|
||
// Check that a LOI is correctly configured for this adapter | ||
public abstract boolean validateLOI (LineOfInquiry loi, Map<String, String> values); | ||
// Basic endpoint information, getters and setters omitted for simplicity | ||
private String name, id, endpointUrl, username, password, description; | ||
private Float version; | ||
|
||
public MethodAdapter (String adapterName, String url); | ||
public MethodAdapter (String adapterName, String url, String username, String password); | ||
|
||
// Get workflows and input parameters | ||
public abstract List<WorkflowTemplate> getWorkflowList(); | ||
public abstract List<WorkflowVariable> getWorkflowVariables(String id); | ||
// Checks if a list of input files are available for the workflow manager. | ||
public abstract List<String> areFilesAvailable (Set<String> fileList, String dType); | ||
// Uploads/register data into the workflow manager | ||
public abstract String addData (String url, String name, String dType) throws Exception; | ||
// Runs a workflow | ||
public abstract List<String> runWorkflow (String wfId, List<VariableBinding> vBindings, Map<String, WorkflowVariable> inputVariables); | ||
// Monitor workflow | ||
public abstract Execution getRunStatus (String runId); | ||
// Download a output file | ||
public abstract FileAndMeta fetchData (String dataId); | ||
} | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters