Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I hook jbpm up to kie-server for REST API usage? #35

Closed
NullVoxPopuli opened this issue Apr 17, 2018 · 3 comments
Closed

How do I hook jbpm up to kie-server for REST API usage? #35

NullVoxPopuli opened this issue Apr 17, 2018 · 3 comments

Comments

@NullVoxPopuli
Copy link

NullVoxPopuli commented Apr 17, 2018

I was reading: #29
and I was able to get the two showcase containers running.

docker run -p 8080:8080 -p 8001:8001 -d -e JAVA_OPTS="-Djava.net.preferIPv4Stack=true" --name jbpm-workbench jboss/jbpm-workbench-showcase:latest

docker run -p 8180:8080 -d --name kie-server -e JAVA_OPTS="-Djava.net.preferIPv4Stack=true" --link jbpm-workbench:kie_wb jboss/kie-server-showcase:latest

at http://localhost:8080/jbpm_console, I create a workflow, and deploy it and make sure the start checkbox is checked on deploy.

However, when I visit http://localhost:8180/kie-server/services/rest/server/containers

<response type="SUCCESS" msg="List of created containers">
  <kie-containers/>
</response>

My deployed project doesn't show up?
does kie not know how to communicate with jbpm?

docker logs <kie-server container id> shows a toooooon of exceptions:

13:27:14,414 ERROR [org.kie.server.remote.rest.jbpm.QueryDataResource] (default task-10) Unexpected error during processing Can't get metadata on specified data set: jbpmProcessInstances: org.dashbuilder.dataset.exception.DataSetLookupException: Can't get metadata on specified data set: jbpmProcessInstances
...
Caused by: org.h2.jdbc.JdbcSQLException: Column "LOG.SLA_DUE_DATE" not found; SQL statement:
...

14:17:18,246 ERROR [io.undertow.request] (default task-11) UT005023: Exception handling request to /kie-server/services/rest/server/containers/aoeu_1.0.2: org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.jsontype.impl.AsWrapperTypeDeserializer.<init>(Lcom/fasterxml/jackson/databind/JavaType;Lcom/fasterxml/jackson/databind/jsontype/TypeIdResolver;Ljava/lang/String;ZLjava/lang/Class;)
...
Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.jsontype.impl.AsWrapperTypeDeserializer.<init>(Lcom/fasterxml/jackson/databind/JavaType;Lcom/fasterxml/jackson/databind/jsontype/TypeIdResolver;Ljava/lang/String;ZLjava/lang/Class;)


Is there a guide anywhere to correctly get things working?

I feel a lot of the documentation for kie and jbpm assumes some knowledge of how kie and friends are supposed to interact with each other. I don't know much, but all I want is to have a rest api into jbpm.

Is there a volume that needs to be shared between the two docker containers?

I also have this docker-compose setup:

version: '3.4'
services:
  jbpm:
    image: jboss/jbpm-workbench-showcase
    ports:
      - '8080:8080'
      - '8081:8081'
      - '9990:9990'
    networks:
      - backoffice
    volumes:
      - type: bind
        source: ./deployment/local/config/niogit
        target: /opt/jboss/wildfly/bin/.niogit

  kie-server:
    image: jboss/kie-server-showcase
    ports:
      - '8180:8080'
    links:
      - jbpm:kie_wb
    networks:
      - backoffice


networks:
  internet:
  backoffice:

Thanks!

At the time of writing this:
jboss/jbpm-workbench-showcase is 7.7.0.Final
jboss/kie-server-showcase is 7.7.0.Final-3

$ docker --version
Docker version 18.03.0-ce, build 0520e24

$ lsb_release -rdc
Description:	Ubuntu 16.04.4 LTS
Release:	16.04
Codename:	xenial

$ uname -a
Linux macbuntu 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar 14 17:48:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
@mbiarnes
Copy link
Contributor

Please re-try with jboss/kie-server-showcase is 7.7.0.Final-4 (latest) and let us know if it happens again.
If so, please send a mail to drools-setup or
drools-usage as there are more people reading.

@NullVoxPopuli
Copy link
Author

well, I don't get any errors.
though, I've since learned that jbpm and kie-server need to share an .m2 directory for jbpm to deploy processes to.

version: '3.4'
services:
  jbpm:
    build:
      context: ./source/workflow-engine/jbpm-workbench
      dockerfile: Dockerfile
    ports:
      - '8080:8080'
      - '8081:8081'
      - '9990:9990'
    networks:
      - backoffice
    volumes:
      - type: volume
        source: jbpm-m2
        target: /opt/jboss/.m2
      - type: bind
        source: ./deployment/local/config/niogit
        target: /opt/jboss/wildfly/bin/.niogit

  kie-server:
    build:
      context: ./source/workflow-engine/kie-server
      dockerfile: Dockerfile
    ports:
      - '8180:8080'
    links:
      - jbpm:kie_wb
    networks:
      - backoffice
    volumes:
      - type: volume
        source: jbpm-m2
        target: /opt/jboss/.m2

volumes:
  jbpm-m2:

networks:
  internet:
  backoffice:

However, I still can't get the containers endpoint on the kie-server to show anything other than an empty list.

@NullVoxPopuli
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants