Packages

Domain specific language based on Google Cloud Workflows

Current section

Files

Jump to
workflow_dsl examples workflow8.json
Raw

examples/workflow8.json

[
{
"init": {
"assign": [
{
"minTemp": -14.5
},
{
"maxTemp": -14.0
}
]
}
},
{
"storeNormalBodyTemp": {
"for": {
"value": "temp",
"range": [
"${minTemp}",
"${maxTemp}"
],
"steps": [
{
"checkTemp": {
"call": "http.get",
"args": {
"url": "${\"http://localhost:1234/isBodyTempNormal?temp=\" + string(temp)}"
},
"result": "isNormal"
}
},
{
"storeOrBreak": {
"switch": [
{
"condition": "${isNormal.body == \"true\"}",
"next": "storeTemp"
}
],
"next": "break"
}
},
{
"storeTemp": {
"call": "http.post",
"args": {
"headers": {
"Content-Type": "application/json",
"accept": "*/*"
},
"url": "${\"http://localhost:1234/storeTemp?temp=\" + string(temp)}"
},
"body": {
"args":{
"temp": "${temp}"
}
}
}
}
]
}
}
}
]