Skip to content

Remove CallableTaskFactory indirection from CallableTaskBuilder#1552

Open
mdproctor wants to merge 1 commit into
open-workflow-specification:mainfrom
mdproctor:refactor/remove-callable-task-factory
Open

Remove CallableTaskFactory indirection from CallableTaskBuilder#1552
mdproctor wants to merge 1 commit into
open-workflow-specification:mainfrom
mdproctor:refactor/remove-callable-task-factory

Conversation

@mdproctor

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the two-step init()CallableTaskFactory.get() pattern on CallableTaskBuilder with a single build() method that returns CallableTask directly
  • Deletes the CallableTaskFactory interface from the public API
  • Updates all six implementations and the CallTaskExecutor call site

Motivation

CallableTaskFactory is a Supplier<CallableTask> whose .get() is called immediately after init() returns — no implementation uses the deferred construction. Every implementation already captures all state in the lambda closure returned from init(), so the factory layer adds a public type, an allocation, and a concept to the API surface with no behavioral benefit.

After this change:

  • Smaller public API — one fewer type for implementors to learn and maintain. Third-party CallableTaskBuilder implementations (e.g. in Quarkus Flow) drop the factory wrapper and return CallableTask directly.
  • Simpler call siteCallTaskExecutorBuilder stores a CallableTask directly instead of holding a factory and deferring .get().
  • No behavioral change — same data in, same CallableTask out. All existing tests pass.

Test plan

  • mvn verify — all 232 tests pass (one pre-existing flaky SchedulerTest.testAfter timing test passes on rerun)
  • No remaining references to CallableTaskFactory in the codebase

🤖 Generated with Claude Code

@mdproctor
mdproctor requested a review from fjtirado as a code owner July 22, 2026 12:10
Replace the two-step init()/factory.get() pattern with a single
build() method that returns CallableTask directly. This eliminates
the CallableTaskFactory type from the public API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mdproctor
mdproctor force-pushed the refactor/remove-callable-task-factory branch from 9b37c04 to 422918c Compare July 22, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant