SMILA (incubation) API documentation

org.eclipse.smila.processing
Interface WorkflowProcessor

All Known Implementing Classes:
ODEWorkflowProcessor

public interface WorkflowProcessor

Interface of WorkflowProcessors. A workflow orchestrates a set of SMILA pipelets (or other components) to process SMILA records. It may use deliberate workflow definition languages, e.g. BPEL.

Author:
jschumacher

Field Summary
static java.lang.String NAMESPACE_PROCESSOR
          namespace of SMILA BPEL process names.
static java.lang.String WORKFLOW_DEFINITION
          key in workflow definitions for the definition of the workflow.
static java.lang.String WORKFLOW_NAME
          key in workflow definitions for the name of the workflow.
static java.lang.String WORKFLOW_READONLY
          key in workflow definitions for the readOnly flag, set in getWorkflowDefinition(String) results for predefined workflows.
static java.lang.String WORKFLOW_TIMESTAMP
          key in workflow definitions for the timestamp of the workflow, set automatically when defining the workflow.
 
Method Summary
 void deleteWorkflowDefinition(java.lang.String workflowName)
           
 AnyMap getWorkflowDefinition(java.lang.String workflowName)
          get the definition for a given workflow name.
 java.util.List<java.lang.String> getWorkflowNames()
          get the names of the currently active workflows.
 java.lang.String[] process(java.lang.String workflowName, Blackboard blackboard, java.lang.String[] recordIds)
          process records on Blackboard service.
 void setWorkflowDefinition(java.lang.String workflowName, AnyMap workflowDefinition)
           
 void synchronizeWorkflowDefinition(java.lang.String workflowName, boolean isDeleted)
          reload the workflow definition from persistence and deploy it, or undeploy it.
 

Field Detail

NAMESPACE_PROCESSOR

static final java.lang.String NAMESPACE_PROCESSOR
namespace of SMILA BPEL process names.

See Also:
Constant Field Values

WORKFLOW_NAME

static final java.lang.String WORKFLOW_NAME
key in workflow definitions for the name of the workflow.

See Also:
Constant Field Values

WORKFLOW_TIMESTAMP

static final java.lang.String WORKFLOW_TIMESTAMP
key in workflow definitions for the timestamp of the workflow, set automatically when defining the workflow.

See Also:
Constant Field Values

WORKFLOW_DEFINITION

static final java.lang.String WORKFLOW_DEFINITION
key in workflow definitions for the definition of the workflow.

See Also:
Constant Field Values

WORKFLOW_READONLY

static final java.lang.String WORKFLOW_READONLY
key in workflow definitions for the readOnly flag, set in getWorkflowDefinition(String) results for predefined workflows.

See Also:
Constant Field Values
Method Detail

process

java.lang.String[] process(java.lang.String workflowName,
                           Blackboard blackboard,
                           java.lang.String[] recordIds)
                           throws ProcessingException
process records on Blackboard service.

Parameters:
workflowName - name of workflow to execute on Ids
blackboard - blackboard to use for processing
recordIds - Ids of records to process.
Returns:
Ids of result records.
Throws:
ProcessingException - error during processing.

getWorkflowNames

java.util.List<java.lang.String> getWorkflowNames()
get the names of the currently active workflows.

Returns:
names of workflows.

getWorkflowDefinition

AnyMap getWorkflowDefinition(java.lang.String workflowName)
                             throws ProcessingException
get the definition for a given workflow name.

Parameters:
workflowName - The workflow name
Returns:
the any object with the definition
Throws:
ProcessingException - error reading the definition.

setWorkflowDefinition

void setWorkflowDefinition(java.lang.String workflowName,
                           AnyMap workflowDefinition)
                           throws ProcessingException
Parameters:
workflowName - The workflow name
workflowDefinition - contains the workflow to add/update and deploy
Throws:
ProcessingException - error during deploy

deleteWorkflowDefinition

void deleteWorkflowDefinition(java.lang.String workflowName)
                              throws ProcessingException
Parameters:
workflowName - The workflow name to delete and undeploy
Throws:
ProcessingException - error during undeploy

synchronizeWorkflowDefinition

void synchronizeWorkflowDefinition(java.lang.String workflowName,
                                   boolean isDeleted)
                                   throws ProcessingException
reload the workflow definition from persistence and deploy it, or undeploy it. This can be called to notify the processor that the definition has been changed by someone else, e.g. another cluster node.

Parameters:
workflowName - the name of the workflow to reload.
isDeleted - true to undeploy workflow locally, false to deploy the currently persisted version.
Throws:
ProcessingException - if the workflow could not be reloaded for any reason.

SMILA (incubation) API documentation