Class ImmutableDecisionEvaluationRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableDecisionEvaluationRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,RecordValueWithVariables,DecisionEvaluationRecordValue
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableDecisionEvaluationRecordValue
extends Object
implements DecisionEvaluationRecordValue
Immutable implementation of
DecisionEvaluationRecordValue.
Use the builder to create immutable instances:
ImmutableDecisionEvaluationRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDecisionEvaluationRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableDecisionEvaluationRecordValue.copyOf(DecisionEvaluationRecordValue instance) Creates an immutable copy of aDecisionEvaluationRecordValuevalue.booleanThis instance is equal to all instances ofImmutableDecisionEvaluationRecordValuethat have equal attribute values.longlongintlongReturns thedetailsof the evaluated decision and its required decisions.If the evaluation of the decision failed then it returns the reason why the evaluation of thefailed decisionwas not successful.If the evaluation of the decision failed then it returns the id of the decision where the evaluation failed.longlonginthashCode()Returns a lazily computed hash code from attributes:variables,decisionKey,decisionId,decisionName,decisionVersion,decisionRequirementsId,decisionRequirementsKey,decisionOutput,bpmnProcessId,processDefinitionKey,processInstanceKey,elementId,elementInstanceKey,evaluatedDecisions,evaluationFailureMessage,failedDecisionId.toString()Prints the immutable valueDecisionEvaluationRecordValuewith attribute values.withBpmnProcessId(String value) Copy the current immutable object by setting a value for thebpmnProcessIdattribute.withDecisionId(String value) Copy the current immutable object by setting a value for thedecisionIdattribute.withDecisionKey(long value) Copy the current immutable object by setting a value for thedecisionKeyattribute.withDecisionName(String value) Copy the current immutable object by setting a value for thedecisionNameattribute.withDecisionOutput(String value) Copy the current immutable object by setting a value for thedecisionOutputattribute.withDecisionRequirementsId(String value) Copy the current immutable object by setting a value for thedecisionRequirementsIdattribute.withDecisionRequirementsKey(long value) Copy the current immutable object by setting a value for thedecisionRequirementsKeyattribute.withDecisionVersion(int value) Copy the current immutable object by setting a value for thedecisionVersionattribute.withElementId(String value) Copy the current immutable object by setting a value for theelementIdattribute.withElementInstanceKey(long value) Copy the current immutable object by setting a value for theelementInstanceKeyattribute.withEvaluatedDecisions(EvaluatedDecisionValue... elements) Copy the current immutable object with elements that replace the content ofevaluatedDecisions.withEvaluatedDecisions(Iterable<? extends EvaluatedDecisionValue> elements) Copy the current immutable object with elements that replace the content ofevaluatedDecisions.Copy the current immutable object by setting a value for theevaluationFailureMessageattribute.withFailedDecisionId(String value) Copy the current immutable object by setting a value for thefailedDecisionIdattribute.withProcessDefinitionKey(long value) Copy the current immutable object by setting a value for theprocessDefinitionKeyattribute.withProcessInstanceKey(long value) Copy the current immutable object by setting a value for theprocessInstanceKeyattribute.withVariables(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thevariablesmap with the specified map.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.camunda.zeebe.protocol.record.JsonSerializable
toJson
-
Method Details
-
getVariables
- Specified by:
getVariablesin interfaceRecordValueWithVariables- Returns:
- the variables of this record. Can be empty.
-
getDecisionKey
public long getDecisionKey()- Specified by:
getDecisionKeyin interfaceDecisionEvaluationRecordValue- Returns:
- the key of the evaluated decision
-
getDecisionId
- Specified by:
getDecisionIdin interfaceDecisionEvaluationRecordValue- Returns:
- the id of the evaluated decision in the DMN
-
getDecisionName
- Specified by:
getDecisionNamein interfaceDecisionEvaluationRecordValue- Returns:
- the name of the evaluated decision in the DMN
-
getDecisionVersion
public int getDecisionVersion()- Specified by:
getDecisionVersionin interfaceDecisionEvaluationRecordValue- Returns:
- the version of the evaluated decision
-
getDecisionRequirementsId
- Specified by:
getDecisionRequirementsIdin interfaceDecisionEvaluationRecordValue- Returns:
- the id of the DRG in the DMN the evaluated decision belongs to
-
getDecisionRequirementsKey
public long getDecisionRequirementsKey()- Specified by:
getDecisionRequirementsKeyin interfaceDecisionEvaluationRecordValue- Returns:
- the key of the deployed DRG the evaluated decision belongs to
-
getDecisionOutput
- Specified by:
getDecisionOutputin interfaceDecisionEvaluationRecordValue- Returns:
- the output of the evaluated decision as JSON string
-
getBpmnProcessId
- Specified by:
getBpmnProcessIdin interfaceDecisionEvaluationRecordValue- Returns:
- the BPMN process id in which context the decision was evaluated
-
getProcessDefinitionKey
public long getProcessDefinitionKey()- Specified by:
getProcessDefinitionKeyin interfaceDecisionEvaluationRecordValue- Returns:
- the key of the process in which context the decision was evaluated
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKeyin interfaceDecisionEvaluationRecordValue- Returns:
- the key of the process instance in which context the decision was evaluated
-
getElementId
- Specified by:
getElementIdin interfaceDecisionEvaluationRecordValue- Returns:
- the id of the element in the BPMN in which context the decision was evaluated
-
getElementInstanceKey
public long getElementInstanceKey()- Specified by:
getElementInstanceKeyin interfaceDecisionEvaluationRecordValue- Returns:
- the key of the element instance in which context the decision was evaluated
-
getEvaluatedDecisions
Returns thedetailsof the evaluated decision and its required decisions. The order depends on the evaluation order, starting from the required decisions.- Specified by:
getEvaluatedDecisionsin interfaceDecisionEvaluationRecordValue- Returns:
- details of the evaluated decisions
-
getEvaluationFailureMessage
If the evaluation of the decision failed then it returns the reason why the evaluation of thefailed decisionwas not successful. The failure message is not available if the decision was evaluated successfully.- Specified by:
getEvaluationFailureMessagein interfaceDecisionEvaluationRecordValue- Returns:
- the failure message why the evaluation failed, or an empty string if the evaluation was successful
-
getFailedDecisionId
If the evaluation of the decision failed then it returns the id of the decision where the evaluation failed. It can be the called/root decision or any of its required decisions. The reason of the failure can be retrieved asevaluation failure message. The decision id is not available if the decision was evaluated successfully.- Specified by:
getFailedDecisionIdin interfaceDecisionEvaluationRecordValue- Returns:
- the id of the decision in the DMN where the evaluation failed, or an empty string if the evaluation was successful
-
withVariables
public final ImmutableDecisionEvaluationRecordValue withVariables(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thevariablesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the variables map- Returns:
- A modified copy of
thisobject
-
withDecisionKey
Copy the current immutable object by setting a value for thedecisionKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionKey- Returns:
- A modified copy of the
thisobject
-
withDecisionId
Copy the current immutable object by setting a value for thedecisionIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionId (can benull)- Returns:
- A modified copy of the
thisobject
-
withDecisionName
Copy the current immutable object by setting a value for thedecisionNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionName (can benull)- Returns:
- A modified copy of the
thisobject
-
withDecisionVersion
Copy the current immutable object by setting a value for thedecisionVersionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionVersion- Returns:
- A modified copy of the
thisobject
-
withDecisionRequirementsId
Copy the current immutable object by setting a value for thedecisionRequirementsIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionRequirementsId (can benull)- Returns:
- A modified copy of the
thisobject
-
withDecisionRequirementsKey
Copy the current immutable object by setting a value for thedecisionRequirementsKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionRequirementsKey- Returns:
- A modified copy of the
thisobject
-
withDecisionOutput
Copy the current immutable object by setting a value for thedecisionOutputattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionOutput (can benull)- Returns:
- A modified copy of the
thisobject
-
withBpmnProcessId
Copy the current immutable object by setting a value for thebpmnProcessIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bpmnProcessId (can benull)- Returns:
- A modified copy of the
thisobject
-
withProcessDefinitionKey
Copy the current immutable object by setting a value for theprocessDefinitionKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for processDefinitionKey- Returns:
- A modified copy of the
thisobject
-
withProcessInstanceKey
Copy the current immutable object by setting a value for theprocessInstanceKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for processInstanceKey- Returns:
- A modified copy of the
thisobject
-
withElementId
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
-
withElementInstanceKey
Copy the current immutable object by setting a value for theelementInstanceKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for elementInstanceKey- Returns:
- A modified copy of the
thisobject
-
withEvaluatedDecisions
public final ImmutableDecisionEvaluationRecordValue withEvaluatedDecisions(EvaluatedDecisionValue... elements) Copy the current immutable object with elements that replace the content ofevaluatedDecisions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withEvaluatedDecisions
public final ImmutableDecisionEvaluationRecordValue withEvaluatedDecisions(Iterable<? extends EvaluatedDecisionValue> elements) Copy the current immutable object with elements that replace the content ofevaluatedDecisions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of evaluatedDecisions elements to set- Returns:
- A modified copy of
thisobject
-
withEvaluationFailureMessage
Copy the current immutable object by setting a value for theevaluationFailureMessageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for evaluationFailureMessage (can benull)- Returns:
- A modified copy of the
thisobject
-
withFailedDecisionId
Copy the current immutable object by setting a value for thefailedDecisionIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for failedDecisionId (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableDecisionEvaluationRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:variables,decisionKey,decisionId,decisionName,decisionVersion,decisionRequirementsId,decisionRequirementsKey,decisionOutput,bpmnProcessId,processDefinitionKey,processInstanceKey,elementId,elementInstanceKey,evaluatedDecisions,evaluationFailureMessage,failedDecisionId. -
toString
Prints the immutable valueDecisionEvaluationRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aDecisionEvaluationRecordValuevalue. 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 DecisionEvaluationRecordValue instance
-
builder
Creates a builder forImmutableDecisionEvaluationRecordValue.ImmutableDecisionEvaluationRecordValue.builder() .putVariable|putAllVariables(String => Object) //variablesmappings .withDecisionKey(long) // optionaldecisionKey.withDecisionId(String | null) // nullabledecisionId.withDecisionName(String | null) // nullabledecisionName.withDecisionVersion(int) // optionaldecisionVersion.withDecisionRequirementsId(String | null) // nullabledecisionRequirementsId.withDecisionRequirementsKey(long) // optionaldecisionRequirementsKey.withDecisionOutput(String | null) // nullabledecisionOutput.withBpmnProcessId(String | null) // nullablebpmnProcessId.withProcessDefinitionKey(long) // optionalprocessDefinitionKey.withProcessInstanceKey(long) // optionalprocessInstanceKey.withElementId(String | null) // nullableelementId.withElementInstanceKey(long) // optionalelementInstanceKey.addEvaluatedDecision|addAllEvaluatedDecisions(io.camunda.zeebe.protocol.record.value.EvaluatedDecisionValue) //evaluatedDecisionselements .withEvaluationFailureMessage(String | null) // nullableevaluationFailureMessage.withFailedDecisionId(String | null) // nullablefailedDecisionId.build();- Returns:
- A new ImmutableDecisionEvaluationRecordValue builder
-