Package akka.javasdk.decision
Interface DecisionModelProvider
- All Known Subinterfaces:
DecisionModelProvider.Custom
- All Known Implementing Classes:
DecisionModelProvider.FromConfig,DecisionModelProvider.SystemOne
public sealed interface DecisionModelProvider
permits DecisionModelProvider.FromConfig, DecisionModelProvider.SystemOne, DecisionModelProvider.Custom
The decision model that answers the questions of a
DecisionModelClient request.
A DecisionModelClient uses the provider configured in
akka.javasdk.decision.model-provider unless you pass one to DecisionModelClient.model(DecisionModelProvider).
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA provider that answers in the service process instead of calling a model, for example a mock in tests.static final recordA request as given to aDecisionModelProvider.Customprovider.static final recordA provider defined in configuration.static final recordA model that implements the SystemOne API. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionThe provider configured inakka.javasdk.decision.model-provider.fromConfig(String configPath) The provider defined at a configuration path.A SystemOne provider with the defaults ofakka.javasdk.decision.system-one.
-
Method Details
-
fromConfig
The provider configured inakka.javasdk.decision.model-provider. -
fromConfig
The provider defined at a configuration path. A name without dots resolves underakka.javasdk.decision, sofromConfig("system-one")readsakka.javasdk.decision.system-one.The configuration section must define every key of a provider section. Inherit the defaults instead of repeating them:
escalation-model = ${akka.javasdk.decision.system-one} escalation-model.model-name = "jev-1.14.0" -
systemOne
A SystemOne provider with the defaults ofakka.javasdk.decision.system-one. Set the API key and the model name.
-