Class ImmutableProcessInstanceModificationActivateInstructionValue
- All Implemented Interfaces:
ProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue
ProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue.
Use the builder to create immutable instances:
ImmutableProcessInstanceModificationActivateInstructionValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableProcessInstanceModificationActivateInstructionValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableProcessInstanceModificationActivateInstructionValue.copyOf(ProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue instance) Creates an immutable copy of aProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValuevalue.booleanThis instance is equal to all instances ofImmutableProcessInstanceModificationActivateInstructionValuethat have equal attribute values.longReturns the key of the ancestor scope to create the new element instance in, or -1 if no specific ancestor is selected.Returns all ancestor scope keys of the element that will be activated.Returns the id of the element to create a new element instance at.Returns a list of variable instructions (if available), or an empty list.inthashCode()Returns a lazily computed hash code from attributes:elementId,ancestorScopeKey,variableInstructions,ancestorScopeKeys.toString()Prints the immutable valueProcessInstanceModificationActivateInstructionValuewith attribute values.withAncestorScopeKey(long value) Copy the current immutable object by setting a value for theancestorScopeKeyattribute.withAncestorScopeKeys(Iterable<? extends Long> elements) Copy the current immutable object with elements that replace the content ofancestorScopeKeys.withAncestorScopeKeys(Long... elements) Copy the current immutable object with elements that replace the content ofancestorScopeKeys.withElementId(String value) Copy the current immutable object by setting a value for theelementIdattribute.withVariableInstructions(ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue... elements) Copy the current immutable object with elements that replace the content ofvariableInstructions.withVariableInstructions(Iterable<? extends ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue> elements) Copy the current immutable object with elements that replace the content ofvariableInstructions.
-
Method Details
-
getElementId
Returns the id of the element to create a new element instance at.- Specified by:
getElementIdin interfaceProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue
-
getAncestorScopeKey
public long getAncestorScopeKey()Returns the key of the ancestor scope to create the new element instance in, or -1 if no specific ancestor is selected.This key is used for ancestor selection:
By default, the new element instance is created within an existing element instance of the flow scope. For example, when activating an element inside an embedded subprocess and the subprocess is already active.
If there is more than one element instance of the flow scope active then the engine can't decide which element instance to create the new element instance in. Instead, the element instance must be selected by its element instance key. The new element instance is created within the selected element instance.
If the selected element instance is not of the flow scope but from a higher scope (e.g. the process instance key instead of the element instance key of the subprocess) then the engine creates a new element instance of the flow scope first and then creates the new element instance within this scope.
- Specified by:
getAncestorScopeKeyin interfaceProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue
-
getVariableInstructions
public List<ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue> getVariableInstructions()Returns a list of variable instructions (if available), or an empty list. -
getAncestorScopeKeys
Returns all ancestor scope keys of the element that will be activated. The property is set in the event only after the modification is applied.- Specified by:
getAncestorScopeKeysin interfaceProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue
-
withElementId
public final ImmutableProcessInstanceModificationActivateInstructionValue withElementId(String value) Copy the current immutable object by setting a value for theelementIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for elementId (can benull)- Returns:
- A modified copy of the
thisobject
-
withAncestorScopeKey
public final ImmutableProcessInstanceModificationActivateInstructionValue withAncestorScopeKey(long value) Copy the current immutable object by setting a value for theancestorScopeKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ancestorScopeKey- Returns:
- A modified copy of the
thisobject
-
withVariableInstructions
public final ImmutableProcessInstanceModificationActivateInstructionValue withVariableInstructions(ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue... elements) Copy the current immutable object with elements that replace the content ofvariableInstructions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withVariableInstructions
public final ImmutableProcessInstanceModificationActivateInstructionValue withVariableInstructions(Iterable<? extends ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue> elements) Copy the current immutable object with elements that replace the content ofvariableInstructions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of variableInstructions elements to set- Returns:
- A modified copy of
thisobject
-
withAncestorScopeKeys
public final ImmutableProcessInstanceModificationActivateInstructionValue withAncestorScopeKeys(Long... elements) Copy the current immutable object with elements that replace the content ofancestorScopeKeys.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAncestorScopeKeys
public final ImmutableProcessInstanceModificationActivateInstructionValue withAncestorScopeKeys(Iterable<? extends Long> elements) Copy the current immutable object with elements that replace the content ofancestorScopeKeys. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of ancestorScopeKeys elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableProcessInstanceModificationActivateInstructionValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:elementId,ancestorScopeKey,variableInstructions,ancestorScopeKeys. -
toString
Prints the immutable valueProcessInstanceModificationActivateInstructionValuewith attribute values. -
copyOf
public static ImmutableProcessInstanceModificationActivateInstructionValue copyOf(ProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue instance) Creates an immutable copy of aProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValuevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable ProcessInstanceModificationActivateInstructionValue instance
-
builder
Creates a builder forImmutableProcessInstanceModificationActivateInstructionValue.ImmutableProcessInstanceModificationActivateInstructionValue.builder() .withElementId(String | null) // nullableelementId.withAncestorScopeKey(long) // optionalancestorScopeKey.addVariableInstruction|addAllVariableInstructions(io.camunda.zeebe.protocol.record.value.ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue) //variableInstructionselements .addAncestorScopeKey|addAllAncestorScopeKeys(Long) //ancestorScopeKeyselements .build();- Returns:
- A new ImmutableProcessInstanceModificationActivateInstructionValue builder
-