Class ElementActivationBehavior

java.lang.Object
io.camunda.zeebe.engine.processing.common.ElementActivationBehavior

public final class ElementActivationBehavior extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • activateElement

      public ElementActivationBehavior.ActivatedElementKeys activateElement(ProcessInstanceRecord processInstanceRecord, AbstractFlowElement elementToActivate)
      Activates the given element.

      If the element is nested inside a flow scope and there is no active instance of the flow scope then it creates a new instance. This is used when modifying a process instance or starting a process instance at a different place than the start event.

      If there are multiple flow scope instances, then you should use activateElement(ProcessInstanceRecord, AbstractFlowElement, long, BiConsumer) to select a specific ancestor.

      Parameters:
      processInstanceRecord - the record of the process instance
      elementToActivate - The element to activate
      Returns:
      The key of the activated element instance and the keys of all it's flow scopes
    • activateElement

      public ElementActivationBehavior.ActivatedElementKeys activateElement(ProcessInstanceRecord processInstanceRecord, AbstractFlowElement elementToActivate, long ancestorScopeKey, BiConsumer<org.agrona.DirectBuffer,Long> createVariablesCallback)
      Activates the given element.

      If the element is nested inside a flow scope and there is no active instance of the flow scope then it creates a new instance. This is used when modifying a process instance or starting a process instance at a different place than the start event.

      If there are multiple flow scope instances, then the ancestor scope key must be provided to choose one.

      Parameters:
      processInstanceRecord - the record of the process instance
      elementToActivate - The element to activate
      ancestorScopeKey - The key of the chosen ancestor scope in case there are multiple flow scope instances
      createVariablesCallback - Callback to create variables at a given scope
      Returns:
      The key of the activated element instance and the keys of all it's flow scopes