-
Notifications
You must be signed in to change notification settings - Fork 239
Support dynamic activity and workflow implementations #543
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
Comments
Hi, is there some progress? |
We have not prioritized this because there haven't been many requests. Are you needing dynamic activity/workflow support? In almost all cases, a properly named/registered activity/workflow should be used and field in the parameter can be provided to take different paths. Can you describe your use case (here or in Slack or in forum)? |
Sorry, something went wrong.
@cretz can you share an example of what you describe ? |
Something like: func FallthroughWorkflow(ctx workflow.Context) error {
workflow.GetLogger(ctx).Info("Called workflow: " + workflow.GetInfo(ctx).WorkflowType.Name)
}
func FallthroughActivity(ctx context.Context) error {
activity.GetLogger(ctx).Info("Called activity: " + activity.GetInfo(ctx).ActivityType.Name)
}
func Register(worker worker.Worker) error {
worker.RegisterWorkflowWithOptions(FallthroughWorkflow, workflow.RegisterOptions{Dynamic: true})
worker.RegisterActivityWithOptions(FallthroughActivity, activity.RegisterOptions{Dynamic: true})
} So basically that workflow or activity is called when one for the specific name is not found. |
Hi, We are also looking at support for dynamic activity registration for Go. Would be great if you can provide some ETA? Thanks, |
I think we need to do the |
Any updates on this ? |
No updates. If you can, we strongly recommend using explicit activities/workflows and using activity/workflow input to decide what to do inside the body instead of dynamic even when dynamic is available. But it is understood in some use cases like DSLs and such that dynamic is needed. |
Is your feature request related to a problem? Please describe.
In some cases, activity and workflow implementations should be loaded dynamically.
Describe the solution you'd like
Expose an extension point for dynamic activity loading. This issue is created to ensure feature parity among SDK's where temporalio/sdk-java#245 already implements this for Java.
Additional context
In Dynamic activities registration at runtime and worker splitting on the community forum @mfateev requested another user to create this issue, but that never happened AFAIK. Hence this issue.
The text was updated successfully, but these errors were encountered: