Hello again!
So I’ve been playing around with the code and understanding the APIs that exist in the compose webapp. I am currently trying to get a return value from the workflows as shown in the attached image. Is there a way to set a variable in a workflow and get it to return in a custom piece of code or component I define?
The response from the workflow exec endpoint should return the final scope of the workflow execution, so all your variables should be in there; for example:
{
"response": {
"results": {
"a": {
"@value": 10,
"@type": "Integer"
},
"eventType": {
"@value": "onManual",
"@type": "String"
},
"invoker": {
"@value": {},
"@type": "Any"
},
"resourceType": {
"@value": "system",
"@type": "String"
},
"runner": {
"@value": {},
"@type": "Any"
}
}
}
}
This is from the POST $BASE_DOMAIN/api/automation/workflows/$WORKFLOW_ID/exec
endpoint