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

Example using child workflows #568

Closed
sce9sc opened this issue Feb 1, 2024 · 6 comments
Closed

Example using child workflows #568

sce9sc opened this issue Feb 1, 2024 · 6 comments
Labels
documentation Improvements or additions to documentation stale

Comments

@sce9sc
Copy link

sce9sc commented Feb 1, 2024

Since, according to the documentation, having a workflow that spawns many workers is not ideal and the proposed solution is to have child workflows can you please point me to the right direction on how to implement a workflow that schedules other workworkflows as child workflows.

Also according to the documentation

Because child workflows are independent of their parents, terminating
 a parent workflow does not affect any child workflows. 
You must terminate each child workflow independently using its instance ID.

How do you accomplish the above ?

Thanks,
Great work.

@shubham1172
Copy link
Member

Hi @sce9sc, you can see callSubWorkflow here to call a child-workflow.

public callSubWorkflow<TInput, TOutput>(

Please see https://github.com/dapr/python-sdk/blob/main/examples/demo_workflow/app.py#L59 for an example in Python SDK.

We need to add an example in this SDK as well. Please feel free to drop a PR if you are willing to contribute 🙂

@shubham1172 shubham1172 added the documentation Improvements or additions to documentation label Feb 1, 2024
@sce9sc
Copy link
Author

sce9sc commented Feb 1, 2024

Thanks I will try to create an example . I've seen that there is a test that I can use also .

I saw that child workflows needs to be registrered together with the parent workflows. And the parrent workflow can then call that workflow. What if I wanted that child workflow to be written in another language ? How can this be accomplished. The reason behind this is that I might want to create an orchestration workflow in one language and the child workflows in another.

Sincerely thank you for your prompt replies.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Apr 1, 2024

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 dapr-bot added the stale label Apr 1, 2024
@shubham1172
Copy link
Member

/keep-alive

@dapr-bot dapr-bot removed the stale label Apr 2, 2024
@dapr-bot
Copy link
Collaborator

dapr-bot commented Jun 1, 2024

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 dapr-bot added the stale label Jun 1, 2024
@dapr-bot
Copy link
Collaborator

dapr-bot commented Jun 8, 2024

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.

@dapr-bot dapr-bot closed this as completed Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation stale
Projects
None yet
Development

No branches or pull requests

3 participants