conductor-oss / conductor-oss/conductor
[FEATURE] Add ReturnStrategy for SYNC API /execute which will only return output instead of returning output and task of every subworkflow and tasks
- Dominant language
- Java
- Stars
- 32.2k
- Forks
- 1k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 37
Description
### The feature, motivation and pitch
Is your feature request related to a problem? Please describe. Currently, when executing a workflow synchronously using the /execute/{name}/{version} API (or the corresponding Conductor client method), the response always returns the entire SignalResponse(or WorkflowRun) object. This includes a large amount of metadata, such as the workflow ID, correlation ID, task details, status, timestamps, and input data. In many use-cases, the caller executing the workflow synchronously is only interested in the output data produced by the workflow. Parsing the entire metadata payload just to extract the output adds unnecessary overhead, bandwidth usage, and complexity for the client.
Describe the solution you'd like I propose adding a new value to the WorkflowSignalReturnStrategy enum called TARGET_WORKFLOW_OUTPUT. When a client calls the /execute API with returnStrategy=TARGET_WORKFLOW_OUTPUT, the Conductor backend should return only the output map of the completed workflow (or a minimized response object OutputOnlyRun that serializes cleanly to contain just the output map and core identifiers like workflowId and requestId).
This change will allow clients to perform synchronous workflow executions and immediately receive back just the exact output data they computed, vastly simplifying integration in scenarios where Conductor is being used for synchronous distributed computation.
Describe alternatives you've considered Adding a separate boolean flag (e.g. ?returnOutputOnly=true) to the /execute endpoint. However, since the API already has an existing construct for shaping the return payload (WorkflowSignalReturnStrategy), adding a new strategy enum value is cleaner and backward-compatible without adding new query parameters.
### Alternatives
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Start at the synchronous /execute/{name}/{version} API and the WorkflowSignalReturnStrategy enum, then trace how SignalResponse or WorkflowRun is assembled for the Conductor client. Define the TARGET_WORKFLOW_OUTPUT response behavior and verify that the completed workflow returns only its output map while preserving the stated core identifiers and existing strategies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100