dapr / python-sdk

Dapr SDK for Python
Apache License 2.0
222 stars 125 forks source link

[WORKFLOW SDK FEATURE REQUEST] more samples for dapr workflow #637

Closed lucus-sun closed 7 months ago

lucus-sun commented 10 months ago

Describe the WORKFLOW SDK feature

We only have a basic workflow sample that call several activities one by one, it's hard to learn how to use other advanced features. We should have more example codes including:

  1. How to use durable timers in workflow?
  2. How to use child workflows?
  3. All these workflow patterns should be in the sample folder of the python sdk with a main function that can run directly.

Without these examples, it's very hard to learn how to use dapr workflow. Hope this can be scheduled in v1.13.

cgillum commented 10 months ago

The workflow patterns examples have already been merged into this repo: https://github.com/dapr/python-sdk/pull/575.

You can find the workflow patterns samples here: https://github.com/dapr/python-sdk/tree/main/examples/workflow

I don't think there is currently a child workflow sample for Python, however. This is something that can be added.

rabollin commented 10 months ago

We do have multiple samples for Workflow scenarios in different repos that usually one can refer in addition to the pattern code samples shown in dapr docs here: https://docs.dapr.io/developing-applications/building-blocks/workflow/workflow-patterns/

Different DAPR repos where you can find the samples:

  1. https://github.com/dapr/samples
  2. https://github.com/dapr/python-sdk/tree/main/examples/workflow
  3. https://github.com/dapr/quickstarts
cgillum commented 10 months ago

The Python Workflow demo that I created for KubeCon can be found here: https://github.com/dapr/samples/tree/master/workflow-orderprocessing-python

dapr-bot commented 8 months ago

This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

dapr-bot commented 7 months ago

This issue has been automatically closed because it has not had activity in the last 67 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions.