@DeclareRoles(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) @RolesAllowed(value={"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"}) public class AsyncEventService extends Object
The processor look up the workItem and starts a processing life cycle.
The AsyncEventService is called only by the AsyncEventScheduler which is implementing a ManagedScheduledExecutorService.
To prevent concurrent processes to handle the same workitems the batch process uses a Optimistic lock strategy. After fetching new event log entries the processor updates the eventLog entry in a new transaction and set the topic to 'batch.process.lock'. After that update we can be sure that no other process is dealing with these entries. After completing the processing step the eventlog entry will be removed.
To avoid ad deadlock the processor set an expiration time on the lock, so the lock will be auto-released after 1 minute (batch.processor.deadlock).
AsyncEventScheduler| Constructor and Description |
|---|
AsyncEventService() |
| Modifier and Type | Method and Description |
|---|---|
void |
onProcess(ProcessingEvent processingEvent)
The observer method verifies if the current task contains a AsyncEvent
definition.
|
void |
processEventLog()
The method lookups for batch event log entries and processed workitems in a
batch process.
|
public void onProcess(@Observes
ProcessingEvent processingEvent)
throws ModelException
ModelExceptionpublic void processEventLog()
Each eventLogEntry is cached in the eventCache. The cache is cleared from all eventLogEntries not part of the current collection. We can assume that the event was succefully processed by the ArchiveHandler
ArchiveExceptionCopyright © 2006–2020 Imixs Software Solutions GmbH. All rights reserved.