Octave WasdiLib
Methods
startWasdi
- octavewasdilib.startWasdi()
Initialize the Wasdi object
- Parameters:
config_path – The path to be used to import the configuration.
- Returns:
Wasdi
The object to be used to invoke all the following call to Wasdi services
addFileToWASDI
- octavewasdilib.addFileToWASDI(Wasdi, sFileName)
Ingest a new file in the Active WASDI Workspace waiting for the result The method takes a file saved in the workspace root (see getSaveFilePath) not already added to the WS o work be sure that the file is on the server Syntax sStatus =addFileToWASDI(Wasdi, sFileName);
- Parameters:
Wasdi – Wasdi object created after the wasdilib call
sFileName – Name of the file to add
- Returns:
sStatus
Status of the Ingest Process as a String: CREATED, RUNNING, STOPPED, DONE, ERROR
executeWorkflow
- octavewasdilib.executeWorkflow(Wasdi, sWorkflow, asInputFiles, asOutputFiles)
Executes a SNAP workflow. The workflow has to be uploaded in WASDI: it can be public or private of a user. If it is private, it must be triggered from the owner. Syntax sStatus = wExecuteWorkflow(Wasdi, sWorkflow, asInputFiles, asOutputFiles)
- Parameters:
Wasdi – Wasdi object created after the wasdilib call
sWorkflow – Name of the workflow
asInputFiles – array of strings with the name of the input files. Must be one file for each Read Node of the workflow, in the exact order
asOutputFiles – array of strings with the name of the output files. Must be one file for each Write Node of the workflow, in the exact order
- Returns:
sStatus
Exit Workflow Process Status as a String: CREATED, RUNNING, STOPPED, DONE, ERROR
getFullProductPath
- octavewasdilib.getFullProductPath(Wasdi, sFileName)
Get the full local path of a product. If it is not present on the local PC and DownloadActive flag is true the product will be downloaded. Syntax sFullPath =getFullProductPath(Wasdi, sFileName);
- Parameters:
Wasdi – Wasdi object created after the wasdilib call
FileName – Name of the file
- Returns:
sFullPath
full local path
getProcessStatus
- octavewasdilib.getProcessStatus(Wasdi, sProcessId)
Get the status of a Process Syntax sStatus =getProcessStatus(Wasdi, sProcessId);
- Parameters:
Wasdi – Wasdi object created after the wasdilib call
sProcessId – Id of the process to query
- Returns:
sStatus
Process Status as a String: CREATED, RUNNING, STOPPED, DONE, ERROR
getProductsByWorkspace
- octavewasdilib.getProductsByWorkspace(Wasdi, sWorkspaceName)
Get the List of Products in a Workspace Syntax asProducts=getProductsByWorkspace(Wasdi, sWorkspaceName); :param Wasdi: Wasdi object created after the wasdilib call :param sWorkspaceName: name of the workspace
- returns:
asProducts
array of strings that are the names of the products
getSavePath
- octavewasdilib.getSavePath(Wasdi)
Get the full local path where to save a product in the active workspace Syntax sSavePath =getSavePath(Wasdi);
- Parameters:
Wasdi – Wasdi object created after the wasdilib call
- Returns:
sSavePath
the local path to use to save the file, including last /
getWorkflows
- octavewasdilib.getWorkflows(Wasdi)
Get the List of Workflows of the actual User Syntax [asWorkflowNames, asWorkflowIds]=getWorkflows(Wasdi);
- Parameters:
Wasdi – Wasdi object created after the wasdilib call
- Returns:
asWorkflowNames
array of strings that are the names of the workflows- Returns:
asWorkflowIds
array of strings that are the id of the workflows
getWorkspaces
- octavewasdilib.getWorkspaces(Wasdi)
Get the List of Workspace of the actual User Syntax [asWorkspaceNames, asWorkspaceIds]=getWorkspaces(Wasdi);
- Parameters:
Wasdi – Wasdi object created after the wasdilib call
- Returns:
asWorkspaceNames
array of strings that are the names of the workspaces- Returns:
asWorkspaceIds
array of strings that are the id of the workspaces
openWorkspace
- octavewasdilib.openWorkspace(Wasdi, sWorkspaceName)
Open a Workspace Syntax sWorkspaceId=openWorkspace(Wasdi, sWorkspaceName);
INPUT :param Wasdi: Wasdi object created after the wasdilib call :param sWorkspaceName: Name of the workspace
- Returns sWorkspaceId:
id of the workspace
setProcessPayload
- octavewasdilib.setProcessPayload(Wasdi, sProcessId, sData)
Writes a Payload in a process Syntax sStatus =setProcessPayload(Wasdi, sProcessId, sData);
- Parameters:
Wasdi – Wasdi object created after the wasdilib call
sProcessId – Id of the process to update
sData – Data to write as payload
- Returns:
sStatus
Process Status as a String: CREATED, RUNNING, STOPPED, DONE, ERROR
updateProcessStatus
- octavewasdilib.updateProcessStatus(Wasdi, sProcessId, sStatus, iPerc)
Updates the status of a Process Syntax sStatus =updateProcessStatus(Wasdi, sProcessId, sStatus, iPerc);
- Parameters:
Wasdi – Wasdi object created after the wasdilib call
sProcessId – Id of the process to update
sStatus – updated status. Must be CREATED, RUNNING, STOPPED, DONE, ERROR
iPerc – progress percentage of the process
- Returns:
sOutputStatus
Process Status Updated as a String: CREATED, RUNNING, STOPPED, DONE, ERROR
waitProcess
- octavewasdilib.waitProcess(Wasdi, sProcessId)
Wait for the end of a process Syntax sStatus =waitProcess(Wasdi, sProcessId);
- Parameters:
Wasdi – Wasdi object created after the wasdilib call
sProcessId –
Id of the process to wait
- returns:
sStatus
exit status of the process: CREATED, RUNNING, STOPPED, DONE, ERROR