Skip to content

Commit

Permalink
Merge pull request #12 from rgolangh/autopr-3425
Browse files Browse the repository at this point in the history
Automatic manifests generation from
  • Loading branch information
rgolangh authored Jan 14, 2024
2 parents 155d316 + 24ba315 commit 2021315
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
data:
greeting.sw.input-schema.json: |-
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"language": {
"type": "string"
}
}
}
kind: ConfigMap
metadata:
creationTimestamp: null
name: 01-greeting-resources
namespace: default
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apiVersion: sonataflow.org/v1alpha08
kind: SonataFlow
metadata:
annotations:
sonataflow.org/description: YAML based greeting workflow
sonataflow.org/expressionLang: jsonpath
sonataflow.org/version: "1.0"
creationTimestamp: null
labels:
app: greeting
sonataflow.org/workflow-app: greeting
name: greeting
namespace: default
spec:
flow:
dataInputSchema:
failOnValidationErrors: true
schema: specs/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
resources:
configMaps:
- configMap:
name: 01-greeting-resources
workflowPath: specs
podTemplate:
container:
image: quay.io/orchestrator/serverless-workflow-greeting:8dc7224f47325e380e72ac4555f4b2aa1d129e8a
status:
address: {}
lastTimeRecoverAttempt: null

0 comments on commit 2021315

Please sign in to comment.