mirror of
https://github.com/apache/incubator-kie-kogito-examples.git
synced 2025-08-06 15:20:20 +08:00

* kie-kogito-examples-2041: Implement a getting started example for operator use case Adds example to serverless-operator-examples, that explains basic use cases of workflow plugin CLI and showcases how to run, deploy and deploy with custom configuration on local environment or remote cluster env. * Update serverless-operator-examples/README.md Co-authored-by: Gonzalo Muñoz <gonzalo51429@gmail.com> * Update serverless-operator-examples/serverless-workflow-get-random-catfact/README.md Co-authored-by: Gonzalo Muñoz <gonzalo51429@gmail.com> * Update serverless-operator-examples/serverless-workflow-get-random-catfact/README.md * kogito-example-2041: Add note about retrieval URL on different clusters * kogito-examples-2041: Improve steps and NOTE for routes * kogito-examples-2041: Improve steps and example profiles better * kogito-examples-2041: Remove timeouts --------- Co-authored-by: Gonzalo Muñoz <gonzalo51429@gmail.com>
71 lines
1.5 KiB
JSON
71 lines
1.5 KiB
JSON
{
|
|
"id": "getCatFactInformation",
|
|
"version": "1.0",
|
|
"specVersion": "0.8.0",
|
|
"name": "Get cat fact",
|
|
"description": "Description",
|
|
"start": "GreetOrCatFact",
|
|
"functions": [
|
|
{
|
|
"name": "getCatFact",
|
|
"operation": "specs/catfacts.json#getRandomFact"
|
|
},
|
|
{
|
|
"name": "sysOutFunction",
|
|
"type": "custom",
|
|
"operation": "sysout"
|
|
}
|
|
],
|
|
"states": [
|
|
{
|
|
"name": "GreetOrCatFact",
|
|
"type": "switch",
|
|
"dataConditions": [
|
|
{
|
|
"condition": "${ .fact == \"random\"}",
|
|
"transition": "GetRandomFact"
|
|
}
|
|
],
|
|
"defaultCondition": {
|
|
"transition": "GetOneStaticFact"
|
|
}
|
|
},
|
|
{
|
|
"name": "GetOneStaticFact",
|
|
"type": "inject",
|
|
"data": {
|
|
"message": "Cats are very cute"
|
|
},
|
|
"transition": "PrintTheFact"
|
|
},
|
|
{
|
|
"name": "GetRandomFact",
|
|
"type": "operation",
|
|
"actions": [
|
|
{
|
|
"name": "getRandomFact",
|
|
"functionRef": {
|
|
"refName": "getCatFact"
|
|
}
|
|
}
|
|
],
|
|
"transition": "PrintTheFact"
|
|
},
|
|
{
|
|
"name": "PrintTheFact",
|
|
"type": "operation",
|
|
"actions": [
|
|
{
|
|
"name": "greetAction",
|
|
"functionRef": {
|
|
"refName": "sysOutFunction",
|
|
"arguments": {
|
|
"message": "${\"Fact is that: \" + .message + .fact }"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"end": true
|
|
}
|
|
]
|
|
} |