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
static java.lang.String BUNDLE_NAME
          name of bundle.
static java.lang.String CONFIGURATION_DIR
          name of configuration directory.
static java.lang.String CONFIGURATION_FILE
          name of configuration file.
static java.lang.String DEFAULT_PIPELINE_DIR
          default value for PROP_PIPELINE_DIR = "piplines".
static java.lang.String OPERATION_NAME
          name of WSDL operation of SMILA BPEL processes.
static java.lang.String PROP_PIPELINE_DIR
          configuration property name: directory of BPEL pipeline files in configuration directory = "pipeline.dir".
static java.lang.String PROP_PREFIX_ODE
          prefix of ODE configuration properties in property file.
static java.lang.String REFERENCE_PROCSERCVICE
          name of OSGi service reference to pielets.
static java.lang.String REFERENCE_SEARCHPROCSERCVICE
          name of OSGi service reference to search processing services.
 
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()
           
protected  ProcessingService getProcessingService(java.lang.String name)
          get the processing service registered with the specified name.
protected  SearchProcessingService getSearchProcessingService(java.lang.String name)
          get the search processing service registered with the specified name.
 java.util.List<java.lang.String> getWorkflowNames()
          get the pipeline names of the active BPEL processes.
 Id[] process(java.lang.String workflowName, Blackboard blackboard, Id[] recordIds)
          process records on Blackboard service.
 SearchMessage process(java.lang.String workflowName, Blackboard blackboard, SearchMessage query)
          process a search request 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.
protected  void setProcessingService(ServiceReference serviceReference)
          add a processing service as an OSGi service reference.
protected  void setSearchProcessingService(ServiceReference serviceReference)
          add a search processing service as an OSGi service reference.
protected  void unsetProcessingService(ServiceReference serviceReference)
          remove a processing service.
protected  void unsetSearchProcessingService(ServiceReference serviceReference)
          remove a search processing service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REFERENCE_PROCSERCVICE

public static final java.lang.String REFERENCE_PROCSERCVICE
name of OSGi service reference to pielets.

See Also:
Constant Field Values

REFERENCE_SEARCHPROCSERCVICE

public static final java.lang.String REFERENCE_SEARCHPROCSERCVICE
name of OSGi service reference to search processing services.

See Also:
Constant Field Values

OPERATION_NAME

public static final java.lang.String OPERATION_NAME
name of WSDL operation of SMILA BPEL processes.

See Also:
Constant Field Values

BUNDLE_NAME

public static final java.lang.String BUNDLE_NAME
name of bundle. Used in configuration reading.

See Also:
Constant Field Values

CONFIGURATION_DIR

public static final java.lang.String CONFIGURATION_DIR
name of configuration directory. Hardcoded for now (or fallback), configuration properties should be received from configuration service later.

See Also:
Constant Field Values

CONFIGURATION_FILE

public static final java.lang.String CONFIGURATION_FILE
name of configuration file. Hardcoded for now (or fallback), configuration properties should be received from configuration service later.

See Also:
Constant Field Values

PROP_PIPELINE_DIR

public static final java.lang.String PROP_PIPELINE_DIR
configuration property name: directory of BPEL pipeline files in configuration directory = "pipeline.dir".

See Also:
Constant Field Values

DEFAULT_PIPELINE_DIR

public static final java.lang.String DEFAULT_PIPELINE_DIR
default value for PROP_PIPELINE_DIR = "piplines".

See Also:
Constant Field Values

PROP_PREFIX_ODE

public static final java.lang.String PROP_PREFIX_ODE
prefix of ODE configuration properties in property file.

See Also:
Constant Field Values
Constructor Detail

ODEWorkflowProcessor

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

Method Detail

process

public Id[] process(java.lang.String workflowName,
                    Blackboard blackboard,
                    Id[] 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[])

process

public SearchMessage process(java.lang.String workflowName,
                             Blackboard blackboard,
                             SearchMessage query)
                      throws ProcessingException
process a search request on Blackboard service.

Specified by:
process in interface WorkflowProcessor
Parameters:
workflowName - name of workflow to execute on message.
blackboard - blackboard to use for processing
query - Id of query record. The record Id list in this will be null, usually.
Returns:
Ids of effective query and result records.
Throws:
ProcessingException - error during processing.
See Also:
WorkflowProcessor.process(java.lang.String, org.eclipse.smila.blackboard.Blackboard, org.eclipse.smila.processing.SearchMessage)

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.

getProcessingService

protected ProcessingService getProcessingService(java.lang.String name)
get the processing service registered with the specified name.

Parameters:
name - name of processing service
Returns:
processing service registered for this name.

getSearchProcessingService

protected SearchProcessingService getSearchProcessingService(java.lang.String name)
get the search processing service registered with the specified name.

Parameters:
name - name of searchprocessing service
Returns:
search processing service registered for this name.

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

setProcessingService

protected void setProcessingService(ServiceReference serviceReference)
add a processing service as an OSGi service reference. To be used by Declarative Services as the bind method.

Parameters:
serviceReference - service reference to add.

unsetProcessingService

protected void unsetProcessingService(ServiceReference serviceReference)
remove a processing service. To be used by Declarative Services as the unbind method.

Parameters:
serviceReference - service reference to remove.

setSearchProcessingService

protected void setSearchProcessingService(ServiceReference serviceReference)
add a search processing service as an OSGi service reference. To be used by Declarative Services as the bind method.

Parameters:
serviceReference - service reference to add.

unsetSearchProcessingService

protected void unsetSearchProcessingService(ServiceReference serviceReference)
remove a search processing service. To be used by Declarative Services as the unbind method.

Parameters:
serviceReference - service reference to remove.

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