NetTemporal.Client.Core 1.0.0

dotnet add package NetTemporal.Client.Core --version 1.0.0
                    
NuGet\Install-Package NetTemporal.Client.Core -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NetTemporal.Client.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NetTemporal.Client.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="NetTemporal.Client.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NetTemporal.Client.Core --version 1.0.0
                    
#r "nuget: NetTemporal.Client.Core, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NetTemporal.Client.Core@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NetTemporal.Client.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=NetTemporal.Client.Core&version=1.0.0
                    
Install as a Cake Tool

Temporal.Client.Core

NuGet License: MIT

A .NET 8 wrapper around the Temporal.io SDK that provides a clean, DI-friendly abstraction for managing workflows — starting them, sending signals, executing updates, and querying state — with minimal boilerplate.

Installation

dotnet add package NetTemporal.Client.Core

Configuration

Add your Temporal connection settings to appsettings.json:

{
  "TemporalConfig": {
    "ServerAddress": "localhost:7233",
    "Namespace": "default",
    "ApiKey": ""
  }
}
Property Description Required
ServerAddress Temporal server host and port Yes
Namespace Temporal namespace (defaults to "default") No
ApiKey API key for Temporal Cloud or secured deployments No

Registration

Call AddTemporalClientCore in your Program.cs or Startup.cs:

builder.Services.AddTemporalClientCore(builder.Configuration);

This registers:

  • ITemporalClient as a singleton (connected on startup)
  • ITemporalClientService as a scoped service

Usage

Inject ITemporalClientService wherever you need it:

public class OrderService(ITemporalClientService temporal)
{
    // ...
}

Start a workflow with an initial signal

await temporal.StartWorkflowAsync(new TemporalSignalRequest
{
    WorkflowId  = "order-123",
    WorkflowName = "OrderWorkflow",
    TaskQueue   = "order-queue",
    SignalName  = "OrderReceived",
    Data        = new { OrderId = "123", Amount = 99.99 },
    MetaData    = null   // optional workflow constructor args
});

Send a signal to a running workflow

await temporal.SendSignalAsync(new TemporalSignalRequest
{
    WorkflowId   = "order-123",
    WorkflowName = "OrderWorkflow",
    TaskQueue    = "order-queue",
    SignalName   = "PaymentConfirmed",
    Data         = new { TransactionId = "txn-456" }
});

Execute a workflow update

var result = await temporal.UpdateWorkflowStateAsync<UpdateInput, UpdateResult>(
    workflowId: "order-123",
    updateName: "ApplyDiscount",
    data: new UpdateInput { DiscountPercent = 10 }
);

Query workflow execution history

var history = await temporal.GetWorkflowStateAsync("order-123");

Returns a GetWorkflowExecutionHistoryResponse? (from the Temporal gRPC API), or null if the workflow is not found.

Check and resume a failed workflow

bool isFailed = await temporal.IsWorkflowFailedAsync("order-123");

if (isFailed)
{
    await temporal.ResumeFailedWorkflowAsync("order-123");
}

ResumeFailedWorkflowAsync sends a ResumeWorkflow signal only if the workflow is currently in a failed state.
RemoveWorkflowFromFailedStateAsync sends the same signal unconditionally (no state check).

API Reference

TemporalSignalRequest

Property Type Required Description
WorkflowId string Yes Unique identifier of the workflow
WorkflowName string Yes Registered workflow type name
TaskQueue string Yes Task queue the worker is polling on
SignalName string Yes Name of the signal or start signal
Data object? No Signal or update payload
MetaData IReadOnlyCollection<object?>? No Workflow constructor arguments

ITemporalClientService

Method Description
StartWorkflowAsync(request) Starts a new workflow execution with an initial signal
SendSignalAsync(request) Sends a signal to an existing running workflow
UpdateWorkflowStateAsync<TInput, TResult>(workflowId, updateName, data) Executes a synchronous update on a running workflow
GetWorkflowStateAsync(workflowId) Returns the full execution history of a workflow
IsWorkflowFailedAsync(workflowId) Returns true if the workflow has a failed execution event
ResumeFailedWorkflowAsync(workflowId) Sends ResumeWorkflow signal only when workflow is in failed state
RemoveWorkflowFromFailedStateAsync(workflowId) Sends ResumeWorkflow signal unconditionally

Requirements

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 108 5/8/2026