eu.planets_project.ifr.core.wee.api
Interface WeeManager


public interface WeeManager

It allows to submit a job to the WorkflowExecution Engine's queue and also maintains a list of jobs currently being executed and their status, etc. A polling architecture for clients is implemented by using tickets for job identification. The list of jobs is a nice thread-safe FIFO Queue which is processed by the messageDriven WorkflowExecutionEngine.

Since:
12.11.2008

Method Summary
 WorkflowResult getExecutionResult(java.util.UUID ticket)
          Method for polling the wf execution results for a given ticket.
 int getPositionInQueue(java.util.UUID ticket)
          Returns the current position in the queue.
 int getProgress(java.util.UUID ticket)
          Returns -1 if status = submitted, completed or failed; 0-100 when execution is running
 WorkflowExecutionStatus getStatus(java.util.UUID ticket)
          Returns the Workflow Execution Status for a given ticket.
 boolean isExecutionCompleted(java.util.UUID ticket)
           
 boolean isExecutionFailed(java.util.UUID ticket)
           
 boolean isExecutionRunning(java.util.UUID ticket)
           
 void notify(java.util.UUID ticket, WorkflowExecutionStatus status)
          The callback method which is used by the execution engine to report back on a wf execution's status
 void notify(java.util.UUID ticket, WorkflowResult wfResult, WorkflowExecutionStatus executionStatus)
          The callback method which is used by the execution engine to report back on a wf execution and its status
 void notify(java.util.UUID ticket, WorkflowResult wfResult, WorkflowExecutionStatus executionStatus, int percentCompleted)
          The callback method which is used by the execution engine to report back on a wf execution, its status, the current workflowResult and the percent of completed items
 java.util.UUID submitWorkflow(WorkflowInstance workflow)
          Submits a workflow for execution.
 

Method Detail

submitWorkflow

java.util.UUID submitWorkflow(WorkflowInstance workflow)
Submits a workflow for execution. This will - generate a UUID ticket - send a message containing all information (workflow, ticket) to the queue

Parameters:
workflow -
Returns:

getStatus

WorkflowExecutionStatus getStatus(java.util.UUID ticket)
                                  throws PlanetsException
Returns the Workflow Execution Status for a given ticket.

Parameters:
ticket -
Returns:
Throws:
PlanetsException - if ticket is unknown

getPositionInQueue

int getPositionInQueue(java.util.UUID ticket)
                       throws PlanetsException
Returns the current position in the queue.

Parameters:
ticket -
Returns:
Throws:
PlanetsException - if ticket is unknown

notify

void notify(java.util.UUID ticket,
            WorkflowResult wfResult,
            WorkflowExecutionStatus executionStatus)
The callback method which is used by the execution engine to report back on a wf execution and its status

Parameters:
wfResult -
executionStatus -

notify

void notify(java.util.UUID ticket,
            WorkflowExecutionStatus status)
The callback method which is used by the execution engine to report back on a wf execution's status

Parameters:
wfResult -
executionStatus -

notify

void notify(java.util.UUID ticket,
            WorkflowResult wfResult,
            WorkflowExecutionStatus executionStatus,
            int percentCompleted)
The callback method which is used by the execution engine to report back on a wf execution, its status, the current workflowResult and the percent of completed items

Parameters:
wfResult -
executionStatus -
percentCompleted - 0-100

getProgress

int getProgress(java.util.UUID ticket)
                throws PlanetsException
Returns -1 if status = submitted, completed or failed; 0-100 when execution is running

Parameters:
ticket -
Returns:
Throws:
PlanetsException - if ticket is unknown

getExecutionResult

WorkflowResult getExecutionResult(java.util.UUID ticket)
                                  throws PlanetsException
Method for polling the wf execution results for a given ticket.

Parameters:
ticket -
Returns:
WorkflowResult
Throws:
PlanetsException - if status is != completed

isExecutionRunning

boolean isExecutionRunning(java.util.UUID ticket)

isExecutionCompleted

boolean isExecutionCompleted(java.util.UUID ticket)

isExecutionFailed

boolean isExecutionFailed(java.util.UUID ticket)


Copyright © 2007-2010 The Planets Consortium. All Rights Reserved.