Package akka.javasdk.evaluation
Interface DurableEvaluator.Effect.Builder<S>
- Type Parameters:
S- The type of the state for this evaluation.
- Enclosing interface:
DurableEvaluator.Effect
public static interface DurableEvaluator.Effect.Builder<S>
Construct the effect that is returned by
DurableEvaluator.onEvaluation(akka.javasdk.evaluation.EvaluationContext) or a step method.-
Method Summary
Modifier and TypeMethodDescriptioncomplete(Evaluation evaluation) Complete the evaluation with its verdict.inconclusive(String reason) Report that the evaluation was inconclusive: it ran but could not reach a verdict, for example there was no transcript or the interaction was not applicable.transitionTo(akka.japi.function.Function<W, DurableEvaluator.Effect> methodRef) Defines the next step to which the evaluation should transition to.transitionTo(akka.japi.function.Function2<W, I, DurableEvaluator.Effect> methodRef) Defines the next step to which the evaluation should transition to.updateState(S newState) Update the state of the evaluation, kept across steps.
-
Method Details
-
updateState
Update the state of the evaluation, kept across steps. -
transitionTo
<W> DurableEvaluator.Effect transitionTo(akka.japi.function.Function<W, DurableEvaluator.Effect> methodRef) Defines the next step to which the evaluation should transition to.The step is identified by a method reference to a method that accepts no input parameters and returns an
DurableEvaluator.Effect.- Type Parameters:
W- The evaluator type containing the step method- Parameters:
methodRef- Reference to the step method
-
transitionTo
<W,I> DurableEvaluator.WithInput<I,DurableEvaluator.Effect> transitionTo(akka.japi.function.Function2<W, I, DurableEvaluator.Effect> methodRef) Defines the next step to which the evaluation should transition to.The step is identified by a method reference that accepts an input parameter.
- Type Parameters:
W- The evaluator type containing the step methodI- The input parameter type for the step- Parameters:
methodRef- Reference to the step method- Returns:
- A builder to provide the input parameter
-
complete
Complete the evaluation with its verdict. The outcome is recorded and the evaluation instance is cleaned up.- Parameters:
evaluation- the evaluation outcome
-
inconclusive
Report that the evaluation was inconclusive: it ran but could not reach a verdict, for example there was no transcript or the interaction was not applicable.- Parameters:
reason- why the evaluation was inconclusive
-