Skip to main content

50 docs tagged with "Java SDK"

View all tags

Activities

Activity Definitions, Activity Execution, Timeouts, Standalone Activities, and benign exceptions in the Temporal Java SDK.

Activity basics

Implement an Activity behind an annotated Java interface, define its parameters and return values, and control Activity Type names with prefixes.

Activity Execution

Invoke Activities synchronously or asynchronously from a Java Workflow, set ActivityOptions and Timeouts, and read the ActivityExecutionContext.

Activity Timeouts

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.

Asynchronous Activity Completion

Asynchronously complete an Activity in a Workflow with Temporal. Follow steps to provide identifying information, use Temporal Client, and set the complete() method.

Benign exceptions

Mark expected or non-severe Activity errors as benign in Java to reduce noise in logs, metrics, and OpenTelemetry traces.

Best practices

This section explains how to implement best practices with the Java SDK

Child Workflows

Start a Child Workflow Execution and set a Parent Close Policy using the Java SDK. Manage Child Workflow Events and ensure successful execution.

Client

Connect a Temporal Client, start Workflow Executions, get Workflow results, and manage Namespaces with the Temporal Java SDK.

Continue-As-New

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.

Data handling

Learn how Temporal handles data through the Data Converter, including payload conversion, encryption, and large payload storage.

Debugging

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.

Error handling

Catch the right exception types, wrap checked exceptions, and inspect failures correctly in Temporal Java Workflows and Activities.

External Storage

Offload large payloads to Amazon S3 using the claim check pattern in the Java SDK.

Integrations

This section covers integrations with the Java SDK

Interceptors

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

Interrupt a Workflow Execution using the Temporal Java SDK. Choose between canceling for a graceful stop or terminating for a forceful stop.

Java SDK developer guide

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

Namespaces

Register, update, deprecate, and delete Namespaces using Temporal CLI or SDK APIs. Manage Workflow Executions with isolated Namespaces to match your needs.

Nexus

This section covers Nexus with the Java SDK

Nexus feature guide

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.

Observability

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.

Payload conversion

Customize how Temporal serializes application objects using Payload Converters in the Java SDK.

Payload encryption

Encrypt data sent to and from the Temporal Service using a custom Payload Codec in the Java SDK.

Platform

This section explains how to implement platform with the Java SDK

Run a Worker

Create and run a Temporal Worker using the Java SDK.

Schedules

Schedule, Backfill, Delete, Describe, List, Pause, Trigger, Update, and set Cron and Start Delays for Workflow Executions in Java using Temporal's ScheduleClient.

Serverless Workers

Write Temporal Workers that run on serverless compute using the Java SDK.

Side Effects

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.

Temporal Client

Connect to a development Temporal Service or Temporal Cloud from Java, set WorkflowOptions, and get Workflow Execution results.

Testing

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

Timers

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.

Versioning

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.

Workers

This section covers Workers with the Java SDK

Workflow basics

This section explains how to implement Workflows with the Java SDK

Workflow Streams

Stream events from a Workflow to subscribers using the Temporal Java SDK Workflow Streams contrib module.

Workflow Timeouts

Optimize Workflow Execution with Temporal Java SDK - Set Workflow Timeouts and Retry Policies efficiently.

Workflows

This section covers Workflows with the Java SDK