<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dapr Workflow .NET SDK on Dapr Docs</title><link>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/</link><description>Recent content in Dapr Workflow .NET SDK on Dapr Docs</description><generator>Hugo</generator><language>en</language><atom:link href="https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/index.xml" rel="self" type="application/rss+xml"/><item><title>DaprWorkflowClient lifetime management and registration</title><link>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/dotnet-workflowclient-usage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/dotnet-workflowclient-usage/</guid><description>&lt;h2 id="lifetime-management">Lifetime management&lt;/h2>
&lt;p>A &lt;code>DaprWorkflowClient&lt;/code> holds access to networking resources in the form of TCP sockets used to communicate with the Dapr sidecar as well
as other types used in the management and operation of Workflows. &lt;code>DaprWorkflowClient&lt;/code> implements &lt;code>IAsyncDisposable&lt;/code> to support eager
cleanup of resources.&lt;/p>
&lt;h2 id="dependency-injection">Dependency Injection&lt;/h2>
&lt;p>The &lt;code>AddDaprWorkflow()&lt;/code> method will register the Dapr workflow services with ASP.NET Core dependency injection. This method
requires an options delegate that defines each of the workflows and activities you wish to register and use in your application.&lt;/p></description></item><item><title>Workflow serialization in the .NET SDK</title><link>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/dotnet-workflow-serialization/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/dotnet-workflow-serialization/</guid><description>&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>Starting with Dapr .NET SDK v1.17.0, &lt;code>Dapr.Workflow&lt;/code> supports pluggable serialization. The SDK continues to use
&lt;code>System.Text.Json&lt;/code> by default, but you can now:&lt;/p>
&lt;ul>
&lt;li>Override the default &lt;code>System.Text.Json&lt;/code> settings.&lt;/li>
&lt;li>Register a custom serializer (for example, MessagePack or BSON).&lt;/li>
&lt;/ul>
&lt;p>Serialization configuration is entirely client-side and does not require a specific Dapr runtime version.&lt;/p>


&lt;div class="alert alert-primary" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>

 This feature requires Dapr .NET SDK v1.17.0 or later.

&lt;/div>

&lt;h2 id="compatibility-and-breaking-changes">Compatibility and breaking changes&lt;/h2>


&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Warning&lt;/h4>

 &lt;p>Changing serialization can be a breaking change for existing workflows. There is no supported migration path between
serialization implementations.&lt;/p></description></item><item><title>Multi-application workflows in the .NET SDK</title><link>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/dotnet-workflow-multi-app/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/dotnet-workflow-multi-app/</guid><description>&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>Dapr workflows can call activities or child workflows that are hosted in a different Dapr application. In .NET,
multi-application workflows are supported starting with:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Dapr runtime v1.16.0+&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Dapr .NET SDK v1.17.0+&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>Conceptual guidance and constraints are covered in
&lt;a href="https://v1-18.docs.dapr.io/developing-applications/building-blocks/workflow/workflow-multi-app/">Multi Application Workflows&lt;/a>.&lt;/p>
&lt;h2 id="requirements">Requirements&lt;/h2>
&lt;p>Multi-application workflow calls require:&lt;/p>
&lt;ul>
&lt;li>The target app ID must exist and must register the activity or workflow you invoke.&lt;/li>
&lt;li>All participating app IDs must be in the same namespace.&lt;/li>
&lt;li>All participating app IDs must use the same workflow (actor) state store.&lt;/li>
&lt;/ul>
&lt;h2 id="call-an-activity-in-another-application">Call an activity in another application&lt;/h2>
&lt;p>Set &lt;code>TargetAppId&lt;/code> on &lt;code>WorkflowTaskOptions&lt;/code> when calling an activity to execute it in another app:&lt;/p></description></item><item><title>Workflow management operations with DaprWorkflowClient</title><link>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/dotnet-workflow-management-methods/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/dotnet-workflow-management-methods/</guid><description>&lt;h2 id="workflow-management-operations-with-daprworkflowclient">Workflow management operations with &lt;code>DaprWorkflowClient&lt;/code>&lt;/h2>
&lt;p>The &lt;code>DaprWorkflowClient&lt;/code> class provides methods to manage workflow instances. Below are the operations you can perform using the &lt;code>DaprWorkflowClient&lt;/code>.&lt;/p>
&lt;h3 id="schedule-a-new-workflow-instance">Schedule a new workflow instance&lt;/h3>
&lt;p>To start a new workflow instance, use the &lt;code>ScheduleNewWorkflowAsync&lt;/code> method. This method requires the workflow type name and an input required by the workflow. The workflow &lt;code>instancedId&lt;/code> is an optional argument; if not provided, a new GUID is generated by the &lt;code>DaprWorkflowClient&lt;/code>. The final optional argument is a &lt;code>startTime&lt;/code> of type &lt;code>DateTimeOffset&lt;/code> which can be used to define when the workflow instance should start. The method returns the &lt;code>instanceId&lt;/code> of the scheduled workflow which is used for other workflow management operations.&lt;/p></description></item><item><title>Workflow versioning in the .NET SDK</title><link>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/dotnet-workflow-versioning/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/dotnet-workflow-versioning/</guid><description>&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>Dapr Workflow versioning lets you evolve workflows without breaking deterministic execution for in-flight instances.
The .NET SDK supports two approaches:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Patch-based versioning&lt;/strong>: introduce conditional branches guarded by &lt;code>context.IsPatched(&amp;quot;patch-name&amp;quot;)&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Name-based versioning&lt;/strong>: create a new workflow type name and let a versioning strategy select the newest version.&lt;/li>
&lt;/ul>
&lt;p>Use patch-based versioning for small, in-place changes. Use name-based versioning for larger refactors where you want
a clean new workflow type.&lt;/p>


&lt;div class="alert alert-primary" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>

 Workflow versioning requires Dapr .NET SDK v1.17.0 or later and Dapr runtime v1.17.0 or later.

&lt;/div>

&lt;h2 id="when-to-use-each-approach">When to use each approach&lt;/h2>
&lt;p>&lt;strong>Patch-based versioning&lt;/strong> is a good fit when:&lt;/p></description></item><item><title>.NET Workflow Examples</title><link>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/dotnet-workflow-examples/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/sdks/dotnet/dotnet-workflow/dotnet-workflow-examples/</guid><description>&lt;h2 id="workflow-tutorials-in-the-dapr-quickstarts-repository">Workflow tutorials in the Dapr Quickstarts repository&lt;/h2>
&lt;p>The Dapr Quickstarts repository on GitHub includes many workflow tutorials that showcase the various workflow patterns and how to use the workflow management operations. You can find these tutorials in the &lt;a href="https://github.com/dapr/quickstarts/tree/master/tutorials/workflow/csharp">quickstarts/tutorials/workflow/csharp&lt;/a> folder.&lt;/p>
&lt;h2 id="workflow-examples-in-the-net-sdk-repository">Workflow examples in the .NET SDK repository&lt;/h2>
&lt;p>The Dapr .NET SDK repository on GitHub contains several examples demonstrating how to use Dapr Workflows with .NET. You can find these examples in the &lt;a href="https://github.com/dapr/dotnet-sdk/tree/master/examples/Workflow">examples/Workflow&lt;/a> folder.&lt;/p></description></item></channel></rss>