Skip to content

Instantly share code, notes, and snippets.

@tsurdilo
Created April 15, 2020 12:02
Show Gist options
  • Save tsurdilo/2f1151428cd2a508d6eb18a2e6dad4a4 to your computer and use it in GitHub Desktop.
Save tsurdilo/2f1151428cd2a508d6eb18a2e6dad4a4 to your computer and use it in GitHub Desktop.
example updates
***************** 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"
}
}
]
}
@tsurdilo
Copy link
Author

branch swservicesexamplesquarkus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment