You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/serverless-logic-building-deploying-workflow-preview-mode.adoc
+20-53
Original file line number
Diff line number
Diff line change
@@ -12,70 +12,28 @@ You can create a `SonataFlow` custom resource (CR) on {ocp-product-title} and {S
12
12
13
13
* You have an {ServerlessLogicOperatorName} installed on your cluster.
14
14
* You have access to an {ServerlessLogicProductName} project with the appropriate roles and permissions to create applications and other workloads in {ocp-product-title}.
15
+
* You have installed the {ServerlessLogicProductName}`kn-workflow` CLI plugin.
15
16
* You have installed the OpenShift CLI `(oc)`.
16
17
17
18
.Procedure
18
19
19
-
. Create a workflow YAML file similar to the following:
20
-
+
21
-
[source,yaml]
22
-
----
23
-
apiVersion: sonataflow.org/v1alpha08
24
-
kind: SonataFlow
25
-
metadata:
26
-
name: greeting
27
-
annotations:
28
-
sonataflow.org/description: Greeting example on k8s!
29
-
sonataflow.org/version: 0.0.1
30
-
spec:
31
-
flow:
32
-
start: ChooseOnLanguage
33
-
functions:
34
-
- name: greetFunction
35
-
type: custom
36
-
operation: sysout
37
-
states:
38
-
- name: ChooseOnLanguage
39
-
type: switch
40
-
dataConditions:
41
-
- condition: "${ .language == \"English\" }"
42
-
transition: GreetInEnglish
43
-
- condition: "${ .language == \"Spanish\" }"
44
-
transition: GreetInSpanish
45
-
defaultCondition: GreetInEnglish
46
-
- name: GreetInEnglish
47
-
type: inject
48
-
data:
49
-
greeting: "Hello from JSON Workflow, "
50
-
transition: GreetPerson
51
-
- name: GreetInSpanish
52
-
type: inject
53
-
data:
54
-
greeting: "Saludos desde JSON Workflow, "
55
-
transition: GreetPerson
56
-
- name: GreetPerson
57
-
type: operation
58
-
actions:
59
-
- name: greetAction
60
-
functionRef:
61
-
refName: greetFunction
62
-
arguments:
63
-
message: ".greeting+.name"
64
-
end: true
65
-
----
66
-
67
-
. Apply the `SonataFlow` workflow definition to your {ocp-product-title} namespace by running the following command:
20
+
. In your project application directory, execute the following command:
.Example command for the `greetings-workflow.yaml` file:
27
+
This command generates {ocp-product-title} YAML manifests based on your `workflow.sw.json|yaml` definition. Default location is `<project_application_dir>/manifests` directory.
28
+
You can modify these files to your liking, however when you run above command again, the changes are going to be overwritten. Use `--custom-generated-manifests-dir` or `-c` flag to generate the files in different location.
29
+
30
+
. Deploy the `SonataFlow` workflow application to your {ocp-product-title} namespace by running the following command:
Copy file name to clipboardExpand all lines: modules/serverless-logic-deploying-workflows-dev-mode.adoc
+15-52
Original file line number
Diff line number
Diff line change
@@ -12,69 +12,32 @@ You can deploy your local workflow on {ocp-product-title} in Dev mode. You can u
12
12
13
13
* You have {ServerlessLogicOperatorName} installed on your cluster.
14
14
* You have access to a {ServerlessLogicProductName} project with the appropriate roles and permissions to create applications and other workloads in {ocp-product-title}.
15
+
* You have installed the {ServerlessLogicProductName}`kn-workflow` CLI plugin.
15
16
* You have installed the OpenShift CLI `(oc)`.
16
17
17
18
.Procedure
18
19
19
-
. Create the workflow configuration YAML file.
20
+
. Login to your cluster
20
21
+
21
-
.Example `workflow-dev.yaml` file
22
-
[source,yaml]
23
-
----
24
-
apiVersion: sonataflow.org/v1alpha08
25
-
kind: SonataFlow
26
-
metadata:
27
-
name: greeting <1>
28
-
annotations:
29
-
sonataflow.org/description: Greeting example on k8s!
0 commit comments