Class EventInstanceServiceImpl
java.lang.Object
org.bonitasoft.engine.core.process.instance.event.impl.EventInstanceServiceImpl
- All Implemented Interfaces:
EventInstanceService
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEventInstanceServiceImpl(EventInstanceRepository eventInstanceRepository, DataInstanceService dataInstanceService, io.micrometer.core.instrument.MeterRegistry meterRegistry) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateEventInstance(SEventInstance eventInstance) voidcreateMessageInstance(SMessageInstance messageInstance) voidcreateTimerEventTriggerInstance(STimerEventTriggerInstance sEventTriggerInstance) STimerEventTriggerInstance is used to keep track of currently running timers usingProcessRuntimeAPI.searchTimerEventTriggerInstances(long, SearchOptions)voidcreateWaitingEvent(SWaitingEvent sWaitingEvent) voiddeleteEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance) voiddeleteEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) deleteMessageAndDataInstanceOlderThanCreationDate(long creationDate, QueryOptions queryOptions) voiddeleteMessageInstance(SMessageInstance messageInstance) voiddeleteWaitingEvent(SWaitingEvent sWaitingEvent) voiddeleteWaitingEvents(SFlowNodeInstance flowNodeInstance) voiddeleteWaitingEvents(SProcessInstance processInstance) getActivityBoundaryEventInstances(long id, int fromIndex, int maxResults) getBoundaryWaitingErrorEvent(long id, String catchingErrorCode) getEventInstances(long rootContainerId, int fromIndex, int maxResults, String fieldName, OrderByType orderByType) <T extends STimerEventTriggerInstance>
TgetEventTriggerInstance(Class<T> entityClass, long eventTriggerInstanceId) getMessageEventCouples(int i, int maxCouples) getMessageInstance(long messageInstanceId) getMessageInstanceIdOlderThanCreationDate(long creationDate, QueryOptions queryOptions) longgetNumberOfTimerEventTriggerInstances(long processInstanceId, QueryOptions searchOptions) Get the number of STimerEventTriggerInstance on the specific process instance & corresponding to the criterialonggetNumberOfWaitingEvents(Class<? extends SWaitingEvent> sWaitingEventClass, QueryOptions searchOptions) getStartWaitingEventsOfProcessDefinition(long processDefinitionId) getTimerEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) getWaitingMessage(long waitingMessageId) getWaitingSignalEvent(long signalId) 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 searchOptions) Search the list of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria<T extends SWaitingEvent>
List<T>searchWaitingEvents(Class<T> waitingEventClass, QueryOptions queryOptions) voidupdateEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance, EntityUpdateDescriptor descriptor) Update an event trigger instance.voidupdateMessageInstance(SMessageInstance messageInstance, EntityUpdateDescriptor descriptor) voidupdateWaitingMessage(SWaitingMessageEvent waitingMsg, EntityUpdateDescriptor descriptor)
-
Field Details
-
BONITA_BPMENGINE_MESSAGE_SENT
- See Also:
-
-
Constructor Details
-
EventInstanceServiceImpl
public EventInstanceServiceImpl(EventInstanceRepository eventInstanceRepository, DataInstanceService dataInstanceService, io.micrometer.core.instrument.MeterRegistry meterRegistry)
-
-
Method Details
-
createEventInstance
public void createEventInstance(SEventInstance eventInstance) throws SEventInstanceCreationException - Specified by:
createEventInstancein interfaceEventInstanceService- Throws:
SEventInstanceCreationException
-
createTimerEventTriggerInstance
public void createTimerEventTriggerInstance(STimerEventTriggerInstance sEventTriggerInstance) throws SEventTriggerInstanceCreationException Description copied from interface:EventInstanceServiceSTimerEventTriggerInstance is used to keep track of currently running timers usingProcessRuntimeAPI.searchTimerEventTriggerInstances(long, SearchOptions)- Specified by:
createTimerEventTriggerInstancein interfaceEventInstanceService- Throws:
SEventTriggerInstanceCreationException
-
createMessageInstance
public void createMessageInstance(SMessageInstance messageInstance) throws SMessageInstanceCreationException - Specified by:
createMessageInstancein interfaceEventInstanceService- Throws:
SMessageInstanceCreationException
-
createWaitingEvent
- Specified by:
createWaitingEventin interfaceEventInstanceService- Throws:
SWaitingEventCreationException
-
deleteEventTriggerInstance
public void deleteEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance) throws SEventTriggerInstanceDeletionException - Specified by:
deleteEventTriggerInstancein interfaceEventInstanceService- Throws:
SEventTriggerInstanceDeletionException
-
deleteEventTriggerInstanceOfFlowNode
public void deleteEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) throws SBonitaReadException, SEventTriggerInstanceDeletionException - Specified by:
deleteEventTriggerInstanceOfFlowNodein interfaceEventInstanceService- Throws:
SBonitaReadExceptionSEventTriggerInstanceDeletionException
-
deleteMessageInstance
public void deleteMessageInstance(SMessageInstance messageInstance) throws SMessageModificationException - Specified by:
deleteMessageInstancein interfaceEventInstanceService- Throws:
SMessageModificationException
-
deleteWaitingEvent
public void deleteWaitingEvent(SWaitingEvent sWaitingEvent) throws SWaitingEventModificationException - Specified by:
deleteWaitingEventin interfaceEventInstanceService- Throws:
SWaitingEventModificationException
-
deleteWaitingEvents
public void deleteWaitingEvents(SFlowNodeInstance flowNodeInstance) throws SWaitingEventModificationException, SEventTriggerInstanceReadException - Specified by:
deleteWaitingEventsin interfaceEventInstanceService- Throws:
SWaitingEventModificationExceptionSEventTriggerInstanceReadException
-
deleteWaitingEvents
public void deleteWaitingEvents(SProcessInstance processInstance) throws SWaitingEventModificationException, SEventTriggerInstanceReadException - Specified by:
deleteWaitingEventsin interfaceEventInstanceService- Throws:
SWaitingEventModificationExceptionSEventTriggerInstanceReadException
-
getActivityBoundaryEventInstances
public List<SBoundaryEventInstance> getActivityBoundaryEventInstances(long id, int fromIndex, int maxResults) throws SEventInstanceReadException - Specified by:
getActivityBoundaryEventInstancesin interfaceEventInstanceService- Returns:
- List of SBoundaryEventInstance, ordered by identifier ascending
- Throws:
SEventInstanceReadException
-
getBoundaryWaitingErrorEvent
public SWaitingErrorEvent getBoundaryWaitingErrorEvent(long id, String catchingErrorCode) throws SWaitingEventReadException - Specified by:
getBoundaryWaitingErrorEventin interfaceEventInstanceService- Throws:
SWaitingEventReadException
-
getEventInstances
public List<SEventInstance> getEventInstances(long rootContainerId, int fromIndex, int maxResults, String fieldName, OrderByType orderByType) throws SEventInstanceReadException - Specified by:
getEventInstancesin interfaceEventInstanceService- Throws:
SEventInstanceReadException
-
getEventTriggerInstance
public <T extends STimerEventTriggerInstance> T getEventTriggerInstance(Class<T> entityClass, long eventTriggerInstanceId) throws SEventTriggerInstanceReadException - Specified by:
getEventTriggerInstancein interfaceEventInstanceService- Returns:
- Throws:
SEventTriggerInstanceReadException
-
resetProgressMessageInstances
Description copied from interface:EventInstanceServiceResets all Message Instances marked as handled, so that they are eligible to match Waiting Events again.- Specified by:
resetProgressMessageInstancesin interfaceEventInstanceService- Throws:
SMessageModificationException- if an error occurs when resetting the 'handled' flag.
-
resetInProgressWaitingEvents
Description copied from interface:EventInstanceServiceResets all Waiting Message Events marked as 'in progress", so that they are eligible to match Message Instances again.- Specified by:
resetInProgressWaitingEventsin interfaceEventInstanceService- Returns:
- the number of waiting events reset.
- Throws:
SWaitingEventModificationException- if an error occurs when resetting the 'progress' flag.
-
getMessageEventCouples
public List<SMessageEventCouple> getMessageEventCouples(int i, int maxCouples) throws SEventTriggerInstanceReadException - Specified by:
getMessageEventCouplesin interfaceEventInstanceService- Throws:
SEventTriggerInstanceReadException
-
getMessageInstance
public SMessageInstance getMessageInstance(long messageInstanceId) throws SMessageInstanceReadException - Specified by:
getMessageInstancein interfaceEventInstanceService- Throws:
SMessageInstanceReadException
-
getNumberOfWaitingEvents
public long getNumberOfWaitingEvents(Class<? extends SWaitingEvent> sWaitingEventClass, QueryOptions searchOptions) throws SBonitaReadException - Specified by:
getNumberOfWaitingEventsin interfaceEventInstanceService- Throws:
SBonitaReadException
-
getStartWaitingEventsOfProcessDefinition
public List<SWaitingEvent> getStartWaitingEventsOfProcessDefinition(long processDefinitionId) throws SBonitaReadException - Specified by:
getStartWaitingEventsOfProcessDefinitionin interfaceEventInstanceService- Returns:
- Throws:
SBonitaReadException
-
getWaitingMessage
public SWaitingMessageEvent getWaitingMessage(long waitingMessageId) throws SWaitingEventReadException - Specified by:
getWaitingMessagein interfaceEventInstanceService- Throws:
SWaitingEventReadException
-
getWaitingSignalEvents
public List<SWaitingSignalEvent> getWaitingSignalEvents(String signalName, int fromIndex, int maxResults) throws SEventTriggerInstanceReadException - Specified by:
getWaitingSignalEventsin interfaceEventInstanceService- Returns:
- Throws:
SEventTriggerInstanceReadException
-
getWaitingSignalEvent
public SWaitingSignalEvent getWaitingSignalEvent(long signalId) throws SEventTriggerInstanceReadException, SEventTriggerInstanceNotFoundException - Specified by:
getWaitingSignalEventin interfaceEventInstanceService- Throws:
SEventTriggerInstanceReadExceptionSEventTriggerInstanceNotFoundException
-
getTimerEventTriggerInstanceOfFlowNode
public Optional<STimerEventTriggerInstance> getTimerEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) throws SBonitaReadException - Specified by:
getTimerEventTriggerInstanceOfFlowNodein interfaceEventInstanceService- 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 searchOptions) throws SBonitaReadException Description copied from interface:EventInstanceServiceGet the number of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria- Specified by:
getNumberOfTimerEventTriggerInstancesin interfaceEventInstanceService- Parameters:
processInstanceId- The identifier of the process instancesearchOptions- 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 searchOptions) throws SBonitaReadException Description copied from interface:EventInstanceServiceSearch the list of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria- Specified by:
searchTimerEventTriggerInstancesin interfaceEventInstanceService- Parameters:
processInstanceId- The identifier of the process instancesearchOptions- 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> waitingEventClass, QueryOptions queryOptions) throws SBonitaReadException - Specified by:
searchWaitingEventsin interfaceEventInstanceService- Throws:
SBonitaReadException
-
updateMessageInstance
public void updateMessageInstance(SMessageInstance messageInstance, EntityUpdateDescriptor descriptor) throws SMessageModificationException - Specified by:
updateMessageInstancein interfaceEventInstanceService- Throws:
SMessageModificationException
-
updateWaitingMessage
public void updateWaitingMessage(SWaitingMessageEvent waitingMsg, EntityUpdateDescriptor descriptor) throws SWaitingEventModificationException - Specified by:
updateWaitingMessagein interfaceEventInstanceService- Throws:
SWaitingEventModificationException
-
deleteMessageAndDataInstanceOlderThanCreationDate
public Integer deleteMessageAndDataInstanceOlderThanCreationDate(long creationDate, QueryOptions queryOptions) throws SMessageModificationException - Specified by:
deleteMessageAndDataInstanceOlderThanCreationDatein interfaceEventInstanceService- Throws:
SMessageModificationException
-
getMessageInstanceIdOlderThanCreationDate
public List<Long> getMessageInstanceIdOlderThanCreationDate(long creationDate, QueryOptions queryOptions) throws SEventTriggerInstanceReadException, SMessageInstanceReadException - Specified by:
getMessageInstanceIdOlderThanCreationDatein interfaceEventInstanceService- Throws:
SEventTriggerInstanceReadExceptionSMessageInstanceReadException
-
updateEventTriggerInstance
public void updateEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance, EntityUpdateDescriptor descriptor) throws SEventTriggerInstanceModificationException Description copied from interface:EventInstanceServiceUpdate an event trigger instance.- Specified by:
updateEventTriggerInstancein interfaceEventInstanceService- Parameters:
sTimerEventTriggerInstance- The event trigger instance to updatedescriptor- The fields to update- Throws:
SEventTriggerInstanceModificationException
-