Public Courses

Crafting an Error Handling Strategy with Java (errstrat_java)


Description
In this course, you will design and implement effective error handling strategies that map your business logic to the Temporal platform. You will explore the nature of different types of failures and investigate the support that Temporal provides for addressing them. Along the way, you will learn essential concepts and techniques, such as idempotence, Heartbeating, and the Saga Pattern, which will help you to ensure the correctness and responsiveness of your application.

When you've completed the course, you'll be able to:
- Recommend an error handling strategy
- Implement an error handling strategy
- Integrate appropriate mechanisms for handling various types of errors

Prerequisites:

To be successful in this course, you should have an understanding of the fundamental concepts, tools, and techniques used to develop and execute basic Temporal applications with the Java SDK. This includes the ability to develop and execute Temporal Workflows and Activities, navigate the Web UI, configure and run a Worker, as well as an understanding of the high-level interactions between the Temporal Application and Temporal Cluster during Workflow Execution. We strongly recommend that you complete Introducing the Temporal Platform (Temporal 101) and Exploring Durable Execution (Temporal 102), which cover these topics, before starting this course.

Since code used in examples and exercises are written in Java, you must also have at least basic proficiency with the Java programming language.

Programming Language: Java Number of hours: 2.5

Content
  • About this Course
  • Welcome
  • Meet the Instructors
  • Format and Duration
  • Course Outcomes
  • Exercise Environment
  • (Optional Activity) Setting up a Local Development Environment
  • Course Conventions
  • Getting Help
  • Error Handling Concepts
  • Error Handling Concepts: What to Expect
  • Platform vs. Application Failures
  • The Temporal Error Model
  • Three Conceptual Types of Failures
  • Idempotence
  • How Temporal Represents Failures
  • Workflow Task Failures vs Workflow Execution Failures
  • How Executions and Failures Appear in the Event History
  • Throwing and Handling Exceptions
  • Throwing and Handling Exceptions: What to Expect
  • Throwing Exceptions from Activities
  • Throwing Exceptions from Workflows
  • Handling Exceptions
  • Non-Retryable Errors for Activities
  • Java SDK-Specific Behavior
  • Exercise #1 - Handling Errors
  • Timeouts
  • Timeouts: What to Expect
  • What are Timeouts?
  • Activity Timeouts
  • Workflow Timeouts
  • Activity Heartbeats
  • Retry Policies
  • Retry Policies: What to Expect
  • What is a Retry Policy?
  • Default Retry Policies
  • Defining a Custom Retry Policy
  • Customizing a Retry Policy for a Specific Activity
  • Defining Error Types as Non-Retryable
  • Exercise #2: Modify Activity Options
  • Recovering from Failure
  • Recovering from Failure: What to Expect
  • Handling a Workflow Execution that Cannot Complete
  • Canceling a Workflow Execution
  • Terminating a Workflow Execution
  • Resetting a Workflow Execution
  • Rollback Actions and the Saga Pattern
  • Exercise #3: Implementing a Rollback Action with the Saga Pattern
  • Conclusion
  • Essential Points
  • Parting Words
  • For More Information
Completion rules
  • All units must be completed