-
Notifications
You must be signed in to change notification settings - Fork 49
Labels
Description
What would you like to be added:
To have a better experience on handling workflow data.
Actually we need to have this one:
agent("scoreSubmission",
(uniqueId, proposal) -> reviewer.scoreSubmission(proposal), Proposal.class)
.outputAs(buildSubmissionOutput(), Long.class),
// ...
private static JavaContextFunction<Long, ScoreSubmissionOutput> buildSubmissionOutput() {
return (score, workflowContext) ->
new ScoreSubmissionOutput(score, workflowContext.instanceData().input().as(Proposal.class).orElseThrow());
}For every time we need to get the workflowContext.instanceData().input() we need to write a lot. It would be great if we have something more easy, like:
.outputAs((WorfklowModel inputModel, T lastState), Class<T> lastStateClass);
.inputFrom((WorfklowModel inputModel, T lastState), Class<T> lastStateClass);
.outputAs((WorfklowModel inputModel), Class<T> outputClass);
.inputFrom((WorfklowModel inputModel), Class<T> outputClass);
Why is this needed:
To make give a better experience when developing workflow with DSL
Reactions are currently unavailable