Class ProcessEngineManager
- java.lang.Object
-
- com.aquima.interactions.process.impl.ProcessEngineManager
-
- All Implemented Interfaces:
IProcessEngineManager
public class ProcessEngineManager extends Object implements IProcessEngineManager
Process engine manager implementation that uses a datasource to initialize its process engines.- Since:
- 7.1.10
- Author:
- O. Kerpershoek
-
-
Constructor Summary
Constructors Constructor Description ProcessEngineManager(IProcessManagerDS datasource, ProcessSettings processSettings, ILicenseProvider licenseProvider, IScheduler scheduler, CaseEngineScheduler caseEngineScheduler, ListsEventPublisher listsEventPublisher, ILegacyToggles legacyToggles)
Construct a process engine manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IProcessEngine
getProcessEngine(IProject project, IProcessModuleDS datasource, IProcessExtensionFactory processExtensionFactory, ITraceEngine traceEngine)
This method initializes and returns a process engine for a specified application/project.IProcessEngine
getProcessEngine(String projectName, Version projectVersion, ModuleID moduleId, IProcessExtensionFactory processExtensionFactory, ITraceEngine traceEngine)
This method returns a process engine for a specified application/project.IProcessEngineSettings
getProcessEngineSettings()
This method returns the process engine settings which will be used by all process engine instances created by this manager.IInitializationReport
getReport(String projectName, Version projectVersion, ModuleID moduleId, IProcessExtensionFactory processExtensionFactory, ITraceEngine traceEngine)
This method returns the initialization report of a process engine.boolean
resetCache()
Clears the process engine cache.boolean
resetCache(String moduleName)
This method may be invoked to reset the process engine cache for a specific process module.void
setDomainValuesFactory(IDomainValuesFactory domainValuesFactory)
This method can be used to set an optional domain values factory that will be used for all process engines that are available in this manager.
-
-
-
Constructor Detail
-
ProcessEngineManager
public ProcessEngineManager(IProcessManagerDS datasource, ProcessSettings processSettings, ILicenseProvider licenseProvider, IScheduler scheduler, CaseEngineScheduler caseEngineScheduler, ListsEventPublisher listsEventPublisher, ILegacyToggles legacyToggles) throws AppException, InitializationException
Construct a process engine manager.- Parameters:
datasource
- The datasource containing the process engine definitions.processSettings
- processEngine settings to uselicenseProvider
- The license provider that is used to check if processes is allowed.scheduler
- The quartz scheduler used to handle timer nodes inside the process enginecaseEngineScheduler
- The scheduler used for controlling jobs if the case-engine is enabled.listsEventPublisher
- The publisher to publish list events tolegacyToggles
- Toggles that control legacy beahvior- Throws:
AppException
- This exception is thrown when the manager could not be initialized.InitializationException
- This exception is thrown when the manager could not be initialized.
-
-
Method Detail
-
getProcessEngine
public IProcessEngine getProcessEngine(IProject project, IProcessModuleDS datasource, IProcessExtensionFactory processExtensionFactory, ITraceEngine traceEngine) throws UnknownProcessModuleException, InitializationException
Description copied from interface:IProcessEngineManager
This method initializes and returns a process engine for a specified application/project.- Specified by:
getProcessEngine
in interfaceIProcessEngineManager
- Parameters:
project
- Project containing various global definitions.datasource
- Object providing the information needed to initialize a process engine.- Returns:
- The process engine implementation, may be null.
- Throws:
UnknownProcessModuleException
- This exception is thrown when the module ID is not registered with the manager.InitializationException
- When the process engine could not be initialized.
-
getProcessEngine
public IProcessEngine getProcessEngine(String projectName, Version projectVersion, ModuleID moduleId, IProcessExtensionFactory processExtensionFactory, ITraceEngine traceEngine) throws UnknownProcessModuleException, InitializationException
Description copied from interface:IProcessEngineManager
This method returns a process engine for a specified application/project. If no process engine is defined for the application null will be returned.- Specified by:
getProcessEngine
in interfaceIProcessEngineManager
- Parameters:
projectName
- The name of the process engine to return.projectVersion
- The project version of the process engine to return.moduleId
- The module id of the process engine to return.- Returns:
- The process engine implementation, may be null.
- Throws:
UnknownProcessModuleException
- This exception is thrown when the module ID is not registered with the manager.InitializationException
- When the process engine could not be initialized.
-
getProcessEngineSettings
public IProcessEngineSettings getProcessEngineSettings()
Description copied from interface:IProcessEngineManager
This method returns the process engine settings which will be used by all process engine instances created by this manager.- Specified by:
getProcessEngineSettings
in interfaceIProcessEngineManager
- Returns:
- the process engine settings
-
getReport
public IInitializationReport getReport(String projectName, Version projectVersion, ModuleID moduleId, IProcessExtensionFactory processExtensionFactory, ITraceEngine traceEngine) throws UnknownProcessModuleException
Description copied from interface:IProcessEngineManager
This method returns the initialization report of a process engine. If no process engine is defined for the application null will be returned.- Specified by:
getReport
in interfaceIProcessEngineManager
- Parameters:
projectName
- The name of the process engine report to return.projectVersion
- The project version of the process engine report to return.moduleId
- The id that specifies which process engine report to return.- Returns:
- The initialization report, may be null.
- Throws:
UnknownProcessModuleException
- This exception is thrown when the module ID is not registered with the manager.
-
resetCache
public boolean resetCache(String moduleName)
Description copied from interface:IProcessEngineManager
This method may be invoked to reset the process engine cache for a specific process module.- Specified by:
resetCache
in interfaceIProcessEngineManager
- Parameters:
moduleName
- The name of the process module for which the cache should be cleared.- Returns:
- Boolean indicating if the operation was successful.
-
resetCache
public boolean resetCache()
Description copied from interface:IProcessEngineManager
Clears the process engine cache.- Specified by:
resetCache
in interfaceIProcessEngineManager
- Returns:
- boolean indicating if the operation was successful.
-
setDomainValuesFactory
public void setDomainValuesFactory(IDomainValuesFactory domainValuesFactory)
Description copied from interface:IProcessEngineManager
This method can be used to set an optional domain values factory that will be used for all process engines that are available in this manager.Note: Some implementations may use lazy loading to initialize the process engines, so setting a domain factory after a process engine is initialized will not effect the already initialized process engines.
- Specified by:
setDomainValuesFactory
in interfaceIProcessEngineManager
- Parameters:
domainValuesFactory
- The optional domain factory.
-
-