Add support for workflow output setting#67
Conversation
| Expression<Func<TWorkflow, TerminateTaskInput>> input | ||
| ) => AddAndReturnBuilder(new TerminateTaskBuilder(reference.Body, input.Body)); | ||
|
|
||
| public void SetOutput<F>(Expression<Func<TWorkflow, F>> input) where F : WorkflowOutput |
There was a problem hiding this comment.
Shouldn't this method be parameterized with the type already specified as wf output?
There was a problem hiding this comment.
There is no point in specifying workflow output then.
There was a problem hiding this comment.
TWorkflow is ITypedWorkflow here and there is no compile time relationship with the input and output parameters. But, I will move this PR back to draft and try to think of some better way.
There was a problem hiding this comment.
You are right, I did not notice that.
There was a problem hiding this comment.
I think it makes sense to introduce a constraint for TWorkflow to be of type Workflow<TInput, TOutput>. Technically that would break SemVer rules but in this particular case it is highly unlikely anyone will be affected.
There was a problem hiding this comment.
I kind of implemented this, but I am not really happy with how it works. Take a look
There was a problem hiding this comment.
This is ok, I think there is no other way of implementing this. I guess at some point we will drop this builder and use one with specific types but we will see.
This PR should allow setting workflow outputs by combining the outputs of various tasks and workflow inputs.