Interface MutableElementInstanceState

All Superinterfaces:
ElementInstanceState
All Known Implementing Classes:
DbElementInstanceState

public interface MutableElementInstanceState extends ElementInstanceState
  • Method Details

    • newInstance

      ElementInstance newInstance(long key, ProcessInstanceRecord value, ProcessInstanceIntent state)
    • newInstance

      ElementInstance newInstance(ElementInstance parent, long key, ProcessInstanceRecord value, ProcessInstanceIntent state)
    • removeInstance

      void removeInstance(long key)
    • createInstance

      void createInstance(ElementInstance instance)
    • updateInstance

      void updateInstance(ElementInstance scopeInstance)
    • updateInstance

      void updateInstance(long key, Consumer<ElementInstance> modifier)
    • setAwaitResultRequestMetadata

      void setAwaitResultRequestMetadata(long processInstanceKey, AwaitProcessInstanceResultMetadata metadata)
    • incrementNumberOfTakenSequenceFlows

      void incrementNumberOfTakenSequenceFlows(long flowScopeKey, org.agrona.DirectBuffer gatewayElementId, org.agrona.DirectBuffer sequenceFlowElementId)
      Increments the number that counts how often the given sequence flow has been taken.

      The number helps to determine if a parallel gateway can be activated or not. It should be incremented when one of the incoming sequence flows is taken.

      Parameters:
      flowScopeKey - the key of the flow scope that contains the gateway
      gatewayElementId - the element id of the gateway that is the target of the sequence flow
      sequenceFlowElementId - the element id of the sequence flow that is taken
    • decrementNumberOfTakenSequenceFlows

      void decrementNumberOfTakenSequenceFlows(long flowScopeKey, org.agrona.DirectBuffer gatewayElementId)
      Decrements the numbers that counts how often a sequence flow of the given gateway has been taken.

      The number helps to determine if a parallel gateway can be activated or not. It should be decremented when the gateway is activated.

      Parameters:
      flowScopeKey - the key of the flow scope that contains the gateway
      gatewayElementId - the element id of the gateway
    • insertProcessInstanceKeyByDefinitionKey

      void insertProcessInstanceKeyByDefinitionKey(long processInstanceKey, long processDefinitionKey)
      Inserts a new reference from process instance key to process definition key.

      This makes it possible to query for all process instances of a specific process definition using ElementInstanceState.getProcessInstanceKeysByDefinitionKey(long).

      Parameters:
      processInstanceKey - the key of the process instance to insert the reference for
      processDefinitionKey - the key of the process definition to insert the reference for
    • deleteProcessInstanceKeyByDefinitionKey

      void deleteProcessInstanceKeyByDefinitionKey(long processInstanceKey, long processDefinitionKey)
      Deletes the reference between process instance key and process definition key.

      This makes it possible to query for all process instances of a specific process definition using ElementInstanceState.getProcessInstanceKeysByDefinitionKey(long).

      Parameters:
      processInstanceKey - the key of the process instance to delete the reference for
      processDefinitionKey - the key of the process definition to delete the reference for