org.demac.process.base.exe
Class BaseExecutionService

java.lang.Object
  extended by org.demac.process.core.exe.ExecutionService
      extended by org.demac.process.base.exe.BaseExecutionService
All Implemented Interfaces:
Service
Direct Known Subclasses:
BaseExecutionServiceImpl

public abstract class BaseExecutionService
extends ExecutionService

The execution service of the BaseModule of the Process Service, implemented as a singleton, It can execute a process as far as the device and its direct environment is competent to do so. It communicates with the Context Service in order to find suitable services to execute single activities or to evaluate expressions. If the Context Service finds a suitable service it will send a concrete org.demac.process.base.service.ServiceObject that will be executed from sides of the Process Service. Instead of a concrete org.demac.process.base.service.ServiceObject the org.demac.process.base.exe.BaseExecutionService can also receive modifications to exchange Activities against other Activities, so the process becomes more flexible. Finally the org.demac.process.base.exe.BaseExecutionService manages the org.demac.process.core.extension.ExtensionModules and helps binding them into the execution of a process.


Constructor Summary
BaseExecutionService()
           
 
Method Summary
abstract  void execute(AmplifiedPackage pack)
          Method to execute a process given by its org.demac.process.base.dpdl.Package.
abstract  void execute(DataSet ds)
          Method to execute a process given by its org.demac.process.core.persistence.DataSet.
static ExecutionService getExecutionService()
           
abstract  Xpression getXpression(java.lang.String id)
          Method to call a stored org.demac.process.base.dpdl.Xpression by its ID.
abstract  void setExtensionModule(ExtensionModule em)
          Method to set an org.demac.process.base.extension.ExtensionModule to extend the BaseExecutionService´s functionality.
abstract  void setExtensionModules(ExtensionModule[] ems)
          Method to set an array of org.demac.process.base.extension.ExtensionModules to extend the BaseExecutionService´s functionality.
abstract  void storeModifications(java.lang.String id, Activity a)
          Method to store a modification with the ID of the target org.demac.process.base.dpdl.ActivityRef as a key.
abstract  void storeProcess(java.lang.String id, Package p)
          Method to store a (sub-)process with the ID of the target org.demac.process.base.dpdl.ActivityRef as a key.
abstract  void storeServiceObject(java.lang.String id, ServiceObject o)
          Method to store a org.demac.process.base.service.ServiceObject with the ID of the target org.demac.process.base.dpdl.ActivityRef as a key.
 
Methods inherited from class org.demac.process.core.exe.ExecutionService
cancelCurrentProcess, getCurrentDataSet, getExtensionModuleById
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.demac.Service
isStarted, start, stop
 

Constructor Detail

BaseExecutionService

public BaseExecutionService()
Method Detail

getExecutionService

public static ExecutionService getExecutionService()
See Also:
ExecutionService.getExecutionService()

execute

public abstract void execute(DataSet ds)
Description copied from class: ExecutionService
Method to execute a process given by its org.demac.process.core.persistence.DataSet.

Specified by:
execute in class ExecutionService
Parameters:
ds - the org.demac.process.core.persistence.DataSet to load the process.
See Also:
ExecutionService.execute(org.demac.process.core.persistence.DataSet)

execute

public abstract void execute(AmplifiedPackage pack)
Method to execute a process given by its org.demac.process.base.dpdl.Package.

Parameters:
pack - the AmplifiedPackage of the process to execute

getXpression

public abstract Xpression getXpression(java.lang.String id)
Method to call a stored org.demac.process.base.dpdl.Xpression by its ID. The Context Service can call this method to get the expression for a requested evaluation.

Parameters:
id - the identifier of the org.demac.process.base.dpdl.Xpression.
Returns:
the stored org.demac.process.base.dpdl.Xpression

storeServiceObject

public abstract void storeServiceObject(java.lang.String id,
                                        ServiceObject o)
Method to store a org.demac.process.base.service.ServiceObject with the ID of the target org.demac.process.base.dpdl.ActivityRef as a key. The Context Service can call this method to store the org.demac.process.base.service.ServiceObject for a requested application.

Parameters:
id - the identifier of the org.demac.process.base.dpdl.ActivityRef, for which the org.demac.process.base.service.ServiceObject is requested.
o - the org.demac.process.base.service.ServiceObject to store

storeProcess

public abstract void storeProcess(java.lang.String id,
                                  Package p)
Method to store a (sub-)process with the ID of the target org.demac.process.base.dpdl.ActivityRef as a key. The Context Service can call this method to store a process as a requested subprocess.

Parameters:
id - the identifier of the org.demac.process.base.dpdl.ActivityRef, for which the subprocess is requested.
p - the org.demac.process.base.dpdl.Package to store

storeModifications

public abstract void storeModifications(java.lang.String id,
                                        Activity a)
Method to store a modification with the ID of the target org.demac.process.base.dpdl.ActivityRef as a key. The Context Service can call this method to store a modification instead of a org.demac.process.base.service.ServiceObject if no proper service can be found.

Parameters:
id - the identifier of the org.demac.process.base.dpdl.ActivityRef , that has to be replaced.
a - the new org.demac.process.base.dpdl.ActivityRef .

setExtensionModule

public abstract void setExtensionModule(ExtensionModule em)
Description copied from class: ExecutionService
Method to set an org.demac.process.base.extension.ExtensionModule to extend the BaseExecutionService´s functionality.

Specified by:
setExtensionModule in class ExecutionService
Parameters:
em - the instance of the org.demac.process.base.extension.ExtensionModule .

setExtensionModules

public abstract void setExtensionModules(ExtensionModule[] ems)
Description copied from class: ExecutionService
Method to set an array of org.demac.process.base.extension.ExtensionModules to extend the BaseExecutionService´s functionality.

Specified by:
setExtensionModules in class ExecutionService
Parameters:
ems - the array of org.demac.process.base.extension.ExtensionModules .