Interface EventInstanceService
- All Known Implementing Classes:
EventInstanceServiceImpl
public interface EventInstanceService
- Author:
- Elias Ricken de Medeiros, Matthieu Chaffotte, Celine Souchet
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createEventInstance
(SEventInstance eventInstance) void
createMessageInstance
(SMessageInstance messageInstance) void
createTimerEventTriggerInstance
(STimerEventTriggerInstance sEventTriggerInstance) STimerEventTriggerInstance is used to keep track of currently running timers usingProcessRuntimeAPI.searchTimerEventTriggerInstances(long, SearchOptions)
void
createWaitingEvent
(SWaitingEvent waitingEvent) void
deleteEventTriggerInstance
(STimerEventTriggerInstance eventTriggerInstance) void
deleteEventTriggerInstanceOfFlowNode
(long flowNodeInstanceId) deleteMessageAndDataInstanceOlderThanCreationDate
(long creationDate, QueryOptions queryOptions) void
deleteMessageInstance
(SMessageInstance messageInstance) void
deleteWaitingEvent
(SWaitingEvent waitingEvent) void
deleteWaitingEvents
(SFlowNodeInstance flowNodeInstance) void
deleteWaitingEvents
(SProcessInstance processInstance) getActivityBoundaryEventInstances
(long activityInstanceId, int fromIndex, int maxResults) 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) long
getNumberOfTimerEventTriggerInstances
(long processInstanceId, QueryOptions searchOptions) Get the number of STimerEventTriggerInstance on the specific process instance & corresponding to the criterialong
getNumberOfWaitingEvents
(Class<? extends SWaitingEvent> entityClass, QueryOptions countOptions) getStartWaitingEventsOfProcessDefinition
(long processDefinitionId) getTimerEventTriggerInstanceOfFlowNode
(long flowNodeInstanceId) getWaitingMessage
(long waitingMessageId) getWaitingSignalEvent
(long id) getWaitingSignalEvents
(String signalName, int fromIndex, int maxResults) int
Resets all Waiting Message Events marked as 'in progress", so that they are eligible to match Message Instances again.int
Resets 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> 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)
-
Method Details
-
createEventInstance
- 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
- Throws:
SWaitingEventCreationException
-
getBoundaryWaitingErrorEvent
SWaitingErrorEvent getBoundaryWaitingErrorEvent(long relatedActivityInstanceId, String errorCode) throws SWaitingEventReadException - Throws:
SWaitingEventReadException
-
getEventInstances
List<SEventInstance> getEventInstances(long rootContainerId, int fromIndex, int maxResults, String fieldName, OrderByType orderByType) throws SEventInstanceReadException - Throws:
SEventInstanceReadException
-
deleteWaitingEvents
void deleteWaitingEvents(SProcessInstance processInstance) throws SWaitingEventModificationException, SEventTriggerInstanceReadException -
getActivityBoundaryEventInstances
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(Class<T> entityClass, long eventTriggerInstanceId) throws SEventTriggerInstanceReadException - Parameters:
entityClass
-eventTriggerInstanceId
-- Returns:
- Throws:
SEventTriggerInstanceReadException
- Since:
- 6.4.0
-
deleteMessageInstance
- Throws:
SMessageModificationException
-
deleteWaitingEvent
-
getWaitingSignalEvents
List<SWaitingSignalEvent> getWaitingSignalEvents(String signalName, int fromIndex, int maxResults) throws SEventTriggerInstanceReadException - Parameters:
signalName
-fromIndex
-maxResults
-- Returns:
- Throws:
SEventTriggerInstanceReadException
- Since:
- 6.3
-
getStartWaitingEventsOfProcessDefinition
List<SWaitingEvent> getStartWaitingEventsOfProcessDefinition(long processDefinitionId) throws SBonitaReadException - Parameters:
processDefinitionId
-- Returns:
- Throws:
SBonitaReadException
- Since:
- 6.3
-
getMessageEventCouples
List<SMessageEventCouple> getMessageEventCouples(int fromIndex, int maxResults) throws SEventTriggerInstanceReadException -
getWaitingMessage
- Throws:
SWaitingEventReadException
-
getMessageInstance
- 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> List<T> searchWaitingEvents(Class<T> entityClass, QueryOptions searchOptions) throws SBonitaReadException - Throws:
SBonitaReadException
-
getNumberOfWaitingEvents
long getNumberOfWaitingEvents(Class<? extends SWaitingEvent> entityClass, QueryOptions countOptions) throws SBonitaReadException - Throws:
SBonitaReadException
-
getTimerEventTriggerInstanceOfFlowNode
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:
SWaitingEventModificationException
SEventTriggerInstanceReadException
- Since:
- 6.1
-
resetProgressMessageInstances
Resets 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
Resets 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 SBonitaReadException Get 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
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
Integer deleteMessageAndDataInstanceOlderThanCreationDate(long creationDate, QueryOptions queryOptions) throws SMessageModificationException - Throws:
SMessageModificationException
-
getMessageInstanceIdOlderThanCreationDate
List<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
-