Class ProcessEngine
- java.lang.Object
-
- com.aquima.interactions.process.impl.ProcessEngine
-
- All Implemented Interfaces:
ICaseEvaluator
,IProcessEngine
public class ProcessEngine extends Object implements IProcessEngine, ICaseEvaluator
Main class of the process engine.- Since:
- 7.1
- Author:
- O. Kerpershoek
-
-
Constructor Summary
Constructors Constructor Description ProcessEngine(IProcessExtensionFactory factory, IProcessEngineDS datasource, IRuleEngine ruleEngine, IMetaModel model, IProject project, IProcessCaseDao dao, ProcessSettings settings, ILicenseProvider licenseProvider, ITraceEngine traceEngine, IScheduler scheduler, CaseEngineScheduler caseEngineScheduler, ListsEventPublisher listsEventPublisher, ILegacyToggles legacyToggles)
Constructs a process engine with the specified datasource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelStartedTasks()
This method may be used to cancel started tasks that were abandoned, for example due to an unexpected server shutdownvoid
closeCase(IUserData userData, long caseId)
This method may be used to close an existing case and cancel all its tasks.protected boolean
containsNodeDefinition(GUID nodeId)
void
evaluateCase(RefreshableJobDefinition job)
Evaluates the case specified by the given job.IMultilingualText
evaluateIMultilingualText(IMultilingualText displayNameContent, IProfile profile)
This method checks aIMultilingualText
to see if there are any TSL expressions.void
evaluateTimer(DateTimeValue currentTime)
This method (re)evaluates all open timer tasks.CaseViewResult
findByCriteria(CaseViewCriteria criteria)
Find case views based on the specified criteria.TaskViewResult
findByCriteria(TaskViewCriteria criteria)
Find task views based on the specified criteria.IProcessCaseView[]
findCases(CaseCriteria caseFilter)
This method returns an array containing views of all cases that are valid after applying the filters from the filter contextIProcessTaskView[]
findTasks(TaskCriteria taskFilter)
This method returns an array containing views of all tasks that are valid after applying the filters from the filter context.String
getApplicationId()
IAuthorizationAlgorithmDefinition
getAuthorizationAlgorithm(String name)
This method returns the definition of an authorization algorithm.AuthorizationManager
getAuthorizationManager()
IProcessCase[]
getAvailableCases(IUserData userData)
This method will return an array containing the cases that are available for the supplied user.IProcessTask[]
getAvailableTasks(IUserData userData, Long caseId)
This method returns an array containing the tasks that are available for the supplied user.IProcessCase
getCase(long caseId)
This method returns the case for the specified ID.CaseEngineScheduler
getCaseEngineScheduler()
Returns the case engine scheduler used by the processengine when DCM 2 is enabled.ICaseEvaluator
getCaseEvaluator()
Returns the case evaluator currently used by this process engine.IMetaModel
getCaseModel()
This method returns the model that is used by the process engine to store case data.IProcessDefinition[]
getCaseProcesses()
This method returns an array containing the processes that may be executed to create a new case in the process engine.Map<String,String>
getDisplayNameValues(IMultilingualText displayNameContent, IProfile profile)
This method is responsible for returning a map with displayName values of a task/case.IExpressionParser
getExpressionParser()
This method returns the expression parser used by the process engine.ProcessCase
getInternalCase(long caseId)
ILegacyToggles
getLegacyToggles()
protected IMessageEventDefinition
getMessageEvent(String eventName)
IMessageEventDefinition
getMessageEventByName(String eventName)
This method returns the message event definition for the specified name.protected String
getModuleId()
IProcessNodeDefinition
getNodeDefinition(GUID nodeId)
This method returns the process node definition by the specified node id.GUID[]
getNodeIds()
This method returns all node id.IPriorityAlgorithmDefinition
getPriorityAlgorithm(String name)
This method returns the definition of an priority algorithm.PriorityManager
getPriorityManager()
IProcessDefinition
getProcessByName(String name)
This method returns the process definition for the specified name.protected IProcessEventDefinition
getProcessEvent(String eventName)
IProcessEventDefinition
getProcessEventByName(String eventName)
This method returns the event definition for the specified name.ProcessSettings
getProcessSettings()
Returns the settings used by the process engine, case lists and work lists.IProcessTaskDefinition
getProcessTaskDefinition(GUID nodeId)
This method retrieves the task definition for the specified node id.IProcessTaskDelegate
getProcessTaskDelegate()
ProcessCaseRepository
getRepository()
IRole[]
getRoles()
This method returns all available roles.IRoutingAlgorithmDefinition
getRoutingAlgorithm(String name)
This method returns the routing algorithm definition for the specified name.IRoutingAlgorithmDefinition
getRoutingAlgorithmByName(String routingAlgorithmName)
RoutingManager
getRoutingManager()
protected IRuleEngine
getRuleEngine()
IScheduler
getScheduler()
IProcessTask
getTask(long taskId)
This method returns the task for the specified ID.IProcessTaskDefinition
getTaskByName(String name)
This method returns the task definition for the specified name.ITaskModel
getTaskModel(long taskId)
This method returns the task for the specified ID.ITraceEngine
getTraceEngine()
protected ProcessTypeDefinition
getTypeByName(String typeName)
IProcessTask[]
getUnassignedTasks()
This method returns an array containing all the tasks that have not yet been assigned.void
notifyEvent(IMessageEvent messageEvent, IUserData userData, IProcessCaseChangeListener listener)
This method notifies the process engine about an event.void
notifyEvent(IMessageEvent messageEvent, IUserData userData, IProcessCaseChangeListener listener, Set<Long> specificCaseIds)
This method notifies the process engine about an event.void
publishCaseCreated(ICaseModel caseModel)
void
publishCaseDeleted(long caseId)
void
publishCaseUpdated(long caseId)
void
publishCaseUpdated(ICaseModel caseModel)
void
publishTaskCreated(ITaskModel taskModel)
void
publishTaskUpdated(ITaskModel taskModel)
void
registerCaseEvaluator(ICaseEvaluator evaluator)
Registers a case evaluator that will be used by this process engine to evaluate cases in the background.void
registerDelegate(IProcessTaskDelegate processTaskDelegate)
This method can be used to register a handler that is able to handle certain tasks (for example handling of automatic tasks).void
reopenTask(long taskId)
Reopens a task which is stuck in the started state.void
reopenTask(long taskId, IUserData userData)
Reopens a task which is stuck in the started state.long
replayMessageEvent(long eventId, Long caseId)
Replays (re-triggers) a message event.long
replayMessageEvent(long eventId, Long caseId, IUserData userData)
Replays (re-triggers) a message event.long
replayTimerEvent(long eventId)
Replays (re-triggers) a timer event.long
replayTimerEvent(long eventId, IUserData userData)
Replays (re-triggers) a timer event.void
setPostponedJobs(PostponedJobs postponedJobs)
This method sets the place to store the configurations for jobs that have to be scheduled later.
-
-
-
Constructor Detail
-
ProcessEngine
public ProcessEngine(IProcessExtensionFactory factory, IProcessEngineDS datasource, IRuleEngine ruleEngine, IMetaModel model, IProject project, IProcessCaseDao dao, ProcessSettings settings, ILicenseProvider licenseProvider, ITraceEngine traceEngine, IScheduler scheduler, CaseEngineScheduler caseEngineScheduler, ListsEventPublisher listsEventPublisher, ILegacyToggles legacyToggles)
Constructs a process engine with the specified datasource.- Parameters:
factory
- Extension for authorization, routing and priority algorithmsdatasource
- The data source for loading all flows.ruleEngine
- Rule engine containing the various business rules and the expression parser.model
- The model that should be used for the case data.project
- The project for which the process engine is created.dao
- The process case dao to store the process engine state.settings
- The settings for the process enginelicenseProvider
- The license provider to check if using the process engine is allowed.traceEngine
- The trace engine for tracing.scheduler
- The scheduler used for controlling jobs.caseEngineScheduler
- The scheduler used for controlling jobs if the case-engine is enabled.listsEventPublisher
- An event publisher for publishing case or task related eventslegacyToggles
- The properties for legacy toggles- Throws:
InitializationException
- When the flow engine could not be correctly initialized.
-
-
Method Detail
-
getScheduler
public IScheduler getScheduler()
-
getCaseEngineScheduler
public CaseEngineScheduler getCaseEngineScheduler()
Description copied from interface:IProcessEngine
Returns the case engine scheduler used by the processengine when DCM 2 is enabled.- Specified by:
getCaseEngineScheduler
in interfaceIProcessEngine
- Returns:
- the case engine scheduler
-
registerDelegate
public void registerDelegate(IProcessTaskDelegate processTaskDelegate)
Description copied from interface:IProcessEngine
This method can be used to register a handler that is able to handle certain tasks (for example handling of automatic tasks). TODO remove this method and construct the process engine with this delegate.- Specified by:
registerDelegate
in interfaceIProcessEngine
- Parameters:
processTaskDelegate
- The delegate that is used for certain tasks (like automatic tasks).
-
registerCaseEvaluator
public void registerCaseEvaluator(ICaseEvaluator evaluator)
Description copied from interface:IProcessEngine
Registers a case evaluator that will be used by this process engine to evaluate cases in the background.- Specified by:
registerCaseEvaluator
in interfaceIProcessEngine
- Parameters:
evaluator
- the new evaluator (not null)
-
getCaseEvaluator
public ICaseEvaluator getCaseEvaluator()
Description copied from interface:IProcessEngine
Returns the case evaluator currently used by this process engine.NOTE: in future versions, the case evaluator will be replaced with a job scheduler.
- Specified by:
getCaseEvaluator
in interfaceIProcessEngine
- Returns:
- the currently used case evaluator (not null).
-
getCaseModel
public IMetaModel getCaseModel()
Description copied from interface:IProcessEngine
This method returns the model that is used by the process engine to store case data.- Specified by:
getCaseModel
in interfaceIProcessEngine
- Returns:
- the model that is used by the process engine to store case data.
-
closeCase
public void closeCase(IUserData userData, long caseId)
Description copied from interface:IProcessEngine
This method may be used to close an existing case and cancel all its tasks.- Specified by:
closeCase
in interfaceIProcessEngine
- Parameters:
userData
- Object containing information about the current user.caseId
- The ID of the case that should be closed.
-
getAvailableCases
public IProcessCase[] getAvailableCases(IUserData userData)
Description copied from interface:IProcessEngine
This method will return an array containing the cases that are available for the supplied user.- Specified by:
getAvailableCases
in interfaceIProcessEngine
- Parameters:
userData
- Object containing the information about the current user.- Returns:
- an array containing the cases that are available for the supplied user.
-
getTask
public IProcessTask getTask(long taskId) throws UnknownProcessTaskException
Description copied from interface:IProcessEngine
This method returns the task for the specified ID.- Specified by:
getTask
in interfaceIProcessEngine
- Parameters:
taskId
- The ID of the requested case.- Returns:
- The task for the specified ID.
- Throws:
UnknownProcessTaskException
- This exception is thrown when the task could not be found.
-
getTaskModel
public ITaskModel getTaskModel(long taskId)
Description copied from interface:IProcessEngine
This method returns the task for the specified ID.- Specified by:
getTaskModel
in interfaceIProcessEngine
- Parameters:
taskId
- The ID of the requested case.- Returns:
- The task for the specified ID.
-
getCase
public IProcessCase getCase(long caseId) throws UnknownProcessCaseException
Description copied from interface:IProcessEngine
This method returns the case for the specified ID.- Specified by:
getCase
in interfaceIProcessEngine
- Parameters:
caseId
- The ID of the requested case.- Returns:
- The case for the specified ID.
- Throws:
UnknownProcessCaseException
- This exception is thrown when the case could not be found.
-
getCaseProcesses
public IProcessDefinition[] getCaseProcesses()
Description copied from interface:IProcessEngine
This method returns an array containing the processes that may be executed to create a new case in the process engine. The user data is used to determine the processes which may actually be executed by the provided user.- Specified by:
getCaseProcesses
in interfaceIProcessEngine
- Returns:
- Array containing the processes that may be executed to create a new case.
-
getProcessByName
public IProcessDefinition getProcessByName(String name) throws UnknownProcessException
Description copied from interface:IProcessEngine
This method returns the process definition for the specified name.- Specified by:
getProcessByName
in interfaceIProcessEngine
- Parameters:
name
- The name of the requested process definition.- Returns:
- The process definition for the specified name.
- Throws:
UnknownProcessException
- An unknown process exception is thrown when the supplied name does not match any process known to the process engine.
-
getNodeIds
public GUID[] getNodeIds()
Description copied from interface:IProcessEngine
This method returns all node id.- Specified by:
getNodeIds
in interfaceIProcessEngine
- Returns:
- The node ids, never null.
-
getNodeDefinition
public IProcessNodeDefinition getNodeDefinition(GUID nodeId) throws UnknownProcessNodeException
Description copied from interface:IProcessEngine
This method returns the process node definition by the specified node id.- Specified by:
getNodeDefinition
in interfaceIProcessEngine
- Parameters:
nodeId
- The node id, may not be null- Returns:
- The node definition, never null.
- Throws:
UnknownProcessNodeException
- When no node definition exists for the provided id.
-
getProcessEventByName
public IProcessEventDefinition getProcessEventByName(String eventName) throws UnknownProcessEventException
Description copied from interface:IProcessEngine
This method returns the event definition for the specified name.- Specified by:
getProcessEventByName
in interfaceIProcessEngine
- Parameters:
eventName
- The name of the event whose definition is requested.- Returns:
- The definition of the event with the specified name.
- Throws:
UnknownProcessEventException
- This exception is thrown when the event could not be found.
-
getRoutingAlgorithmByName
public IRoutingAlgorithmDefinition getRoutingAlgorithmByName(String routingAlgorithmName) throws UnknownRoutingAlgorithmException
- Throws:
UnknownRoutingAlgorithmException
-
getTaskByName
public IProcessTaskDefinition getTaskByName(String name) throws UnknownTaskException
Description copied from interface:IProcessEngine
This method returns the task definition for the specified name. When a task is loaded from the database (e.g. retrieved from the DAO), use the methodIProcessEngine.getProcessTaskDefinition(GUID)
instead, as that method takes renames of tasks in the current model into account. This method does not. It should therefore only be used for retrieving task definitions on task names that are loaded from the current model, such as task mappings.- Specified by:
getTaskByName
in interfaceIProcessEngine
- Parameters:
name
- The name of the requested process task.- Returns:
- The process task definition for the specified name.
- Throws:
UnknownTaskException
- This exception is thrown when no task is definition matching the specified name.
-
getProcessTaskDefinition
public IProcessTaskDefinition getProcessTaskDefinition(GUID nodeId)
Description copied from interface:IProcessEngine
This method retrieves the task definition for the specified node id. It is required that the node id corresponds to a task node. In Studio, the node id of a task node is knows as the persistency id (note that the node id is a GUID of the persistency id). This method should be used in favor of theIProcessEngine.getTaskByName(String)
method whenever a task is loaded from the database (e.g. retrieved from the DAO), because it takes into account the use case that a task that is stored in the database is renamed in the current model- Specified by:
getProcessTaskDefinition
in interfaceIProcessEngine
- Parameters:
nodeId
- the id of the task node, which is a GUID of the persistency id in Studio- Returns:
- the process task definition for the specified node id
-
getAvailableTasks
public IProcessTask[] getAvailableTasks(IUserData userData, Long caseId)
Description copied from interface:IProcessEngine
This method returns an array containing the tasks that are available for the supplied user. This method is also known as the "tasks for me" in the documentation.- Specified by:
getAvailableTasks
in interfaceIProcessEngine
- Parameters:
userData
- The data of the user to which the task must be assigned.caseId
- ID of the case to which the tasks must belong.- Returns:
- an array containing the tasks for the supplied user.
-
getUnassignedTasks
public IProcessTask[] getUnassignedTasks()
Description copied from interface:IProcessEngine
This method returns an array containing all the tasks that have not yet been assigned.- Specified by:
getUnassignedTasks
in interfaceIProcessEngine
- Returns:
- an array containing all the tasks that have not yet been assigned.
-
findTasks
public IProcessTaskView[] findTasks(TaskCriteria taskFilter)
Description copied from interface:IProcessEngine
This method returns an array containing views of all tasks that are valid after applying the filters from the filter context.- Specified by:
findTasks
in interfaceIProcessEngine
- Parameters:
taskFilter
- TaskFilterContext to filter the tasks that are returned.- Returns:
- an array containing the task views.
-
findCases
public IProcessCaseView[] findCases(CaseCriteria caseFilter)
Description copied from interface:IProcessEngine
This method returns an array containing views of all cases that are valid after applying the filters from the filter context- Specified by:
findCases
in interfaceIProcessEngine
- Parameters:
caseFilter
- CaseFilterContext to filter the cases that are returned.- Returns:
- an array containing the case views
-
evaluateTimer
public void evaluateTimer(DateTimeValue currentTime)
Description copied from interface:IProcessEngine
This method (re)evaluates all open timer tasks.- Specified by:
evaluateTimer
in interfaceIProcessEngine
- Parameters:
currentTime
- The current time.
-
evaluateCase
public void evaluateCase(RefreshableJobDefinition job)
Evaluates the case specified by the given job.- Specified by:
evaluateCase
in interfaceICaseEvaluator
- Parameters:
job
- specifies the case and required evaluation types.
-
getRoles
public IRole[] getRoles()
Description copied from interface:IProcessEngine
This method returns all available roles.- Specified by:
getRoles
in interfaceIProcessEngine
- Returns:
- an array containing all the roles, never null.
-
getExpressionParser
public IExpressionParser getExpressionParser()
Description copied from interface:IProcessEngine
This method returns the expression parser used by the process engine.- Specified by:
getExpressionParser
in interfaceIProcessEngine
- Returns:
- The expression parser, never null.
-
notifyEvent
public void notifyEvent(IMessageEvent messageEvent, IUserData userData, IProcessCaseChangeListener listener) throws InvalidMessageEventException, AppException
Description copied from interface:IProcessEngine
This method notifies the process engine about an event.- Specified by:
notifyEvent
in interfaceIProcessEngine
- Parameters:
messageEvent
- The message event, may not be null.userData
- The user, may not be null.listener
- A listener to trace the modified cases, may be null.- Throws:
InvalidMessageEventException
- This exception is thrown in case of an invalid message event.AppException
- This exception is thrown when the event could not be processed.
-
notifyEvent
public void notifyEvent(IMessageEvent messageEvent, IUserData userData, IProcessCaseChangeListener listener, Set<Long> specificCaseIds) throws InvalidMessageEventException, AppException
Description copied from interface:IProcessEngine
This method notifies the process engine about an event.- Specified by:
notifyEvent
in interfaceIProcessEngine
- Parameters:
messageEvent
- The message event, may not be null.userData
- The user, may not be null.listener
- A listener to trace the modified cases, may be null.specificCaseIds
- A set of case ids, may be null. If not null, only those cases are processed.- Throws:
InvalidMessageEventException
- This exception is thrown in case of an invalid message event.AppException
- This exception is thrown when the event could not be processed.
-
reopenTask
public void reopenTask(long taskId) throws UnknownProcessCaseException, UnknownProcessTaskException, OpenProcessTaskException, ProcessException
Description copied from interface:IProcessEngine
Reopens a task which is stuck in the started state. The case of the task is also opened if it is locked.- Specified by:
reopenTask
in interfaceIProcessEngine
- Parameters:
taskId
- the id of the task to be re-opened- Throws:
UnknownProcessCaseException
- if the task is linked to an unknown caseUnknownProcessTaskException
- if a task with the given id is not foundOpenProcessTaskException
- if a node with the given id is found but it is not task, or its status is not startedProcessException
- if any other error is encountered while reopening the task
-
reopenTask
public void reopenTask(long taskId, IUserData userData) throws UnknownProcessCaseException, UnknownProcessTaskException, OpenProcessTaskException, ProcessException
Description copied from interface:IProcessEngine
Reopens a task which is stuck in the started state. The case of the task is also opened if it is locked.- Specified by:
reopenTask
in interfaceIProcessEngine
- Parameters:
taskId
- the id of the task to be re-openeduserData
- the data of the current user- Throws:
UnknownProcessCaseException
- if the task is linked to an unknown caseUnknownProcessTaskException
- if a task with the given id is not foundOpenProcessTaskException
- if a node with the given id is found but it is not task, or its status is not startedProcessException
- if any other error is encountered while reopening the task
-
replayMessageEvent
public long replayMessageEvent(long eventId, Long caseId) throws UnknownCaseEventException, UnknownProcessCaseException, ReplayCaseEventException
Description copied from interface:IProcessEngine
Replays (re-triggers) a message event.- Specified by:
replayMessageEvent
in interfaceIProcessEngine
- Parameters:
eventId
- the id of the original message event which should be replayedcaseId
- the optional ID of the case in which the message event will be replayed (if null, the message event will be broadcast to all waiting cases)- Returns:
- the id of the newly created event
- Throws:
UnknownCaseEventException
- if the message event with the given id could not be foundUnknownProcessCaseException
- if the process case in which the event should be replayed could not be foundReplayCaseEventException
- if an error occurs during replay
-
replayMessageEvent
public long replayMessageEvent(long eventId, Long caseId, IUserData userData) throws UnknownCaseEventException, UnknownProcessCaseException, ReplayCaseEventException
Description copied from interface:IProcessEngine
Replays (re-triggers) a message event.- Specified by:
replayMessageEvent
in interfaceIProcessEngine
- Parameters:
eventId
- the id of the original message event which should be replayedcaseId
- the optional ID of the case in which the message event will be replayed (if null, the message event will be broadcast to all waiting cases)userData
- the data of the current user- Returns:
- the id of the newly created event
- Throws:
UnknownCaseEventException
- if the message event with the given id could not be foundUnknownProcessCaseException
- if the process case in which the event should be replayed could not be foundReplayCaseEventException
- if an error occurs during replay
-
replayTimerEvent
public long replayTimerEvent(long eventId) throws ReplayCaseEventException, UnknownCaseEventException, UnknownProcessCaseException
Description copied from interface:IProcessEngine
Replays (re-triggers) a timer event.- Specified by:
replayTimerEvent
in interfaceIProcessEngine
- Parameters:
eventId
- the id of the original timer event which should be replayed- Returns:
- the id of the newly created event
- Throws:
ReplayCaseEventException
- if an error occurs during replayUnknownCaseEventException
- if the timer event with the given id could not be foundUnknownProcessCaseException
- if the process case in which the event should be replayed could not be found
-
replayTimerEvent
public long replayTimerEvent(long eventId, IUserData userData) throws ReplayCaseEventException, UnknownCaseEventException, UnknownProcessCaseException
Description copied from interface:IProcessEngine
Replays (re-triggers) a timer event.- Specified by:
replayTimerEvent
in interfaceIProcessEngine
- Parameters:
eventId
- the id of the original timer event which should be replayeduserData
- the data of the current user- Returns:
- the id of the newly created event
- Throws:
ReplayCaseEventException
- if an error occurs during replayUnknownCaseEventException
- if the timer event with the given id could not be foundUnknownProcessCaseException
- if the process case in which the event should be replayed could not be found
-
getMessageEventByName
public IMessageEventDefinition getMessageEventByName(String eventName) throws UnknownMessageEventException
Description copied from interface:IProcessEngine
This method returns the message event definition for the specified name.- Specified by:
getMessageEventByName
in interfaceIProcessEngine
- Parameters:
eventName
- The name of the event whose definition is requested, may not be null.- Returns:
- The definition of the message event with the specified name.
- Throws:
UnknownMessageEventException
- This exception is thrown when the event could not be found.
-
getAuthorizationAlgorithm
public IAuthorizationAlgorithmDefinition getAuthorizationAlgorithm(String name) throws UnknownAuthorizationAlgorithmException
Description copied from interface:IProcessEngine
This method returns the definition of an authorization algorithm.- Specified by:
getAuthorizationAlgorithm
in interfaceIProcessEngine
- Parameters:
name
- The name of the algorithm.- Returns:
- The definition of the algorithm.
- Throws:
UnknownAuthorizationAlgorithmException
-
getPriorityAlgorithm
public IPriorityAlgorithmDefinition getPriorityAlgorithm(String name) throws UnknownPriorityAlgorithmException
Description copied from interface:IProcessEngine
This method returns the definition of an priority algorithm.- Specified by:
getPriorityAlgorithm
in interfaceIProcessEngine
- Parameters:
name
- The name of the algorithm.- Returns:
- The definition of the algorithm.
- Throws:
UnknownPriorityAlgorithmException
-
getAuthorizationManager
public AuthorizationManager getAuthorizationManager()
-
getPriorityManager
public PriorityManager getPriorityManager()
-
getRoutingManager
public RoutingManager getRoutingManager()
-
getRuleEngine
protected IRuleEngine getRuleEngine()
-
getTypeByName
protected ProcessTypeDefinition getTypeByName(String typeName) throws UnknownProcessTypeException
- Throws:
UnknownProcessTypeException
-
getInternalCase
public ProcessCase getInternalCase(long caseId) throws UnknownProcessCaseException
- Throws:
UnknownProcessCaseException
-
getProcessEvent
protected IProcessEventDefinition getProcessEvent(String eventName)
-
getRoutingAlgorithm
public IRoutingAlgorithmDefinition getRoutingAlgorithm(String name) throws UnknownRoutingAlgorithmException
Description copied from interface:IProcessEngine
This method returns the routing algorithm definition for the specified name.- Specified by:
getRoutingAlgorithm
in interfaceIProcessEngine
- Parameters:
name
- The name of the routing algorithm whose definition is requested.- Returns:
- The definition of the routing algorithm with the specified name.
- Throws:
UnknownRoutingAlgorithmException
- This exception is thrown when the routing algorithm could not be found.
-
getApplicationId
public String getApplicationId()
-
getModuleId
protected String getModuleId()
-
getRepository
public ProcessCaseRepository getRepository()
-
getProcessTaskDelegate
public IProcessTaskDelegate getProcessTaskDelegate()
-
containsNodeDefinition
protected boolean containsNodeDefinition(GUID nodeId)
-
getMessageEvent
protected IMessageEventDefinition getMessageEvent(String eventName)
-
getDisplayNameValues
public Map<String,String> getDisplayNameValues(IMultilingualText displayNameContent, IProfile profile)
This method is responsible for returning a map with displayName values of a task/case. The key of the map will be the language code. If the displayName contains a TSL expression, the value will be the evaluated TSL expression.- Parameters:
displayNameContent
- Multilingual text value for the display name of the task/case.profile
- Profile used to get the active instances.- Returns:
- A map containing the displayName by language code for a task/case.
-
evaluateIMultilingualText
public IMultilingualText evaluateIMultilingualText(IMultilingualText displayNameContent, IProfile profile)
This method checks aIMultilingualText
to see if there are any TSL expressions. If there are, it will return back a newIMultilingualText
with the TSL expresions evaluated and the rest of the text will remain the same- Specified by:
evaluateIMultilingualText
in interfaceIProcessEngine
- Parameters:
displayNameContent
- the MultilingualText used toprofile
- the profile- Returns:
IMultilingualText
with the TSL values evaluated
-
getTraceEngine
public ITraceEngine getTraceEngine()
-
cancelStartedTasks
public void cancelStartedTasks()
Description copied from interface:IProcessEngine
This method may be used to cancel started tasks that were abandoned, for example due to an unexpected server shutdown- Specified by:
cancelStartedTasks
in interfaceIProcessEngine
-
getProcessSettings
public ProcessSettings getProcessSettings()
Description copied from interface:IProcessEngine
Returns the settings used by the process engine, case lists and work lists.- Specified by:
getProcessSettings
in interfaceIProcessEngine
-
findByCriteria
public TaskViewResult findByCriteria(TaskViewCriteria criteria) throws ProcessDataAccessException
Description copied from interface:IProcessEngine
Find task views based on the specified criteria.This method alters the criteria by enabling or disabling checking for restriced users depending on the ignore mode setting of the criteria and on whether any authorization algorithms use the 2-man rule. If the Application ID is not ignored, and no authorization algorithm in this process engine uses the 2-man rule, then checking for restricted users is disabled.
For an equivalent method which does not alter the criteria, see
IProcessCaseDao.findByCriteria(TaskViewCriteria)
.- Specified by:
findByCriteria
in interfaceIProcessEngine
- Parameters:
criteria
- the task criteria to search for- Returns:
TaskViewResult
the tasks matching the criteria- Throws:
ProcessDataAccessException
-
findByCriteria
public CaseViewResult findByCriteria(CaseViewCriteria criteria)
Description copied from interface:IProcessEngine
Find case views based on the specified criteria.- Specified by:
findByCriteria
in interfaceIProcessEngine
- Parameters:
criteria
- the case criteria to search for- Returns:
CaseViewResult
the cases matching the criteria
-
setPostponedJobs
public void setPostponedJobs(PostponedJobs postponedJobs)
Description copied from interface:IProcessEngine
This method sets the place to store the configurations for jobs that have to be scheduled later.- Specified by:
setPostponedJobs
in interfaceIProcessEngine
- Parameters:
postponedJobs
- postponed jobs
-
getLegacyToggles
public ILegacyToggles getLegacyToggles()
-
publishCaseCreated
public void publishCaseCreated(ICaseModel caseModel)
-
publishCaseUpdated
public void publishCaseUpdated(ICaseModel caseModel)
-
publishCaseUpdated
public void publishCaseUpdated(long caseId)
-
publishCaseDeleted
public void publishCaseDeleted(long caseId)
-
publishTaskCreated
public void publishTaskCreated(ITaskModel taskModel)
-
publishTaskUpdated
public void publishTaskUpdated(ITaskModel taskModel)
-
-