Interface ModifyProcessInstanceCommandStep1
- All Superinterfaces:
CommandWithCommunicationApiStep<ModifyProcessInstanceCommandStep1>
- All Known Implementing Classes:
ModifyProcessInstanceCommandImpl
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptionactivateElement(String elementId) Create an activate instruction for the given element id.activateElement(String elementId, long ancestorElementInstanceKey) Create an activate instruction for the given element id.moveElement(long sourceElementInstanceKey, String targetElementId) Create a move instruction for the given element instance.moveElement(long sourceElementInstanceKey, String targetElementId, long ancestorElementInstanceKey) Create a move instruction for the given element instance. the source element instance with given key will be terminated and will activate a new one at the target element id.moveElements(String sourceElementId, String targetElementId) Create a move instruction for the given element ids.moveElements(String sourceElementId, String targetElementId, long ancestorElementInstanceKey) Create a move instruction for the given element ids.moveElementsWithInferredAncestor(String sourceElementId, String targetElementId) Create a move instruction for the given element ids.moveElementsWithSourceParentAsAncestor(String sourceElementId, String targetElementId) Create a move instruction for the given element ids.moveElementWithInferredAncestor(long sourceElementInstanceKey, String targetElementId) Create a move instruction for the given element instance.moveElementWithSourceParentAsAncestor(long sourceElementInstanceKey, String targetElementId) Create a move instruction for the given element instance.terminateElement(long elementInstanceKey) Create a terminate instruction for the given element instance key.terminateElements(String elementId) Create a terminate instruction for the given element id.Methods inherited from interface io.camunda.client.api.command.CommandWithCommunicationApiStep
useGrpc, useRest
-
Method Details
-
activateElement
ModifyProcessInstanceCommandStep1.ModifyProcessInstanceCommandStep3 activateElement(String elementId) Create an activate instruction for the given element id.The element will be created within an existing element instance of the flow scope. When activating an element inside a multi-instance element the element instance key of the ancestor must be defined. For this use
activateElement(String, long).- Parameters:
elementId- the id of the element to activate- Returns:
- the builder for this command
-
activateElement
ModifyProcessInstanceCommandStep1.ModifyProcessInstanceCommandStep3 activateElement(String elementId, long ancestorElementInstanceKey) Create an activate instruction for the given element id.The element will be created within the scope that is passed. This scope must be an ancestor of the element that's getting activated.
- Parameters:
elementId- the id of the element to activateancestorElementInstanceKey- the element instance key in which the element will be created- Returns:
- the builder for this command
-
terminateElement
ModifyProcessInstanceCommandStep1.ModifyProcessInstanceCommandStep2 terminateElement(long elementInstanceKey) Create a terminate instruction for the given element instance key.- Parameters:
elementInstanceKey- the element instance key of the element to terminate- Returns:
- the builder for this command
-
terminateElements
ModifyProcessInstanceCommandStep1.ModifyProcessInstanceCommandStep2 terminateElements(String elementId) Create a terminate instruction for the given element id. The element instances will be determined at runtime.- Parameters:
elementId- the id of the elements to terminate- Returns:
- the builder for this command
-
moveElements
ModifyProcessInstanceCommandStep1.ModifyProcessInstanceCommandStep3 moveElements(String sourceElementId, String targetElementId) Create a move instruction for the given element ids. The element instances will be determined at runtime. All source element instances will be terminated and will activate a new one at the target element id. For multi-instance elements, only the body element will activate a new element instance.The elements will be created within an existing element instance of the flow scope. When activating elements inside a multi-instance element, the element instance key of the ancestor must be defined. For this, use
moveElements(String, String, long)ormoveElementsWithInferredAncestor(String, String).- Parameters:
sourceElementId- the id of the elements to movetargetElementId- the id of target element to move to- Returns:
- the builder for this command
-
moveElements
ModifyProcessInstanceCommandStep1.ModifyProcessInstanceCommandStep3 moveElements(String sourceElementId, String targetElementId, long ancestorElementInstanceKey) Create a move instruction for the given element ids. The element instances will be determined at runtime. All source element instances will be terminated and will activate a new one at the target element id. For multi-instance elements, only the body element will activate a new element instance.The elements will be created within the scope that is passed. This scope must be an ancestor of the elements that are getting activated.
- Parameters:
sourceElementId- the id of the elements to movetargetElementId- the id of target element to move toancestorElementInstanceKey- the element instance key in which the elements will be created- Returns:
- the builder for this command
-
moveElementsWithInferredAncestor
ModifyProcessInstanceCommandStep1.ModifyProcessInstanceCommandStep3 moveElementsWithInferredAncestor(String sourceElementId, String targetElementId) Create a move instruction for the given element ids. The element instances will be determined at runtime. All source element instances will be terminated and will activate a new one at the target element id. For multi-instance elements, only the body element will activate a new element instance.This instructs the engine to derive the ancestor scope keys from the source element's hierarchy. The engine traverses the source element's ancestry to find an instance that matches one of the target element's flow scopes, ensuring the target is activated in the correct scope.
- Parameters:
sourceElementId- the id of the elements to movetargetElementId- the id of target element to move to- Returns:
- the builder for this command
-
moveElementsWithSourceParentAsAncestor
ModifyProcessInstanceCommandStep1.ModifyProcessInstanceCommandStep3 moveElementsWithSourceParentAsAncestor(String sourceElementId, String targetElementId) Create a move instruction for the given element ids. The element instances will be determined at runtime. All source element instances will be terminated and will activate a new one at the target element id. For multi-instance elements, only the body element will activate a new element instance.This instructs the engine to use the source's direct parent key as the ancestor scope key for the target element. This is a simpler alternative to
moveElementsWithInferredAncestor(String, String)that skips hierarchy traversal and directly uses the source's parent key. This is useful when source and target elements are siblings within the same flow scope.- Parameters:
sourceElementId- the id of the elements to movetargetElementId- the id of target element to move to- Returns:
- the builder for this command
-
moveElement
ModifyProcessInstanceCommandStep1.ModifyProcessInstanceCommandStep3 moveElement(long sourceElementInstanceKey, String targetElementId) Create a move instruction for the given element instance. This source element instance will be terminated and will activate a new one at the target element id. For multi-instance elements, only the body element will activate a new element instance.The target element will be created within an existing element instance of the flow scope. When activating elements inside a multi-instance element, the element instance key of the ancestor must be defined. For this, use
moveElement(long, String, long)ormoveElementWithInferredAncestor(long, String).- Parameters:
sourceElementInstanceKey- the key of the element to movetargetElementId- the id of target element to move to- Returns:
- the builder for this command
-
moveElement
ModifyProcessInstanceCommandStep1.ModifyProcessInstanceCommandStep3 moveElement(long sourceElementInstanceKey, String targetElementId, long ancestorElementInstanceKey) Create a move instruction for the given element instance. the source element instance with given key will be terminated and will activate a new one at the target element id. For multi-instance elements, only the body element will activate a new element instance.The target element will be created within the scope that is passed. This scope must be an ancestor of the elements that are getting activated.
- Parameters:
sourceElementInstanceKey- the key of the element to movetargetElementId- the id of target element to move toancestorElementInstanceKey- the element instance key in which the elements will be created- Returns:
- the builder for this command
-
moveElementWithInferredAncestor
ModifyProcessInstanceCommandStep1.ModifyProcessInstanceCommandStep3 moveElementWithInferredAncestor(long sourceElementInstanceKey, String targetElementId) Create a move instruction for the given element instance. The source element instance with * given key will be terminated and will activate a new one at the target element id. For multi-instance elements, only the body element will activate a new element instance.This instructs the engine to derive the ancestor scope key from the source element's hierarchy. The engine traverses the source element's ancestry to find an instance that matches one of the target element's flow scopes, ensuring the target is activated in the correct scope.
- Parameters:
sourceElementInstanceKey- the key of the element to movetargetElementId- the id of target element to move to- Returns:
- the builder for this command
-
moveElementWithSourceParentAsAncestor
ModifyProcessInstanceCommandStep1.ModifyProcessInstanceCommandStep3 moveElementWithSourceParentAsAncestor(long sourceElementInstanceKey, String targetElementId) Create a move instruction for the given element instance. The source element instance with given key will be terminated and will activate a new one at the target element id. For multi-instance elements, only the body element will activate a new element instance.This instructs the engine to use the source's direct parent key as the ancestor scope key for the target element. This is a simpler alternative to
moveElementWithInferredAncestor(long, String)that skips hierarchy traversal and directly uses the source's parent key. This is useful when source and target elements are siblings within the same flow scope.- Parameters:
sourceElementInstanceKey- the key of the element to movetargetElementId- the id of target element to move to- Returns:
- the builder for this command
-