Replies: 1 comment
-
To create a sample workflow JSON that returns an HTTP response with the content type {
"name": "Sample JSON Response Workflow",
"activities": [
{
"name": "SomeActivity",
"type": "SomeActivityType",
"properties": {
// ... properties specific to this activity
},
"outputs": {
"Done": {
"outcome": "Done",
"nextActivityName": "WriteJsonResponse"
}
}
},
{
"name": "WriteJsonResponse",
"type": "WriteHttpResponse",
"properties": {
"StatusCode": {
"syntax": "Literal",
"expression": "200"
},
"ContentType": {
"syntax": "Literal",
"expression": "application/json"
},
"Content": {
"syntax": "Json",
"expression": "${lastResult()}" // Assuming lastResult() is a function that gets the result of the last activity
}
}
}
],
"connections": [
{
"sourceActivityName": "SomeActivity",
"targetActivityName": "WriteJsonResponse",
"outcome": "Done"
}
]
} In this JSON:
Please note that the actual function or method to retrieve the last activity result depends on the specifics of the workflow system you are using. You may need to refer to the documentation of your workflow system to find the correct expression to use. This comment was generated by Glime. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Please provide sample workflow json for returning HTTPResponse with content type application/json. Content needs to set values from last activity result
Beta Was this translation helpful? Give feedback.
All reactions