Created
April 15, 2020 12:02
-
-
Save tsurdilo/2f1151428cd2a508d6eb18a2e6dad4a4 to your computer and use it in GitHub Desktop.
example updates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
***************** runtime updates -- application properties: | |
org.kogito.serverless.examples.CountriesService/mp-rest/url=https://restcountries.eu/rest | |
org.kogito.serverless.examples.CountriesService/mp-rest/scope=javax.inject.Singleton | |
# serverless workflow properties | |
kogito.sw.functions.countryInfoFunction.interface=org.kogito.serverless.examples.CountriesResource | |
kogito.sw.functions.countryInfoFunction.operation=jsonName | |
kogito.sw.functions.classifySmallMediumFunction.interface=org.kogito.serverless.examples.CountriesClassifierResource | |
kogito.sw.functions.classifySmallMediumFunction.operation=classifySmallMedium | |
kogito.sw.functions.classifyLargeFunction.interface=org.kogito.serverless.examples.CountriesClassifierResource | |
kogito.sw.functions.classifyLargeFunction.operation=classifyLarge | |
******************* Process (minus the metadata) : | |
{ | |
"id": "jsonservicecall", | |
"version": "1.0", | |
"name": "Service Call Workflow", | |
"description": "JSON based service call workflow", | |
"functions": [ | |
{ | |
"name": "countryInfoFunction", | |
"type": "service" | |
}, | |
{ | |
"name": "classifySmallMediumFunction", | |
"type": "service" | |
}, | |
{ | |
"name": "classifyLargeFunction", | |
"type": "service" | |
} | |
], | |
"states": [ | |
{ | |
"name": "GetCountryInfo", | |
"type": "OPERATION", | |
"start": { | |
"kind": "DEFAULT" | |
}, | |
"actionMode": "SEQUENTIAL", | |
"actions": [ | |
{ | |
"name": "getCountryInfo", | |
"functionRef": { | |
"refName": "countryInfoFunction" | |
} | |
} | |
], | |
"transition": { | |
"nextState": "ClassifyByPopulation" | |
} | |
}, | |
{ | |
"name": "ClassifyByPopulation", | |
"type": "SWITCH", | |
"choices": [ | |
{ | |
"path": "$.population", | |
"value": "20000000", | |
"operator": "LessThan", | |
"transition": { | |
"nextState": "ClassifyAsSmallOrMedium" | |
} | |
}, | |
{ | |
"path": "$.population", | |
"value": "20000000", | |
"operator": "GreaterThanEquals", | |
"transition": { | |
"nextState": "ClassifyAsLarge" | |
} | |
} | |
], | |
"default": { | |
"nextState": "ClassifyAsSmallOrMedium" | |
} | |
}, | |
{ | |
"name": "ClassifyAsSmallOrMedium", | |
"type": "OPERATION", | |
"actionMode": "SEQUENTIAL", | |
"actions": [ | |
{ | |
"name": "classifyIntoSmallOrMedium", | |
"functionRef": { | |
"refName": "classifySmallMediumFunction" | |
} | |
} | |
], | |
"end": { | |
"kind": "DEFAULT" | |
} | |
}, | |
{ | |
"name": "ClassifyAsLarge", | |
"type": "OPERATION", | |
"actionMode": "SEQUENTIAL", | |
"actions": [ | |
{ | |
"name": "classifyIntoLarge", | |
"functionRef": { | |
"refName": "classifyLargeFunction" | |
} | |
} | |
], | |
"end": { | |
"kind": "DEFAULT" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
branch swservicesexamplesquarkus