Executes a workflow and waits for it to complete before returning the result
The name of the workflow to execute
The payload to send to the workflow
(Optional) The workflowId to use. Must be unique
The name of the task queue to send the workflow to
(Optional) The max time to wait for the execution, defaults to 30s
The workflow result
The workflow execution id
The output of the workflow, null if workflow failed
An object with information about the trace generated by the execution
The workflow execution status
completed, failed Error message if workflow failed, null otherwise