第1章 Getting started


1.1. Creating and running workflows with Knative Workflow plugin

You can create and run the OpenShift Serverless Logic workflows locally.

1.1.1. Creating a workflow

You can use the create command with kn workflow to set up a new OpenShift Serverless Logic project in your current directory.

Prerequisites

  • You have installed the OpenShift Serverless Logic kn-workflow CLI plugin.

Procedure

  1. Create a new OpenShift Serverless Logic workflow project by running the following command:

    $ kn workflow create

    By default, the generated project name is new-project. You can change the project name by using the [-n|--name] flag as follows:

    Example command

    $ kn workflow create --name my-project

1.1.2. 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 OpenShift Serverless Logic workflow project in your current directory.

Prerequisites

  • You have installed the OpenShift Serverless Logic kn-workflow CLI plugin.
  • You have created an OpenShift Serverless Logic workflow project.

Procedure

  1. Generate operator manifests for your OpenShift Serverless Logic workflow project by running the following command:

    $ kn workflow gen-manifest

    This creates a new file in the ./manifests directory in your project.

  2. Apply the generated operator manifest to your cluster by running the following command:

    $ oc apply -f manifests/01-sonataflow_hello.yaml -n <namespace>

1.1.3. Running a workflow locally

You can use the run command with kn workflow to build and run your OpenShift Serverless Logic workflow project in your current directory.

Prerequisites

  • You have installed Podman on your local machine.
  • You have installed the OpenShift Serverless Logic kn-workflow CLI plugin.
  • You have created an OpenShift Serverless Logic workflow project.

Procedure

  1. From the directory where you created your OpenShift Serverless Logic project, move to your project directory by running the following command:

    $ cd ./<your-project-name>
  2. Run the following command to build and run your OpenShift Serverless Logic workflow project:

    $ kn workflow run

    When the project is ready, the Development UI automatically opens in your browser at localhost:8080/q/dev-ui and you will find the Serverless Workflow Tools tile available. Alternatively, you can access the tool directly using http://localhost:8080/q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/workflows.

注記

You can execute a workflow locally using a container that runs on your machine. Stop the container with Ctrl+C.

1.1.4. Creating a Quarkus workflow project

注記

For most workflow creation and deployment scenarios, use the Operator with the kn-workflow plugin. Quarkus workflow projects are intended for development or advanced use cases.

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 Red Hat build of Quarkus documentation.

Prerequisites

  • You have installed the OpenShift Serverless Logic kn-workflow CLI plugin.

Procedure

  1. Create a new Quarkus workflow project by running the following command:

    $ 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 as follows:

    $ kn workflow quarkus create --name <your-project-name>
    注記

    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.

  2. Optional: Add one or more extensions to the Quarkus project by running the command with the --extension flag as follows:

    $ kn workflow quarkus create --extension quarkus-jsonp,quarkus-smallrye-openapi

    You can include multiple extensions as a comma-separated list. For example, the following command adds the quarkus-jsonp and quarkus-smallrye-openapi extensions:

    $ kn workflow quarkus create --extension quarkus-jsonp,quarkus-smallrye-openapi
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る