Class ElementActivationBehavior
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionElementActivationBehavior
(KeyGenerator keyGenerator, Writers writers, CatchEventBehavior catchEventBehavior, ElementInstanceState elementInstanceState) -
Method Summary
Modifier and TypeMethodDescriptionactivateElement
(ProcessInstanceRecord processInstanceRecord, AbstractFlowElement elementToActivate) Activates the given element.activateElement
(ProcessInstanceRecord processInstanceRecord, AbstractFlowElement elementToActivate, long ancestorScopeKey, BiConsumer<org.agrona.DirectBuffer, Long> createVariablesCallback) Activates the given element.
-
Field Details
-
NO_ANCESTOR_SCOPE_KEY
public static final long NO_ANCESTOR_SCOPE_KEY- See Also:
-
-
Constructor Details
-
ElementActivationBehavior
public ElementActivationBehavior(KeyGenerator keyGenerator, Writers writers, CatchEventBehavior catchEventBehavior, ElementInstanceState elementInstanceState)
-
-
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 instanceelementToActivate
- 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 instanceelementToActivate
- The element to activateancestorScopeKey
- The key of the chosen ancestor scope in case there are multiple flow scope instancescreateVariablesCallback
- 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
-