Class EvaluationQueue
java.lang.Object
com.aquima.interactions.process.impl.EvaluationQueue
- All Implemented Interfaces:
IEvaluationQueue
Implementation of the evaluation queue. This queue is implemented as a FIFO queue, and accepts new tasks during the
processing of current tasks.
- Since:
- 7.1
- Author:
- O. Kerpershoek
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IProcessCaseChangeListener
protected boolean
protected EvaluationTask
protected INodeHandlerFactory
protected ProcessEngine
protected ProcessEvaluator
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
EvaluationQueue
(ProcessEngine engine, ProcessEvaluator evaluator) protected
EvaluationQueue
(ProcessEngine engine, ProcessEvaluator evaluator, INodeHandlerFactory nodeHandlerFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFirstTask
(ITaskModel taskModel) Adds the given task as the first element to the queue.void
addNode
(IProcessNodeDefinition node, ITaskModel parent) Add a node from a process to the evaluation queue.void
addTask
(ITaskModel taskModel) Add a task to the evaluation queue, so it will be evaluated, and the process will continue from that task if needed.void
cancelTask
(ITaskModel task) This method may be invoked to cancel a task.protected void
cancelTask
(ITaskModel task, TaskStatusType status) void
protected void
expireTask
(ITaskModel task) protected void
setChangeListener
(IProcessCaseChangeListener changeListener) protected boolean
shouldExpire
(ITaskModel taskModel, IProcessNodeDefinition node, DateTimeValue currentTime) protected void
start
(DateTimeValue currentTime)
-
Field Details
-
processEvaluator
-
processEngine
-
nodeHandlerFactory
-
isProcessing
protected boolean isProcessing -
nextTask
-
changeListener
-
-
Constructor Details
-
EvaluationQueue
-
EvaluationQueue
protected EvaluationQueue(ProcessEngine engine, ProcessEvaluator evaluator, INodeHandlerFactory nodeHandlerFactory)
-
-
Method Details
-
start
-
shouldExpire
protected boolean shouldExpire(ITaskModel taskModel, IProcessNodeDefinition node, DateTimeValue currentTime) -
addNode
Description copied from interface:IEvaluationQueue
Add a node from a process to the evaluation queue. this method should be invoked for nodes that have not yet been processed.- Specified by:
addNode
in interfaceIEvaluationQueue
- Parameters:
node
- The node that should be scheduled and processed.parent
- The parent task of the node (should never be null).
-
addTask
Description copied from interface:IEvaluationQueue
Add a task to the evaluation queue, so it will be evaluated, and the process will continue from that task if needed.- Specified by:
addTask
in interfaceIEvaluationQueue
- Parameters:
taskModel
- The task that should be evaluated.
-
addFirstTask
Description copied from interface:IEvaluationQueue
Adds the given task as the first element to the queue. Duplicates will be removed from the queue.- Specified by:
addFirstTask
in interfaceIEvaluationQueue
- Parameters:
taskModel
- the task that should be evaluated.
-
clearSchedulingHistory
public void clearSchedulingHistory() -
expireTask
-
cancelTask
Description copied from interface:IEvaluationQueue
This method may be invoked to cancel a task. The task will be marked as canceled, and will be removed from the queue (if needed). If the task is a process or group task, the cancelTask method will also (automatically) be invoked for any child task that has not yet been completed.- Specified by:
cancelTask
in interfaceIEvaluationQueue
- Parameters:
task
- The task that needs to be canceled.
-
cancelTask
-
setChangeListener
-