Class EventInstanceRepositoryImpl
java.lang.Object
org.bonitasoft.engine.core.process.instance.event.impl.EventInstanceRepositoryImpl
- All Implemented Interfaces:
EventInstanceRepository
- Author:
- Elias Ricken de Medeiros, Matthieu Chaffotte, Frederic Bouquet, Celine Souchet
-
Field Summary
FieldsFields inherited from interface org.bonitasoft.engine.core.process.instance.api.event.EventInstanceRepository
EVENT_INSTANCE, EVENT_TRIGGER_INSTANCE, IN_REQUEST_SIZE, MESSAGE_INSTANCE -
Constructor Summary
ConstructorsConstructorDescriptionEventInstanceRepositoryImpl(Recorder recorder, PersistenceService persistenceService, EventService eventService, ArchiveService archiveService) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateEventInstance(SEventInstance eventInstance) voidcreateMessageInstance(SMessageInstance messageInstance) voidcreateTimerEventTriggerInstance(STimerEventTriggerInstance eventTriggerInstance) STimerEventTriggerInstance is used to keep track of currently running timers usingProcessRuntimeAPI.searchTimerEventTriggerInstances(long, SearchOptions)voidcreateWaitingEvent(SWaitingEvent waitingEvent) voiddeleteEventTriggerInstance(STimerEventTriggerInstance eventTriggerInstance) voiddeleteMessageInstance(SMessageInstance messageInstance) voidvoiddeleteWaitingEvent(SWaitingEvent waitingEvent) getActivityBoundaryEventInstances(long activityInstanceId, int fromIndex, int maxResults) getAllWaitingEventsForProcessInstance(long processInstanceId, int fromIndex, int maxResults) Return waiting events related to the process instance passed as parameter, including the ones at flow node level.getBoundaryWaitingErrorEvent(long relatedActivityInstanceId, String errorCode) getEventInstances(long rootContainerId, int fromIndex, int maxResults, String fieldName, OrderByType orderByType) <T extends STimerEventTriggerInstance>
TgetEventTriggerInstance(Class<T> entityClass, long eventTriggerInstanceId) getMessageEventCouples(int fromIndex, int maxResults) getMessageInstance(long messageInstanceId) getMessageInstanceIdOlderThanCreationDate(long creationDate, QueryOptions queryOptions) longgetNumberOfTimerEventTriggerInstances(long processInstanceId, QueryOptions queryOptions) Get the number of STimerEventTriggerInstance on the specific process instance & corresponding to the criterialonggetNumberOfWaitingEvents(Class<? extends SWaitingEvent> entityClass, QueryOptions countOptions) getStartWaitingEventsOfProcessDefinition(long processDefinitionId) search start waiting events related to a process definition (not its event sub processes)getTimerEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) getWaitingEventsForFlowNodeId(long flowNodeInstanceId) getWaitingMessage(long waitingMessageId) getWaitingSignalEvent(long id) getWaitingSignalEvents(String signalName, int fromIndex, int maxResults) intResets all Waiting Message Events marked as 'in progress", so that they are eligible to match Message Instances again.intResets all Message Instances marked as handled, so that they are eligible to match Waiting Events again.searchTimerEventTriggerInstances(long processInstanceId, QueryOptions queryOptions) Search the list of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria<T extends SWaitingEvent>
List<T>searchWaitingEvents(Class<T> entityClass, QueryOptions searchOptions) voidupdateEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance, EntityUpdateDescriptor descriptor) Update an event trigger instance.voidupdateMessageInstance(SMessageInstance messageInstance, EntityUpdateDescriptor descriptor) voidupdateWaitingMessage(SWaitingMessageEvent waitingMessageEvent, EntityUpdateDescriptor descriptor)
-
Field Details
-
QUERY_RESET_IN_PROGRESS_WAITING_EVENTS
- See Also:
-
-
Constructor Details
-
EventInstanceRepositoryImpl
public EventInstanceRepositoryImpl(Recorder recorder, PersistenceService persistenceService, EventService eventService, ArchiveService archiveService)
-
-
Method Details
-
createEventInstance
public void createEventInstance(SEventInstance eventInstance) throws SEventInstanceCreationException - Specified by:
createEventInstancein interfaceEventInstanceRepository- Throws:
SEventInstanceCreationException
-
createTimerEventTriggerInstance
public void createTimerEventTriggerInstance(STimerEventTriggerInstance eventTriggerInstance) throws SEventTriggerInstanceCreationException Description copied from interface:EventInstanceRepositorySTimerEventTriggerInstance is used to keep track of currently running timers usingProcessRuntimeAPI.searchTimerEventTriggerInstances(long, SearchOptions)- Specified by:
createTimerEventTriggerInstancein interfaceEventInstanceRepository- Throws:
SEventTriggerInstanceCreationException
-
createMessageInstance
public void createMessageInstance(SMessageInstance messageInstance) throws SMessageInstanceCreationException - Specified by:
createMessageInstancein interfaceEventInstanceRepository- Throws:
SMessageInstanceCreationException
-
createWaitingEvent
- Specified by:
createWaitingEventin interfaceEventInstanceRepository- Throws:
SWaitingEventCreationException
-
deleteEventTriggerInstance
public void deleteEventTriggerInstance(STimerEventTriggerInstance eventTriggerInstance) throws SEventTriggerInstanceDeletionException - Specified by:
deleteEventTriggerInstancein interfaceEventInstanceRepository- Throws:
SEventTriggerInstanceDeletionException
-
deleteMessageInstance
public void deleteMessageInstance(SMessageInstance messageInstance) throws SMessageModificationException - Specified by:
deleteMessageInstancein interfaceEventInstanceRepository- Throws:
SMessageModificationException
-
getActivityBoundaryEventInstances
public List<SBoundaryEventInstance> getActivityBoundaryEventInstances(long activityInstanceId, int fromIndex, int maxResults) throws SEventInstanceReadException - Specified by:
getActivityBoundaryEventInstancesin interfaceEventInstanceRepository- Returns:
- List of SBoundaryEventInstance, ordered by identifier ascending
- Throws:
SEventInstanceReadException
-
getBoundaryWaitingErrorEvent
public SWaitingErrorEvent getBoundaryWaitingErrorEvent(long relatedActivityInstanceId, String errorCode) throws SWaitingEventReadException - Specified by:
getBoundaryWaitingErrorEventin interfaceEventInstanceRepository- Throws:
SWaitingEventReadException
-
getEventInstances
public List<SEventInstance> getEventInstances(long rootContainerId, int fromIndex, int maxResults, String fieldName, OrderByType orderByType) throws SEventInstanceReadException - Specified by:
getEventInstancesin interfaceEventInstanceRepository- Throws:
SEventInstanceReadException
-
getEventTriggerInstance
public <T extends STimerEventTriggerInstance> T getEventTriggerInstance(Class<T> entityClass, long eventTriggerInstanceId) throws SEventTriggerInstanceReadException - Specified by:
getEventTriggerInstancein interfaceEventInstanceRepository- Returns:
- Throws:
SEventTriggerInstanceReadException
-
resetProgressMessageInstances
Description copied from interface:EventInstanceRepositoryResets all Message Instances marked as handled, so that they are eligible to match Waiting Events again.- Specified by:
resetProgressMessageInstancesin interfaceEventInstanceRepository- Throws:
SMessageModificationException- if an error occurs when resetting the 'handled' flag.
-
resetInProgressWaitingEvents
Description copied from interface:EventInstanceRepositoryResets all Waiting Message Events marked as 'in progress", so that they are eligible to match Message Instances again.- Specified by:
resetInProgressWaitingEventsin interfaceEventInstanceRepository- Returns:
- the number of waiting events reset.
- Throws:
SWaitingEventModificationException- if an error occurs when resetting the 'progress' flag.
-
getMessageEventCouples
public List<SMessageEventCouple> getMessageEventCouples(int fromIndex, int maxResults) throws SEventTriggerInstanceReadException - Specified by:
getMessageEventCouplesin interfaceEventInstanceRepository- Throws:
SEventTriggerInstanceReadException
-
getMessageInstance
public SMessageInstance getMessageInstance(long messageInstanceId) throws SMessageInstanceReadException - Specified by:
getMessageInstancein interfaceEventInstanceRepository- Throws:
SMessageInstanceReadException
-
getMessageInstanceIdOlderThanCreationDate
public List<Long> getMessageInstanceIdOlderThanCreationDate(long creationDate, QueryOptions queryOptions) throws SMessageInstanceReadException - Specified by:
getMessageInstanceIdOlderThanCreationDatein interfaceEventInstanceRepository- Throws:
SMessageInstanceReadException
-
deleteMessageInstanceByIds
- Specified by:
deleteMessageInstanceByIdsin interfaceEventInstanceRepository- Throws:
SMessageModificationException
-
getNumberOfWaitingEvents
public long getNumberOfWaitingEvents(Class<? extends SWaitingEvent> entityClass, QueryOptions countOptions) throws SBonitaReadException - Specified by:
getNumberOfWaitingEventsin interfaceEventInstanceRepository- Throws:
SBonitaReadException
-
getStartWaitingEventsOfProcessDefinition
public List<SWaitingEvent> getStartWaitingEventsOfProcessDefinition(long processDefinitionId) throws SBonitaReadException Description copied from interface:EventInstanceRepositorysearch start waiting events related to a process definition (not its event sub processes)- Specified by:
getStartWaitingEventsOfProcessDefinitionin interfaceEventInstanceRepository- Returns:
- Throws:
SBonitaReadException
-
getWaitingMessage
public SWaitingMessageEvent getWaitingMessage(long waitingMessageId) throws SWaitingEventReadException - Specified by:
getWaitingMessagein interfaceEventInstanceRepository- Throws:
SWaitingEventReadException
-
deleteWaitingEvent
public void deleteWaitingEvent(SWaitingEvent waitingEvent) throws SWaitingEventModificationException - Specified by:
deleteWaitingEventin interfaceEventInstanceRepository- Throws:
SWaitingEventModificationException
-
getWaitingEventsForFlowNodeId
public List<SWaitingEvent> getWaitingEventsForFlowNodeId(long flowNodeInstanceId) throws SEventTriggerInstanceReadException - Specified by:
getWaitingEventsForFlowNodeIdin interfaceEventInstanceRepository- Throws:
SEventTriggerInstanceReadException
-
getAllWaitingEventsForProcessInstance
public List<SWaitingEvent> getAllWaitingEventsForProcessInstance(long processInstanceId, int fromIndex, int maxResults) throws SEventTriggerInstanceReadException Description copied from interface:EventInstanceRepositoryReturn waiting events related to the process instance passed as parameter, including the ones at flow node level.- Specified by:
getAllWaitingEventsForProcessInstancein interfaceEventInstanceRepository- Throws:
SEventTriggerInstanceReadException
-
getWaitingSignalEvents
public List<SWaitingSignalEvent> getWaitingSignalEvents(String signalName, int fromIndex, int maxResults) throws SEventTriggerInstanceReadException - Specified by:
getWaitingSignalEventsin interfaceEventInstanceRepository- Returns:
- Throws:
SEventTriggerInstanceReadException
-
getWaitingSignalEvent
public SWaitingSignalEvent getWaitingSignalEvent(long id) throws SEventTriggerInstanceReadException, SEventTriggerInstanceNotFoundException - Specified by:
getWaitingSignalEventin interfaceEventInstanceRepository- Throws:
SEventTriggerInstanceReadExceptionSEventTriggerInstanceNotFoundException
-
getTimerEventTriggerInstanceOfFlowNode
public Optional<STimerEventTriggerInstance> getTimerEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) throws SBonitaReadException - Specified by:
getTimerEventTriggerInstanceOfFlowNodein interfaceEventInstanceRepository- Parameters:
flowNodeInstanceId- the flow node instance id- Returns:
- the timer event trigger instance of this flow node if there is one
- Throws:
SBonitaReadException
-
getNumberOfTimerEventTriggerInstances
public long getNumberOfTimerEventTriggerInstances(long processInstanceId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:EventInstanceRepositoryGet the number of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria- Specified by:
getNumberOfTimerEventTriggerInstancesin interfaceEventInstanceRepository- Parameters:
processInstanceId- The identifier of the process instancequeryOptions- Criteria of the search- Returns:
- The number of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria
- Throws:
SBonitaReadException
-
searchTimerEventTriggerInstances
public List<STimerEventTriggerInstance> searchTimerEventTriggerInstances(long processInstanceId, QueryOptions queryOptions) throws SBonitaReadException Description copied from interface:EventInstanceRepositorySearch the list of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria- Specified by:
searchTimerEventTriggerInstancesin interfaceEventInstanceRepository- Parameters:
processInstanceId- The identifier of the process instancequeryOptions- Criteria of the search- Returns:
- The list of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria
- Throws:
SBonitaReadException
-
searchWaitingEvents
public <T extends SWaitingEvent> List<T> searchWaitingEvents(Class<T> entityClass, QueryOptions searchOptions) throws SBonitaReadException - Specified by:
searchWaitingEventsin interfaceEventInstanceRepository- Throws:
SBonitaReadException
-
updateMessageInstance
public void updateMessageInstance(SMessageInstance messageInstance, EntityUpdateDescriptor descriptor) throws SMessageModificationException - Specified by:
updateMessageInstancein interfaceEventInstanceRepository- Throws:
SMessageModificationException
-
updateWaitingMessage
public void updateWaitingMessage(SWaitingMessageEvent waitingMessageEvent, EntityUpdateDescriptor descriptor) throws SWaitingEventModificationException - Specified by:
updateWaitingMessagein interfaceEventInstanceRepository- Throws:
SWaitingEventModificationException
-
updateEventTriggerInstance
public void updateEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance, EntityUpdateDescriptor descriptor) throws SEventTriggerInstanceModificationException Description copied from interface:EventInstanceRepositoryUpdate an event trigger instance.- Specified by:
updateEventTriggerInstancein interfaceEventInstanceRepository- Parameters:
sTimerEventTriggerInstance- The event trigger instance to updatedescriptor- The fields to update- Throws:
SEventTriggerInstanceModificationException
-