Troubleshooting Workflow Process Service

If you see an error when you enable Workflow Process Service, try the following solutions.
Workflow Process Service requires an IBM® Cloud Pak for Business Automation installation, and integrates with components in Cloud Pak for Business Automation. If there is an issue related to the Cloud Pak for Business Automation installation, see Troubleshooting.

Getting the operator logs

The operator logs contain more information about the operator than Kuberenetes. To see the operator logs, run the following command:
kubectl logs deployment/ibm-cp4a-wfps-operator -c manager > operator.log

Workflow Process Service runtime server pod not ready

If the Workflow Process Service runtime server is not ready after waiting a long time, check the Workflow Process Service runtime server log by running the following command:
kubectl logs sts/<cr-name>-wfps-runtime-server -c manager > server.log 
If the runtime server is not ready and you see the following message in the log
org.postgresql.util.PSQLException: ERROR: role "yourdatabaserole" does not exist
then you must re-create the role and database for Workflow Process Service by running the following command in your database server. Do not put quotation marks around the role and database name.
create role <your_database_role> password '<your_password>' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
create database <your_database_name> owner <your_database_role>;

In PostgreSQL, if the role and database name are in quotation marks, they are treated as case-sensitive, which is not supported in Workflow Process Service.

Certificate trust issue

If you have a custom process application that cannot find the external service in the certificate trust list while connecting, you need to import the certificate. To import the certificate into your Workflow Process Service instance, you can use the spec.tls.serverTrustCertificateList parameter in the custom resource. You can enter a list of secrets, where each secret stores a trusted certificate using the Privacy Enhanced Mail (PEM) format. For example, a snippet of your custom resource might look similar to:
  tls:
    serverTrustCertificateList:
    - example_secret_02
    - example_secret_03 
To create a secret, run the following command:
kubectl create secret generic dummy_secret_01 --from-file=tls.crt=./cert.crt

Workflow Process Service runtime server pod not showing

If the full text search or federation capability is enabled in the custom resource, and you do not see the Workflow Process Service pod after the custom resource is deployed, you might see an error in the Workflow Process Service operator log similar to:

"spec.capabilities.fullTextSearch.esStorage.storageClassName must be set if spec.capabilities.fullTextSearch.enable is set to true. The StorageClass should be a block StorageClass."

The following is a snippet from the custom resource that shows the full text search and federation capability enabled:

spec:
  capabilities:
    fullTextSearch:
      enable: true
    federate:
      enable: true 

The problem might be caused by not installing Elasticsearch before deploying Workflow Process Service when capabilities.fullTextSearch.enable is set to true. You must add capabilities.fullTextSearch.esStorage and capabilities.fullTextSearch.esSnapshotStorage to the custom resource YAML file. The StorageClass for Elasticsearch and Elasticsearch snapshot should create the storage type of the PVs in block mode rather than file system mode.

Workflow Process Service workplace console not available

When you access the Workflow Process Service workplace console, you might get the following message: `Error 404 - Not Found`. This error means that the zenextension custom resource for Workflow Process Service is not synchronized with the Cloud Pak Platform UI (Zen). To re-synchronize the Cloud Pak Platform UI service (Zen) with the Workflow Process Service zenextension configuration, complete the following steps:
  1. Get the zenextension object by running the following command:
    oc get zenextension | grep wfps
    You might get an output similar to:
    wfps-instance1-wfps-zen-extension 33d
  2. Delete the Workflow Process Service zenextension object by running the following command:
    oc delete zenextension wfps-instance1-wfps-zen-extension
The Workflow Process Service operator will automatically recreate the zenextension object and Cloud Pak Platform UI (Zen) will attempt to synchronize the zenextension configuration again.

Workflow Process Service workplace console dashboard not installed

When you access the Workflow Process Service workplace console for the first time after the Workflow Process Service instance is deployed, you might see the "No dashboard is installed" message on the browser page. You might also get a notification that Workflow Process Service server pod restarted once when checking the pod status. For example:
NAME                                                              READY   STATUS              RESTARTS   AGE
wfps-instance1-wfps-runtime-server-0                              1/1     Running             1          2h
The error means that the database is not in a consistent state. You must clean the database and redeploy the Workflow Process Service custom resource with the following startup probe setting:
  node:
    probe:
      startupProbe:
        failureThreshold: 30
        periodSeconds: 40
        successThreshold: 1
        timeoutSeconds: 20 
If you are using the default EDB PostgreSQL cluster, make sure that the EDB PostgreSQL persistent volume claim (PVC) is deleted before redeploying your Workflow Process Service instance.