|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.embl.ebi.escience.scufl.enactor.implementation.WorkflowInstanceImpl
public class WorkflowInstanceImpl
Represents a receipt for a workflow submitted by the client
This class is used as the handle for all client operations on a running or scheduled workflow instance. It includes methods to extract status and result documents and is augemented by Taverna to also include methods to return the inputs and outputs to a specific processor for debug purpopses during the construction of a workflow.
| Method Summary | |
|---|---|
void |
addWorkflowStateListener(uk.ac.soton.itinnovation.freefluo.event.WorkflowStateListener listener)
Register the specified listener with the engine for this instance and use the internal workflow ID |
void |
cancelExecution()
Cancel the currently running workflow, freeing any resources used |
boolean |
changeOutputPortTaskData(java.lang.String processorId,
java.lang.String OutputPortName,
java.lang.Object newData)
Changes intermediate output data on the output porttask. |
void |
destroy()
Ask for the the workflow instance to be destroyed. |
java.lang.String |
getDefinitionLSID()
|
java.lang.String |
getErrorMessage()
Returns a human readable string containing details of errors that occurred during execution of this WorkflowInstance |
java.lang.String |
getID()
Return a unique identifier for this workflow run. |
static WorkflowInstanceImpl |
getInstance(uk.ac.soton.itinnovation.freefluo.main.Engine engine,
ScuflModel workflowModel,
java.lang.String engineId)
Get the workflow as compiled to the given engine with the given engineId. |
java.util.Map<java.lang.String,DataThing>[] |
getIntermediateResultsForProcessor(java.lang.String processorName)
Returns two Map objects of port name -> dataThing. |
java.util.Map<java.lang.String,DataThing> |
getOutput()
Return the Map of DataThing objects for all known workflow outputs, keys are the output names and values are the DataThing objects. |
java.lang.String |
getProgressReportXMLString()
Updated progress report code to use the event lists |
java.lang.String |
getProvenanceXMLString()
Return the XML string containing the provenance report, this document is currently poorly defined but will in the future contain the set of RDF statements generated by the knowledge collection code. |
java.lang.String |
getStatus()
This method can be used to get a simple String that describes the current state of this workflow instance object. |
UserContext |
getUserContext()
Get the user context for this workflow instance in the form of a UserContext implementation |
ScuflModel |
getWorkflowModel()
Return a reference to the ScuflModel which this workflow was built from |
boolean |
isDataNonVolatile(java.lang.String processorId)
Checks if task's output is allowed to be editied. |
boolean |
isPaused()
Return whether the workflow is currently paused |
void |
pause(java.lang.String processorId)
Add breakoint to the specific processor. |
void |
pauseExecution()
Pause the workflow enactment. |
void |
removeWorkflowStateListener(uk.ac.soton.itinnovation.freefluo.event.WorkflowStateListener listener)
Remove a workflow state listener |
void |
resume(java.lang.String processorId)
Remove breakoint to the specific processor and resume it. |
void |
resumeExecution()
Resume the workflow enactment. |
void |
run()
Start this workflow istance running. |
void |
setInputs(java.util.Map inputMap)
Set workflow inputs. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static WorkflowInstanceImpl getInstance(uk.ac.soton.itinnovation.freefluo.main.Engine engine,
ScuflModel workflowModel,
java.lang.String engineId)
Instances are cached until the instance is destroyed by destroy()
engine - Engine the workflow was compiled onworkflowModel - Workflow that was compiledengineId - Identifier returned when compiling
destroy()public java.lang.String toString()
toString in class java.lang.Objectpublic ScuflModel getWorkflowModel()
getWorkflowModel in interface WorkflowInstancepublic java.lang.String getID()
getID in interface WorkflowInstancepublic java.lang.String getDefinitionLSID()
public void addWorkflowStateListener(uk.ac.soton.itinnovation.freefluo.event.WorkflowStateListener listener)
public void removeWorkflowStateListener(uk.ac.soton.itinnovation.freefluo.event.WorkflowStateListener listener)
public void setInputs(java.util.Map inputMap)
WorkflowInstance
setInputs in interface WorkflowInstance
public void run()
throws uk.ac.soton.itinnovation.freefluo.main.InvalidInputException
WorkflowInstance
run in interface WorkflowInstanceuk.ac.soton.itinnovation.freefluo.main.InvalidInputException - if the input is doesn't map to source in the dataflow.public java.lang.String getStatus()
WorkflowInstanceFlowStateDefinition.
getStatus in interface WorkflowInstance
public java.util.Map<java.lang.String,DataThing>[] getIntermediateResultsForProcessor(java.lang.String processorName)
throws UnknownProcessorException
getIntermediateResultsForProcessor in interface WorkflowInstanceUnknownProcessorException - if a ProcessorTask with the supplied name cannot be found
within the DiGraph that this FlowReceipt is associated
with.public java.lang.String getProgressReportXMLString()
getProgressReportXMLString in interface WorkflowInstancepublic java.util.Map<java.lang.String,DataThing> getOutput()
WorkflowInstance
getOutput in interface WorkflowInstancepublic java.lang.String getErrorMessage()
WorkflowInstanceWorkflowInstance
getErrorMessage in interface WorkflowInstancepublic java.lang.String getProvenanceXMLString()
WorkflowInstance
getProvenanceXMLString in interface WorkflowInstancepublic void pauseExecution()
WorkflowInstance
pauseExecution in interface WorkflowInstancepublic void resumeExecution()
WorkflowInstance
resumeExecution in interface WorkflowInstancepublic boolean isPaused()
WorkflowInstance
isPaused in interface WorkflowInstancepublic void cancelExecution()
WorkflowInstance
cancelExecution in interface WorkflowInstancepublic void destroy()
This happens in two stages. First, an WorkflowToBeDestroyedEvent is sent to each of the registered WorkflowEventListener. A mini-listener has been added by this method, which will be the latest listener to receive that event, uppon when the real destruction (through doDestroy()) will occur. After that, a WorkflowDestroyedEvent is sent out to confirm the destruction. Finally, cleanup() is called.
destroy in interface WorkflowInstancedoDestroy(),
cleanup(),
WorkflowToBeDestroyedEvent,
WorkflowDestroyedEvent,
WorkflowEventDispatcherpublic void pause(java.lang.String processorId)
WorkflowInstance
pause in interface WorkflowInstancepublic boolean isDataNonVolatile(java.lang.String processorId)
WorkflowInstance
isDataNonVolatile in interface WorkflowInstance
public boolean changeOutputPortTaskData(java.lang.String processorId,
java.lang.String OutputPortName,
java.lang.Object newData)
WorkflowInstance
changeOutputPortTaskData in interface WorkflowInstancepublic void resume(java.lang.String processorId)
WorkflowInstance
resume in interface WorkflowInstancepublic UserContext getUserContext()
WorkflowInstance
getUserContext in interface WorkflowInstance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||