workflow-kotlin
workflow-kotlin copied to clipboard
Resolve render(workflow) inconsistencies
// 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.
Decision is to keep mapOutput
on the swift side.
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.