Skip to content

[Fix #1507] Loading HttpRequestDecorator from WorkflowAdditionaObject#1508

Merged
fjtirado merged 1 commit into
serverlessworkflow:mainfrom
fjtirado:Fix_#1507
Jul 2, 2026
Merged

[Fix #1507] Loading HttpRequestDecorator from WorkflowAdditionaObject#1508
fjtirado merged 1 commit into
serverlessworkflow:mainfrom
fjtirado:Fix_#1507

Conversation

@fjtirado

@fjtirado fjtirado commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Fix #1507

Copilot AI review requested due to automatic review settings July 1, 2026 10:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses #1507 by enabling HttpRequestDecorator instances to be provided at the application level (via WorkflowApplication “additional objects”), rather than only via ServiceLoader, allowing decorators to hold application-scoped state.

Changes:

  • Load and sort HttpRequestDecorator instances in HttpExecutorBuilder, combining application-provided decorators with ServiceLoader decorators, and pass them into HttpExecutor.
  • Extend WorkflowApplication.Builder with a withAdditionalObject(String, Supplier<T>) overload and add a corresponding additionalObject(String) accessor.
  • Add unit tests covering WorkflowAdditionalObject and supplier-based additional objects.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/HttpExecutorBuilder.java Loads request decorators from application additional objects + ServiceLoader, sorts them, and supplies them to HttpExecutor.
impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/HttpExecutor.java Accepts request decorators as a constructor parameter instead of loading via ServiceLoader.
impl/core/src/main/java/io/serverlessworkflow/impl/WorkflowApplication.java Adds supplier-backed additional objects (withAdditionalObject(..., Supplier<T>) + additionalObject(String)).
impl/core/src/test/java/io/serverlessworkflow/impl/WorkflowAdditionalObjectTest.java Adds tests for both WorkflowAdditionalObject (bi-function) and supplier-based additional objects.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings July 1, 2026 14:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

…lowAdditionaObject

Signed-off-by: fjtirado <ftirados@ibm.com>
Copilot AI review requested due to automatic review settings July 2, 2026 15:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

@fjtirado fjtirado merged commit c1a724e into serverlessworkflow:main Jul 2, 2026
4 of 5 checks passed
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.

Allow loading of HttpRequestDecorator as additionalObject

3 participants