How temporalio/sdk-java works
Temporal Java SDK is a framework for authoring and operating durable workflows and activities. The main user flow is application code configuring a client and starting a workflow; Temporal Service persists execution state and schedules work; workers run workflow and activity code, report outcomes, and the client retrieves results. The repository also includes workflow streams, payload storage, Spring AI/MCP integrations, Kotlin extensions, configuration loading, and observability plugins. The tree and excerpts support the product boundaries, but not detailed wiring for most unsampled modules, so those links are omitted.
Main entry points: temporal-sdk Worker Runtime · client Workflow Client · workflow Workflow APIs · converter Payload Conversion
Components 21
Workflow Runtime
- Workflow Client
temporal-sdk/src/main/java/io/temporal/client - Workflow APIs
temporal-sdk/src/main/java/io/temporal/workflow - Activity APIs
temporal-sdk/src/main/java/io/temporal/activity - Worker Runtime
temporal-sdk - Payload Conversion
temporal-sdk/src/main/java/io/temporal/common/converter - Payload Storage API
temporal-sdk/src/main/java/io/temporal/payload/storage
Developer Extensions
- Workflow Streams
contrib/temporal-workflowstreams/src/main/java/io/temporal/workflowstreams - Kotlin Extensions
temporal-kotlin/src/main/kotlin/io/temporal - Remote Data Encoder
temporal-remote-data-encoder/src/main/java/io/temporal/payload/codec
External Integrations
- S3 Storage Driver
contrib/temporal-payload-storage-s3driver/src/main/java/io/temporal/payload/storage/s3driver - Spring AI Integration
contrib/temporal-spring-ai/src/main/java/io/temporal/springai - Chat Activities
contrib/temporal-spring-ai/src/main/java/io/temporal/springai/activity - MCP Activities
contrib/temporal-spring-ai/src/main/java/io/temporal/springai/mcp
Configuration And Telemetry
- Client Configuration
temporal-envconfig/src/main/java/io/temporal/envconfig - OpenTelemetry Plugins
contrib/temporal-opentelemetry/src/main/java/io/temporal/opentelemetry - OpenTracing Interceptors
contrib/temporal-opentracing/src/main/java/io/temporal/opentracing
Other components
- Application Developer
- Temporal Service
- Amazon S3
- AI And MCP Services
- Telemetry Backend
Connections 30
- Application Developer → Workflow APIs: authors
- Application Developer → Activity APIs: implements
- Application Developer → Workflow Client: starts workflows
- Workflow Client → Temporal Service: sends requests
- Temporal Service → Worker Runtime: dispatches tasks
- Worker Runtime → Workflow APIs: runs workflows
- Worker Runtime → Activity APIs: runs activities
- Worker Runtime → Temporal Service: reports outcomes
- Workflow Client → Temporal Service: reads results
- Workflow APIs → Payload Conversion: encodes data
- Payload Conversion → Payload Storage API: stores payloads
- Payload Storage API → S3 Storage Driver: selects driver
- S3 Storage Driver → Amazon S3: reads and writes
- Application Developer → Workflow Streams: uses stream APIs
- Workflow Streams → Workflow APIs: runs in workflows
- Application Developer → Spring AI Integration: configures integration
- Spring AI Integration → Chat Activities: registers activities
- Spring AI Integration → MCP Activities: registers activities
- Chat Activities → AI And MCP Services: calls models
- MCP Activities → AI And MCP Services: calls tools
- Application Developer → Kotlin Extensions: uses extensions
- Kotlin Extensions → Workflow APIs: extends API
- Application Developer → Client Configuration: loads settings
- Client Configuration → Workflow Client: configures client
- Payload Conversion → Remote Data Encoder: encodes payloads
- Worker Runtime → OpenTelemetry Plugins: exports metrics
- Workflow Client → OpenTracing Interceptors: intercepts calls
- Worker Runtime → OpenTracing Interceptors: intercepts execution
- OpenTelemetry Plugins → Telemetry Backend: exports telemetry
- OpenTracing Interceptors → Telemetry Backend: exports spans