Class ProcessEngineDelegate
java.lang.Object
com.aquima.interactions.process.wrapper.ProcessEngineDelegate
- All Implemented Interfaces:
IProcessData
,IProcessEngine
,IProcessEngineBehavior
,IProcessEngineDefinitions
,IProcessExpressionHandler
- Direct Known Subclasses:
ReadonlyProcessEngine
Utility class to allow for easy wrapping of a process engine implementation.
This an internal class.
- Since:
- 7.1
- Author:
- Jon van Leuven
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
This method may be used to close an existing case and cancel all its tasks.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.findByCriteria
(CaseViewCriteria criteria) Find case views based on the specified criteria.findByCriteria
(TaskViewCriteria criteria) Find task views based on the specified criteria.findCases
(CaseCriteria caseFilter) This method returns an array containing views of all cases that are valid after applying the filters from the filter contextfindTasks
(TaskCriteria taskFilter) This method returns an array containing views of all tasks that are valid after applying the filters from the filter context.findWaitingCases
(String messageEventName, Set<Long> specificCaseIds) This method returns the cases waiting for a message event.This method returns the definition of an authorization algorithm.getAvailableCases
(IUserData userData) This method will return an array containing the cases that are available for the supplied user.getAvailableTasks
(IUserData userData, Long caseId) This method returns an array containing the tasks that are available for the supplied user.getCase
(long caseId) This method returns the case for the specified ID.Returns the case evaluator currently used by this process engine.This method returns the model that is used by the process engine to store case data.This method returns an array containing the processes that may be executed to create a new case in the process engine.This method returns the expression parser used by the process engine.getMessageEventByName
(String eventName) This method returns the message event definition for the specified name.getNodeDefinition
(GUID nodeId) This method returns the process node definition by the specified node id.GUID[]
This method returns all node id.getPriorityAlgorithmByName
(String priorityAlgorithmName) getProcessByName
(String name) This method returns the process definition for the specified name.getProcessEventByName
(String eventName) This method returns the event definition for the specified name.Returns the settings used by the process engine, case lists and work lists.getProcessTaskDefinition
(GUID nodeId) This method retrieves the task definition for the specified node id.IRole[]
getRoles()
This method returns all available roles.getRoutingAlgorithmByName
(String routingAlgorithmName) getTask
(long taskId) This method returns the task for the specified ID.getTaskByName
(String name) This method returns the task definition for the specified name.getTypeByName
(String typeName) This method returns an array containing all the tasks that have not yet been assigned.void
notifyEvent
(IMessageEvent messageEvent, IUserData user, IProcessCaseChangeListener listener) This method notifies the process engine about an event.void
notifyEvent
(IMessageEvent messageEvent, IUserData user, IProcessCaseChangeListener listener, Set<Long> specificCaseIds) This method notifies the process engine about an event.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aquima.interactions.process.IProcessData
getCaseState, getTaskModel
Methods inherited from interface com.aquima.interactions.process.IProcessEngine
registerCaseEvaluator, registerDelegate
Methods inherited from interface com.aquima.interactions.process.IProcessEngineBehavior
cancelStartedTasks, reopenTask, reopenTask, replayMessageEvent, replayMessageEvent, replayTimerEvent, replayTimerEvent
Methods inherited from interface com.aquima.interactions.process.IProcessEngineDefinitions
getPriorityAlgorithm, getRoutingAlgorithm
-
Constructor Details
-
ProcessEngineDelegate
-
-
Method Details
-
closeCase
Description copied from interface:IProcessEngineBehavior
This method may be used to close an existing case and cancel all its tasks.- Specified by:
closeCase
in interfaceIProcessEngineBehavior
- Parameters:
userData
- Object containing information about the current user.caseId
- The ID of the case that should be closed.
-
getAvailableCases
Description copied from interface:IProcessData
This method will return an array containing the cases that are available for the supplied user.- Specified by:
getAvailableCases
in interfaceIProcessData
- Parameters:
userData
- Object containing the information about the current user.- Returns:
- an array containing the cases that are available for the supplied user.
-
getAvailableTasks
Description copied from interface:IProcessData
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 interfaceIProcessData
- 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.
-
findTasks
Description copied from interface:IProcessData
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 interfaceIProcessData
- Parameters:
taskFilter
- TaskFilterContext to filter the tasks that are returned.- Returns:
- an array containing the task views.
-
findCases
Description copied from interface:IProcessData
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 interfaceIProcessData
- Parameters:
caseFilter
- CaseFilterContext to filter the cases that are returned.- Returns:
- an array containing the case views
-
getCase
Description copied from interface:IProcessData
This method returns the case for the specified ID.- Specified by:
getCase
in interfaceIProcessData
- Parameters:
caseId
- The ID of the requested case.- Returns:
- The case for the specified ID.
-
findWaitingCases
Description copied from interface:IProcessData
This method returns the cases waiting for a message event.- Specified by:
findWaitingCases
in interfaceIProcessData
- Parameters:
messageEventName
- The message event name, may not be null.specificCaseIds
- A set of case ids, may be null. If not null, only those cases are processed.- Returns:
- The case models waiting for the message event.
-
getCaseModel
Description copied from interface:IProcessEngineDefinitions
This method returns the model that is used by the process engine to store case data.- Specified by:
getCaseModel
in interfaceIProcessEngineDefinitions
- Returns:
- the model that is used by the process engine to store case data.
-
getCaseProcesses
Description copied from interface:IProcessEngineDefinitions
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 interfaceIProcessEngineDefinitions
- Returns:
- Array containing the processes that may be executed to create a new case.
-
getRoles
Description copied from interface:IProcessEngineDefinitions
This method returns all available roles.- Specified by:
getRoles
in interfaceIProcessEngineDefinitions
- Returns:
- an array containing all the roles, never null.
-
getProcessByName
Description copied from interface:IProcessEngineDefinitions
This method returns the process definition for the specified name.- Specified by:
getProcessByName
in interfaceIProcessEngineDefinitions
- Parameters:
name
- The name of the requested process definition.- Returns:
- The process definition for the specified name.
-
getTask
Description copied from interface:IProcessData
This method returns the task for the specified ID.- Specified by:
getTask
in interfaceIProcessData
- Parameters:
taskId
- The ID of the requested task.- Returns:
- The task for the specified ID.
-
getTaskByName
Description copied from interface:IProcessEngineDefinitions
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 methodIProcessEngineDefinitions.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 interfaceIProcessEngineDefinitions
- Parameters:
name
- The name of the requested process task.- Returns:
- The process task definition for the specified name.
-
getProcessTaskDefinition
Description copied from interface:IProcessEngineDefinitions
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 theIProcessEngineDefinitions.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 interfaceIProcessEngineDefinitions
- 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
-
getUnassignedTasks
Description copied from interface:IProcessData
This method returns an array containing all the tasks that have not yet been assigned.- Specified by:
getUnassignedTasks
in interfaceIProcessData
- Returns:
- an array containing all the tasks that have not yet been assigned.
-
getProcessEventByName
Description copied from interface:IProcessEngineDefinitions
This method returns the event definition for the specified name.- Specified by:
getProcessEventByName
in interfaceIProcessEngineDefinitions
- Parameters:
eventName
- The name of the event whose definition is requested.- Returns:
- The definition of the event with the specified name.
-
getRoutingAlgorithmByName
-
getPriorityAlgorithmByName
-
getAuthorizationAlgorithm
Description copied from interface:IProcessEngineDefinitions
This method returns the definition of an authorization algorithm.- Specified by:
getAuthorizationAlgorithm
in interfaceIProcessEngineDefinitions
- Parameters:
name
- The name of the algorithm.- Returns:
- The definition of the algorithm.
-
getTypeByName
- Specified by:
getTypeByName
in interfaceIProcessEngineDefinitions
-
evaluateTimer
Description copied from interface:IProcessEngineBehavior
This method (re)evaluates all open timer tasks.- Specified by:
evaluateTimer
in interfaceIProcessEngineBehavior
- Parameters:
currentTime
- The current time.
-
getExpressionParser
Description copied from interface:IProcessEngineDefinitions
This method returns the expression parser used by the process engine.- Specified by:
getExpressionParser
in interfaceIProcessEngineDefinitions
- Returns:
- The expression parser, never null.
-
getMessageEventByName
Description copied from interface:IProcessEngineDefinitions
This method returns the message event definition for the specified name.- Specified by:
getMessageEventByName
in interfaceIProcessEngineDefinitions
- 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.
-
notifyEvent
public void notifyEvent(IMessageEvent messageEvent, IUserData user, IProcessCaseChangeListener listener) Description copied from interface:IProcessEngineBehavior
This method notifies the process engine about an event.- Specified by:
notifyEvent
in interfaceIProcessEngineBehavior
- Parameters:
messageEvent
- The message event, may not be null.user
- The user, may not be null.listener
- A listener to trace the modified cases, may be null.
-
notifyEvent
public void notifyEvent(IMessageEvent messageEvent, IUserData user, IProcessCaseChangeListener listener, Set<Long> specificCaseIds) Description copied from interface:IProcessEngineBehavior
This method notifies the process engine about an event.- Specified by:
notifyEvent
in interfaceIProcessEngineBehavior
- Parameters:
messageEvent
- The message event, may not be null.user
- 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.
-
getNodeIds
Description copied from interface:IProcessEngineDefinitions
This method returns all node id.- Specified by:
getNodeIds
in interfaceIProcessEngineDefinitions
- Returns:
- The node ids, never null.
-
getNodeDefinition
Description copied from interface:IProcessEngineDefinitions
This method returns the process node definition by the specified node id.- Specified by:
getNodeDefinition
in interfaceIProcessEngineDefinitions
- Parameters:
nodeId
- The node id, may not be null- Returns:
- The node definition, never null.
-
getProcessSettings
Description copied from interface:IProcessEngine
Returns the settings used by the process engine, case lists and work lists.- Specified by:
getProcessSettings
in interfaceIProcessEngine
- Returns:
- the process settings
-
findByCriteria
Description copied from interface:IProcessData
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 interfaceIProcessData
- Parameters:
criteria
- the task criteria to search for- Returns:
TaskViewResult
the tasks matching the criteria
-
findByCriteria
Description copied from interface:IProcessData
Find case views based on the specified criteria.- Specified by:
findByCriteria
in interfaceIProcessData
- Parameters:
criteria
- the case criteria to search for- Returns:
CaseViewResult
the cases matching the criteria
-
evaluateIMultilingualText
public IMultilingualText evaluateIMultilingualText(IMultilingualText displayNameContent, IProfile profile) Description copied from interface:IProcessExpressionHandler
This method checks aIMultilingualText
to see if there are any TSL expressions. If there are, it will return back a newIMultilingualText
with the TSL expressions evaluated and the rest of the text will remain the same- Specified by:
evaluateIMultilingualText
in interfaceIProcessExpressionHandler
- Parameters:
displayNameContent
- the multi lingual display nameprofile
- the profile- Returns:
IMultilingualText
with the TSL values evaluated
-
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).
-