Skip to content

Commit

Permalink
[KOGITO-9324] - Testing CLI + Operator using serverless-workflow-fore…
Browse files Browse the repository at this point in the history
…ach-quarkus (#1687)

* [KOGITO-9324] - Testing Operator using serverless-workflow-foreach-quarkus

* [KOGITO-9324]-Added yaml file to Operator

* Apply suggestions from code review

Co-authored-by: Tristan Radisson <[email protected]>

* [KOGITO-9324]- Updated README and json

* [KOGITO-9324]- Updated sonataflow

* Fix spec version

Co-authored-by: Francisco Javier Tirado Sarti <[email protected]>

---------

Co-authored-by: Tristan Radisson <[email protected]>
Co-authored-by: Ricardo Zanini <[email protected]>
Co-authored-by: Francisco Javier Tirado Sarti <[email protected]>
  • Loading branch information
4 people authored Aug 15, 2023
1 parent c8c8ac7 commit a286988
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit a286988

Please sign in to comment.