Skip to content

Python SDK docs are outdated #4410

Closed
@guybartal

Description

@guybartal

What content needs to be created or modified?

In the new SDK version, a set of decorators were introduced which simplifies the way you register activities and workflows.

Describe the solution you'd like

an updated documentation will all parameters per class and its methods, plus example which uses the new decorators,
and also, all the possible methods of DaprWorkflowContext, not only call_activity but also create_timer, call_child_workflow, wait_for_external_event, continue_as_new, when_all, when_any

the same goes for DaprWorkflowClient, not only schedule_new_workflow but also for raise_workflow_event, terminate_workflow, pause_workflow, resume_workflow.

@wfr.activity(name='activity_name')
def my_activity(ctx: wf.DaprWorkflowContext, input: any):
  pass

@wfr.workflow(name='workflow_name')
def my_workflow(ctx: wf.DaprWorkflowContext, input: any):
  pass

Important note

I would also write some recommendations regarding scalability, when using workflows does it means that all activities should be in the same pod? do we call it synchronously or asynchronously? how each activity scale independently from other activities? should they be called via service invocation or pub/sub event to accomplish that or its built-in inside the workflow mechanism?

Where should the new material be placed?

here

The associated pull request from dapr/dapr, dapr/components-contrib, or other Dapr code repos

not yet

Additional context

@yaron2 's session

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions