Deploying your SonataFlow projects using Serverless Logic Web Tools

You can deploy your SonataFlow projects to an OpenShift instance using the OpenShift integration. The OpenShift integration allows you to test your implementations in a live environment.

The deployments described in this document are for development purposes, but not for production.

Deploying your first SonataFlow project

You can deploy your first SonataFlow project to an OpenShift instance and run the project in a live environment.

Prerequisites
Procedure
  1. Create a project using an example application in GitHub.

    You can use the serverless-workflow-greeting-quarkus example application, which does not contain external dependencies and is easy to test and comprehend.

    The serverless-workflow-greeting-quarkus example application contains a single operation state with one action, sending request to the greeting function. In the example application, the workflow data is assumed to be the name of the person to greet, and the result is the greeting for the person. The result is added to the state data, which later becomes the workflow data output.

  2. On the editor page, click Try on OpenShift button.

  3. On the context menu, click Deploy "greetings" (SonataFlow).

    A modal appears, displaying the following deployment options:

    • Deploy as a project: This option is available if your current workspace contains the entire project structure including a single pom.xml file.

      • If Deploy as a project option is disabled, a pre-built image container, containing a Quarkus project is used and the workflow files are placed in the src/main/resources folder of the project. In this case, ensure that the workflow files do not have other dependencies as the dependencies are not included in the deployment.

      • If Deploy as a project option is enabled, all the workflow files are deployed as-is, indicating that no project template is used. Therefore, ensure that the project is deployable.

    • Upload OpenAPI spec to Service Registry: After a workflow is deployed, an OpenAPI specification is available in the deployed service. When you check this option, the Serverless Logic Web Tools fetches the OpenAPI specification, and when ready, the OpenAPI specification is uploaded to your configured service registry. To use this option, you need to configure your service account and service registry on the Settings page. To configure the service account and service registry, see Integrating with Red Hat OpenShift Application and Data Services.

  4. Uncheck all options and click Confirm.

    A pop-up appears displaying Your deployment has been successfully started and will be available shortly. Please do not close this browser tab until the operation is completed. message. Clicking on the OpenShift deployments icon shows your deployment status. The deployment process takes a few minutes since a build needs to be completed before the services are active.

    OpenShift deployment status

    serverless logic web tools openshift deployments

Verifying the deployment status of your first project

After the deployment of your SonataFlow project is successful, you can verify various information about the deployed service.

Prerequisites
  • OpenShift integration is configured correctly.

  • Your SonataFlow project is deployed successfully.

  • Deployed project must be deployed using the Deploy as a project option as unchecked, as the deployment page is only available using the pre-built image container. If the option Deploy as a project option is checked the tool opens the index.html file your project provides, if any.

Procedure
  1. Click on the OpenShift deployments icon to view a list of deployments.

  2. If your deployment is successful (listed with white_check_mark), you can click on it and access the deployment page to check the Swagger UI, Open API specification, and Metrics page using DashBuilder.

    Serverless deployment page

    serverless logic web tools deployment page

Found an issue?

If you find an issue or any misleading information, please feel free to report it here. We really appreciate it!