Async Camel Example In Documentation doesn't seem to work

Doing a POC with Flowable and Camel. The documentation indicates that you can invoke asynchronously a Camel route from Flowable and have that same Camel Route trigger a Receive Task in the Process that invoked the Camel Route asynchronously.

From Docs:

<serviceTask id="serviceAsyncPing" flowable:type="camel" flowable:async="true"/>

<receiveTask id="receiveAsyncPing" name="Wait State" />

from("flowable:asyncPingProcess:serviceAsyncPing").to("flowable:asyncPingProcess:receiveAsyncPing");

The client, when invoking the process that are configured with these tasks, does come back async but Camel fails when it tries to invoke the “asyncPingProcess” and it appears to be because the serviceAsyncPing never finished. It feels like a catch 22 issue where the process is trying invoke the receive task but the service task never finished. I believe I am reading the docs correctly but the behavior doesn’t work as expected.

The unit test with the similar example has a seda endpoint in between, see here : https://github.com/flowable/flowable-engine/blob/4b29300983c50eb5c53f2bd91c80cb7f4ec35978/modules/flowable-camel/src/test/java/org/flowable/camel/AsyncPingTest.java#L46

Can you give that a try?

The documentation seems to be wrong (I planned to create a pull request, but never got around to actually do it). From my expirence you have to use a async endpoint (e.g. seda) in the route to make it work.

I am able to get it to work using seda. As an example, I configured the following camel routes:

from(“flowable:AsyncExample:asyncCamel”)
.to(“log:ExportSalesforceObject_asyncCamel?showAll=true”)
.to(“seda:ExportSalesforceObject”);

from(“seda:AsyncExample?concurrentConsumers=10”)
.to(“log:ExportSalesforceObject_waitAsyncCamel?showAll=true”)
.to(“flowable:ExportSalesforceObject:waitAsyncCamel”);

If this is the way it is suppose to work, the documentation should be updated to reflect the need to include seda.