Package kalix.javasdk.workflow
Interface WorkflowContext
- All Superinterfaces:
Context
- All Known Subinterfaces:
CommandContext
-
Method Summary
Modifier and TypeMethodDescription<T> T
getGrpcClient
(Class<T> clientClass, String service) Get an Akka gRPC client for the given service name.The id of the workflow that this context is for.Methods inherited from interface kalix.javasdk.Context
materializer
-
Method Details
-
workflowId
String workflowId()The id of the workflow that this context is for.- Returns:
- The workflow id.
-
getGrpcClient
Get an Akka gRPC client for the given service name. The same client instance is shared across components in the application. The lifecycle of the client is managed by the SDK and it should not be stopped by user code.- Type Parameters:
T
- The "service" interface generated for the service by Akka gRPC- Parameters:
clientClass
- The class of a gRPC service generated by Akka gRPCservice
- The name of the service to connect to, either a name of another Kalix service or an external service where connection details are configured under `akka.grpc.client.[service-name]` in `application.conf`.
-