e.sonataflow.sonataflow-quarkus-integration-test.10.0.0.source-code.fahrenheit-to-celsius.sw.json Maven / Gradle / Ivy
The newest version!
{
"id": "fahrenheit_to_celsius",
"name": "Fahrenheit to Celsius Conversion Flow",
"version": "v1.0",
"start": "SetConstants",
"extensions" : [ {
"extensionid": "workflow-uri-definitions",
"definitions": {
"multiplication": "specs/multiplication.yaml",
"subtraction": "specs/subtraction.yaml"
}
}
],
"functions": [
{
"name": "multiplication",
"operation": "multiplication#Do Operation"
},
{
"name": "subtraction",
"operation": "subtraction#Do Operation"
}
],
"states": [
{
"name": "SetConstants",
"type": "inject",
"data": {
"subtractValue": 32.0,
"multiplyValue": 0.5556
},
"transition": "Computation"
},
{
"name": "Computation",
"actionMode": "sequential",
"type": "operation",
"stateDataFilter": {
"output": "${ .[\"celsius\"] = .product | del(.subtractValue, .product, .multiplyValue, .difference) }"
},
"actions": [
{
"name": "subtract",
"functionRef": {
"refName": "subtraction",
"arguments": "{leftElement: .fahrenheit, rightElement: .subtractValue}"
}
},
{
"name": "multiply",
"functionRef": {
"refName": "multiplication",
"arguments": { "pepe":"pepa", "leftElement": ".difference", "rightElement": ".multiplyValue" }
}
}
],
"end": {
"terminate": "true"
}
}
]
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy