Skip to content

Allow to add custom TaskOrchestrationFactory and TaskActivityFactory factories #1629

@mcruzdev

Description

@mcruzdev

Context

The current API does not allow a custom TaskOrchestrationFactory and TaskActivityFactory, when creating a DurableTaskGrpcWorker through:

  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:

  public <T extends WorkflowActivity> WorkflowRuntimeBuilder registerTaskActivityFactory(String activityName, TaskActivityFactory taskActivityFactory) {
    return null;
  }

  public <T extends Workflow> WorkflowRuntimeBuilder registerTaskOrchestrationFactory(String orchestrationName, TaskOrchestrationFactory taskOrchestrationFactory) {
    return null;
  }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions