public class EventInstanceRepositoryImpl extends java.lang.Object implements EventInstanceRepository
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
QUERY_RESET_IN_PROGRESS_WAITING_EVENTS |
EVENT_INSTANCE, EVENT_TRIGGER_INSTANCE, IN_REQUEST_SIZE, MESSAGE_INSTANCE| Constructor and Description |
|---|
EventInstanceRepositoryImpl(Recorder recorder,
PersistenceService persistenceService,
EventService eventService,
TechnicalLoggerService logger,
ArchiveService archiveService) |
| Modifier and Type | Method and Description |
|---|---|
void |
createEventInstance(SEventInstance eventInstance) |
void |
createMessageInstance(SMessageInstance messageInstance) |
void |
createTimerEventTriggerInstance(STimerEventTriggerInstance eventTriggerInstance)
STimerEventTriggerInstance is used to keep track of currently running timers
using
ProcessRuntimeAPI.searchTimerEventTriggerInstances(long, SearchOptions) |
void |
createWaitingEvent(SWaitingEvent waitingEvent) |
void |
deleteEventTriggerInstance(STimerEventTriggerInstance eventTriggerInstance) |
void |
deleteMessageInstance(SMessageInstance messageInstance) |
void |
deleteMessageInstanceByIds(java.util.List<java.lang.Long> ids) |
void |
deleteWaitingEvent(SWaitingEvent waitingEvent) |
java.util.List<SBoundaryEventInstance> |
getActivityBoundaryEventInstances(long activityInstanceId,
int fromIndex,
int maxResults) |
SWaitingErrorEvent |
getBoundaryWaitingErrorEvent(long relatedActivityInstanceId,
java.lang.String errorCode) |
java.util.List<SEventInstance> |
getEventInstances(long rootContainerId,
int fromIndex,
int maxResults,
java.lang.String fieldName,
OrderByType orderByType) |
<T extends STimerEventTriggerInstance> |
getEventTriggerInstance(java.lang.Class<T> entityClass,
long eventTriggerInstanceId) |
java.util.List<SMessageEventCouple> |
getMessageEventCouples(int fromIndex,
int maxResults) |
SMessageInstance |
getMessageInstance(long messageInstanceId) |
java.util.List<java.lang.Long> |
getMessageInstanceIdOlderThanCreationDate(long creationDate,
QueryOptions queryOptions) |
long |
getNumberOfTimerEventTriggerInstances(long processInstanceId,
QueryOptions queryOptions)
Get the number of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria
|
long |
getNumberOfWaitingEvents(java.lang.Class<? extends SWaitingEvent> entityClass,
QueryOptions countOptions) |
java.util.Optional<STimerEventTriggerInstance> |
getTimerEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) |
java.util.List<SWaitingEvent> |
getWaitingEventsForFlowNodeId(long flowNodeInstanceId) |
SWaitingMessageEvent |
getWaitingMessage(long waitingMessageId) |
SWaitingSignalEvent |
getWaitingSignalEvent(long id) |
java.util.List<SWaitingSignalEvent> |
getWaitingSignalEvents(java.lang.String signalName,
int fromIndex,
int maxResults) |
int |
resetInProgressWaitingEvents()
Resets all Waiting Message Events marked as 'in progress", so that they are eligible to match Message Instances
again.
|
int |
resetProgressMessageInstances()
Resets all Message Instances marked as handled, so that they are eligible to match Waiting Events again.
|
java.util.List<SWaitingEvent> |
searchStartWaitingEvents(long processDefinitionId,
QueryOptions queryOptions) |
java.util.List<STimerEventTriggerInstance> |
searchTimerEventTriggerInstances(long processInstanceId,
QueryOptions queryOptions)
Search the list of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria
|
<T extends SWaitingEvent> |
searchWaitingEvents(java.lang.Class<T> entityClass,
QueryOptions searchOptions) |
void |
updateEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance,
EntityUpdateDescriptor descriptor)
Update an event trigger instance.
|
void |
updateMessageInstance(SMessageInstance messageInstance,
EntityUpdateDescriptor descriptor) |
void |
updateWaitingMessage(SWaitingMessageEvent waitingMessageEvent,
EntityUpdateDescriptor descriptor) |
public static final java.lang.String QUERY_RESET_IN_PROGRESS_WAITING_EVENTS
public EventInstanceRepositoryImpl(Recorder recorder, PersistenceService persistenceService, EventService eventService, TechnicalLoggerService logger, ArchiveService archiveService)
public void createEventInstance(SEventInstance eventInstance) throws SEventInstanceCreationException
createEventInstance in interface EventInstanceRepositorySEventInstanceCreationExceptionpublic void createTimerEventTriggerInstance(STimerEventTriggerInstance eventTriggerInstance) throws SEventTriggerInstanceCreationException
EventInstanceRepositoryProcessRuntimeAPI.searchTimerEventTriggerInstances(long, SearchOptions)createTimerEventTriggerInstance in interface EventInstanceRepositorySEventTriggerInstanceCreationExceptionpublic void createMessageInstance(SMessageInstance messageInstance) throws SMessageInstanceCreationException
createMessageInstance in interface EventInstanceRepositorySMessageInstanceCreationExceptionpublic void createWaitingEvent(SWaitingEvent waitingEvent) throws SWaitingEventCreationException
createWaitingEvent in interface EventInstanceRepositorySWaitingEventCreationExceptionpublic void deleteEventTriggerInstance(STimerEventTriggerInstance eventTriggerInstance) throws SEventTriggerInstanceDeletionException
deleteEventTriggerInstance in interface EventInstanceRepositorySEventTriggerInstanceDeletionExceptionpublic void deleteMessageInstance(SMessageInstance messageInstance) throws SMessageModificationException
deleteMessageInstance in interface EventInstanceRepositorySMessageModificationExceptionpublic java.util.List<SBoundaryEventInstance> getActivityBoundaryEventInstances(long activityInstanceId, int fromIndex, int maxResults) throws SEventInstanceReadException
getActivityBoundaryEventInstances in interface EventInstanceRepositorySEventInstanceReadExceptionpublic SWaitingErrorEvent getBoundaryWaitingErrorEvent(long relatedActivityInstanceId, java.lang.String errorCode) throws SWaitingEventReadException
getBoundaryWaitingErrorEvent in interface EventInstanceRepositorySWaitingEventReadExceptionpublic java.util.List<SEventInstance> getEventInstances(long rootContainerId, int fromIndex, int maxResults, java.lang.String fieldName, OrderByType orderByType) throws SEventInstanceReadException
getEventInstances in interface EventInstanceRepositorySEventInstanceReadExceptionpublic <T extends STimerEventTriggerInstance> T getEventTriggerInstance(java.lang.Class<T> entityClass, long eventTriggerInstanceId) throws SEventTriggerInstanceReadException
getEventTriggerInstance in interface EventInstanceRepositorySEventTriggerInstanceReadExceptionpublic int resetProgressMessageInstances()
throws SMessageModificationException
EventInstanceRepositoryresetProgressMessageInstances in interface EventInstanceRepositorySMessageModificationException - if an error occurs when resetting the 'handled' flag.public int resetInProgressWaitingEvents()
throws SWaitingEventModificationException
EventInstanceRepositoryresetInProgressWaitingEvents in interface EventInstanceRepositorySWaitingEventModificationException - if an error occurs when resetting the 'progress' flag.public java.util.List<SMessageEventCouple> getMessageEventCouples(int fromIndex, int maxResults) throws SEventTriggerInstanceReadException
getMessageEventCouples in interface EventInstanceRepositorySEventTriggerInstanceReadExceptionpublic SMessageInstance getMessageInstance(long messageInstanceId) throws SMessageInstanceReadException
getMessageInstance in interface EventInstanceRepositorySMessageInstanceReadExceptionpublic java.util.List<java.lang.Long> getMessageInstanceIdOlderThanCreationDate(long creationDate,
QueryOptions queryOptions)
throws SMessageInstanceReadException
getMessageInstanceIdOlderThanCreationDate in interface EventInstanceRepositorySMessageInstanceReadExceptionpublic void deleteMessageInstanceByIds(java.util.List<java.lang.Long> ids)
throws SMessageModificationException
deleteMessageInstanceByIds in interface EventInstanceRepositorySMessageModificationExceptionpublic long getNumberOfWaitingEvents(java.lang.Class<? extends SWaitingEvent> entityClass, QueryOptions countOptions) throws SBonitaReadException
getNumberOfWaitingEvents in interface EventInstanceRepositorySBonitaReadExceptionpublic java.util.List<SWaitingEvent> searchStartWaitingEvents(long processDefinitionId, QueryOptions queryOptions) throws SBonitaReadException
searchStartWaitingEvents in interface EventInstanceRepositorySBonitaReadExceptionpublic SWaitingMessageEvent getWaitingMessage(long waitingMessageId) throws SWaitingEventReadException
getWaitingMessage in interface EventInstanceRepositorySWaitingEventReadExceptionpublic void deleteWaitingEvent(SWaitingEvent waitingEvent) throws SWaitingEventModificationException
deleteWaitingEvent in interface EventInstanceRepositorySWaitingEventModificationExceptionpublic java.util.List<SWaitingEvent> getWaitingEventsForFlowNodeId(long flowNodeInstanceId) throws SEventTriggerInstanceReadException
getWaitingEventsForFlowNodeId in interface EventInstanceRepositorySEventTriggerInstanceReadExceptionpublic java.util.List<SWaitingSignalEvent> getWaitingSignalEvents(java.lang.String signalName, int fromIndex, int maxResults) throws SEventTriggerInstanceReadException
getWaitingSignalEvents in interface EventInstanceRepositorySEventTriggerInstanceReadExceptionpublic SWaitingSignalEvent getWaitingSignalEvent(long id) throws SEventTriggerInstanceReadException, SEventTriggerInstanceNotFoundException
getWaitingSignalEvent in interface EventInstanceRepositorySEventTriggerInstanceReadExceptionSEventTriggerInstanceNotFoundExceptionpublic java.util.Optional<STimerEventTriggerInstance> getTimerEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) throws SBonitaReadException
getTimerEventTriggerInstanceOfFlowNode in interface EventInstanceRepositoryflowNodeInstanceId - the flow node instance idSBonitaReadExceptionpublic long getNumberOfTimerEventTriggerInstances(long processInstanceId,
QueryOptions queryOptions)
throws SBonitaReadException
EventInstanceRepositorygetNumberOfTimerEventTriggerInstances in interface EventInstanceRepositoryprocessInstanceId - The identifier of the process instancequeryOptions - Criteria of the searchSBonitaReadExceptionpublic java.util.List<STimerEventTriggerInstance> searchTimerEventTriggerInstances(long processInstanceId, QueryOptions queryOptions) throws SBonitaReadException
EventInstanceRepositorysearchTimerEventTriggerInstances in interface EventInstanceRepositoryprocessInstanceId - The identifier of the process instancequeryOptions - Criteria of the searchSBonitaReadExceptionpublic <T extends SWaitingEvent> java.util.List<T> searchWaitingEvents(java.lang.Class<T> entityClass, QueryOptions searchOptions) throws SBonitaReadException
searchWaitingEvents in interface EventInstanceRepositorySBonitaReadExceptionpublic void updateMessageInstance(SMessageInstance messageInstance, EntityUpdateDescriptor descriptor) throws SMessageModificationException
updateMessageInstance in interface EventInstanceRepositorySMessageModificationExceptionpublic void updateWaitingMessage(SWaitingMessageEvent waitingMessageEvent, EntityUpdateDescriptor descriptor) throws SWaitingEventModificationException
updateWaitingMessage in interface EventInstanceRepositorySWaitingEventModificationExceptionpublic void updateEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance, EntityUpdateDescriptor descriptor) throws SEventTriggerInstanceModificationException
EventInstanceRepositoryupdateEventTriggerInstance in interface EventInstanceRepositorysTimerEventTriggerInstance - The event trigger instance to updatedescriptor - The fields to updateSEventTriggerInstanceModificationException