Understanding Workflow Services Status Conditions

This document describes the Status and Conditions of a SonataFlow object managed by the SonataFlow Operator.

Kubernetes Status is an important property to observe in order to understand what is currently happening with the object. It can also help you troubleshoot or integrate with other objects in the cluster.

You can inspect the Status of any Workflow object using the following command:

Checking the Workflow Status
kubectl get workflow <your_workflow_name> -n <your_namespace> -o jsonpath={.status}

General Status

The table below lists the general structure of a Workflow status:

Table 1. Description of SonataFlow Status object
Status Description

ObservedGeneration

Last object generation observed by the operator

Conditions

Current observed Workflow Conditions

Address

External or internal Workflow access endpoint. Implements the Knative Addressable Interface

RecoverFailureAttempts

How many attempts the operator tried to recover from a failure

The Conditions property might vary depending on the Workflow profile. The next sections describe the current implementation.

Development Profile Conditions

When you deploy a Workflow with the development profile, the operator deploys a ready-to-use container with a running Workflow instance.

The following table lists the possible Conditions.

Table 2. Conditions Scenarios in Development
Condition Status Reason Description

Built

Unknown

In development profile there’s no build process, so this state remains in Unknown status

Running

True

The Workflow is running and in healthy state

Running

False

WaitingForDeployment

The Workflow is waiting for the underlying deployment object to have a minimum availability

Running

False

DeploymentFailure

There was a problem with the underlying deployment object. Check the message in this Condition and the Workflow Pod logs for more info

Running

False

DeploymentIsUnavailable

The underlying deployment object doesn’t have the minimum availability for this Workflow. Check the message in this condition and the Workflow Pod logs for more info

Running

False

AttemptToRedeployFailed

If the Workflow Deployment is not available, the operator will try to rollout the Deployment three times before entering this stage. Check the message in this Condition and the Workflow Pod logs for more info

In normal conditions, the Workflow will transition from Running, WaitingForDeployment condition to Running. In case something wrong happens, consult the section Workflow Troubleshooting in Development.

Production Profile Conditions

Deploying the Workflow in Production profile makes the operator build an immutable image for the Workflow application. The progress of the immutable image build can be followed by observing the Workflow Conditions.

Table 3. Condition Scenarios in Production
Condition Status Reason Description

Built

False

BuildIsRunningReason

The build is currently running

Built

False

BuildFailedReason

The build has failed and any attempts to have it run failed

Built

True

Last build has finished successfully

Running

True

The Workflow is running and in healthy state

Running

False

WaitingForPlatform

The Workflow can’t have a Pod running until a SonataFlowPlatform is ready

Running

False

WaitingForBuildReason

The Workflow is waiting for the build to finish to start running

Running

False

WaitingForDeployment

The Workflow is waiting for the underlying Deployment object to have a minimum availability

Running

False

DeploymentFailure

There was a problem with the underlying Deployment object. Check the message in this Condition and the Workflow Pod logs for more info

Running

False

DeploymentIsUnavailable

The underlying Deployment object doesn’t have the minimum availability for this Workflow. Check the message in this Condition and the Workflow Pod logs for more info

Running

False

AttemptToRedeployFailed

If the Workflow Deployment is not available, the operator will try to roll out the Deployment three times before entering this stage. Check the message in this Condition and the Workflow Pod logs for more info

When building an image for a Workflow resource, a SonataFlowBuild will first be created and the operator will wait for the associated build to finish. Once the build is complete, the Workflow transitions to the deployment phase, which will provide a new Workflow service Pod to run with the built image.

Found an issue?

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