public class EventInstanceServiceImpl extends java.lang.Object implements EventInstanceService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BONITA_BPMENGINE_MESSAGE_SENT |
| Constructor and Description |
|---|
EventInstanceServiceImpl(EventInstanceRepository eventInstanceRepository,
DataInstanceService dataInstanceService,
io.micrometer.core.instrument.MeterRegistry meterRegistry,
java.lang.Long tenantId) |
| Modifier and Type | Method and Description |
|---|---|
void |
createEventInstance(SEventInstance eventInstance) |
void |
createMessageInstance(SMessageInstance messageInstance) |
void |
createTimerEventTriggerInstance(STimerEventTriggerInstance sEventTriggerInstance)
STimerEventTriggerInstance is used to keep track of currently running timers
using
ProcessRuntimeAPI.searchTimerEventTriggerInstances(long, SearchOptions) |
void |
createWaitingEvent(SWaitingEvent sWaitingEvent) |
void |
deleteEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance) |
void |
deleteEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) |
java.lang.Integer |
deleteMessageAndDataInstanceOlderThanCreationDate(long creationDate,
QueryOptions queryOptions) |
void |
deleteMessageInstance(SMessageInstance messageInstance) |
void |
deleteWaitingEvent(SWaitingEvent sWaitingEvent) |
void |
deleteWaitingEvents(SFlowNodeInstance flowNodeInstance) |
java.util.List<SBoundaryEventInstance> |
getActivityBoundaryEventInstances(long id,
int fromIndex,
int maxResults) |
SWaitingErrorEvent |
getBoundaryWaitingErrorEvent(long id,
java.lang.String catchingErrorCode) |
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 i,
int maxCouples) |
SMessageInstance |
getMessageInstance(long messageInstanceId) |
java.util.List<java.lang.Long> |
getMessageInstanceIdOlderThanCreationDate(long creationDate,
QueryOptions queryOptions) |
long |
getNumberOfTimerEventTriggerInstances(long processInstanceId,
QueryOptions searchOptions)
Get the number of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria
|
long |
getNumberOfWaitingEvents(java.lang.Class<? extends SWaitingEvent> sWaitingEventClass,
QueryOptions searchOptions) |
java.util.Optional<STimerEventTriggerInstance> |
getTimerEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) |
SWaitingMessageEvent |
getWaitingMessage(long waitingMessageId) |
SWaitingSignalEvent |
getWaitingSignalEvent(long signalId) |
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 searchOptions)
Search the list of STimerEventTriggerInstance on the specific process instance & corresponding to the criteria
|
<T extends SWaitingEvent> |
searchWaitingEvents(java.lang.Class<T> waitingEventClass,
QueryOptions queryOptions) |
void |
updateEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance,
EntityUpdateDescriptor descriptor)
Update an event trigger instance.
|
void |
updateMessageInstance(SMessageInstance messageInstance,
EntityUpdateDescriptor descriptor) |
void |
updateWaitingMessage(SWaitingMessageEvent waitingMsg,
EntityUpdateDescriptor descriptor) |
public static final java.lang.String BONITA_BPMENGINE_MESSAGE_SENT
public EventInstanceServiceImpl(EventInstanceRepository eventInstanceRepository, DataInstanceService dataInstanceService, io.micrometer.core.instrument.MeterRegistry meterRegistry, java.lang.Long tenantId)
public void createEventInstance(SEventInstance eventInstance) throws SEventInstanceCreationException
createEventInstance in interface EventInstanceServiceSEventInstanceCreationExceptionpublic void createTimerEventTriggerInstance(STimerEventTriggerInstance sEventTriggerInstance) throws SEventTriggerInstanceCreationException
EventInstanceServiceProcessRuntimeAPI.searchTimerEventTriggerInstances(long, SearchOptions)createTimerEventTriggerInstance in interface EventInstanceServiceSEventTriggerInstanceCreationExceptionpublic void createMessageInstance(SMessageInstance messageInstance) throws SMessageInstanceCreationException
createMessageInstance in interface EventInstanceServiceSMessageInstanceCreationExceptionpublic void createWaitingEvent(SWaitingEvent sWaitingEvent) throws SWaitingEventCreationException
createWaitingEvent in interface EventInstanceServiceSWaitingEventCreationExceptionpublic void deleteEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance) throws SEventTriggerInstanceDeletionException
deleteEventTriggerInstance in interface EventInstanceServiceSEventTriggerInstanceDeletionExceptionpublic void deleteEventTriggerInstanceOfFlowNode(long flowNodeInstanceId)
throws SBonitaReadException,
SEventTriggerInstanceDeletionException
deleteEventTriggerInstanceOfFlowNode in interface EventInstanceServiceSBonitaReadExceptionSEventTriggerInstanceDeletionExceptionpublic void deleteMessageInstance(SMessageInstance messageInstance) throws SMessageModificationException
deleteMessageInstance in interface EventInstanceServiceSMessageModificationExceptionpublic void deleteWaitingEvent(SWaitingEvent sWaitingEvent) throws SWaitingEventModificationException
deleteWaitingEvent in interface EventInstanceServiceSWaitingEventModificationExceptionpublic void deleteWaitingEvents(SFlowNodeInstance flowNodeInstance) throws SWaitingEventModificationException, SEventTriggerInstanceReadException
deleteWaitingEvents in interface EventInstanceServiceSWaitingEventModificationExceptionSEventTriggerInstanceReadExceptionpublic java.util.List<SBoundaryEventInstance> getActivityBoundaryEventInstances(long id, int fromIndex, int maxResults) throws SEventInstanceReadException
getActivityBoundaryEventInstances in interface EventInstanceServiceSEventInstanceReadExceptionpublic SWaitingErrorEvent getBoundaryWaitingErrorEvent(long id, java.lang.String catchingErrorCode) throws SWaitingEventReadException
getBoundaryWaitingErrorEvent in interface EventInstanceServiceSWaitingEventReadExceptionpublic java.util.List<SEventInstance> getEventInstances(long rootContainerId, int fromIndex, int maxResults, java.lang.String fieldName, OrderByType orderByType) throws SEventInstanceReadException
getEventInstances in interface EventInstanceServiceSEventInstanceReadExceptionpublic <T extends STimerEventTriggerInstance> T getEventTriggerInstance(java.lang.Class<T> entityClass, long eventTriggerInstanceId) throws SEventTriggerInstanceReadException
getEventTriggerInstance in interface EventInstanceServiceSEventTriggerInstanceReadExceptionpublic int resetProgressMessageInstances()
throws SMessageModificationException
EventInstanceServiceresetProgressMessageInstances in interface EventInstanceServiceSMessageModificationException - if an error occurs when resetting the 'handled' flag.public int resetInProgressWaitingEvents()
throws SWaitingEventModificationException
EventInstanceServiceresetInProgressWaitingEvents in interface EventInstanceServiceSWaitingEventModificationException - if an error occurs when resetting the 'progress' flag.public java.util.List<SMessageEventCouple> getMessageEventCouples(int i, int maxCouples) throws SEventTriggerInstanceReadException
getMessageEventCouples in interface EventInstanceServiceSEventTriggerInstanceReadExceptionpublic SMessageInstance getMessageInstance(long messageInstanceId) throws SMessageInstanceReadException
getMessageInstance in interface EventInstanceServiceSMessageInstanceReadExceptionpublic long getNumberOfWaitingEvents(java.lang.Class<? extends SWaitingEvent> sWaitingEventClass, QueryOptions searchOptions) throws SBonitaReadException
getNumberOfWaitingEvents in interface EventInstanceServiceSBonitaReadExceptionpublic java.util.List<SWaitingEvent> searchStartWaitingEvents(long processDefinitionId, QueryOptions queryOptions) throws SBonitaReadException
searchStartWaitingEvents in interface EventInstanceServiceSBonitaReadExceptionpublic SWaitingMessageEvent getWaitingMessage(long waitingMessageId) throws SWaitingEventReadException
getWaitingMessage in interface EventInstanceServiceSWaitingEventReadExceptionpublic java.util.List<SWaitingSignalEvent> getWaitingSignalEvents(java.lang.String signalName, int fromIndex, int maxResults) throws SEventTriggerInstanceReadException
getWaitingSignalEvents in interface EventInstanceServiceSEventTriggerInstanceReadExceptionpublic SWaitingSignalEvent getWaitingSignalEvent(long signalId) throws SEventTriggerInstanceReadException, SEventTriggerInstanceNotFoundException
getWaitingSignalEvent in interface EventInstanceServiceSEventTriggerInstanceReadExceptionSEventTriggerInstanceNotFoundExceptionpublic java.util.Optional<STimerEventTriggerInstance> getTimerEventTriggerInstanceOfFlowNode(long flowNodeInstanceId) throws SBonitaReadException
getTimerEventTriggerInstanceOfFlowNode in interface EventInstanceServiceflowNodeInstanceId - the flow node instance idSBonitaReadExceptionpublic long getNumberOfTimerEventTriggerInstances(long processInstanceId,
QueryOptions searchOptions)
throws SBonitaReadException
EventInstanceServicegetNumberOfTimerEventTriggerInstances in interface EventInstanceServiceprocessInstanceId - The identifier of the process instancesearchOptions - Criteria of the searchSBonitaReadExceptionpublic java.util.List<STimerEventTriggerInstance> searchTimerEventTriggerInstances(long processInstanceId, QueryOptions searchOptions) throws SBonitaReadException
EventInstanceServicesearchTimerEventTriggerInstances in interface EventInstanceServiceprocessInstanceId - The identifier of the process instancesearchOptions - Criteria of the searchSBonitaReadExceptionpublic <T extends SWaitingEvent> java.util.List<T> searchWaitingEvents(java.lang.Class<T> waitingEventClass, QueryOptions queryOptions) throws SBonitaReadException
searchWaitingEvents in interface EventInstanceServiceSBonitaReadExceptionpublic void updateMessageInstance(SMessageInstance messageInstance, EntityUpdateDescriptor descriptor) throws SMessageModificationException
updateMessageInstance in interface EventInstanceServiceSMessageModificationExceptionpublic void updateWaitingMessage(SWaitingMessageEvent waitingMsg, EntityUpdateDescriptor descriptor) throws SWaitingEventModificationException
updateWaitingMessage in interface EventInstanceServiceSWaitingEventModificationExceptionpublic java.lang.Integer deleteMessageAndDataInstanceOlderThanCreationDate(long creationDate,
QueryOptions queryOptions)
throws SMessageModificationException
deleteMessageAndDataInstanceOlderThanCreationDate in interface EventInstanceServiceSMessageModificationExceptionpublic java.util.List<java.lang.Long> getMessageInstanceIdOlderThanCreationDate(long creationDate,
QueryOptions queryOptions)
throws SEventTriggerInstanceReadException,
SMessageInstanceReadException
getMessageInstanceIdOlderThanCreationDate in interface EventInstanceServiceSEventTriggerInstanceReadExceptionSMessageInstanceReadExceptionpublic void updateEventTriggerInstance(STimerEventTriggerInstance sTimerEventTriggerInstance, EntityUpdateDescriptor descriptor) throws SEventTriggerInstanceModificationException
EventInstanceServiceupdateEventTriggerInstance in interface EventInstanceServicesTimerEventTriggerInstance - The event trigger instance to updatedescriptor - The fields to updateSEventTriggerInstanceModificationException