workflow-kotlin icon indicating copy to clipboard operation
workflow-kotlin copied to clipboard

Resolve render(workflow) inconsistencies

Open rjrjr opened this issue 4 years ago • 2 comments

// This is the fundamental API. 
// rendered method here requires output type to be Action<...>
let result = MyWorkflow()
    .mapOutput { … }
    .rendered(with: context, key: “key”)

// Convenience for the above,  and probably /maybe the 90% use case
let result = MyWorkflow()
    .rendered(
        with: context,
        key: “key”,
        onOutput: { … }
    )

Unclear, though, what impact the mapOutput call has / should have on workflow equivalence. While sorting this out, keep in mind the intimately related conversation in square/workflow#961. It would be pretty odd to land in different places.

Also slightly related to square/workflow#544?

This change should also be applied to Workers. See square/workflow-kotlin#611.

rjrjr avatar Mar 04 '20 00:03 rjrjr

Decision is to keep mapOutput on the swift side.

dhavalshreyas avatar Jul 02 '20 21:07 dhavalshreyas

We decided to remove this from 1.0 in kotlin since it just added work and confusion and we didn't think this was a very important detail to converge on.

zach-klippenstein avatar Jul 05 '20 17:07 zach-klippenstein