SMILA 1.0 API documentation

org.eclipse.smila.processing.bpel
Class BpelWorkflowProcessor

java.lang.Object
  extended by org.eclipse.smila.processing.bpel.BpelWorkflowProcessor
All Implemented Interfaces:
WorkflowProcessor

public class BpelWorkflowProcessor
extends java.lang.Object
implements WorkflowProcessor

SMILA Workflow Processor that uses the Apache ODE BPEL engine to orchestrate SMILA pipelets in BPEL processes.


Field Summary
 
Fields inherited from interface org.eclipse.smila.processing.WorkflowProcessor
NAMESPACE_PROCESSOR, WORKFLOW_DEFINITION, WORKFLOW_NAME, WORKFLOW_READONLY, WORKFLOW_TIMESTAMP
 
Constructor Summary
BpelWorkflowProcessor()
           
 
Method Summary
protected  void activate()
          OSGi Declarative Services service activation method.
protected  void deactivate()
          OSGi Declarative Services service deactivation method.
 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 pipeline names of the active BPEL processes.
 java.lang.String[] process(java.lang.String workflowName, Blackboard blackboard, java.lang.String[] recordIds)
          process records on Blackboard service.
 void setBpelEngine(BpelEngine bpelEngine)
          method for DS to set a service reference.
 void setRequestTable(RequestTable requests)
          method for DS to set a service reference.
 void setUpdateWatcher(WorkflowUpdateWatcher updateWatcher)
          method for DS to set a service reference.
 void setWorkflowDefinition(java.lang.String workflowName, AnyMap workflowDefinition)
           
 void setWorkflowStorage(WorkflowStorage workflowStorage)
          method for DS to set a service reference.
 void synchronizeWorkflowDefinition(java.lang.String workflowName, boolean isDeleted)
          reload the workflow definition from persistence and deploy it, or undeploy it.
 void unsetBpelEngine(BpelEngine bpelEngine)
          method for DS to unset a service reference.
 void unsetRequestTable(RequestTable requests)
          method for DS to unset a service reference.
 void unsetUpdateWatcher(WorkflowUpdateWatcher updateWatcher)
          method for DS to unset a service reference.
 void unsetWorkflowStorage(WorkflowStorage workflowStorage)
          method for DS to unset a service reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BpelWorkflowProcessor

public BpelWorkflowProcessor()
Method Detail

process

public java.lang.String[] process(java.lang.String workflowName,
                                  Blackboard blackboard,
                                  java.lang.String[] recordIds)
                           throws ProcessingException
Description copied from interface: WorkflowProcessor
process records on Blackboard service.

Specified by:
process in interface WorkflowProcessor
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.
See Also:
org.eclipse.smila.processing.WorkflowProcessor#process(java.lang.String, org.eclipse.smila.datamodel.id.Id[])

getWorkflowNames

public java.util.List<java.lang.String> getWorkflowNames()
get the pipeline names of the active BPEL processes. The pipeline name is the local part of the EPR service name.

Specified by:
getWorkflowNames in interface WorkflowProcessor
Returns:
pipeline names of the active BPEL processes.

getWorkflowDefinition

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

Specified by:
getWorkflowDefinition in interface WorkflowProcessor
Parameters:
workflowName - The workflow name
Returns:
the any object with the definition
Throws:
ProcessingException - error reading the definition.

setWorkflowDefinition

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

deleteWorkflowDefinition

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

synchronizeWorkflowDefinition

public void synchronizeWorkflowDefinition(java.lang.String workflowName,
                                          boolean isDeleted)
                                   throws ProcessingException
Description copied from interface: WorkflowProcessor
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.

Specified by:
synchronizeWorkflowDefinition in interface WorkflowProcessor
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.

activate

protected void activate()
OSGi Declarative Services service activation method. Initializes BPEL engine.


deactivate

protected void deactivate()
OSGi Declarative Services service deactivation method. Shuts down BPEL engine.


setWorkflowStorage

public void setWorkflowStorage(WorkflowStorage workflowStorage)
method for DS to set a service reference.


unsetWorkflowStorage

public void unsetWorkflowStorage(WorkflowStorage workflowStorage)
method for DS to unset a service reference.


setUpdateWatcher

public void setUpdateWatcher(WorkflowUpdateWatcher updateWatcher)
method for DS to set a service reference.


unsetUpdateWatcher

public void unsetUpdateWatcher(WorkflowUpdateWatcher updateWatcher)
method for DS to unset a service reference.


setBpelEngine

public void setBpelEngine(BpelEngine bpelEngine)
method for DS to set a service reference.


unsetBpelEngine

public void unsetBpelEngine(BpelEngine bpelEngine)
method for DS to unset a service reference.


setRequestTable

public void setRequestTable(RequestTable requests)
method for DS to set a service reference.


unsetRequestTable

public void unsetRequestTable(RequestTable requests)
method for DS to unset a service reference.


SMILA 1.0 API documentation