[Fix #1507] Loading HttpRequestDecorator from WorkflowAdditionaObject#1508
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
HttpRequestDecoratorinstances inHttpExecutorBuilder, combining application-provided decorators withServiceLoaderdecorators, and pass them intoHttpExecutor. - Extend
WorkflowApplication.Builderwith awithAdditionalObject(String, Supplier<T>)overload and add a correspondingadditionalObject(String)accessor. - Add unit tests covering
WorkflowAdditionalObjectand 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.
fjtirado
commented
Jul 1, 2026
mcruzdev
approved these changes
Jul 2, 2026
mcruzdev
reviewed
Jul 2, 2026
…lowAdditionaObject Signed-off-by: fjtirado <ftirados@ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1507