Executing Camel task through Flowable Task


#1

Hi all,

I try to run a process definition containing Camel task into the application Flowable Task. As mentioned in issue #1322, Flowable Task does not support Camel tasks.

Because of version compatibility between SpringBoot, Flowable and Camel, it is not possible to add this support in Flowable Task 6.3.1. So, I’m trying to add it to Flowable Task 6.4.0-SNAPSHOT. I have added the following dependencies to the project flowable-ui-task-app, built it and redeployed it in my Tomcat instance:

        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring-boot-starter</artifactId>
            <version>2.22.0</version>
        </dependency>
        <dependency>
            <groupId>org.flowable</groupId>
            <artifactId>flowable-camel</artifactId>
        </dependency>

My process definition containing Camel task is the one of the Flowable BPMN user guide. I deployed it successfully.

When I started a process instance, I have got an error about the Camel endpoint flowable://SimpleCamelCallProcess:simpleCall not defined. Normal because the Camel route was not deployed into the BPMN engine.

So I have packaged the Camel route (as a Java class) into a JAR file and put it in flowable-task/WEB-INF/lib directory in my Flowable Tomcat. And I restarted my Tomcat instance.

When I try to start a new process instance, I get the same error: Camel route not found.

Do you know how Camel route must be deployed ?

Thanks for your help,
Regards,
Christophe


#2

When starting Flowable UI Task, I get following log traces:

2018-10-12 12:23:45.476  INFO 31454 --- [io-8080-exec-19] o.a.c.s.b.RoutesCollector                : Loading additional Camel XML routes from: classpath:camel/*.xml
2018-10-12 12:23:45.476  INFO 31454 --- [io-8080-exec-19] o.a.c.s.b.RoutesCollector                : Loading additional Camel XML rests from: classpath:camel-rest/*.xml
2018-10-12 12:23:45.479  INFO 31454 --- [io-8080-exec-19] o.a.c.s.SpringCamelContext               : Apache Camel 2.22.0 (CamelContext: camel-1) is starting
2018-10-12 12:23:45.482  INFO 31454 --- [io-8080-exec-19] o.a.c.m.ManagedManagementStrategy        : JMX is enabled
2018-10-12 12:23:45.664  INFO 31454 --- [io-8080-exec-19] o.a.c.s.SpringCamelContext               : StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
2018-10-12 12:23:45.668  INFO 31454 --- [io-8080-exec-19] o.a.c.s.SpringCamelContext               : Total 0 routes, of which 0 are started
2018-10-12 12:23:45.669  INFO 31454 --- [io-8080-exec-19] o.a.c.s.SpringCamelContext               : Apache Camel 2.22.0 (CamelContext: camel-1) started in 0.190 seconds
2018-10-12 12:23:45.711  INFO 31454 --- [io-8080-exec-19] o.f.u.t.c.Bootstrapper                   : Migrated 0 app deployments
2018-10-12 12:23:45.719  INFO 31454 --- [io-8080-exec-19] o.f.u.t.a.FlowableTaskApplication        : Started FlowableTaskApplication in 16.158 seconds (JVM running for 981.413)

where we can see no route is loaded even if its JAR file was added in WEB-INF/lib

Regards,
Christophe


#3

I haven’t tried it myself yet, but an alternative would be to have the camel route definted in Java and put it on a package that is known (e.g. org.flowable.ui.task.conf). Or is that the way you’ve tried it?


#4

Thanks @joram for your proposal, but same problem: the route is not loaded.