cli icon indicating copy to clipboard operation
cli copied to clipboard

[Feature Request] Add `temporal workflow result`

Open lorensr opened this issue 2 years ago • 2 comments

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"
}

lorensr avatar May 19 '23 22:05 lorensr

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.

bergundy avatar May 25 '23 21:05 bergundy

what's the use-case for rc 1 for failed/non-successful workflows? This behavior seems a bit ambiguous

feedmeapples avatar Aug 01 '23 02:08 feedmeapples