e.sonataflow.sonataflow-quarkus-integration-test.10.0.0.source-code.greet.sw.json Maven / Gradle / Ivy
The newest version!
{
"id": "greet",
"version": "1.0",
"name": "Greeting workflow",
"expressionLang": "jsonpath",
"description": "JSON based greeting workflow",
"start": "ChooseOnLanguage",
"functions": [
{
"name": "greetFunction",
"type": "custom",
"operation": "sysout"
},
{
"name": "isEnglish",
"type": "expression",
"operation" : "$.[?(@.language == 'English')]"
}
],
"states": [
{
"name": "ChooseOnLanguage",
"type": "switch",
"dataConditions": [
{
"condition": "fn:isEnglish",
"transition": "GreetInEnglish"
},
{
"condition": "${ $.[?(@.language == 'Spanish')] }",
"transition": "GreetInSpanish"
}
],
"defaultCondition": {
"transition": "GreetInEnglish"
}
},
{
"name": "GreetInEnglish",
"type": "inject",
"data": {
"greeting": "Hello from JSON Workflow,"
},
"transition": "GreetPerson"
},
{
"name": "GreetInSpanish",
"type": "inject",
"data": {
"greeting": "Saludos desde JSON Workflow,"
},
"transition": "GreetPerson"
},
{
"name": "GreetPerson",
"type": "operation",
"actions": [
{
"name": "greetAction",
"functionRef": {
"refName": "greetFunction",
"arguments": {
"message": "$.greeting $.name"
}
}
}
],
"end": true
}
]
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy