new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Temporal · Concepts · all subjects

activities/types

10 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Standalone Activity execution

If you only want to execute one Activity Function, you don't need to use a Workflow. You can use your SDK Client to invoke it directly as a Standalone Activity.

Standalone Activities Activity interface definition

An Activity in the Temporal Java SDK is an interface annotated with @ActivityInterface, with methods annotated with @ActivityMethod. A Standalone Activity is defined identically to an Activity orchestrated by a Workflow.

Standalone Activity definition and CLI operations

A Standalone Activity is an Activity that runs independently, not invoked by a Workflow. The Temporal CLI provides operations to manage Standalone Activities including start, execute, describe, list, count, cancel, complete, fail, terminate, pause, unpause, reset, and update-options commands.

Pause and unpause support for workflow-invoked Activities only

The pause, unpause, and reset commands for Activities are not supported for Standalone Activities; they only work with Activities invoked by Workflows.

Activity update-options command not supported for Standalone Activities

The update-options command, which updates the options of a running Activity that were passed into it from a Workflow, is not supported for Standalone Activities.

Standalone Activities execution flow

When you call client.execute_activity() from your application, the following happens: (1) Connect - your application opens a connection to the Temporal Server using a Temporal Client configured with your namespace and credentials; (2) Schedule - the Server durably persists the Activity Task on the specified Task Queue so that the request survives Worker restarts and network interruptions; (3) Poll - a Worker that is polling that Task Queue picks up the Activity Task and prepares to execute it; (4) Execute - the Worker runs your Activity function with the provided arguments and reports the outcome back to the Server; (5) Return - the Server stores the result and returns it to the original caller, either directly or via a handle, depending on which SDK method you use.

How Standalone Activities differ from Workflow Activities

Standalone Activities are orchestrated by your application code via the Temporal Client and started with client.execute_activity() from application code, whereas Workflow Activities are orchestrated by a Workflow Definition and started with workflow.execute_activity() from inside a Workflow Definition. Standalone Activities have their Retry Policy set when calling the Activity from your application, while Workflow Activities set it when calling from inside a Workflow. Standalone Activities are shown in the Standalone Activity list and count views, while Workflow Activities are shown in the Workflow's Event History. The Activity function and Worker registration are identical for both approaches, and only the execution path that triggers the Activity differs.

Standalone Activities use cases

Standalone Activities are designed for single, independent jobs like sending an email or processing a webhook, in contrast to Workflow Activities which are used for multi-step orchestration with multiple Activities.

Standalone Activities availability by SDK and version

Standalone Activities are available in Temporal Cloud and in the Temporal CLI v1.7.0 or higher with Temporal Server v1.31.0 or higher. Support exists for Go, Python, Java (Pre-release), .NET, TypeScript, and Ruby SDKs.

Standalone Activities execution model

Standalone Activities are Activities that run independently, without being orchestrated by a Workflow. Instead of starting an Activity from within a Workflow Definition, a Standalone Activity is executed directly from a Temporal Client. The way you write and register a Standalone Activity with a Worker is identical to Workflow Activities; the only difference is the execution method.

Give your agent this brain