org.alfresco.bm.eventprocessor
Class ScheduleWorkflows
java.lang.Object
org.alfresco.bm.event.AbstractEventProcessor
org.alfresco.bm.eventprocessor.ScheduleWorkflows
- All Implemented Interfaces:
- org.alfresco.bm.event.EventProcessor, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware
public class ScheduleWorkflows
- extends org.alfresco.bm.event.AbstractEventProcessor
Schedule processing events.
Input
No input requirements
Data
A MongoDB collection containing unstarted workflows data.
Actions
The MongoDB collection is examined to find unscheduled workflows.
They are scheduled up to a batch size after which this processor reschedules itself.
Output
EVENT_NAME_PROCESS: The process name
#EVENT_NAME_SCHEDULE_WORKFLOWS: No data
- Since:
- 1.0
- Author:
- Derek Hulley
| Fields inherited from class org.alfresco.bm.event.AbstractEventProcessor |
DEFAULT_WARN_DELAY, logger |
|
Method Summary |
org.alfresco.bm.event.EventResult |
processEvent(org.alfresco.bm.event.Event event)
|
void |
setBatchSize(int batchSize)
Set the size of the batches the unscheduled workflows will be started in. |
void |
setEventNameProcess(String eventNameProcess)
Override the default event name to process an event |
| Methods inherited from class org.alfresco.bm.event.AbstractEventProcessor |
getWarnDelay, register, setBeanName, setEventName, setEventNames, setRegistry, setWarnDelay |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZE
- See Also:
- Constant Field Values
EVENT_NAME_PROCESS
public static final String EVENT_NAME_PROCESS
- See Also:
- Constant Field Values
ScheduleWorkflows
public ScheduleWorkflows(WorkflowDataService workflowDataService,
org.alfresco.bm.user.UserDataService userDataService,
long timeBetweenProcesses)
- Parameters:
mongo - connection to MongoDBprocessData - name of DB collection containing process detailsprocessCount - total number of processes to scheduletimeBetweenProcesses - how long between each process
setEventNameProcess
public void setEventNameProcess(String eventNameProcess)
- Override the
default event name to process an event
processEvent
public org.alfresco.bm.event.EventResult processEvent(org.alfresco.bm.event.Event event)
throws Exception
- Throws:
Exception
setBatchSize
public void setBatchSize(int batchSize)
- Set the size of the batches the unscheduled workflows will be started in.
- Parameters:
batchSize - size of a batch
Copyright © 2012. All Rights Reserved.