Home / Companies / Temporal / Blog / Post Details
Content Deep Dive

Announcing a new operation: Workflow Update

Blog post from Temporal

Post Details
Company
Date Published
Author
Dan Davison
Word Count
2,008
Language
English
Hacker News Points
-
Summary

Workflow Update, now generally available, is a significant feature that enhances message handling in applications by allowing developers to send a message to a Workflow, wait for the message to be processed, and receive a result or error in response. This contrasts with existing messages like Query and Signal, which have limitations such as the inability to mutate Workflow state or communicate back to the caller. The Update feature enables lower latency use cases and combines well with triggering local activities, offering design patterns like mutating local Workflow state, executing activities, or waiting for the Workflow to reach a certain state. Developers can use an Update Validator to reject invalid Updates immediately, leaving no trace in Workflow history. The implementation of Workflow Update required extending Temporal internals to defer writing to history until after the Update is delivered. Workflow Update supports diverse applications, such as managing e-commerce shopping carts, task queues, distributed lock services, and multi-stage financial transactions. With two ways to invoke Updates, either waiting for a completed result or using an Update handle to fetch the result later, developers have flexibility in designing both short and long-running Updates. This feature is already being utilized in Temporal Cloud and server core, and further resources are available for developers interested in integrating Workflow Update into their applications.