Interface EventInstanceService
-
- All Known Implementing Classes:
EventInstanceServiceImpl
public interface EventInstanceService- Author:
- Elias Ricken de Medeiros, Matthieu Chaffotte, Celine Souchet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreateEventInstance(SEventInstance eventInstance)voidcreateMessageInstance(SMessageInstance messageInstance)voidcreateTimerEventTriggerInstance(STimerEventTriggerInstance sEventTriggerInstance)STimerEventTriggerInstance is used to keep track of currently running timers usingProcessRuntimeAPI.searchTimerEventTriggerInstances(long, SearchOptions)voidcreateWaitingEvent(SWaitingEvent waitingEvent)voiddeleteEventTriggerInstance(STimerEventTriggerInstance eventTriggerInstance)voiddeleteEventTriggerInstanceOfFlowNode(long flowNodeInstanceId)java.lang.IntegerdeleteMessageAndDataInstanceOlderThanCreationDate(long creationDate, QueryOptions queryOptions)voiddeleteMessageInstance(SMessageInstance messageInstance)voiddeleteWaitingEvent(SWaitingEvent waitingEvent)voiddeleteWaitingEvents(SFlowNodeInstance flowNodeInstance)voiddeleteWaitingEvents(SProcessInstance processInstance)java.util.List<SBoundaryEventInstance>getActivityBoundaryEventInstances(long activityInstanceId, int fromIndex, int maxResults)SWaitingErrorEventgetBoundaryWaitingErrorEvent(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>
TgetEventTriggerInstance(java.lang.Class<T> entityClass, long eventTriggerInstanceId)java.util.List<SMessageEventCouple>getMessageEventCouples(int fromIndex, int maxResults)SMessageInstancegetMessageInstance(long messageInstanceId)java.util.List<java.lang.Long>getMessageInstanceIdOlderThanCreationDate(long creationDate, QueryOptions queryOptions)longgetNumberOfTimerEventTriggerInstances(long processInstanceId, QueryOptions searchOptions)Get the number of STimerEventTriggerInstance on the specific process instance & corresponding to the criterialonggetNumberOfWaitingEvents(java.lang.Class<? extends SWaitingEvent> entityClass, QueryOptions countOptions)java.util.List<SWaitingEvent>getStartWaitingEventsOfProcessDefinition(long processDefinitionId)java.util.Optional<STimerEventTriggerInstance>getTimerEventTriggerInstanceOfFlowNode(long flowNodeInstanceId)SWaitingMessageEventgetWaitingMessage(long waitingMessageId)SWaitingSignalEventgetWaitingSignalEvent(long id)java.util.List<SWaitingSignalEvent>getWaitingSignalEvents(java.lang.String signalName, int fromIndex, int maxResults)intresetInProgressWaitingEvents()Resets all Waiting Message Events marked as 'in progress", so that they are eligible to match Message Instances again.intresetProgressMessageInstances()Resets all Message Instances marked as handled, so that they are eligible to match Waiting Events again.java.util.List<STimerEventTriggerInstance>searchTimerEventTriggerInstances(long processInstanceId, QueryOptions searchOptions)Search the list of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria<T extends SWaitingEvent>
java.util.List<T>searchWaitingEvents(java.lang.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)
-
-
-
Method Detail
-
createEventInstance
void createEventInstance(SEventInstance eventInstance) throws SEventInstanceCreationException
- Throws:
SEventInstanceCreationException
-
createTimerEventTriggerInstance
void createTimerEventTriggerInstance(STimerEventTriggerInstance sEventTriggerInstance) throws SEventTriggerInstanceCreationException
STimerEventTriggerInstance is used to keep track of currently running timers usingProcessRuntimeAPI.searchTimerEventTriggerInstances(long, SearchOptions)
-
createMessageInstance
void createMessageInstance(SMessageInstance messageInstance) throws SMessageInstanceCreationException
-
createWaitingEvent
void createWaitingEvent(SWaitingEvent waitingEvent) throws SWaitingEventCreationException
- Throws:
SWaitingEventCreationException
-
getBoundaryWaitingErrorEvent
SWaitingErrorEvent getBoundaryWaitingErrorEvent(long relatedActivityInstanceId, java.lang.String errorCode) throws SWaitingEventReadException
- Throws:
SWaitingEventReadException
-
getEventInstances
java.util.List<SEventInstance> getEventInstances(long rootContainerId, int fromIndex, int maxResults, java.lang.String fieldName, OrderByType orderByType) throws SEventInstanceReadException
- Throws:
SEventInstanceReadException
-
deleteWaitingEvents
void deleteWaitingEvents(SProcessInstance processInstance) throws SWaitingEventModificationException, SEventTriggerInstanceReadException
-
getActivityBoundaryEventInstances
java.util.List<SBoundaryEventInstance> getActivityBoundaryEventInstances(long activityInstanceId, int fromIndex, int maxResults) throws SEventInstanceReadException
- Parameters:
activityInstanceId-fromIndex-maxResults-- Returns:
- List of SBoundaryEventInstance, ordered by identifier ascending
- Throws:
SEventInstanceReadException- Since:
- 6.2
-
getEventTriggerInstance
<T extends STimerEventTriggerInstance> T getEventTriggerInstance(java.lang.Class<T> entityClass, long eventTriggerInstanceId) throws SEventTriggerInstanceReadException
- Parameters:
entityClass-eventTriggerInstanceId-- Returns:
- Throws:
SEventTriggerInstanceReadException- Since:
- 6.4.0
-
deleteMessageInstance
void deleteMessageInstance(SMessageInstance messageInstance) throws SMessageModificationException
- Throws:
SMessageModificationException
-
deleteWaitingEvent
void deleteWaitingEvent(SWaitingEvent waitingEvent) throws SWaitingEventModificationException
-
getWaitingSignalEvents
java.util.List<SWaitingSignalEvent> getWaitingSignalEvents(java.lang.String signalName, int fromIndex, int maxResults) throws SEventTriggerInstanceReadException
- Parameters:
signalName-fromIndex-maxResults-- Returns:
- Throws:
SEventTriggerInstanceReadException- Since:
- 6.3
-
getStartWaitingEventsOfProcessDefinition
java.util.List<SWaitingEvent> getStartWaitingEventsOfProcessDefinition(long processDefinitionId) throws SBonitaReadException
- Parameters:
processDefinitionId-- Returns:
- Throws:
SBonitaReadException- Since:
- 6.3
-
getMessageEventCouples
java.util.List<SMessageEventCouple> getMessageEventCouples(int fromIndex, int maxResults) throws SEventTriggerInstanceReadException
-
getWaitingMessage
SWaitingMessageEvent getWaitingMessage(long waitingMessageId) throws SWaitingEventReadException
- Throws:
SWaitingEventReadException
-
getMessageInstance
SMessageInstance getMessageInstance(long messageInstanceId) throws SMessageInstanceReadException
- Throws:
SMessageInstanceReadException
-
updateWaitingMessage
void updateWaitingMessage(SWaitingMessageEvent waitingMessageEvent, EntityUpdateDescriptor descriptor) throws SWaitingEventModificationException
-
updateMessageInstance
void updateMessageInstance(SMessageInstance messageInstance, EntityUpdateDescriptor descriptor) throws SMessageModificationException
- Throws:
SMessageModificationException
-
searchWaitingEvents
<T extends SWaitingEvent> java.util.List<T> searchWaitingEvents(java.lang.Class<T> entityClass, QueryOptions searchOptions) throws SBonitaReadException
- Throws:
SBonitaReadException
-
getNumberOfWaitingEvents
long getNumberOfWaitingEvents(java.lang.Class<? extends SWaitingEvent> entityClass, QueryOptions countOptions) throws SBonitaReadException
- Throws:
SBonitaReadException
-
getTimerEventTriggerInstanceOfFlowNode
java.util.Optional<STimerEventTriggerInstance> getTimerEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) throws SBonitaReadException
- Parameters:
flowNodeInstanceId- the flow node instance id- Returns:
- the timer event trigger instance of this flow node if there is one
- Throws:
SBonitaReadException
-
getWaitingSignalEvent
SWaitingSignalEvent getWaitingSignalEvent(long id) throws SEventTriggerInstanceReadException, SEventTriggerInstanceNotFoundException
-
deleteEventTriggerInstance
void deleteEventTriggerInstance(STimerEventTriggerInstance eventTriggerInstance) throws SEventTriggerInstanceDeletionException
- Parameters:
eventTriggerInstance-- Throws:
SEventTriggerInstanceDeletionException- Since:
- 6.1
-
deleteEventTriggerInstanceOfFlowNode
void deleteEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) throws SBonitaReadException, SEventTriggerInstanceDeletionException
-
deleteWaitingEvents
void deleteWaitingEvents(SFlowNodeInstance flowNodeInstance) throws SWaitingEventModificationException, SEventTriggerInstanceReadException
- Parameters:
flowNodeInstance-- Throws:
SWaitingEventModificationExceptionSEventTriggerInstanceReadException- Since:
- 6.1
-
resetProgressMessageInstances
int resetProgressMessageInstances() throws SMessageModificationExceptionResets all Message Instances marked as handled, so that they are eligible to match Waiting Events again.- Throws:
SMessageModificationException- if an error occurs when resetting the 'handled' flag.
-
resetInProgressWaitingEvents
int resetInProgressWaitingEvents() throws SWaitingEventModificationExceptionResets all Waiting Message Events marked as 'in progress", so that they are eligible to match Message Instances again.- Returns:
- the number of waiting events reset.
- Throws:
SWaitingEventModificationException- if an error occurs when resetting the 'progress' flag.
-
getNumberOfTimerEventTriggerInstances
long getNumberOfTimerEventTriggerInstances(long processInstanceId, QueryOptions searchOptions) throws SBonitaReadExceptionGet the number of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria- 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- Since:
- 6.4.0
-
searchTimerEventTriggerInstances
java.util.List<STimerEventTriggerInstance> searchTimerEventTriggerInstances(long processInstanceId, QueryOptions searchOptions) throws SBonitaReadException
Search the list of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria- 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- Since:
- 6.4.0
-
deleteMessageAndDataInstanceOlderThanCreationDate
java.lang.Integer deleteMessageAndDataInstanceOlderThanCreationDate(long creationDate, QueryOptions queryOptions) throws SMessageModificationException- Throws:
SMessageModificationException
-
getMessageInstanceIdOlderThanCreationDate
java.util.List<java.lang.Long> getMessageInstanceIdOlderThanCreationDate(long creationDate, QueryOptions queryOptions) throws SEventTriggerInstanceReadException, SMessageInstanceReadException
-
updateEventTriggerInstance
void updateEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance, EntityUpdateDescriptor descriptor) throws SEventTriggerInstanceModificationException
Update an event trigger instance.- Parameters:
sTimerEventTriggerInstance- The event trigger instance to updatedescriptor- The fields to update- Throws:
SEventTriggerInstanceModificationException- Since:
- 6.4.0
-
-