ITADN

Allow to add custom `TaskOrchestrationFactory` and `TaskActivityFactory` factories

#1629Openmcruzdev 创建于 2026-01-29
M
mcruzdevcommented
# Context The current API does not allow a custom `TaskOrchestrationFactory` and `TaskActivityFactory`, when creating a `DurableTaskGrpcWorker` through: ```java public DurableTaskGrpcWorker build() { return new DurableTaskGrpcWorker(this); } ``` # Proposal It would be great, if we have a way to add custom factories to load `WorkflowActivity` or `Workflow` implementations through other mechanism, like CDI, by example. ## Possible implementation To change the `WorkflowRuntimeBuilder` builder adding a new method that adds a custom factories. For example: ```java public <T extends WorkflowActivity> WorkflowRuntimeBuilder registerTaskActivityFactory(String activityName, TaskActivityFactory taskActivityFactory) { return null; } public <T extends Workflow> WorkflowRuntimeBuilder registerTaskOrchestrationFactory(String orchestrationName, TaskOrchestrationFactory taskOrchestrationFactory) { return null; } ```
7 条评论