org.embl.ebi.escience.scufl.enactor
Interface WorkflowEventListener

All Known Implementing Classes:
RshellConnectionManager, WorkflowEventAdapter

public interface WorkflowEventListener

Implementations express an interest in events produced during the lifecycle of an enactor instance including but not limited to workflow creation and process reports

Author:
Tom Oinn
See Also:
WorkflowEventAdapter

Method Summary
 void collectionConstructed(CollectionConstructionEvent e)
          Called when a data item is wrapped up inside a default collection prior to being passed to a service expecting a higher cardinality version of the same input type
 void dataChanged(UserChangedDataEvent e)
          Called when a user changes intemediate data (output).
 void nestedWorkflowCompleted(NestedWorkflowCompletionEvent e)
          Called when a nested workflow instance has completed its invocation successfully.
 void nestedWorkflowCreated(NestedWorkflowCreationEvent e)
          Called when a nested workflow instance is created and about to be invoked by the enactor instance.
 void nestedWorkflowFailed(NestedWorkflowFailureEvent e)
          Called when a nested workflow fails.
 void processCompleted(ProcessCompletionEvent e)
          Called when an individual processor within a workflow completes its invocation successfuly.
 void processCompletedWithIteration(IterationCompletionEvent e)
          Called when the iteration stage of the processor is completed the event carries details of the LSIDs of the component results which are now integrated into the result of the process
 void processFailed(ProcessFailureEvent e)
          Called when a process fails - typically this will be followed by a WorkflowFailed event.
 void workflowCompleted(WorkflowCompletionEvent e)
          Called when a previously scheduled workflow completes successfuly.
 void workflowCreated(WorkflowCreationEvent e)
          Called when a workflow instance has been submitted along with associated input data to an enactor instance.
 void workflowDestroyed(WorkflowDestroyedEvent event)
          This event is sent after workflowInstance.destroy() has been called.
 void workflowFailed(WorkflowFailureEvent e)
          Called when a workflow instance fails for some reason
 void workflowToBeDestroyed(WorkflowToBeDestroyedEvent event)
          Called right before workflowInstance.destroy() is to be called.
 

Method Detail

workflowCreated

void workflowCreated(WorkflowCreationEvent e)
Called when a workflow instance has been submitted along with associated input data to an enactor instance. Methods on the WorkflowCreationEvent allow access to the underlying workflow instance, the user context and the enactor.


workflowFailed

void workflowFailed(WorkflowFailureEvent e)
Called when a workflow instance fails for some reason


workflowCompleted

void workflowCompleted(WorkflowCompletionEvent e)
Called when a previously scheduled workflow completes successfuly. This is called after results are available, so storage plugins may rely on the getResults method on the workflow instance references within the event being valid.


nestedWorkflowFailed

void nestedWorkflowFailed(NestedWorkflowFailureEvent e)
Called when a nested workflow fails. The event contains an referenece to the failed workflow instance.


nestedWorkflowCreated

void nestedWorkflowCreated(NestedWorkflowCreationEvent e)
Called when a nested workflow instance is created and about to be invoked by the enactor instance. Where a nested workflow exists within an iteration, this will be called for each iteration.The event carries details of the workflow instance created.


nestedWorkflowCompleted

void nestedWorkflowCompleted(NestedWorkflowCompletionEvent e)
Called when a nested workflow instance has completed its invocation successfully. The event carries with it details of the workflow instance invoked.

Parameters:
e -

processCompleted

void processCompleted(ProcessCompletionEvent e)
Called when an individual processor within a workflow completes its invocation successfuly. For cases where iteration is involved this is called once for each invocation of the processor task within the iteration.


processCompletedWithIteration

void processCompletedWithIteration(IterationCompletionEvent e)
Called when the iteration stage of the processor is completed the event carries details of the LSIDs of the component results which are now integrated into the result of the process


processFailed

void processFailed(ProcessFailureEvent e)
Called when a process fails - typically this will be followed by a WorkflowFailed event.


dataChanged

void dataChanged(UserChangedDataEvent e)
Called when a user changes intemediate data (output).


collectionConstructed

void collectionConstructed(CollectionConstructionEvent e)
Called when a data item is wrapped up inside a default collection prior to being passed to a service expecting a higher cardinality version of the same input type


workflowToBeDestroyed

void workflowToBeDestroyed(WorkflowToBeDestroyedEvent event)
Called right before workflowInstance.destroy() is to be called. (Usually this has been triggered by the user clicking a "Close" button in the result window)

This is your last chance to access the workflow instance before it becomes unusable. workflowDestroyed(WorkflowDestroyedEvent) will be called after destroy() has been invoked, but at that point it will be too late to access the instance.

Note: This is the last chance to access workflowInstance before it is destroyed. If you have your own references to the instance or any of the data of workflowInstance (such as the input map), this is the time to remove such references.


workflowDestroyed

void workflowDestroyed(WorkflowDestroyedEvent event)
This event is sent after workflowInstance.destroy() has been called.

This is the last message you receive about this workflow instance, which by now should not be accessed anymore.

event.getWorkflowInstance() on this event will therefore always return null, but you can access what would have been the result of workflowInstance.getID() by calling event.getWorkflowInstanceID().

If you would like to access the instance before it has been destroyed, do so from workflowToBeDestroyed(WorkflowToBeDestroyedEvent)