Skip to content

[docs] Add workflows to .NET client doc#1019

Merged
halspang merged 11 commits into
dapr:masterfrom
hhunter-ms:issue_1016
Feb 8, 2023
Merged

[docs] Add workflows to .NET client doc#1019
halspang merged 11 commits into
dapr:masterfrom
hhunter-ms:issue_1016

Conversation

@hhunter-ms
Copy link
Copy Markdown
Contributor

Signed-off-by: Hannah Hunter hannahhunter@microsoft.com

Description

Add example of workflow calling to .NET Client doc

Issue reference

PR will close: #1016

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
@hhunter-ms hhunter-ms requested review from a team as code owners February 1, 2023 19:43
@hhunter-ms
Copy link
Copy Markdown
Contributor Author

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 1, 2023

Codecov Report

Merging #1019 (baf1a0b) into master (22ac4c5) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1019   +/-   ##
=======================================
  Coverage   69.45%   69.45%           
=======================================
  Files         162      162           
  Lines        5432     5432           
  Branches      585      585           
=======================================
  Hits         3773     3773           
  Misses       1519     1519           
  Partials      140      140           
Flag Coverage Δ
net6 69.38% <ø> (ø)
net7 69.38% <ø> (ø)
netcoreapp3.1 69.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Comment thread daprdocs/content/en/dotnet-sdk-docs/dotnet-client/_index.md Outdated
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
```csharp
var daprClient = new DaprClientBuilder().Build();

// Start workflow
Copy link
Copy Markdown
Contributor

@RyanLettieri RyanLettieri Feb 2, 2023

Choose a reason for hiding this comment

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

string instanceId;
string workflowComponentName;
string workflowName;
object input ;

It might be helpful to add all of these above "//Start workflow" to give the user a better idea as to what variable types everything is.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't bother with a CancellationToken cts local variable. Just pass CancellationToken.None directly as the last input of StartWorkflowAsync.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If we're using CancellationToken.None I'd rather just use the default variable. I worry that this implies that you have to use a CancellationToken instead of having it as optional.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, good point. In that case, let’s remove both the options variable and the cancellation token.

hhunter-ms and others added 2 commits February 2, 2023 16:09
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Comment thread daprdocs/content/en/dotnet-sdk-docs/dotnet-client/_index.md Outdated
Comment thread daprdocs/content/en/dotnet-sdk-docs/dotnet-client/_index.md Outdated
Copy link
Copy Markdown
Contributor

@halspang halspang left a comment

Choose a reason for hiding this comment

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

Two small comments.

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Comment thread daprdocs/content/en/dotnet-sdk-docs/dotnet-client/_index.md Outdated
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
halspang
halspang previously approved these changes Feb 7, 2023
Comment thread daprdocs/content/en/dotnet-sdk-docs/dotnet-client/_index.md Outdated
Comment thread daprdocs/content/en/dotnet-sdk-docs/dotnet-client/_index.md Outdated
Comment thread daprdocs/content/en/dotnet-sdk-docs/dotnet-client/_index.md Outdated
Comment thread daprdocs/content/en/dotnet-sdk-docs/dotnet-client/_index.md Outdated
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
@halspang halspang merged commit bc3ec80 into dapr:master Feb 8, 2023
RyanLettieri pushed a commit to RyanLettieri/dotnet-sdk that referenced this pull request Feb 10, 2023
* add workflows to client page

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
halspang pushed a commit that referenced this pull request Feb 10, 2023
…ity. (#1020)

* Workflow Management - Initial Methods (#1003)

Initial work for workflows DotNET SDK

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Beefed up the workflows example program and added in statestore functionality

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Addressing a bunch of review comments

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updates to readme and demo for workflows

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Changed webapp to console app

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Update DurableTask SDK dependency to get ARM64 compatibility (#1024)

* Update DurableTask SDK dependency to get ARM64 compatibility

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* Fix issue with gRPC address override behavior

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Remove Web APIs and web dependencies

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Renaming WorkflowWebApp to WorkflowConsoleApp

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Various updates to the sample app

- Replaced DaprClient with WorkflowEngineClient
- Removed unused etag logic
- Fixed incorrect usage of certain model types
- Cleaned up logs and console output
- Simplified program loop
- Cleaned up console output and added some coloring
- Added error handling in the console interactions
- Various other tweaks/simplifications/enhancements

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updates to README and demo http commands

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Make README copy/paste-able and some other minor tweaks

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Adding in Paul's devcontainer work

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* More README touch-ups

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* [docs] Add workflows to .NET client doc (#1019)

* add workflows to client page

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating workflows readme and example

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Fixing README for letting users know which .NET is needed

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* moving using statements above the namespace

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

---------

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Co-authored-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Co-authored-by: Chris Gillum <cgillum@microsoft.com>
Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
yash-nisar pushed a commit to yash-nisar/dotnet-sdk that referenced this pull request Feb 27, 2023
* add workflows to client page

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
yash-nisar pushed a commit to yash-nisar/dotnet-sdk that referenced this pull request Feb 27, 2023
…ity. (dapr#1020)

* Workflow Management - Initial Methods (dapr#1003)

Initial work for workflows DotNET SDK

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Beefed up the workflows example program and added in statestore functionality

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Addressing a bunch of review comments

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updates to readme and demo for workflows

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Changed webapp to console app

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Update DurableTask SDK dependency to get ARM64 compatibility (dapr#1024)

* Update DurableTask SDK dependency to get ARM64 compatibility

Signed-off-by: Chris Gillum <cgillum@microsoft.com>

* Fix issue with gRPC address override behavior

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Remove Web APIs and web dependencies

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Renaming WorkflowWebApp to WorkflowConsoleApp

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Various updates to the sample app

- Replaced DaprClient with WorkflowEngineClient
- Removed unused etag logic
- Fixed incorrect usage of certain model types
- Cleaned up logs and console output
- Simplified program loop
- Cleaned up console output and added some coloring
- Added error handling in the console interactions
- Various other tweaks/simplifications/enhancements

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updates to README and demo http commands

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Make README copy/paste-able and some other minor tweaks

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Adding in Paul's devcontainer work

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* More README touch-ups

Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* [docs] Add workflows to .NET client doc (dapr#1019)

* add workflows to client page

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Updating workflows readme and example

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* Fixing README for letting users know which .NET is needed

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

* moving using statements above the namespace

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>

---------

Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Signed-off-by: Chris Gillum <cgillum@microsoft.com>
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Co-authored-by: Ryan Lettieri <ryanLettieri@microsoft.com>
Co-authored-by: Chris Gillum <cgillum@microsoft.com>
Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Workflows

4 participants