| # |
| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| # |
| |
| apiVersion: sonataflow.org/v1alpha08 |
| kind: SonataFlow |
| metadata: |
| annotations: |
| sonataflow.org/description: An example of how to consume events over HTTP |
| sonataflow.org/expressionLang: jsonpath |
| sonataflow.org/profile: dev |
| sonataflow.org/version: "" |
| creationTimestamp: null |
| labels: |
| app: start |
| name: start |
| namespace: operatordemo |
| spec: |
| flow: |
| events: |
| - dataOnly: true |
| kind: consumed |
| name: startEvent |
| type: start |
| - dataOnly: true |
| kind: consumed |
| name: moveEvent |
| type: move |
| functions: |
| - name: printMessage |
| operation: sysout |
| type: custom |
| start: |
| stateName: printWaitMessage |
| states: |
| - exclusive: true |
| name: printWaitMessage |
| onEvents: |
| - actionMode: sequential |
| actions: |
| - actionDataFilter: |
| useResults: true |
| functionRef: |
| arguments: |
| message: $[*] |
| invoke: sync |
| refName: printMessage |
| name: printAfterStart |
| eventDataFilter: |
| useData: true |
| eventRefs: |
| - startEvent |
| transition: |
| nextState: waitForEvent |
| type: event |
| - end: |
| terminate: true |
| exclusive: true |
| name: waitForEvent |
| onEvents: |
| - actionMode: sequential |
| actions: |
| - actionDataFilter: |
| useResults: true |
| functionRef: |
| arguments: |
| message: $[*] |
| invoke: sync |
| refName: printMessage |
| name: printAfterEvent |
| eventDataFilter: |
| useData: true |
| eventRefs: |
| - moveEvent |
| type: event |
| resources: {} |
| status: |
| address: {} |
| lastTimeRecoverAttempt: null |