o.serverless-workflow-service-calls-quarkus.1.7.0.Final.source-code.countryservice.sw.json Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of serverless-workflow-service-calls-quarkus
Show all versions of serverless-workflow-service-calls-quarkus
Kogito Serverless Workflow Example - Quarkus
The newest version!
{
"id": "jsonservicecall",
"version": "1.0",
"name": "Service Call Workflow",
"description": "JSON based service call workflow",
"start": "GetCountryInfo",
"functions": [
{
"name": "countryInfoFunction",
"operation": "restcountries.json#getByName1"
},
{
"name": "classifySmallMediumFunction",
"metadata": {
"interface": "org.kogito.serverless.examples.CountriesClassifierResource",
"operation": "classifySmallMedium",
"type": "service"
}
},
{
"name": "classifyLargeFunction",
"metadata": {
"interface": "org.kogito.serverless.examples.CountriesClassifierResource",
"operation": "classifyLarge",
"type": "service"
}
}
],
"states": [
{
"name": "GetCountryInfo",
"type": "operation",
"actionMode": "sequential",
"actions": [
{
"name": "getCountryInfo",
"functionRef": {
"refName": "countryInfoFunction",
"arguments": {
"name": "$.name"
}
}
}
],
"transition": "ClassifyByPopulation"
},
{
"name": "ClassifyByPopulation",
"type": "switch",
"dataConditions": [
{
"condition": "{{ $.response[0].[?(@.population < 20000000)] }}",
"transition": "ClassifyAsSmallOrMedium"
},
{
"condition": "{{ $.response[0].[?(@.population >= 20000000)] }}",
"transition": "ClassifyAsLarge"
}
],
"default": {
"transition": "ClassifyAsSmallOrMedium"
}
},
{
"name": "ClassifyAsSmallOrMedium",
"type": "operation",
"actionMode": "sequential",
"actions": [
{
"name": "classifyIntoSmallOrMedium",
"functionRef": "classifySmallMediumFunction"
}
],
"end": true
},
{
"name": "ClassifyAsLarge",
"type": "operation",
"actionMode": "sequential",
"actions": [
{
"name": "classifyIntoLarge",
"functionRef": "classifyLargeFunction"
}
],
"end": true
}
]
}