|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.embl.ebi.escience.scufl.tools.WorkflowLauncher
public class WorkflowLauncher
A utility class that wraps the process of executing a workflow, allowing workflows to be easily executed independantly of the GUI.
| Constructor Summary | |
|---|---|
WorkflowLauncher(java.io.InputStream xmlStream)
Set userContext and instantiate the WorkflowLauncher,
constructing an instance of the ScuflModel from the XML provided by the
given input stream. |
|
WorkflowLauncher(java.io.InputStream xmlStream,
UserContext userContext)
Set userContext and instantiate the WorkflowLauncher,
constructing an instance of the ScuflModel from the XML provided by the
given input stream. |
|
WorkflowLauncher(ScuflModel model)
Instantiate the WorkflowLauncher with a direct reference to the ScuflModel to be executed. |
|
WorkflowLauncher(ScuflModel model,
UserContext userContext)
Instantiate the WorkflowLauncher with a direct reference to the ScuflModel to be executed, together with a UserContext for the user executing this model. |
|
WorkflowLauncher(java.net.URL url)
Instantiate the WorkflowLauncher, constructing an instance of the ScuflModel from the XML in the provided url |
|
WorkflowLauncher(java.net.URL url,
UserContext userContext)
Instantiate the WorkflowLauncher, constructing an instance of the ScuflModel from the XML in the provided url |
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,DataThing> |
execute(java.util.Map<java.lang.String,DataThing> inputs)
|
java.util.Map<java.lang.String,DataThing> |
execute(java.util.Map<java.lang.String,DataThing> inputs,
WorkflowEventListener workflowEventListener)
Executes the workflow with the provided inputs (which is a Map of DataThings) and userContext. |
java.util.Map<java.lang.String,DataThing> |
execute(java.util.Map<java.lang.String,DataThing> inputs,
WorkflowEventListener[] workflowEventListeners)
Executes the workflow with the provided inputs (which is a Map of DataThings) and userContext. |
java.lang.String |
getProgressReportXML()
Provides access to the progress report after the workflow has be executed |
static java.util.Map<java.lang.String,DataThing> |
loadInputDoc(java.io.File file)
Load a XML-serialised Baclava data document from a file. |
static void |
main(java.lang.String[] args)
Allows a workflow to be executed stand-alone. |
static void |
saveOutputDoc(java.util.Map<java.lang.String,DataThing> outputs,
java.io.File outputDoc)
Save workflow outputs as an DataThing XML document |
static void |
saveOutputs(java.util.Map<java.lang.String,DataThing> outputs,
java.io.File outputDir)
Save workflow outputs as a directory structure. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WorkflowLauncher(java.io.InputStream xmlStream,
UserContext userContext)
throws ProcessorCreationException,
DataConstraintCreationException,
UnknownProcessorException,
UnknownPortException,
DuplicateProcessorNameException,
MalformedNameException,
ConcurrencyConstraintCreationException,
DuplicateConcurrencyConstraintNameException,
XScuflFormatException
userContext and instantiate the WorkflowLauncher,
constructing an instance of the ScuflModel from the XML provided by the
given input stream.
xmlStream - userContext - a UserContext
ProcessorCreationException
DataConstraintCreationException
UnknownProcessorException
UnknownPortException
DuplicateProcessorNameException
MalformedNameException
ConcurrencyConstraintCreationException
DuplicateConcurrencyConstraintNameException
XScuflFormatException
public WorkflowLauncher(java.io.InputStream xmlStream)
throws ProcessorCreationException,
DataConstraintCreationException,
UnknownProcessorException,
UnknownPortException,
DuplicateProcessorNameException,
MalformedNameException,
ConcurrencyConstraintCreationException,
DuplicateConcurrencyConstraintNameException,
XScuflFormatException
userContext and instantiate the WorkflowLauncher,
constructing an instance of the ScuflModel from the XML provided by the
given input stream.
xmlStream -
ProcessorCreationException
DataConstraintCreationException
UnknownProcessorException
UnknownPortException
DuplicateProcessorNameException
MalformedNameException
ConcurrencyConstraintCreationException
DuplicateConcurrencyConstraintNameException
XScuflFormatException
public WorkflowLauncher(java.net.URL url,
UserContext userContext)
throws java.io.FileNotFoundException,
ProcessorCreationException,
java.io.IOException,
DataConstraintCreationException,
UnknownProcessorException,
UnknownPortException,
DuplicateProcessorNameException,
MalformedNameException,
ConcurrencyConstraintCreationException,
DuplicateConcurrencyConstraintNameException,
XScuflFormatException
xmlFilename - userContext - a UserContext
java.io.FileNotFoundException
ProcessorCreationException
DataConstraintCreationException
UnknownProcessorException
UnknownPortException
DuplicateProcessorNameException
MalformedNameException
ConcurrencyConstraintCreationException
DuplicateConcurrencyConstraintNameException
XScuflFormatException
java.io.IOException
public WorkflowLauncher(java.net.URL url)
throws java.io.FileNotFoundException,
ProcessorCreationException,
java.io.IOException,
DataConstraintCreationException,
UnknownProcessorException,
UnknownPortException,
DuplicateProcessorNameException,
MalformedNameException,
ConcurrencyConstraintCreationException,
DuplicateConcurrencyConstraintNameException,
XScuflFormatException
xmlFilename -
java.io.FileNotFoundException
ProcessorCreationException
DataConstraintCreationException
UnknownProcessorException
UnknownPortException
DuplicateProcessorNameException
MalformedNameException
ConcurrencyConstraintCreationException
DuplicateConcurrencyConstraintNameException
XScuflFormatException
java.io.IOExceptionpublic WorkflowLauncher(ScuflModel model)
model - a ScuflModel
public WorkflowLauncher(ScuflModel model,
UserContext userContext)
model - a ScuflModeluserContext - a UserContext| Method Detail |
|---|
public java.lang.String getProgressReportXML()
public java.util.Map<java.lang.String,DataThing> execute(java.util.Map<java.lang.String,DataThing> inputs)
throws WorkflowSubmissionException,
uk.ac.soton.itinnovation.freefluo.main.InvalidInputException
WorkflowSubmissionException
uk.ac.soton.itinnovation.freefluo.main.InvalidInputException
public java.util.Map<java.lang.String,DataThing> execute(java.util.Map<java.lang.String,DataThing> inputs,
WorkflowEventListener[] workflowEventListeners)
throws WorkflowSubmissionException,
uk.ac.soton.itinnovation.freefluo.main.InvalidInputException
userContext. Returns the outputs of the
workflow (which is also a Map of DataThings). An array of
workflowEventListeners can be provided to allow handling of events as the
workflow is executed.
inputs - workflowEventListeners -
WorkflowSubmissionException
uk.ac.soton.itinnovation.freefluo.main.InvalidInputExceptionDataThing,
WorkflowEventListener
public java.util.Map<java.lang.String,DataThing> execute(java.util.Map<java.lang.String,DataThing> inputs,
WorkflowEventListener workflowEventListener)
throws WorkflowSubmissionException,
uk.ac.soton.itinnovation.freefluo.main.InvalidInputException
userContext. Returns the outputs of the
workflow (which is also a Map of DataThings). A workflowEventListener can
be provided to allow handling of events as the workflow is executed.
inputs - workflowEventListener -
WorkflowSubmissionException
uk.ac.soton.itinnovation.freefluo.main.InvalidInputExceptionDataThing,
WorkflowEventListener
public static void main(java.lang.String[] args)
throws java.net.MalformedURLException
args -
java.net.MalformedURLException
public static java.util.Map<java.lang.String,DataThing> loadInputDoc(java.io.File file)
throws org.jdom.JDOMException,
java.io.IOException
file - The file to load
DataThing Map of input values
org.jdom.JDOMException - If the file could not be parsed
java.io.IOException - If the file could not be opened/read
public static void saveOutputDoc(java.util.Map<java.lang.String,DataThing> outputs,
java.io.File outputDoc)
throws java.io.IOException
outputs - Map of String -> DataThing to saveoutputDoc - File to write the document
java.io.IOException - If the file cannot be written
public static void saveOutputs(java.util.Map<java.lang.String,DataThing> outputs,
java.io.File outputDir)
throws java.io.IOException
outputs - Map of DataThing to saveoutputDir - Base directory for structure
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||