SMILA (incubation) API documentation

org.eclipse.smila.processing.bpel
Class ODEWorkflowProcessor

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

public class ODEWorkflowProcessor
extends java.lang.Object
implements WorkflowProcessor

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

Author:
jschumacher

Field Summary
 
Fields inherited from interface org.eclipse.smila.processing.WorkflowProcessor
NAMESPACE_PROCESSOR
 
Constructor Summary
ODEWorkflowProcessor()
          create processor.
 
Method Summary
protected  void activate(ComponentContext context)
          OSGi Declarative Services service activation method.
protected  void deactivate(ComponentContext context)
          OSGi Declarative Services service deactivation method.
 Blackboard getBlackboard(java.lang.String id)
          get blackboard service for request.
 MessageHelper getMessageHelper()
           
 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 setPipeletException(java.lang.String requestId, java.lang.Exception ex)
          store a pipelet exception for better error reporting if the engine finally fails.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ODEWorkflowProcessor

public ODEWorkflowProcessor()
create processor. BPEL server is initialized in activate method.

Method Detail

process

public java.lang.String[] process(java.lang.String workflowName,
                                  Blackboard blackboard,
                                  java.lang.String[] recordIds)
                           throws ProcessingException
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, or null, if engine is not active yet.

getBlackboard

public Blackboard getBlackboard(java.lang.String id)
                         throws ProcessingException
get blackboard service for request.

Parameters:
id - request ID
Returns:
blackboard service.
Throws:
ProcessingException - no blackboard associated with id

setPipeletException

public void setPipeletException(java.lang.String requestId,
                                java.lang.Exception ex)
store a pipelet exception for better error reporting if the engine finally fails.

Parameters:
requestId - id of request
ex - exception thrown during pipelet execution.

getMessageHelper

public MessageHelper getMessageHelper()
Returns:
message helper that converts Processor/SearchMessages to XML and vice versa

activate

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

Parameters:
context - OSGi service component context.

deactivate

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

Parameters:
context - OSGi service component context.

SMILA (incubation) API documentation