-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automated PR from rhdhorchestrator/serverless-workflows#335
- Loading branch information
Showing
4 changed files
with
121 additions
and
1 deletion.
There are no files selected for viewing
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
12 changes: 12 additions & 0 deletions
12
charts/greeting/templates/01-configmap_greeting-props.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
data: | ||
application.properties: |2 | ||
quarkus.flyway.migrate-at-start=true | ||
kind: ConfigMap | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app: greeting | ||
sonataflow.org/workflow-app: greeting | ||
name: greeting-props |
20 changes: 20 additions & 0 deletions
20
charts/greeting/templates/02-configmap_01-greeting-resources-schemas.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: v1 | ||
data: | ||
greeting.sw.input-schema.json: | | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"properties": { | ||
"language": { | ||
"title": "Language", | ||
"description": "Language to greet", | ||
"type": "string", | ||
"enum": ["English", "Spanish"], | ||
"default": "English" | ||
} | ||
} | ||
} | ||
kind: ConfigMap | ||
metadata: | ||
creationTimestamp: null | ||
name: 01-greeting-resources-schemas |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
apiVersion: sonataflow.org/v1alpha08 | ||
kind: SonataFlow | ||
metadata: | ||
annotations: | ||
sonataflow.org/description: YAML based greeting workflow | ||
sonataflow.org/expressionLang: jsonpath | ||
sonataflow.org/profile: prod | ||
sonataflow.org/version: "1.0" | ||
creationTimestamp: null | ||
labels: | ||
app: greeting | ||
sonataflow.org/workflow-app: greeting | ||
name: greeting | ||
spec: | ||
flow: | ||
annotations: | ||
- workflow-type/infrastructure | ||
dataInputSchema: | ||
failOnValidationErrors: true | ||
schema: schemas/greeting.sw.input-schema.json | ||
functions: | ||
- name: greetFunction | ||
operation: sysout | ||
type: custom | ||
start: | ||
stateName: ChooseOnLanguage | ||
states: | ||
- dataConditions: | ||
- condition: ${$.[?(@.language == 'English')]} | ||
transition: | ||
nextState: GreetInEnglish | ||
- condition: ${$.[?(@.language == 'Spanish')]} | ||
transition: | ||
nextState: GreetInSpanish | ||
defaultCondition: | ||
transition: | ||
nextState: GreetInEnglish | ||
name: ChooseOnLanguage | ||
type: switch | ||
- data: | ||
greeting: 'Hello from YAML Workflow, ' | ||
name: GreetInEnglish | ||
transition: | ||
nextState: GreetPerson | ||
type: inject | ||
- data: | ||
greeting: 'Saludos desde YAML Workflow, ' | ||
name: GreetInSpanish | ||
transition: | ||
nextState: GreetPerson | ||
type: inject | ||
- actionMode: sequential | ||
actions: | ||
- actionDataFilter: | ||
useResults: true | ||
functionRef: | ||
arguments: | ||
message: $.greeting $.name | ||
invoke: sync | ||
refName: greetFunction | ||
name: greetAction | ||
end: | ||
terminate: true | ||
name: GreetPerson | ||
type: operation | ||
podTemplate: | ||
container: | ||
resources: {} | ||
image: quay.io/orchestrator/serverless-workflow-greeting:67f743039643807ca6e6e7a284c22658856c92c7 | ||
resources: | ||
configMaps: | ||
- configMap: | ||
name: 01-greeting-resources-schemas | ||
workflowPath: schemas | ||
persistence: | ||
postgresql: | ||
secretRef: | ||
name: sonataflow-psql-postgresql | ||
userKey: postgres-username | ||
passwordKey: postgres-password | ||
serviceRef: | ||
name: sonataflow-psql-postgresql | ||
port: 5432 | ||
databaseName: sonataflow | ||
databaseSchema: greeting | ||
status: | ||
address: {} | ||
lastTimeRecoverAttempt: null |