Interface MutableEventScopeInstanceState

All Superinterfaces:
EventScopeInstanceState
All Known Implementing Classes:
DbEventScopeInstanceState

public interface MutableEventScopeInstanceState extends EventScopeInstanceState
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    createIfNotExists(long eventScopeKey, Collection<org.agrona.DirectBuffer> interruptingIds)
    Creates a new event scope instance in the state
    void
    createInstance(long eventScopeKey, Collection<org.agrona.DirectBuffer> interruptingIds)
    Creates a new event scope instance in the state
    void
    deleteInstance(long eventScopeKey)
    Delete an event scope from the state.
    void
    deleteTrigger(long eventScopeKey, long eventKey)
    Deletes an event trigger by key and scope key.
    pollEventTrigger(long eventScopeKey)
    Returns the next event trigger for the event scope or null if none exists.
    void
    shutdownInstance(long eventScopeKey)
    If the scope exists, sets its accepting property to false.
    void
    triggerEvent(long eventScopeKey, long eventKey, org.agrona.DirectBuffer elementId, org.agrona.DirectBuffer variables)
    Creates a new event trigger for the given event scope.
    void
    triggerStartEvent(long processDefinitionKey, long eventKey, org.agrona.DirectBuffer elementId, org.agrona.DirectBuffer variables)
    Creates an event trigger for a process start event.

    Methods inherited from interface io.camunda.zeebe.engine.state.immutable.EventScopeInstanceState

    getInstance, isAcceptingEvent, peekEventTrigger
  • Method Details

    • shutdownInstance

      void shutdownInstance(long eventScopeKey)
      If the scope exists, sets its accepting property to false.
      Parameters:
      eventScopeKey - the event scope key
    • createIfNotExists

      boolean createIfNotExists(long eventScopeKey, Collection<org.agrona.DirectBuffer> interruptingIds)
      Creates a new event scope instance in the state
      Parameters:
      eventScopeKey - the event scope key
      interruptingIds - list of element IDs which should set accepting to false
      Returns:
      whether the scope was created or not
    • createInstance

      void createInstance(long eventScopeKey, Collection<org.agrona.DirectBuffer> interruptingIds)
      Creates a new event scope instance in the state
      Parameters:
      eventScopeKey - the event scope key
      interruptingIds - list of element IDs which should set accepting to false
    • deleteInstance

      void deleteInstance(long eventScopeKey)
      Delete an event scope from the state. Does not fail in case the scope does not exist.
      Parameters:
      eventScopeKey - the key of the event scope to delete
    • pollEventTrigger

      EventTrigger pollEventTrigger(long eventScopeKey)
      Returns the next event trigger for the event scope or null if none exists. This will remove the polled event trigger from the state if it exists.
      Parameters:
      eventScopeKey - the key of the event scope
      Returns:
      the next event trigger or null if none exist
    • triggerEvent

      void triggerEvent(long eventScopeKey, long eventKey, org.agrona.DirectBuffer elementId, org.agrona.DirectBuffer variables)
      Creates a new event trigger for the given event scope. Ignores the trigger if the event scope is not accepting anymore or doesn't exist.
      Parameters:
      eventScopeKey - the key of the event scope the event is triggered in
      eventKey - the key of the event record (used for ordering)
      elementId - the id of the element which should be triggered, e.g. boundary event
      variables - the variables of the occurred event, i.e. message variables
    • triggerStartEvent

      void triggerStartEvent(long processDefinitionKey, long eventKey, org.agrona.DirectBuffer elementId, org.agrona.DirectBuffer variables)
      Creates an event trigger for a process start event. Uses the process definition key as the scope key of the trigger.
      Parameters:
      processDefinitionKey - the key of the process definition a new instance should be created of
      eventKey - the key of the event record (used for ordering)
      elementId - the id of the start event which should be triggered
      variables - the variables of the occurred event, i.e. message variables
    • deleteTrigger

      void deleteTrigger(long eventScopeKey, long eventKey)
      Deletes an event trigger by key and scope key. Does not fail if the trigger does not exist.
      Parameters:
      eventScopeKey - the key of the event scope
      eventKey - the key of the event trigger