Dockerized REST container fails creating schema

Hi!
I set up a docker compose but whatever I do, the REST container does not start properly and seems to fail during schema creation - because “a relation” alredy exists.

I guess the problem is relying 40cm in front of the screen, but I seem to be blind right now.
Maybe someone has an idea.
THX in advance!

flowable-rest-1     | 2025-02-03T11:20:35.714Z  INFO 1 --- [flowable-rest] [           main] o.f.e.impl.db.ProcessDbSchemaManager     : Upgrade needed: 7101 -> 7102. Looking for schema update resource for component 'history'
flowable-rest-1     | 2025-02-03T11:20:35.716Z  INFO 1 --- [flowable-rest] [           main] o.f.d.engine.impl.db.DmnDbSchemaManager  : performing create on dmn with resource org/flowable/dmn/db/create/flowable.postgres.create.dmn.sql
db-1                | 2025-02-03 11:20:35.717 UTC [65] ERROR:  relation "act_dmn_deployment" already exists
db-1                | 2025-02-03 11:20:35.717 UTC [65] STATEMENT:  CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP WITHOUT TIME ZONE, TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT "ACT_DMN_DEPLOYMENT_pkey" PRIMARY KEY (ID_))
db-1                | 2025-02-03 11:20:35.722 UTC [65] ERROR:  current transaction is aborted, commands ignored until end of transaction block
db-1                | 2025-02-03 11:20:35.722 UTC [65] STATEMENT:  CREATE TABLE ACT_DMN_DEPLOYMENT_RESOURCE (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), DEPLOYMENT_ID_ VARCHAR(255), RESOURCE_BYTES_ BYTEA, CONSTRAINT "ACT_DMN_DEPLOYMENT_RESOURCE_pkey" PRIMARY KEY (ID_))
flowable-rest-1     | 2025-02-03T11:20:35.719Z ERROR 1 --- [flowable-rest] [           main] o.f.d.engine.impl.db.DmnDbSchemaManager  : problem during schema create, statement CREATE TABLE ACT_DMN_DEPLOYMENT (ID_ VARCHAR(255) NOT NULL, NAME_ VARCHAR(255), CATEGORY_ VARCHAR(255), DEPLOY_TIME_ TIMESTAMP WITHOUT TIME ZONE, TENANT_ID_ VARCHAR(255), PARENT_DEPLOYMENT_ID_ VARCHAR(255), CONSTRAINT "ACT_DMN_DEPLOYMENT_pkey" PRIMARY KEY (ID_))
flowable-rest-1     | 
flowable-rest-1     | org.postgresql.util.PSQLException: ERROR: relation "act_dmn_deployment" already exists

docker-compose.yml

# 28000 DB
# 28001 IDM     http://localhost:28001/
# 28002 ADMIN   http://localhost:28002/
# 28003 MODELER http://localhost:28003/
# 28004 TASK    http://localhost:28004/flowable-task/
# 28005 REST    http://localhost:28005/

networks:
  flowable-net:

services:
  flowable-db:
    image: postgres
    environment:
      - POSTGRES_PASSWORD=flowable
      - POSTGRES_USER=flowable
      - POSTGRES_DB=flowable
    ports:
      - "28000:5432"
    networks:
      - flowable-net

  flowable-idm:
    image: flowable/flowable-idm:latest
    environment:
      - SERVER_PORT=8080
      - SERVER_SERVLET_CONTEXT_PATH=/
      - SPRING_DATASOURCE_DRIVER-CLASS-NAME=org.postgresql.Driver
      - SPRING_DATASOURCE_URL=jdbc:postgresql://flowable-db:5432/flowable
      - SPRING_DATASOURCE_USERNAME=flowable
      - SPRING_DATASOURCE_PASSWORD=flowable
      - FLOWABLE_IDM_APP_ADMIN_USER_ID=admin
      - FLOWABLE_IDM_APP_ADMIN_PASSWORD=test
      - FLOWABLE_IDM_APP_ADMIN_FIRST_NAME=UI
      - FLOWABLE_IDM_APP_ADMIN_LAST-NAME=Admin
      - FLOWABLE_REST_APP_ADMIN_USER_ID=rest-admin
      - FLOWABLE_REST_APP_ADMIN_PASSWORD=test
      - FLOWABLE_REST_APP_ADMIN_FIRST_NAME=Rest
      - FLOWABLE_REST_APP_ADMIN_LAST-NAME=Admin
    networks:
      - flowable-net
    ports:
      - "28001:8080"
    depends_on:
      - flowable-db
    entrypoint: ["./wait-for-something.sh", "flowable-db", "5432", "Database", "java", "-jar", "/app.war"]

  flowable-admin:
    image: flowable/flowable-admin:latest
    environment:
      - SERVER_PORT=8080
      - SERVER_SERVLET_CONTEXT_PATH=/
      - SPRING_DATASOURCE_DRIVER-CLASS-NAME=org.postgresql.Driver
      - SPRING_DATASOURCE_URL=jdbc:postgresql://flowable-db:5432/flowable
      - SPRING_DATASOURCE_USERNAME=flowable
      - SPRING_DATASOURCE_PASSWORD=flowable
      - FLOWABLE_COMMON_APP_IDM_URL=http://flowable-idm:8080/
      - FLOWABLE_COMMON_APP_IDM_REDIRECT_URL=http://localhost:28888/
      - FLOWABLE_COMMON_APP_IDM_ADMIN_USER=admin
      - FLOWABLE_COMMON_APP_IDM_ADMIN_PASSWORD=test
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_PROCESS_SERVER_ADDRESS=http://flowable-task
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_PROCESS_PORT=8080
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_PROCESS_USER_NAME=admin
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_PROCESS_PASSWORD=test
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_CMMN_SERVER_ADDRESS=http://flowable-task
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_CMMN_PORT=8080
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_CMMN_CONTEXT_ROOT=/
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_CMMN_PASSWORD=test
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_APP_SERVER_ADDRESS=http://flowable-task
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_APP_PORT=8080
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_APP_USER_NAME=admin
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_APP_PASSWORD=test
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_DMN_SERVER_ADDRESS=http://flowable-task
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_DMN_PORT=8080
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_DMN_USER_NAME=admin
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_DMN_PASSWORD=test
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_FORM_SERVER_ADDRESS=http://flowable-task
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_FORM_PORT=8080
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_FORM_USER_NAME=admin
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_FORM_PASSWORD=test
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_CONTENT_SERVER_ADDRESS=http://flowable-task
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_CONTENT_PORT=8080
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_CONTENT_USER_NAME=admin
      - FLOWABLE_ADMIN_APP_SERVER_CONFIG_CONTENT_PASSWORD=test
    networks:
      - flowable-net
    ports:
      - "28002:8080"
    depends_on:
      - flowable-db
      - flowable-idm
    entrypoint: ["./wait-for-something.sh", "flowable-db", "5432", "Database", "java", "-jar", "/app.war"]

  flowable-modeler:
    image: flowable/flowable-modeler:latest
    environment:
      - SERVER_PORT=8080
      - SERVER_SERVLET_CONTEXT_PATH=/
      - SPRING_DATASOURCE_DRIVER-CLASS-NAME=org.postgresql.Driver
      - SPRING_DATASOURCE_URL=jdbc:postgresql://flowable-db:5432/flowable
      - SPRING_DATASOURCE_USERNAME=flowable
      - SPRING_DATASOURCE_PASSWORD=flowable
      - FLOWABLE_COMMON_APP_IDM_URL=http://flowable-idm:8080/
      - FLOWABLE_COMMON_APP_IDM_REDIRECT_URL=http://localhost:28888/
      - FLOWABLE_COMMON_APP_IDM_ADMIN_USER=admin
      - FLOWABLE_COMMON_APP_IDM_ADMIN_PASSWORD=test
      - FLOWABLE_MODELER_APP_DEPLOYMENT_API_URL=http://flowable-task:8080/flowable-task/app-api
    networks:
      - flowable-net
    ports:
      - "28003:8080"
    depends_on:
      - flowable-db
      - flowable-idm
    entrypoint: ["./wait-for-something.sh", "flowable-db", "5432", "Database", "java", "-jar", "/app.war"]

  flowable-task:
    image: flowable/flowable-task:latest
    environment:
      - SERVER_PORT=8080
      - SPRING_DATASOURCE_DRIVER-CLASS-NAME=org.postgresql.Driver
      - SPRING_DATASOURCE_URL=jdbc:postgresql://flowable-db:5432/flowable
      - SPRING_DATASOURCE_USERNAME=flowable
      - SPRING_DATASOURCE_PASSWORD=flowable
      - FLOWABLE_COMMON_APP_IDM_URL=http://flowable-idm:8080/
      - FLOWABLE_COMMON_APP_IDM_REDIRECT_URL=http://localhost:28888/
      - FLOWABLE_COMMON_APP_IDM_ADMIN_USER=admin
      - FLOWABLE_COMMON_APP_IDM_ADMIN_PASSWORD=test
    networks:
      - flowable-net
    ports:
      - "28004:8080"
    depends_on:
      - flowable-db
      - flowable-idm
    entrypoint: ["./wait-for-something.sh", "flowable-db", "5432", "Database", "java", "-jar", "/app.war"]

  flowable-rest:
    image: flowable/flowable-rest:latest
    environment:
      - SERVER_PORT=8080
      - SPRING_DATASOURCE_DRIVER-CLASS-NAME=org.postgresql.Driver
      - SPRING_DATASOURCE_URL=jdbc:postgresql://flowable-db:5432/flowable
      - SPRING_DATASOURCE_USERNAME=flowable
      - SPRING_DATASOURCE_PASSWORD=flowable
      - FLOWABLE_REST_APP_ADMIN_USER-ID=rest-admin
      - FLOWABLE_REST_APP_ADMIN_PASSWORD=test
      - FLOWABLE_REST_APP_ADMIN_FIRST-NAME=Rest
      - FLOWABLE_REST_APP_ADMIN_LAST-NAME=Admin

    networks:
      - flowable-net
    ports:
      - "28005:8080"
    depends_on:
      - flowable-db
      - flowable-idm
    entrypoint: ["./wait-for-something.sh", "flowable-task", "8080", "flowable-task", "/flowable-entrypoint.sh"]

Hi,

couple of questions.
What version are you using?
Is the database clean?

Regards.

Yvo

Version(s) - this may already be a problem…

flowable-db-1.      |      PostgreSQL    17.2
flowable-idm-1      |   :: Flowable :: (v6.5.0)    :: Spring Boot ::  (v2.2.2.RELEASE)
flowable-admin-1    |   :: Flowable :: (v6.5.0)    :: Spring Boot ::  (v2.2.2.RELEASE)
flowable-modeler-1  |   :: Flowable :: (v6.5.0)    :: Spring Boot ::  (v2.2.2.RELEASE)
flowable-task-1     |   :: Flowable :: (v6.5.0)    :: Spring Boot ::  (v2.2.2.RELEASE)
flowable-rest-1     |   :: Flowable :: (v7.1.0)    :: Spring Boot ::  (v3.3.4)

The database is clean - but only can be initialized if I run the DB and the REST components without all the rest.

Should I downgrade do REST version <7? (Will try this now…)

Hi,

trying to initialize both Flowable Task and Flowable REST in the same schema won’t work.
They both contain the Flowable engines and will try to create the same database structure.
Also, Flowable Task contains the REST API. So Flowable REST is not needed.
You either run Flowable REST or Flowable Task.

Regards,

Yvo

1 Like

@yvo, but where do I find the docs and swagger and rest API/resources in the task module?
Is there some kind of documentation?

The Task app related documentation is no longer published online because that app is no longer maintained.
The REST API itself is documented. For example for the process engine; REST API · Flowable Open Source Documentation

The Swagger URl is described here;
https://hub.docker.com/r/flowable/flowable-rest

Regards,

Yvo

Then which stack should I use?
I need a process engine (BPMN), a task engine (BPMN), a DMN “engine”, REST endpoints, a modeler, an administrative interface, an IAM/IDP…

Is there an architectural drawing of the maintained flowable world also showing the deployable components…?
(Sorry for asking so many sideshow-questions in on this ticket… - Is there a chat-channel somewhere out there (like on Discord)?)

For a flowable-noob it seems a bit chaotic…

Hey @cptclarenceouvert,

Starting from Flowable 7 only the REST application and the engines are supported. The open source administrative interface (Admin), the IAM / IDP, the Task and the modeler are no longer supported.

For modeler you can use our Cloud Design (Model in the cloud | Flowable Platform | Free). You have unlimited access to BPMN, CMMN and DMN models when using our Cloud Design.

Cheers,
Filip

So there is no longer a full blown, autonomous, maintained version of all flowable modules available? This would mean I have to use enterprise cloud tools for administration and modelling. Correct?

The modeling environment is a hosted environment that is free to use.
The administration tool was a UI that used the REST endpoints that are still in the open source project.

Ich denke, dass the simplest and most robust solution is to deploy only one engine container (either flowable task or flowable REST) against a single, clean database.