conductor-oss / conductor-oss/conductor
[Bug] Conductor search api does not return JSON string for inputs, it looks like it uses Map.toString()
- Dominant language
- Java
- Stars
- 32.2k
- Forks
- 1k
- Avg merge
- 2d
- Merged PRs (30d)
- 33
Description
**Describe the bug**
The JSON value that comes back from an API search of tasks does not provide the `inputs` attribute for tasks as a JSON.parse-able string. It appears to be a Map.toString() representation which is not really reversable without external libraries in Java (not to mention other languages that might use the API).
**Details**
Workflow def:
```
{
"createTime": 1763999284669,
"updateTime": 1767622045209,
"name": "Human event test",
"description": "Edit or extend this sample workflow. Set the workflow name to get started",
"version": 3,
"tasks": [
{
"name": "call_remote_api",
"taskReferenceName": "call_remote_api",
"inputParameters": {
"http_request": {
"uri": "https://orkes-api-tester.orkesconductor.com/api",
"method": "GET"
}
},
"type": "HTTP",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": [],
"onStateChange": {},
"permissive": false
},
{
"name": "human",
"taskReferenceName": "human_ref",
"inputParameters": {
"ITSM_CHANGE_ID": "CHG1234987",
"ITSM_BLOCKED": true
},
"type": "HUMAN",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": [],
"onStateChange": {},
"permissive": false
}
],
"inputParameters": [],
"outputParameters": {
"data": "${call_remote_api.output.response.body.data}",
"source": "${call_remote_api.output.response.body.source}"
},
"schemaVersion": 2,
"restartable": true,
"workflowStatusListenerEnabled": false,
"ownerEmail": "example@email.com",
"timeoutPolicy": "ALERT_ONLY",
"timeoutSeconds": 0,
"variables": {},
"inputTemplate": {},
"enforceSchema": true,
"metadata": {},
"maskedFields": []
}
```
**To Reproduce**
Steps to reproduce the behavior:
1. Define and start workflow
2. Call Task API: `GET https://conductor/api/tasks/search?query=taskType IN (HUMAN, HTTP)`
3. Examine result - snippet is below:
`"input": "{ITSM_CHANGE_ID=CHG1234987, ITSM_BLOCKED=true}",`
**Expected behavior**
I should be able to JSON.parse or the equivalent in my language and marshal the API result into the proper format. Right now, it's treated as `input: String` and should be `input: Map`
**Screenshots**
N/A
Contributor guide
Assessment
This issue has not been assessed yet.