flowable / flowable-engine

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.
https://www.flowable.org
Apache License 2.0
7.77k stars 2.59k forks source link

Flowable Task does not support Camel task #1322

Open cdeneux opened 5 years ago

cdeneux commented 5 years ago

Hi all,

Using Flowable Modeler, I created an application containing a process definition containing Camel tasks. The process definition was deployed into the BPMN engine embbeded in Flowable Tasks. I get the following error. I think that it's due to the missing module flowable-camel in Flowable Task:

org.flowable.common.engine.api.FlowableException: Could not find org.flowable.camel.CamelBehavior: 
    at org.flowable.engine.impl.bpmn.parser.factory.DefaultActivityBehaviorFactory.createCamelActivityBehavior(DefaultActivityBehaviorFactory.java:287) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.factory.DefaultActivityBehaviorFactory.createCamelActivityBehavior(DefaultActivityBehaviorFactory.java:252) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.handler.ServiceTaskParseHandler.executeParse(ServiceTaskParseHandler.java:49) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.handler.ServiceTaskParseHandler.executeParse(ServiceTaskParseHandler.java:27) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler.parse(AbstractBpmnParseHandler.java:57) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.handler.AbstractActivityBpmnParseHandler.parse(AbstractActivityBpmnParseHandler.java:33) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.BpmnParseHandlers.parseElement(BpmnParseHandlers.java:79) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.BpmnParse.processFlowElements(BpmnParse.java:311) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.handler.ProcessParseHandler.transformProcess(ProcessParseHandler.java:76) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.handler.ProcessParseHandler.executeParse(ProcessParseHandler.java:49) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.handler.ProcessParseHandler.executeParse(ProcessParseHandler.java:33) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler.parse(AbstractBpmnParseHandler.java:57) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.BpmnParseHandlers.parseElement(BpmnParseHandlers.java:79) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.BpmnParse.applyParseHandlers(BpmnParse.java:282) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:195) ~[flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    at org.flowable.engine.impl.bpmn.deployer.ParsedDeploymentBuilder.createBpmnParseFromResource(ParsedDeploymentBuilder.java:97) [flowable-engine-6.4.0-SNAPSHOT.jar:6.4.0-SNAPSHOT]
    ...

So, please, add support of Camel task in Flowable Task.

Regards, Christophe

tijsrademakers commented 5 years ago

Hi Christophe,

That's correct, the Flowable Task app doesn't include the flowable-camel module by default. But you can just add the flowable-camel module to the classpath and then it should work without issues.

cdeneux commented 5 years ago

Hi @tijsrademakers,

It is not sufficient to add flowable-camel because the Apache Camel engine is missing. It should be added also. So, it will be user-friendly to be able to execute Camel tasks through Flowable Task without to have to add these libraries, even more if Flowable Task is running as a Docker container :whale2:

More details on my experimentation on executing Camel tasks through Flowable Task running into a simple Tomcat instance are here: https://forum.flowable.org/t/executing-camel-task-through-flowable-task/2663

Thanks for your help. Regards, Christophe

tijsrademakers commented 5 years ago

Hi Christophe,

You are right with your comment that the Apache Camel engine is missing as well then. But you will also need a Camel route defined in XML or Java. So you need to make that available for the Flowable Task application as well. How would you do that with the Docker container? Just asking for some more context, to see what should be changed.

Thanks

cdeneux commented 5 years ago

Hi @tijsrademakers ,

You are right with the Camel route that must be added to Flowable Task. I mentioned Flowable Task running as Docker container only to emphasize to add flowable-camel and Camel engine to Flowable Task, but forgetting the Camel route :wink:

I created this issue because I'm not able to run a process with a Camel Task with Flowable Task running in a Tomcat instance, as described here: https://forum.flowable.org/t/executing-camel-task-through-flowable-task/2663. With a dedicated SpringBoot application, my process works fine with my Camel route. So, I imagine that something is missing in Flowable Task ?

Regards, Christophe

wberges commented 5 years ago

Hi, I have the same problem using a simple process with 1 Camel task in Flowable 6.4.0. I have installed the 4 Flowable wars in my Tomcat, everything works fine with script tasks. But when I try to use a Camel task, no way to make it work (even after adding flowable-camel jar in flowable-task/WEB-INF/lib, and even after having also tried to add the different camel jars at the same place). I agree with Christophe that, considering that the Camel task is part of the modeler tasks, it should work by default, without having to add any Camel module (except the routes which are project dependent). I can understand with groovy, which is optional as script language, but Camel is a task type, so not an option :) Best Regards And thanks for your help William

wberges commented 5 years ago

Hello, No update on this topic? Nobody tried to use Camel tasks in a standalone Tomcat for example (not using bootstrap)? Thanks :)

tijsrademakers commented 5 years ago

Hi, This is something that we want to get fixed, so it's on the todo list. But no work has been done on it yet. Best regards, Tijs

PinoEire commented 1 year ago

Hi there. I’m looking at Flowable reliability and support to evaluate its implementation in a critical system.

This, in particular, has a comment made in 2018 acknowledging that it should be fixed, but there is no further activity on it.

I’m worried about finding bugs like this one that have no answers and is still open after a long time. Is there a rationale behind this?