Skip to content

Conversation

fjtirado
Copy link
Collaborator

@fjtirado fjtirado commented Oct 8, 2025

User can now specify java filter functions that accepts WorkflowContext and TaskContext in their signature.

Fix #863

…s additional params

User can now specify java filter functions that accepts WorkflowContext
and TaskContext in their signature.

Signed-off-by: fjtirado <ftirados@redhat.com>
@fjtirado fjtirado requested a review from ricardozanini October 8, 2025 12:34
new TimeoutAfter()
.withDurationInline(
new DurationInline().withMilliseconds(10)))))))
.withOutput(
Copy link
Collaborator Author

@fjtirado fjtirado Oct 8, 2025

Choose a reason for hiding this comment

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

Output associated to a workflow, we specify the two arguments function.
Important thing to know is that TaskContext will be null if the three parameter function has been specified here (we should either document that or prevent user passing the three parameter function if the input/output/export is associated to the workflow)

.withOutput(
new Output()
.withAs(
new OutputAsFunction()
Copy link
Collaborator Author

@fjtirado fjtirado Oct 8, 2025

Choose a reason for hiding this comment

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

Output associated to the task, we call three parameter function without issue
We can also call the two/one parameter one if we want.

setObject(new TypedFunction<>(value, argClass));
return this;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Export also existed ;)

@ricardozanini ricardozanini merged commit 5dd9291 into serverlessworkflow:main Oct 8, 2025
3 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 passing WorkflowContext and TaskContext to input, output, export function for experimental lambda

2 participants