Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVP .NET referential feature & inter-tech how-to documentation #2769

Merged
merged 29 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/develop/dotnet/asynchronous-activity.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
id: asynchronous-activity
title: Asynchronous Activity - .NET SDK feature guide
sidebar_label: Asynchronous Activity
description: How to asynchronously complete an Activity using the .NET SDK.
slug: /develop/dotnet/asynchronous-activity
toc_max_heading_level: 4
keywords:
- asynchronous activity
- dotnet sdk
- overview
tags:
- asynchronous-activity
- dotnet-sdk
- overview
---

## How to asynchronously complete an Activity {#asynchronous-activity-completion}

<!-- CONTENT-->
72 changes: 72 additions & 0 deletions docs/develop/dotnet/cancellation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
id: cancellation
title: Cancellation - .NET SDK feature guide
sidebar_label: Cancellation
description: How to cancel a Workflow Execution and it's Activities using the Go SDK.
slug: /develop/dotnet/cancellation
toc_max_heading_level: 4
keywords:
- cancellation
- dotnet sdk
- overview
tags:
- cancellation
- dotnet-sdk
- overview
---

This pages shows the following:
flossypurse marked this conversation as resolved.
Show resolved Hide resolved

- How to handle a Cancellation request within a Workflow.
- How to set an Activity Heartbeat Timeout.
- How to listen for and handle a Cancellation request within an Activity.
- How to send a Cancellation request from a Temporal Client.

## Handle Cancellation in Workflow {#handle-cancellation-in-workflow}

**How to handle a Cancellation in a Workflow in Go.**
jsundai marked this conversation as resolved.
Show resolved Hide resolved

<!-- CONTENT-->

## Handle Cancellation in an Activity {#handle-cancellation-in-an-activity}

**How to handle a Cancellation in an Activity in Go.**

<!-- CONTENT-->

## Request Cancellation {#request-cancellation}

**How to request Cancellation of a Workflow and Activities in Go.**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting cancellation of a workflow is a different concept than requesting cancellation of an activity, so I am splitting these


<!-- CONTENT-->

## How to interrupt a Workflow Execution {#interrupt-a-workflow-execution}
flossypurse marked this conversation as resolved.
Show resolved Hide resolved

You can interrupt a Workflow Execution in one of the following ways:

- [Cancel](#cancel)
- [Terminate](#terminate)

The following are the main differences between canceling and terminating a Workflow in Temporal:

##### Cancel

Canceling a Workflow provides a graceful way to stop Workflow Execution.
flossypurse marked this conversation as resolved.
Show resolved Hide resolved

##### Terminate
flossypurse marked this conversation as resolved.
Show resolved Hide resolved

<!-- CONTENT-->

### How to terminate a Workflow Execution in .NET {#terminate-a-workflow-execution}
flossypurse marked this conversation as resolved.
Show resolved Hide resolved
flossypurse marked this conversation as resolved.
Show resolved Hide resolved

<!-- CONTENT-->

##### Summary

In summary:

- Canceling provides a graceful way to stop the Workflow and allows it to handle cancelation logic.
- Termination forcefully stops the Workflow and prevents any further events.

In most cases, canceling is preferable because it allows the Workflow to finish gracefully.
Terminate only if the Workflow is stuck and cannot be canceled normally.
24 changes: 24 additions & 0 deletions docs/develop/dotnet/child-workflows.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
id: child-workflows
title: Child Workflows in .NET
flossypurse marked this conversation as resolved.
Show resolved Hide resolved
sidebar_label: Child Workflows
description: Spawn a child workflow execution
keywords:
- developer guide
- sdk
- dotnet
- child workflow
tags:
- developer-guide
- sdk
- dotnet
- child-workflow
---

## How to start a Child Workflow Execution {#child-workflows}

<!-- CONTENT-->

#### How to set a Parent Close Policy {#parent-close-policy}

<!-- CONTENT-->
19 changes: 19 additions & 0 deletions docs/develop/dotnet/continue-as-new.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
id: continue-as-new
title: How to Continue-As-New in Dotnet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: How to Continue-As-New in Dotnet
title: How to Continue-As-New in .NET

Inconsistent

sidebar_label: Continue-As-New
description: Continue-As-New
keywords:
- sdk
- dotnet
- continue-as-new
tags:
- sdk
- dotnet
- continue-as-new
---

## How to Continue-As-New {#continue-as-new}

<!-- CONTENT-->
<!-- .NET specific example of continue-as-new-->
82 changes: 82 additions & 0 deletions docs/develop/dotnet/core-application.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
id: core-application
title: Core application - .NET SDK feature guide
sidebar_label: Core application
description: Temporal's core application primitives include Workflows, Activities, and Workers.
toc_max_heading_level: 4
keywords:
- activity
- activity definition
- activity execution
- dotnet
- dotnet sdk
- worker
- workflow
- workflow execution
- workflow parameters
- workflow return values
tags:
- activity
- activity-definition
- activity-execution
- code-samples
- dotnet
- dotnet-sdk
- worker
- workflow
- workflow-execution
- workflow-parameters
- workflow-return-values
---

<!-- What is on this page-->

## Workflows

**How to develop a basic Workflow using the Temporal .NET SDK**

<!-- CONTENT-->
<!-- Call out best practices for defining Workflow params and return values-->

### Workflow logic requirements {#workflow-logic-requirements}

<!-- .NET specific Workflow logic requirements-->

### Customize Workflow Type {#workflow-type}

**How to customize your Workflow Type name using the Temporal .NET SDK**

## Activities

**How to develop a basic Activity using the Temporal .NET SDK**

<!-- CONTENT-->
<!-- Call out best practices for defining Activity params and return values-->

## Start Activity Execution {#activity-execution}

**How to start an Activity Execution using the Temporal .NET SDK**

<!-- CONTENT-->
<!-- Call out required Timeouts-->

### Get Activity Execution results {#get-activity-results}

**How to get the results of an Activity Execution using the Temporal .NET SDK**

<!-- CONTENT-->

## Worker Processes

**How to create and run a Worker Process using the Temporal .NET SDK**

<!-- CONTENT-->
<!-- Call out registering multiple types-->

### How to set a Dynamic Workflow {#set-a-dynamic-workflow}

<!-- CONTENT-->

### How to set a Dynamic Activity {#set-a-dynamic-activity}

<!-- CONTENT-->
51 changes: 51 additions & 0 deletions docs/develop/dotnet/data-encryption.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
id: data-encryption
title: Date Encryption
sidebar_label: Date encryption
description: Date encryption
flossypurse marked this conversation as resolved.
Show resolved Hide resolved
keywords:
- sdk
- dotnet
- data encryption
- codec server
- converter
tags:
- sdk
- dotnet
- data encryption
- codec server
- converter
---

This page shows the following:

- How to use a custom Payload Codec
- How to use a custom Payload Converter

## Custom Payload Codec {#custom-payload-codec}

**How to use a custom Payload Codec with the .NET SDK.**

<!-- CONTENT-->

## Payload conversion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conversion not capitalized here but it is with Data Conversion below


<!-- CONTENT-->

### Conversion sequence {#conversion-sequence}

<!-- CONTENT-->

### Custom Payload Converter {#custom-payload-converter}

**How to use a custom Payload Converter with the .NET SDK.**

<!-- CONTENT-->

**List of default Data Converter supports converting multiple types**

<!-- CONTENT-->

### Custom Type Data Conversion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Custom Type Data Conversion
### Custom type Data Conversion

Unsure if "Type" should be capitalized in this case


<!-- CONTENT-->
flossypurse marked this conversation as resolved.
Show resolved Hide resolved
27 changes: 27 additions & 0 deletions docs/develop/dotnet/debugging.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
id: debugging
title: Debugging .NET SDK feature guide
sidebar_label: Debugging
description: The Debugging section of the Temporal Developer's guide covers the many ways to debug your application.
toc_max_heading_level: 4
keywords:
- sdk
- dotnet
- debugging
tags:
- sdk
- dotnet
- debugging
---

## Debugging {#debug}

### How to debug in a development environment {#debug-in-a-development-environment}

<!-- CONTENT-->

### How to debug in a development production {#debug-in-a-development-production}

<!--Different ways you can debug production Workflows with links (web ui, replay, tracing, logging), debug server performance with cloud vs self hosted-->

<!-- CONTENT-->
30 changes: 30 additions & 0 deletions docs/develop/dotnet/durable-timers.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
id: durable-timers
title: Durable Timers - .NET SDK feature guide
description: Set a Durable Timer to sleep for days, weeks, or years in a Workflow.
sidebar_label: Durable Timers
keywords:
- sdk
- dotnet
- durable timers
- sleep
- time-skipping
tags:
- sdk
- dotnet
- durable-timers
- sleep
- time-skipping
---

## Sleep

**How to sleep in a Workflow using the Temporal .NET SDK**

<!-- CONTENT-->

## Skip time in tests {#testing-skip-time}
Copy link
Member

@cretz cretz May 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be here, I think it should be with the testing documentation. It's not about durable timers a user may create, it's also about timeouts and other things.


**How to skip time while testing Workflows using the .NET SDK**

<!-- CONTENT-->
55 changes: 55 additions & 0 deletions docs/develop/dotnet/failure-detection.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
id: failure-detection
title: Failure Detection .NET SDK feature guide
sidebar_label: Failure Detection
description: The Failure Detection section of the Temporal Developer's guide covers the many ways to detect failure with your Temporal application.
toc_max_heading_level: 4
keywords:
- guide context
- how to
- dotnet
- sdk
- failure detection
tags:
- guide-context
- how-to
- dotnet
- sdk
- failure-detection
---

## Failure Detection {#failure-detection}
Copy link
Member

@cretz cretz May 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is expected to be put under this heading? The next heading is not a child. Is there existing SDK documentation you can point to as a guide so we can be consistent here?


## Workflow timeouts {#workflow-timeouts}
Copy link
Member

@cretz cretz May 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title of this document is failure detection but we often don't consider timeouts the same as failures. Also, not sure these general purpose options are about failure detections. I think they deserve to be next to other workflow options.


Each Workflow timeout controls the maximum duration of a different aspect of a Workflow Execution.

Workflow timeouts are set when [starting the Workflow Execution](#workflow-timeouts).

- **[Workflow Execution Timeout](/workflows#workflow-execution-timeout)** - restricts the maximum amount of time that a single Workflow Execution can be executed.
- **[Workflow Run Timeout](/workflows#workflow-run-timeout):** restricts the maximum amount of time that a single Workflow Run can last.
- **[Workflow Task Timeout](/workflows#workflow-task-timeout):** restricts the maximum amount of time that a Worker can execute a Workflow Task.

<!-- CONTENT-->

### Workflow retries {#workflow-retries}

A Retry Policy can work in cooperation with the timeouts to provide fine controls to optimize the execution experience.

<!-- CONTENT-->

## How to set Activity timeouts {#activity-timeouts}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent headings with workflow timeouts (this is prefixed with "How to set" but "Workflow timeouts" section is not)


Each Activity timeout controls the maximum duration of a different aspect of an Activity Execution.

The following timeouts are available in the Activity Options.

- **[Schedule-To-Close Timeout](/activities#schedule-to-close-timeout):** is the maximum amount of time allowed for the overall [Activity Execution](/activities#activity-execution).
- **[Start-To-Close Timeout](/activities#start-to-close-timeout):** is the maximum time allowed for a single [Activity Task Execution](/workers#activity-task-execution).
- **[Schedule-To-Start Timeout](/activities#schedule-to-start-timeout):** is the maximum amount of time that is allowed from when an [Activity Task](/workers#activity-task) is scheduled to when a [Worker](/workers#worker) starts that Activity Task.

<!-- CONTENT-->

### How to set an Activity Retry Policy {#activity-retries}

<!-- CONTENT-->