cli
cli copied to clipboard
[Feature Request] Add `temporal workflow result`
Describe the solution you'd like
$ temporal workflow result -w foo
Workflow foo does not yet have a result. It is still running.
$ temporal workflow result -w foo
Workflow foo does not have a result. Its status is Terminated.
$ temporal workflow result -w foo
{
"resultFieldA": 42,
"resultFieldB": "bar"
}
I can see why this is useful. I don't like in you solution that the output is inconsistent, sometimes you get JSON, sometimes text. Also this doesn't take into account non JSON output, we'll need to figure out how to display that. If we do add this command, we might want to also allow waiting for the result to be avaialble. IMHO for non successful workflows, we'd want to return rc 1 and output to STDERR.
what's the use-case for rc 1 for failed/non-successful workflows? This behavior seems a bit ambiguous