Skip to main content

.Net SDK developer guide

Build Temporal Applications with the .Net SDK.

Core Application

Use the essential components of a Temporal Application (Workflows, Activities, and Workers) to build and run a Temporal application.

Temporal Client

Connect to a Temporal Service and start a Workflow Execution.

Testing

Set up the testing suite and test Workflows and Activities.

  • Test frameworks: Testing provides a framework to facilitate Workflow and integration testing.
  • Testing Workflows: Ensure the functionality and reliability of your Workflows.
  • Testing Activities: Validate the execution and outcomes of your Activities.
  • Replay test: Replay recreates the exact state of a Workflow Execution.

Failure detection

Explore how your application can detect failures using timeouts and automatically attempt to mitigate them with retries.

  • Workflow timeouts: Each Workflow timeout controls the maximum duration of a different aspect of a Workflow Execution.
  • Workflow retries: A Workflow Retry Policy can be used to retry a Workflow Execution in the event of a failure.
  • Activity timeouts: Each Activity timeout controls the maximum duration of a different aspect of an Activity Execution.
  • Set an Activity Retry Policy: Define retry logic for Activities to handle failures.
  • Heartbeat an Activity: An Activity Heartbeat is a ping from the Worker that is executing the Activity to the Temporal Service.
  • Heartbeat Timeout: A Heartbeat Timeout works in conjunction with Activity Heartbeats.

Workflow message passing

Send messages to and read the state of Workflow Executions.

Signals

  • Define Signal: A Signal is a message sent to a running Workflow Execution.
  • Send a Signal from a Temporal Client: Send a Signal to a Workflow from a Temporal Client.
  • Send a Signal from a Workflow: Send a Signal to another Workflow from within a Workflow, this would also be called an External Signal.
  • Signal-With-Start: Start a Workflow and send it a Signal in a single operation used from the Client.
  • Dynamic Handler: Dynamic Handlers provide flexibility to handle cases where the names of Workflows, Activities, Signals, or Queries aren't known at run time.
  • Set a Dynamic Signal: A Dynamic Signal in Temporal is a Signal that is invoked dynamically at runtime if no other Signal with the same input is registered.

Queries

  • Define a Query: A Query is a synchronous operation that is used to get the state of a Workflow Execution.
  • Send Queries: Queries are sent from the Temporal Client.
  • Set a Dynamic Query: A Dynamic Query in Temporal is a Query that is invoked dynamically at runtime if no other Query with the same name is registered.

Updates

  • Define an Update: An Update is an operation that can mutate the state of a Workflow Execution and return a response.
  • Send an Update: An Update is sent from the Temporal Client.

Interrupt a Workflow

Interrupt a Workflow Execution with a Cancel or Terminate action.

  • Cancel a Workflow: Interrupt a Workflow Execution and its Activities through Workflow cancellation.
  • Terminate a Workflow: Interrupt a Workflow Execution and its Activities through Workflow termination.

Asynchronous Activity completion

Complete Activities asynchronously.

  • Asynchronous Activity: Asynchronous Activity completion enables the Activity Function to return without the Activity Execution completing.

Versioning

Change Workflow Definitions without causing non-deterministic behavior in current long-running Workflows.

Observability

Configure and use the Temporal Observability APIs.

  • Emit Metrics: Each Temporal SDK is capable of emitting an optional set of metrics from either the Client or the Worker process.
  • Set up Tracing: Explains how the Go SDK supports tracing and custom context propagation.
  • Log from a Workflow: Send logs and errors to a logging service, so that when things go wrong, you can see what happened.
  • Use Visibility APIs: The term Visibility, within the Temporal Platform, refers to the subsystems and APIs that enable an operator to view Workflow Executions that currently exist within a Terminal Service.

Debugging

Explore various ways to debug your application.

Schedules

Run Workflows on a schedule and delay the start of a Workflow.

Data encryption

Use compression, encryption, and other data handling by implementing custom converters and codecs.

Durable Timers

Use Timers to make a Workflow Execution pause or "sleep" for seconds, minutes, days, months, or years.

  • Sleep: A Timer lets a Workflow sleep for a fixed time period.

Child Workflows

Explore how to spawn a Child Workflow Execution and handle Child Workflow Events.

  • Start a Child Workflow Execution: A Child Workflow Execution is a Workflow Execution that is scheduled from within another Workflow using a Child Workflow API.
  • Set a Parent Close Policy: A Parent Close Policy determines what happens to a Child Workflow Execution if its Parent changes to a Closed status.

Continue-As-New

Continue the Workflow Execution with a new Workflow Execution using the same Workflow ID.

  • Continue-As-New: Continue-As-New enables a Workflow Execution to close successfully and create a new Workflow Execution in a single atomic operation if the number of Events in the Event History is becoming too large.