Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions modules/serverless-logic-creating-workflows-quarkus.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Module included in the following assemblies:
//
// * serverless/serverless-logic/serverless-logic-creating-managing-workflows.adoc

:_mod-docs-content-type: PROCEDURE
[id="serverless-logic-creating-workflows-quarkus_{context}"]
= Creating a Quarkus workflow project

You can use the `quarkus create` command with `kn workflow` to scaffold a new Quarkus workflow project in your current directory. You can also include additional Quarkus extensions during project creation.

For more information about Quarkus, see link:https://docs.redhat.com/en/documentation/red_hat_build_of_quarkus/latest[Red Hat build of Quarkus documentation].

.Prerequisites

* You installed the {ServerlessLogicProductName} `kn-workflow` CLI plugin.

.Procedure

. Create a new Quarkus workflow project by running the following command:
+
[source, teminal]
----
$ kn workflow quarkus create
----
+
By default, the generated project is named `new-project`. You can overwrite the project name by running the command with the `--name` flag:
+
[source, teminal]
----
$ kn workflow quarkus create --name <your-project-name>
----
+
[NOTE]
====
The generated project contains a minimal Quarkus workflow setup, including a sample `workflow.sw.json` file in `./<project-name>/src/main/resources/`.
First-time execution might take several minutes due to dependency downloads.
====

. Optional: Add more extensions to the Quarkus project by running the command with the `--extension` flag:
+
[source, teminal]
----
$ kn workflow quarkus create --extension quarkus-jsonp,quarkus-smallrye-openapi
----
+
You can include multiple extensions as a comma-separated list. The following example adds the `quarkus-jsonp` and `quarkus-smallrye-openapi` extensions:
+
[source, teminal]
----
$ kn workflow quarkus create --extension quarkus-jsonp,quarkus-smallrye-openapi
----
32 changes: 32 additions & 0 deletions modules/serverless-logic-generate-manifest.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Module included in the following assemblies:
//
// * serverless/serverless-logic/serverless-logic-creating-managing-workflows.adoc

:_mod-docs-content-type: PROCEDURE
[id="serverless-logic-generate-manifest_{context}"]
= Generating a list of Operator manifests

After creating your workflow project, you can use the `gen-manifest` command with `kn workflow` to generate operator manifest files for your {ServerlessLogicProductName} workflow project in your current directory.

.Prerequisites

* You have installed the {ServerlessLogicProductName} `kn-workflow` CLI plugin.
* You have created an {ServerlessLogicProductName} workflow project.

.Procedure

. Generate operator manifests for your {ServerlessLogicProductName} workflow project by running the following command:
+
[source,terminal]
----
$ kn workflow gen-manifest
----
+
This creates a new file in the `./manifests` directory in your project.

. Apply the generated operator manifest to your cluster by running the following command:
+
[source,terminal]
----
$ oc apply -f manifests/01-sonataflow_hello.yaml -n <namespace>
----
2 changes: 0 additions & 2 deletions modules/serverless-logic-running-workflows.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ When the project is ready, the Development UI automatically opens in your browse
====
You can execute a workflow locally using a container that runs on your machine. Stop the container with Ctrl+C.
====


Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ include::modules/serverless-logic-modifying-workflow-configuration.adoc[leveloff

include::modules/serverless-logic-modifying-managed-properties-workflow-services.adoc[leveloffset=+1]

include::modules/serverless-logic-defining-global-managed-properties.adoc[leveloffset=+1]
include::modules/serverless-logic-defining-global-managed-properties.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ toc::[]
You can create and run the {ServerlessLogicProductName} workflows locally.

include::modules/serverless-logic-creating-workflows.adoc[leveloffset=+1]
include::modules/serverless-logic-running-workflows.adoc[leveloffset=+1]

include::modules/serverless-logic-generate-manifest.adoc[leveloffset=+1]

include::modules/serverless-logic-running-workflows.adoc[leveloffset=+1]

include::modules/serverless-logic-creating-workflows-quarkus.adoc[leveloffset=+1]
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,3 @@ include::modules/serverless-logic-editing-workflows.adoc[leveloffset=+1]
include::modules/serverless-logic-testing-workflows.adoc[leveloffset=+1]
include::modules/serverless-logic-troubleshooting-workflows.adoc[leveloffset=+1]
include::modules/serverless-logic-deleting-workflows.adoc[leveloffset=+1]