Activities
Activity Definitions, Activity Execution, Timeouts, Standalone Activities, and benign exceptions in the Temporal Java SDK.
Activity Definitions, Activity Execution, Timeouts, Standalone Activities, and benign exceptions in the Temporal Java SDK.
Implement an Activity behind an annotated Java interface, define its parameters and return values, and control Activity Type names with prefixes.
Invoke Activities synchronously or asynchronously from a Java Workflow, set ActivityOptions and Timeouts, and read the ActivityExecutionContext.
Set the Schedule-To-Close, Start-To-Close, and Heartbeat Timeouts on a Java Activity, tune its Retry Policy, and override the next retry delay.
An Activity-backed Operation sends one notification with retries and no Workflow, keyed on the Nexus request Id so a server retry cannot send it twice.
A Signal nudges a pending approval and an Update records the decision and confirms it, so what the caller needs back decides the message type.
Asynchronously complete an Activity in a Workflow with Temporal. Follow steps to provide identifying information, use Temporal Client, and set the complete() method.
Mark expected or non-severe Activity errors as benign in Java to reduce noise in logs, metrics, and OpenTelemetry traces.
This section explains how to implement best practices with the Java SDK
A caller Workflow invokes Operations through the generated stub, awaits the decision durably, and sets the three timeouts that bound a Nexus Operation.
Running the approval end to end shows the caller crossing a Namespace boundary without learning a Workflow Id, a Task Queue, or what backs an Operation.
Start a Child Workflow Execution and set a Parent Close Policy using the Java SDK. Manage Child Workflow Events and ensure successful execution.
A Workflow, Standalone Activity, Update, or sync messaging can sit behind an Operation. Choose by whether the work waits, holds state, or returns a result.
Connect a Temporal Client, start Workflow Executions, get Workflow results, and manage Namespaces with the Temporal Java SDK.
Use Temporal's Continue-As-New in Java to manage large Event Histories by atomically creating new Workflow Executions with the same Workflow Id and fresh parameters.
Learn how Temporal handles data through the Data Converter, including payload conversion, encryption, and large payload storage.
Hangs, unauthorized calls, missing UI links, and duplicate side effects in a Nexus Service, each traced from the symptom back to the wiring behind it.
Debug your Temporal Java Workflows using your favorite Java IDE's debugger. Set the TEMPORAL_DEBUG environment variable to true during debugging to avoid deadlocks. Use Web UI, Temporal CLI, and logging for development and production. Optimize Worker performance with metrics and the Worker performance guide.
A contract in JSON Schema 2020-12 declares the five approval Operations, the types they carry, and the rules that keep both sides deployable independently.
Add contextual information to workflows and events in the Temporal UI using the Java SDK.
Catch the right exception types, wrap checked exceptions, and inspect failures correctly in Temporal Java Workflows and Activities.
Offload large payloads to Amazon S3 using the claim check pattern in the Java SDK.
NexGen emits typed models, runtime validators, and a Nexus Service definition for each language, so handler and caller agree without hand-written types.
TemporalOperationHandler backs requestApproval with a Workflow that blocks for a human decision, hosted on one Worker with the Activities it runs.
This section covers integrations with the Java SDK
Implement Interceptors in the Temporal Java SDK to manage inbound and outbound SDK calls, enhance tracing, and add authorization to your Workflows and Activities.
Interrupt a Workflow Execution using the Temporal Java SDK. Choose between canceling for a graceful stop or terminating for a forceful stop.
Explore Temporal Java SDK feature guides to master developing Temporal Applications. Build Workflows, Activities, and Workers, connect to Temporal Services, set up a testing suite, handle failure detection, send messages, complete Activities asynchronously, implement Versioning, use Observability, debug applications, schedule Workflows
Build a Nexus Service end to end in Java, starting from a data contract and adding one Nexus capability at a time to solve a purchase approval problem.
Register, update, deprecate, and delete Namespaces using Temporal CLI or SDK APIs. Manage Workflow Executions with isolated Namespaces to match your needs.
This section covers Nexus with the Java SDK
Use Temporal Nexus within the Java SDK to connect Durable Executions within and across Namespaces using a Nexus Endpoint, a Nexus Service contract, and Nexus Operations.
Build a Nexus Service that wraps an existing Temporal Workflow using the Java SDK
Explore the observability features of Temporal, including Metrics, Tracing, Logging, and Visibility. Emit Metrics with the Java SDK, set up Tracing, and use Search Attributes.
Customize how Temporal serializes application objects using Payload Converters in the Java SDK.
Encrypt data sent to and from the Temporal Service using a custom Payload Codec in the Java SDK.
This section explains how to implement platform with the Java SDK
A Nexus Endpoint routes Operation requests to the handler Namespace and Task Queue, so callers address it by name and never see what sits behind it.
Create and run a Temporal Worker using the Java SDK.
Schedule, Backfill, Delete, Describe, List, Pause, Trigger, Update, and set Cron and Start Delays for Workflow Executions in Java using Temporal's ScheduleClient.
Signal-with-Start attaches a note whether or not the approval exists, and a use-existing conflict policy lets several callers await the same approval.
Write Temporal Workers that run on serverless compute using the Java SDK.
Write a Temporal Worker that runs on AWS Lambda using the Java SDK temporal-aws-lambda contrib module.
Run a Temporal Worker on a GCP Cloud Run worker pool using the Java SDK.
Configure your local development environment to get started developing with Temporal
Side Effects in a Workflow execute non-deterministic code like generating a UUID. The result is saved in Workflow Event History for consistent replays without re-execution.
Run Spring AI agents on Temporal with durable model calls, Activity tools, and replay-safe orchestration using Spring Boot.
Learn about the Temporal Spring Boot integration
Execute Activities independently without a Workflow using the Temporal Java SDK.
Execute a Standalone Activity with the Temporal Java SDK without writing a Workflow.
Execute Nexus Operations independently without a Workflow using the Temporal Java SDK.
Connect to a development Temporal Service or Temporal Cloud from Java, set WorkflowOptions, and get Workflow Execution results.
The Testing section of the Temporal Application development guide covers frameworks for Workflow and integration testing, including end-to-end, integration, and unit tests. Unit tests can be set up and run using the Temporal Java SDK's TestWorkflowEnvironment and TestWorkflowExtension classes for automated testing, allowing developers to test Workflows
A Workflow sets a durable Timer for delayed execution. Even if the Worker or Temporal Service is down, the Timer resumes once back up. Efficient and scalable.
The Temporal Platform ensures deterministic Workflow code, offering versioning features in the Java SDK with Workflow Patching APIs and Worker Build Ids for efficient updates.
Learn the Java SDK's outdated Worker Versioning APIs.
This section covers Workers with the Java SDK
This section explains how to implement Workflows with the Java SDK
Develop with Queries, Signals, and Updates with the Temporal Java SDK.
Stream events from a Workflow to subscribers using the Temporal Java SDK Workflow Streams contrib module.
Optimize Workflow Execution with Temporal Java SDK - Set Workflow Timeouts and Retry Policies efficiently.
This section covers Workflows with the Java SDK