Skip to content

Commit

Permalink
[KOGITO-9082] - [KSW-Operator] Review the Workflow CRD API (#118)
Browse files Browse the repository at this point in the history
Signed-off-by: Spolti <[email protected]>
  • Loading branch information
spolti authored May 16, 2023
1 parent b03ca35 commit 3760827
Show file tree
Hide file tree
Showing 14 changed files with 11,604 additions and 11,142 deletions.
3 changes: 2 additions & 1 deletion api/v1alpha08/kogitoserverlessworkflow_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ import (

// KogitoServerlessWorkflowSpec defines the desired state of KogitoServerlessWorkflow
type KogitoServerlessWorkflowSpec struct {
model.Workflow `json:",inline"`
// +kubebuilder:validation:Required
Flow model.Workflow `json:"flow"`
}

// KogitoServerlessWorkflowStatus defines the observed state of KogitoServerlessWorkflow
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha08/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

108 changes: 55 additions & 53 deletions bundle/manifests/kogito-serverless-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,63 +31,65 @@ metadata:
"name": "greeting"
},
"spec": {
"functions": [
{
"name": "greetFunction",
"operation": "sysout",
"type": "custom"
}
],
"start": "ChooseOnLanguage",
"states": [
{
"dataConditions": [
{
"condition": "${ .language == \"English\" }",
"transition": "GreetInEnglish"
"flow": {
"functions": [
{
"name": "greetFunction",
"operation": "sysout",
"type": "custom"
}
],
"start": "ChooseOnLanguage",
"states": [
{
"dataConditions": [
{
"condition": "${ .language == \"English\" }",
"transition": "GreetInEnglish"
},
{
"condition": "${ .language == \"Spanish\" }",
"transition": "GreetInSpanish"
}
],
"defaultCondition": "GreetInEnglish",
"name": "ChooseOnLanguage",
"type": "switch"
},
{
"data": {
"greeting": "Hello from JSON Workflow, "
},
{
"condition": "${ .language == \"Spanish\" }",
"transition": "GreetInSpanish"
}
],
"defaultCondition": "GreetInEnglish",
"name": "ChooseOnLanguage",
"type": "switch"
},
{
"data": {
"greeting": "Hello from JSON Workflow, "
"name": "GreetInEnglish",
"transition": "GreetPerson",
"type": "inject"
},
"name": "GreetInEnglish",
"transition": "GreetPerson",
"type": "inject"
},
{
"data": {
"greeting": "Saludos desde JSON Workflow, "
{
"data": {
"greeting": "Saludos desde JSON Workflow, "
},
"name": "GreetInSpanish",
"transition": "GreetPerson",
"type": "inject"
},
"name": "GreetInSpanish",
"transition": "GreetPerson",
"type": "inject"
},
{
"actions": [
{
"functionRef": {
"arguments": {
"message": ".greeting+.name"
{
"actions": [
{
"functionRef": {
"arguments": {
"message": ".greeting+.name"
},
"refName": "greetFunction"
},
"refName": "greetFunction"
},
"name": "greetAction"
}
],
"end": true,
"name": "GreetPerson",
"type": "operation"
}
]
"name": "greetAction"
}
],
"end": true,
"name": "GreetPerson",
"type": "operation"
}
]
}
}
}
]
Expand Down
Loading

0 comments on commit 3760827

Please sign in to comment.