diff --git a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/README.md index 64d683bd69..d6a0ac8e1e 100644 --- a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/README.md @@ -81,3 +81,8 @@ once completed, it should return: } ``` +### Building and Deploying Workflow using CLI + Kogito Serverless Workflow Operator +For this prepare your environment by following the instructions from [here](). + +Refer to [Serverless Workflow Guide](), to know how to build and deploy workflows using CLI + Kogito Serverless Workflow Operator. +Refer to [Serverless Workflow Guide](https://kiegroup.github.io/kogito-docs/serverlessworkflow/latest/cloud/index.html), to know more about Kogito Serverless Workflow Operator. diff --git a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/operator/01-sonataflow_foreach.yaml b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/operator/01-sonataflow_foreach.yaml new file mode 100755 index 0000000000..92b23d70c8 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/operator/01-sonataflow_foreach.yaml @@ -0,0 +1,54 @@ +apiVersion: sonataflow.org/v1alpha08 +kind: SonataFlow +metadata: + annotations: + sonataflow.org/description: An example of how to use for each state + sonataflow.org/expressionLang: jq + sonataflow.org/profile: dev + sonataflow.org/version: "" + creationTimestamp: null + labels: + app: foreach + name: foreach + namespace: operatordemo +spec: + flow: + functions: + - name: printMessage + operation: sysout + type: custom + - name: increase + operation: .item + 1 + type: expression + start: + stateName: start + states: + - actions: + - actionDataFilter: + useResults: true + functionRef: + invoke: sync + refName: increase + name: increase + - actionDataFilter: + useResults: true + functionRef: + arguments: + message: .item + invoke: sync + refName: printMessage + name: printAction + end: + terminate: true + inputCollection: .input + iterationParam: item + mode: parallel + name: start + outputCollection: .output + stateDataFilter: + output: '{output: .output}' + type: foreach + resources: {} +status: + address: {} + lastTimeRecoverAttempt: null diff --git a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/foreach.sw.json b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/foreach.sw.json index 837f1b08f7..5532eed27f 100644 --- a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/foreach.sw.json +++ b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/foreach.sw.json @@ -1,6 +1,6 @@ { "id": "foreach", - "version": "1.0", + "specVersion": "0.8", "name": "Workflow ForEach example", "description": "An example of how to use for each state", "start": "start",